{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) #GIOExtension is an opaque data structure and can only be accessed using the following functions. -} module GI.Gio.Structs.IOExtension ( -- * Exported types IOExtension(..) , noIOExtension , -- * Methods -- ** iOExtensionGetName iOExtensionGetName , -- ** iOExtensionGetPriority iOExtensionGetPriority , -- ** iOExtensionGetType iOExtensionGetType , ) 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.Gio.Types import GI.Gio.Callbacks newtype IOExtension = IOExtension (ForeignPtr IOExtension) noIOExtension :: Maybe IOExtension noIOExtension = Nothing -- method IOExtension::get_name -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_io_extension_get_name" g_io_extension_get_name :: Ptr IOExtension -> -- _obj : TInterface "Gio" "IOExtension" IO CString iOExtensionGetName :: (MonadIO m) => IOExtension -> -- _obj m T.Text iOExtensionGetName _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- g_io_extension_get_name _obj' checkUnexpectedReturnNULL "g_io_extension_get_name" result result' <- cstringToText result touchManagedPtr _obj return result' -- method IOExtension::get_priority -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "g_io_extension_get_priority" g_io_extension_get_priority :: Ptr IOExtension -> -- _obj : TInterface "Gio" "IOExtension" IO Int32 iOExtensionGetPriority :: (MonadIO m) => IOExtension -> -- _obj m Int32 iOExtensionGetPriority _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- g_io_extension_get_priority _obj' touchManagedPtr _obj return result -- method IOExtension::get_type -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "IOExtension", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TGType -- throws : False -- Skip return : False foreign import ccall "g_io_extension_get_type" g_io_extension_get_type :: Ptr IOExtension -> -- _obj : TInterface "Gio" "IOExtension" IO CGType iOExtensionGetType :: (MonadIO m) => IOExtension -> -- _obj m GType iOExtensionGetType _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- g_io_extension_get_type _obj' let result' = GType result touchManagedPtr _obj return result'