gi-vte-0.0.42.13: GI/Vte/Functions.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Vte.Functions
(
-- * Methods
-- ** getFeatures
getFeatures ,
-- ** getMajorVersion
getMajorVersion ,
-- ** getMicroVersion
getMicroVersion ,
-- ** getMinorVersion
getMinorVersion ,
-- ** getUserShell
getUserShell ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Vte.Types
import GI.Vte.Callbacks
-- function vte_get_user_shell
-- Args : []
-- Lengths : []
-- returnType : TBasicType TFileName
-- throws : False
-- Skip return : False
foreign import ccall "vte_get_user_shell" vte_get_user_shell ::
IO CString
getUserShell ::
(MonadIO m) =>
m [Char] -- result
getUserShell = liftIO $ do
result <- vte_get_user_shell
checkUnexpectedReturnNULL "vte_get_user_shell" result
result' <- cstringToString result
freeMem result
return result'
-- function vte_get_minor_version
-- Args : []
-- Lengths : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "vte_get_minor_version" vte_get_minor_version ::
IO Word32
getMinorVersion ::
(MonadIO m) =>
m Word32 -- result
getMinorVersion = liftIO $ do
result <- vte_get_minor_version
return result
-- function vte_get_micro_version
-- Args : []
-- Lengths : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "vte_get_micro_version" vte_get_micro_version ::
IO Word32
getMicroVersion ::
(MonadIO m) =>
m Word32 -- result
getMicroVersion = liftIO $ do
result <- vte_get_micro_version
return result
-- function vte_get_major_version
-- Args : []
-- Lengths : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False
foreign import ccall "vte_get_major_version" vte_get_major_version ::
IO Word32
getMajorVersion ::
(MonadIO m) =>
m Word32 -- result
getMajorVersion = liftIO $ do
result <- vte_get_major_version
return result
-- function vte_get_features
-- Args : []
-- Lengths : []
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "vte_get_features" vte_get_features ::
IO CString
getFeatures ::
(MonadIO m) =>
m T.Text -- result
getFeatures = liftIO $ do
result <- vte_get_features
checkUnexpectedReturnNULL "vte_get_features" result
result' <- cstringToText result
return result'