{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) #GStaticResource is an opaque data structure and can only be accessed using the following functions. -} module GI.Gio.Structs.StaticResource ( -- * Exported types StaticResource(..) , noStaticResource , -- * Methods -- ** staticResourceFini staticResourceFini , -- ** staticResourceGetResource staticResourceGetResource , -- ** staticResourceInit staticResourceInit , ) 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 StaticResource = StaticResource (ForeignPtr StaticResource) noStaticResource :: Maybe StaticResource noStaticResource = Nothing -- method StaticResource::fini -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_static_resource_fini" g_static_resource_fini :: Ptr StaticResource -> -- _obj : TInterface "Gio" "StaticResource" IO () staticResourceFini :: (MonadIO m) => StaticResource -> -- _obj m () staticResourceFini _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj g_static_resource_fini _obj' touchManagedPtr _obj return () -- method StaticResource::get_resource -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "Resource" -- throws : False -- Skip return : False foreign import ccall "g_static_resource_get_resource" g_static_resource_get_resource :: Ptr StaticResource -> -- _obj : TInterface "Gio" "StaticResource" IO (Ptr Resource) staticResourceGetResource :: (MonadIO m) => StaticResource -> -- _obj m Resource staticResourceGetResource _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- g_static_resource_get_resource _obj' checkUnexpectedReturnNULL "g_static_resource_get_resource" result result' <- (newBoxed Resource) result touchManagedPtr _obj return result' -- method StaticResource::init -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "StaticResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_static_resource_init" g_static_resource_init :: Ptr StaticResource -> -- _obj : TInterface "Gio" "StaticResource" IO () staticResourceInit :: (MonadIO m) => StaticResource -> -- _obj m () staticResourceInit _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj g_static_resource_init _obj' touchManagedPtr _obj return ()