{- |
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.GObject.Callbacks
    ( 

 -- * Signals
-- ** BaseFinalizeFunc #signal:BaseFinalizeFunc#
    BaseFinalizeFunc                        ,
    C_BaseFinalizeFunc                      ,
    dynamic_BaseFinalizeFunc                ,
    genClosure_BaseFinalizeFunc             ,
    mk_BaseFinalizeFunc                     ,
    noBaseFinalizeFunc                      ,
    wrap_BaseFinalizeFunc                   ,


-- ** BaseInitFunc #signal:BaseInitFunc#
    BaseInitFunc                            ,
    C_BaseInitFunc                          ,
    dynamic_BaseInitFunc                    ,
    genClosure_BaseInitFunc                 ,
    mk_BaseInitFunc                         ,
    noBaseInitFunc                          ,
    wrap_BaseInitFunc                       ,


-- ** BindingTransformFunc #signal:BindingTransformFunc#
    BindingTransformFunc                    ,
    BindingTransformFunc_WithClosures       ,
    C_BindingTransformFunc                  ,
    drop_closures_BindingTransformFunc      ,
    dynamic_BindingTransformFunc            ,
    genClosure_BindingTransformFunc         ,
    mk_BindingTransformFunc                 ,
    noBindingTransformFunc                  ,
    noBindingTransformFunc_WithClosures     ,
    wrap_BindingTransformFunc               ,


-- ** BoxedCopyFunc #signal:BoxedCopyFunc#
    BoxedCopyFunc                           ,
    C_BoxedCopyFunc                         ,
    dynamic_BoxedCopyFunc                   ,
    genClosure_BoxedCopyFunc                ,
    mk_BoxedCopyFunc                        ,
    noBoxedCopyFunc                         ,
    wrap_BoxedCopyFunc                      ,


-- ** BoxedFreeFunc #signal:BoxedFreeFunc#
    BoxedFreeFunc                           ,
    C_BoxedFreeFunc                         ,
    dynamic_BoxedFreeFunc                   ,
    genClosure_BoxedFreeFunc                ,
    mk_BoxedFreeFunc                        ,
    noBoxedFreeFunc                         ,
    wrap_BoxedFreeFunc                      ,


-- ** Callback #signal:Callback#
    C_Callback                              ,
    Callback                                ,
    dynamic_Callback                        ,
    genClosure_Callback                     ,
    mk_Callback                             ,
    noCallback                              ,
    wrap_Callback                           ,


-- ** ClassFinalizeFunc #signal:ClassFinalizeFunc#
    C_ClassFinalizeFunc                     ,
    ClassFinalizeFunc                       ,
    dynamic_ClassFinalizeFunc               ,
    genClosure_ClassFinalizeFunc            ,
    mk_ClassFinalizeFunc                    ,
    noClassFinalizeFunc                     ,
    wrap_ClassFinalizeFunc                  ,


-- ** ClassInitFunc #signal:ClassInitFunc#
    C_ClassInitFunc                         ,
    ClassInitFunc                           ,
    dynamic_ClassInitFunc                   ,
    genClosure_ClassInitFunc                ,
    mk_ClassInitFunc                        ,
    noClassInitFunc                         ,
    wrap_ClassInitFunc                      ,


-- ** ClosureMarshalFieldCallback #signal:ClosureMarshalFieldCallback#
    C_ClosureMarshalFieldCallback           ,
    ClosureMarshalFieldCallback             ,
    dynamic_ClosureMarshalFieldCallback     ,
    genClosure_ClosureMarshalFieldCallback  ,
    mk_ClosureMarshalFieldCallback          ,
    noClosureMarshalFieldCallback           ,
    wrap_ClosureMarshalFieldCallback        ,


-- ** ClosureNotify #signal:ClosureNotify#
    C_ClosureNotify                         ,
    ClosureNotify                           ,
    dynamic_ClosureNotify                   ,
    genClosure_ClosureNotify                ,
    mk_ClosureNotify                        ,
    noClosureNotify                         ,
    wrap_ClosureNotify                      ,


-- ** InstanceInitFunc #signal:InstanceInitFunc#
    C_InstanceInitFunc                      ,
    InstanceInitFunc                        ,
    dynamic_InstanceInitFunc                ,
    genClosure_InstanceInitFunc             ,
    mk_InstanceInitFunc                     ,
    noInstanceInitFunc                      ,
    wrap_InstanceInitFunc                   ,


-- ** InterfaceFinalizeFunc #signal:InterfaceFinalizeFunc#
    C_InterfaceFinalizeFunc                 ,
    InterfaceFinalizeFunc                   ,
    dynamic_InterfaceFinalizeFunc           ,
    genClosure_InterfaceFinalizeFunc        ,
    mk_InterfaceFinalizeFunc                ,
    noInterfaceFinalizeFunc                 ,
    wrap_InterfaceFinalizeFunc              ,


-- ** InterfaceInitFunc #signal:InterfaceInitFunc#
    C_InterfaceInitFunc                     ,
    InterfaceInitFunc                       ,
    dynamic_InterfaceInitFunc               ,
    genClosure_InterfaceInitFunc            ,
    mk_InterfaceInitFunc                    ,
    noInterfaceInitFunc                     ,
    wrap_InterfaceInitFunc                  ,


-- ** ObjectFinalizeFunc #signal:ObjectFinalizeFunc#
    C_ObjectFinalizeFunc                    ,
    ObjectFinalizeFunc                      ,
    dynamic_ObjectFinalizeFunc              ,
    genClosure_ObjectFinalizeFunc           ,
    mk_ObjectFinalizeFunc                   ,
    noObjectFinalizeFunc                    ,
    wrap_ObjectFinalizeFunc                 ,


-- ** ObjectGetPropertyFunc #signal:ObjectGetPropertyFunc#
    C_ObjectGetPropertyFunc                 ,
    ObjectGetPropertyFunc                   ,
    dynamic_ObjectGetPropertyFunc           ,
    genClosure_ObjectGetPropertyFunc        ,
    mk_ObjectGetPropertyFunc                ,
    noObjectGetPropertyFunc                 ,
    wrap_ObjectGetPropertyFunc              ,


-- ** ObjectSetPropertyFunc #signal:ObjectSetPropertyFunc#
    C_ObjectSetPropertyFunc                 ,
    ObjectSetPropertyFunc                   ,
    dynamic_ObjectSetPropertyFunc           ,
    genClosure_ObjectSetPropertyFunc        ,
    mk_ObjectSetPropertyFunc                ,
    noObjectSetPropertyFunc                 ,
    wrap_ObjectSetPropertyFunc              ,


-- ** ParamSpecTypeInfoFinalizeFieldCallback #signal:ParamSpecTypeInfoFinalizeFieldCallback#
    C_ParamSpecTypeInfoFinalizeFieldCallback,
    ParamSpecTypeInfoFinalizeFieldCallback  ,
    dynamic_ParamSpecTypeInfoFinalizeFieldCallback,
    genClosure_ParamSpecTypeInfoFinalizeFieldCallback,
    mk_ParamSpecTypeInfoFinalizeFieldCallback,
    noParamSpecTypeInfoFinalizeFieldCallback,
    wrap_ParamSpecTypeInfoFinalizeFieldCallback,


-- ** ParamSpecTypeInfoInstanceInitFieldCallback #signal:ParamSpecTypeInfoInstanceInitFieldCallback#
    C_ParamSpecTypeInfoInstanceInitFieldCallback,
    ParamSpecTypeInfoInstanceInitFieldCallback,
    dynamic_ParamSpecTypeInfoInstanceInitFieldCallback,
    genClosure_ParamSpecTypeInfoInstanceInitFieldCallback,
    mk_ParamSpecTypeInfoInstanceInitFieldCallback,
    noParamSpecTypeInfoInstanceInitFieldCallback,
    wrap_ParamSpecTypeInfoInstanceInitFieldCallback,


-- ** ParamSpecTypeInfoValueSetDefaultFieldCallback #signal:ParamSpecTypeInfoValueSetDefaultFieldCallback#
    C_ParamSpecTypeInfoValueSetDefaultFieldCallback,
    ParamSpecTypeInfoValueSetDefaultFieldCallback,
    dynamic_ParamSpecTypeInfoValueSetDefaultFieldCallback,
    genClosure_ParamSpecTypeInfoValueSetDefaultFieldCallback,
    mk_ParamSpecTypeInfoValueSetDefaultFieldCallback,
    noParamSpecTypeInfoValueSetDefaultFieldCallback,
    wrap_ParamSpecTypeInfoValueSetDefaultFieldCallback,


-- ** ParamSpecTypeInfoValueValidateFieldCallback #signal:ParamSpecTypeInfoValueValidateFieldCallback#
    C_ParamSpecTypeInfoValueValidateFieldCallback,
    ParamSpecTypeInfoValueValidateFieldCallback,
    dynamic_ParamSpecTypeInfoValueValidateFieldCallback,
    genClosure_ParamSpecTypeInfoValueValidateFieldCallback,
    mk_ParamSpecTypeInfoValueValidateFieldCallback,
    noParamSpecTypeInfoValueValidateFieldCallback,
    wrap_ParamSpecTypeInfoValueValidateFieldCallback,


-- ** ParamSpecTypeInfoValuesCmpFieldCallback #signal:ParamSpecTypeInfoValuesCmpFieldCallback#
    C_ParamSpecTypeInfoValuesCmpFieldCallback,
    ParamSpecTypeInfoValuesCmpFieldCallback ,
    dynamic_ParamSpecTypeInfoValuesCmpFieldCallback,
    genClosure_ParamSpecTypeInfoValuesCmpFieldCallback,
    mk_ParamSpecTypeInfoValuesCmpFieldCallback,
    noParamSpecTypeInfoValuesCmpFieldCallback,
    wrap_ParamSpecTypeInfoValuesCmpFieldCallback,


-- ** SignalAccumulator #signal:SignalAccumulator#
    C_SignalAccumulator                     ,
    SignalAccumulator                       ,
    dynamic_SignalAccumulator               ,
    genClosure_SignalAccumulator            ,
    mk_SignalAccumulator                    ,
    noSignalAccumulator                     ,
    wrap_SignalAccumulator                  ,


-- ** SignalEmissionHook #signal:SignalEmissionHook#
    C_SignalEmissionHook                    ,
    SignalEmissionHook                      ,
    dynamic_SignalEmissionHook              ,
    genClosure_SignalEmissionHook           ,
    mk_SignalEmissionHook                   ,
    noSignalEmissionHook                    ,
    wrap_SignalEmissionHook                 ,


-- ** ToggleNotify #signal:ToggleNotify#
    C_ToggleNotify                          ,
    ToggleNotify                            ,
    dynamic_ToggleNotify                    ,
    genClosure_ToggleNotify                 ,
    mk_ToggleNotify                         ,
    noToggleNotify                          ,
    wrap_ToggleNotify                       ,


-- ** TypeClassCacheFunc #signal:TypeClassCacheFunc#
    C_TypeClassCacheFunc                    ,
    TypeClassCacheFunc                      ,
    dynamic_TypeClassCacheFunc              ,
    genClosure_TypeClassCacheFunc           ,
    mk_TypeClassCacheFunc                   ,
    noTypeClassCacheFunc                    ,
    wrap_TypeClassCacheFunc                 ,


-- ** TypeInterfaceCheckFunc #signal:TypeInterfaceCheckFunc#
    C_TypeInterfaceCheckFunc                ,
    TypeInterfaceCheckFunc                  ,
    dynamic_TypeInterfaceCheckFunc          ,
    genClosure_TypeInterfaceCheckFunc       ,
    mk_TypeInterfaceCheckFunc               ,
    noTypeInterfaceCheckFunc                ,
    wrap_TypeInterfaceCheckFunc             ,


-- ** TypePluginCompleteInterfaceInfo #signal:TypePluginCompleteInterfaceInfo#
    C_TypePluginCompleteInterfaceInfo       ,
    TypePluginCompleteInterfaceInfo         ,
    dynamic_TypePluginCompleteInterfaceInfo ,
    genClosure_TypePluginCompleteInterfaceInfo,
    mk_TypePluginCompleteInterfaceInfo      ,
    noTypePluginCompleteInterfaceInfo       ,
    wrap_TypePluginCompleteInterfaceInfo    ,


-- ** TypePluginCompleteTypeInfo #signal:TypePluginCompleteTypeInfo#
    C_TypePluginCompleteTypeInfo            ,
    TypePluginCompleteTypeInfo              ,
    dynamic_TypePluginCompleteTypeInfo      ,
    genClosure_TypePluginCompleteTypeInfo   ,
    mk_TypePluginCompleteTypeInfo           ,
    noTypePluginCompleteTypeInfo            ,
    wrap_TypePluginCompleteTypeInfo         ,


-- ** TypePluginUnuse #signal:TypePluginUnuse#
    C_TypePluginUnuse                       ,
    TypePluginUnuse                         ,
    dynamic_TypePluginUnuse                 ,
    genClosure_TypePluginUnuse              ,
    mk_TypePluginUnuse                      ,
    noTypePluginUnuse                       ,
    wrap_TypePluginUnuse                    ,


-- ** TypePluginUse #signal:TypePluginUse#
    C_TypePluginUse                         ,
    TypePluginUse                           ,
    dynamic_TypePluginUse                   ,
    genClosure_TypePluginUse                ,
    mk_TypePluginUse                        ,
    noTypePluginUse                         ,
    wrap_TypePluginUse                      ,


-- ** TypeValueTableCollectValueFieldCallback #signal:TypeValueTableCollectValueFieldCallback#
    C_TypeValueTableCollectValueFieldCallback,
    TypeValueTableCollectValueFieldCallback ,
    dynamic_TypeValueTableCollectValueFieldCallback,
    genClosure_TypeValueTableCollectValueFieldCallback,
    mk_TypeValueTableCollectValueFieldCallback,
    noTypeValueTableCollectValueFieldCallback,
    wrap_TypeValueTableCollectValueFieldCallback,


-- ** TypeValueTableLcopyValueFieldCallback #signal:TypeValueTableLcopyValueFieldCallback#
    C_TypeValueTableLcopyValueFieldCallback ,
    TypeValueTableLcopyValueFieldCallback   ,
    dynamic_TypeValueTableLcopyValueFieldCallback,
    genClosure_TypeValueTableLcopyValueFieldCallback,
    mk_TypeValueTableLcopyValueFieldCallback,
    noTypeValueTableLcopyValueFieldCallback ,
    wrap_TypeValueTableLcopyValueFieldCallback,


-- ** TypeValueTableValueCopyFieldCallback #signal:TypeValueTableValueCopyFieldCallback#
    C_TypeValueTableValueCopyFieldCallback  ,
    TypeValueTableValueCopyFieldCallback    ,
    dynamic_TypeValueTableValueCopyFieldCallback,
    genClosure_TypeValueTableValueCopyFieldCallback,
    mk_TypeValueTableValueCopyFieldCallback ,
    noTypeValueTableValueCopyFieldCallback  ,
    wrap_TypeValueTableValueCopyFieldCallback,


-- ** TypeValueTableValueFreeFieldCallback #signal:TypeValueTableValueFreeFieldCallback#
    C_TypeValueTableValueFreeFieldCallback  ,
    TypeValueTableValueFreeFieldCallback    ,
    dynamic_TypeValueTableValueFreeFieldCallback,
    genClosure_TypeValueTableValueFreeFieldCallback,
    mk_TypeValueTableValueFreeFieldCallback ,
    noTypeValueTableValueFreeFieldCallback  ,
    wrap_TypeValueTableValueFreeFieldCallback,


-- ** TypeValueTableValueInitFieldCallback #signal:TypeValueTableValueInitFieldCallback#
    C_TypeValueTableValueInitFieldCallback  ,
    TypeValueTableValueInitFieldCallback    ,
    dynamic_TypeValueTableValueInitFieldCallback,
    genClosure_TypeValueTableValueInitFieldCallback,
    mk_TypeValueTableValueInitFieldCallback ,
    noTypeValueTableValueInitFieldCallback  ,
    wrap_TypeValueTableValueInitFieldCallback,


-- ** TypeValueTableValuePeekPointerFieldCallback #signal:TypeValueTableValuePeekPointerFieldCallback#
    C_TypeValueTableValuePeekPointerFieldCallback,
    TypeValueTableValuePeekPointerFieldCallback,
    dynamic_TypeValueTableValuePeekPointerFieldCallback,
    genClosure_TypeValueTableValuePeekPointerFieldCallback,
    mk_TypeValueTableValuePeekPointerFieldCallback,
    noTypeValueTableValuePeekPointerFieldCallback,
    wrap_TypeValueTableValuePeekPointerFieldCallback,


-- ** ValueTransform #signal:ValueTransform#
    C_ValueTransform                        ,
    ValueTransform                          ,
    dynamic_ValueTransform                  ,
    genClosure_ValueTransform               ,
    mk_ValueTransform                       ,
    noValueTransform                        ,
    wrap_ValueTransform                     ,


-- ** WeakNotify #signal:WeakNotify#
    C_WeakNotify                            ,
    WeakNotify                              ,
    dynamic_WeakNotify                      ,
    genClosure_WeakNotify                   ,
    mk_WeakNotify                           ,
    noWeakNotify                            ,
    wrap_WeakNotify                         ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import {-# SOURCE #-} qualified GI.GObject.Interfaces.TypePlugin as GObject.TypePlugin
import {-# SOURCE #-} qualified GI.GObject.Objects.Binding as GObject.Binding
import {-# SOURCE #-} qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GObject.Structs.InterfaceInfo as GObject.InterfaceInfo
import {-# SOURCE #-} qualified GI.GObject.Structs.SignalInvocationHint as GObject.SignalInvocationHint
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeClass as GObject.TypeClass
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeInfo as GObject.TypeInfo
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeInstance as GObject.TypeInstance
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeInterface as GObject.TypeInterface
import {-# SOURCE #-} qualified GI.GObject.Structs.TypeValueTable as GObject.TypeValueTable
import {-# SOURCE #-} qualified GI.GObject.Unions.TypeCValue as GObject.TypeCValue

-- callback WeakNotify
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data that was provided when the weak reference was established", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "where_the_object_was", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the object being finalized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A #GWeakNotify function can be added to an object as a callback that gets\ntriggered when the object is finalized. Since the object is already being\nfinalized when the #GWeakNotify is called, there's not much you could do\nwith the object, apart from e.g. using its address as hash-index or the like.", sinceVersion = Nothing}}
type C_WeakNotify =
    Ptr () ->
    Ptr GObject.Object.Object ->
    IO ()

-- Args : [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data that was provided when the weak reference was established", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "where_the_object_was", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the object being finalized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WeakNotify :: FunPtr C_WeakNotify -> C_WeakNotify

dynamic_WeakNotify ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_WeakNotify
    -> Ptr ()
    {- ^ /@data@/: data that was provided when the weak reference was established -}
    -> a
    {- ^ /@whereTheObjectWas@/: the object being finalized -}
    -> m ()
dynamic_WeakNotify __funPtr data_ whereTheObjectWas = liftIO $ do
    whereTheObjectWas' <- unsafeManagedPtrCastPtr whereTheObjectWas
    (__dynamic_C_WeakNotify __funPtr) data_ whereTheObjectWas'
    touchManagedPtr whereTheObjectWas
    return ()

foreign import ccall "wrapper"
    mk_WeakNotify :: C_WeakNotify -> IO (FunPtr C_WeakNotify)

type WeakNotify =
    Ptr () ->
    GObject.Object.Object ->
    IO ()

noWeakNotify :: Maybe WeakNotify
noWeakNotify = Nothing

genClosure_WeakNotify :: WeakNotify -> IO Closure
genClosure_WeakNotify cb = do
    let cb' = wrap_WeakNotify Nothing cb
    mk_WeakNotify cb' >>= newCClosure


wrap_WeakNotify ::
    Maybe (Ptr (FunPtr C_WeakNotify)) ->
    WeakNotify ->
    Ptr () ->
    Ptr GObject.Object.Object ->
    IO ()
wrap_WeakNotify funptrptr _cb data_ whereTheObjectWas = do
    whereTheObjectWas' <- (newObject GObject.Object.Object) whereTheObjectWas
    _cb  data_ whereTheObjectWas'
    maybeReleaseFunPtr funptrptr


-- callback ValueTransform
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "src_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Source value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Target value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of value transformation functions which can be registered with\ng_value_register_transform_func().", sinceVersion = Nothing}}
type C_ValueTransform =
    Ptr GValue ->
    Ptr GValue ->
    IO ()

-- Args : [Arg {argCName = "src_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Source value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Target value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ValueTransform :: FunPtr C_ValueTransform -> C_ValueTransform

dynamic_ValueTransform ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ValueTransform
    -> GValue
    {- ^ /@srcValue@/: Source value. -}
    -> GValue
    {- ^ /@destValue@/: Target value. -}
    -> m ()
dynamic_ValueTransform __funPtr srcValue destValue = liftIO $ do
    srcValue' <- unsafeManagedPtrGetPtr srcValue
    destValue' <- unsafeManagedPtrGetPtr destValue
    (__dynamic_C_ValueTransform __funPtr) srcValue' destValue'
    touchManagedPtr srcValue
    touchManagedPtr destValue
    return ()

foreign import ccall "wrapper"
    mk_ValueTransform :: C_ValueTransform -> IO (FunPtr C_ValueTransform)

type ValueTransform =
    GValue ->
    GValue ->
    IO ()

noValueTransform :: Maybe ValueTransform
noValueTransform = Nothing

genClosure_ValueTransform :: ValueTransform -> IO Closure
genClosure_ValueTransform cb = do
    let cb' = wrap_ValueTransform Nothing cb
    mk_ValueTransform cb' >>= newCClosure


wrap_ValueTransform ::
    Maybe (Ptr (FunPtr C_ValueTransform)) ->
    ValueTransform ->
    Ptr GValue ->
    Ptr GValue ->
    IO ()
wrap_ValueTransform funptrptr _cb srcValue destValue = do
    B.ManagedPtr.withTransient GValue srcValue $ \srcValue' -> do
        B.ManagedPtr.withTransient GValue destValue $ \destValue' -> do
            _cb  srcValue' destValue'
            maybeReleaseFunPtr funptrptr


-- callback TypeValueTableValuePeekPointerFieldCallback
--          -> Callable {returnType = Just (TBasicType TPtr), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableValuePeekPointerFieldCallback =
    Ptr GValue ->
    IO (Ptr ())

-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableValuePeekPointerFieldCallback :: FunPtr C_TypeValueTableValuePeekPointerFieldCallback -> C_TypeValueTableValuePeekPointerFieldCallback

dynamic_TypeValueTableValuePeekPointerFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableValuePeekPointerFieldCallback
    -> GValue
    -> m (Ptr ())
dynamic_TypeValueTableValuePeekPointerFieldCallback __funPtr value = liftIO $ do
    value' <- unsafeManagedPtrGetPtr value
    result <- (__dynamic_C_TypeValueTableValuePeekPointerFieldCallback __funPtr) value'
    touchManagedPtr value
    return result

foreign import ccall "wrapper"
    mk_TypeValueTableValuePeekPointerFieldCallback :: C_TypeValueTableValuePeekPointerFieldCallback -> IO (FunPtr C_TypeValueTableValuePeekPointerFieldCallback)

type TypeValueTableValuePeekPointerFieldCallback =
    GValue ->
    IO (Ptr ())

noTypeValueTableValuePeekPointerFieldCallback :: Maybe TypeValueTableValuePeekPointerFieldCallback
noTypeValueTableValuePeekPointerFieldCallback = Nothing

genClosure_TypeValueTableValuePeekPointerFieldCallback :: TypeValueTableValuePeekPointerFieldCallback -> IO Closure
genClosure_TypeValueTableValuePeekPointerFieldCallback cb = do
    let cb' = wrap_TypeValueTableValuePeekPointerFieldCallback Nothing cb
    mk_TypeValueTableValuePeekPointerFieldCallback cb' >>= newCClosure


wrap_TypeValueTableValuePeekPointerFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableValuePeekPointerFieldCallback)) ->
    TypeValueTableValuePeekPointerFieldCallback ->
    Ptr GValue ->
    IO (Ptr ())
wrap_TypeValueTableValuePeekPointerFieldCallback funptrptr _cb value = do
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        result <- _cb  value'
        maybeReleaseFunPtr funptrptr
        return result


-- callback TypeValueTableValueInitFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableValueInitFieldCallback =
    Ptr GValue ->
    IO ()

-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableValueInitFieldCallback :: FunPtr C_TypeValueTableValueInitFieldCallback -> C_TypeValueTableValueInitFieldCallback

dynamic_TypeValueTableValueInitFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableValueInitFieldCallback
    -> GValue
    -> m ()
dynamic_TypeValueTableValueInitFieldCallback __funPtr value = liftIO $ do
    value' <- unsafeManagedPtrGetPtr value
    (__dynamic_C_TypeValueTableValueInitFieldCallback __funPtr) value'
    touchManagedPtr value
    return ()

foreign import ccall "wrapper"
    mk_TypeValueTableValueInitFieldCallback :: C_TypeValueTableValueInitFieldCallback -> IO (FunPtr C_TypeValueTableValueInitFieldCallback)

type TypeValueTableValueInitFieldCallback =
    GValue ->
    IO ()

noTypeValueTableValueInitFieldCallback :: Maybe TypeValueTableValueInitFieldCallback
noTypeValueTableValueInitFieldCallback = Nothing

genClosure_TypeValueTableValueInitFieldCallback :: TypeValueTableValueInitFieldCallback -> IO Closure
genClosure_TypeValueTableValueInitFieldCallback cb = do
    let cb' = wrap_TypeValueTableValueInitFieldCallback Nothing cb
    mk_TypeValueTableValueInitFieldCallback cb' >>= newCClosure


wrap_TypeValueTableValueInitFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableValueInitFieldCallback)) ->
    TypeValueTableValueInitFieldCallback ->
    Ptr GValue ->
    IO ()
wrap_TypeValueTableValueInitFieldCallback funptrptr _cb value = do
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        _cb  value'
        maybeReleaseFunPtr funptrptr


-- callback TypeValueTableValueFreeFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableValueFreeFieldCallback =
    Ptr GValue ->
    IO ()

-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableValueFreeFieldCallback :: FunPtr C_TypeValueTableValueFreeFieldCallback -> C_TypeValueTableValueFreeFieldCallback

dynamic_TypeValueTableValueFreeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableValueFreeFieldCallback
    -> GValue
    -> m ()
dynamic_TypeValueTableValueFreeFieldCallback __funPtr value = liftIO $ do
    value' <- unsafeManagedPtrGetPtr value
    (__dynamic_C_TypeValueTableValueFreeFieldCallback __funPtr) value'
    touchManagedPtr value
    return ()

foreign import ccall "wrapper"
    mk_TypeValueTableValueFreeFieldCallback :: C_TypeValueTableValueFreeFieldCallback -> IO (FunPtr C_TypeValueTableValueFreeFieldCallback)

type TypeValueTableValueFreeFieldCallback =
    GValue ->
    IO ()

noTypeValueTableValueFreeFieldCallback :: Maybe TypeValueTableValueFreeFieldCallback
noTypeValueTableValueFreeFieldCallback = Nothing

genClosure_TypeValueTableValueFreeFieldCallback :: TypeValueTableValueFreeFieldCallback -> IO Closure
genClosure_TypeValueTableValueFreeFieldCallback cb = do
    let cb' = wrap_TypeValueTableValueFreeFieldCallback Nothing cb
    mk_TypeValueTableValueFreeFieldCallback cb' >>= newCClosure


wrap_TypeValueTableValueFreeFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableValueFreeFieldCallback)) ->
    TypeValueTableValueFreeFieldCallback ->
    Ptr GValue ->
    IO ()
wrap_TypeValueTableValueFreeFieldCallback funptrptr _cb value = do
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        _cb  value'
        maybeReleaseFunPtr funptrptr


-- callback TypeValueTableValueCopyFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "src_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableValueCopyFieldCallback =
    Ptr GValue ->
    Ptr GValue ->
    IO ()

-- Args : [Arg {argCName = "src_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableValueCopyFieldCallback :: FunPtr C_TypeValueTableValueCopyFieldCallback -> C_TypeValueTableValueCopyFieldCallback

dynamic_TypeValueTableValueCopyFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableValueCopyFieldCallback
    -> GValue
    -> GValue
    -> m ()
dynamic_TypeValueTableValueCopyFieldCallback __funPtr srcValue destValue = liftIO $ do
    srcValue' <- unsafeManagedPtrGetPtr srcValue
    destValue' <- unsafeManagedPtrGetPtr destValue
    (__dynamic_C_TypeValueTableValueCopyFieldCallback __funPtr) srcValue' destValue'
    touchManagedPtr srcValue
    touchManagedPtr destValue
    return ()

foreign import ccall "wrapper"
    mk_TypeValueTableValueCopyFieldCallback :: C_TypeValueTableValueCopyFieldCallback -> IO (FunPtr C_TypeValueTableValueCopyFieldCallback)

type TypeValueTableValueCopyFieldCallback =
    GValue ->
    GValue ->
    IO ()

noTypeValueTableValueCopyFieldCallback :: Maybe TypeValueTableValueCopyFieldCallback
noTypeValueTableValueCopyFieldCallback = Nothing

genClosure_TypeValueTableValueCopyFieldCallback :: TypeValueTableValueCopyFieldCallback -> IO Closure
genClosure_TypeValueTableValueCopyFieldCallback cb = do
    let cb' = wrap_TypeValueTableValueCopyFieldCallback Nothing cb
    mk_TypeValueTableValueCopyFieldCallback cb' >>= newCClosure


wrap_TypeValueTableValueCopyFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableValueCopyFieldCallback)) ->
    TypeValueTableValueCopyFieldCallback ->
    Ptr GValue ->
    Ptr GValue ->
    IO ()
wrap_TypeValueTableValueCopyFieldCallback funptrptr _cb srcValue destValue = do
    B.ManagedPtr.withTransient GValue srcValue $ \srcValue' -> do
        B.ManagedPtr.withTransient GValue destValue $ \destValue' -> do
            _cb  srcValue' destValue'
            maybeReleaseFunPtr funptrptr


-- callback TypeValueTableLcopyValueFieldCallback
--          -> Callable {returnType = Just (TBasicType TUTF8), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_collect_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_values", argType = TInterface (Name {namespace = "GObject", name = "TypeCValue"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableLcopyValueFieldCallback =
    Ptr GValue ->
    Word32 ->
    Ptr GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO CString

-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_collect_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_values", argType = TInterface (Name {namespace = "GObject", name = "TypeCValue"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableLcopyValueFieldCallback :: FunPtr C_TypeValueTableLcopyValueFieldCallback -> C_TypeValueTableLcopyValueFieldCallback

dynamic_TypeValueTableLcopyValueFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableLcopyValueFieldCallback
    -> GValue
    -> Word32
    -> GObject.TypeCValue.TypeCValue
    -> Word32
    -> m T.Text
dynamic_TypeValueTableLcopyValueFieldCallback __funPtr value nCollectValues collectValues collectFlags = liftIO $ do
    value' <- unsafeManagedPtrGetPtr value
    collectValues' <- unsafeManagedPtrGetPtr collectValues
    result <- (__dynamic_C_TypeValueTableLcopyValueFieldCallback __funPtr) value' nCollectValues collectValues' collectFlags
    checkUnexpectedReturnNULL "typeValueTableLcopyValueFieldCallback" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr value
    touchManagedPtr collectValues
    return result'

foreign import ccall "wrapper"
    mk_TypeValueTableLcopyValueFieldCallback :: C_TypeValueTableLcopyValueFieldCallback -> IO (FunPtr C_TypeValueTableLcopyValueFieldCallback)

type TypeValueTableLcopyValueFieldCallback =
    GValue ->
    Word32 ->
    GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO T.Text

noTypeValueTableLcopyValueFieldCallback :: Maybe TypeValueTableLcopyValueFieldCallback
noTypeValueTableLcopyValueFieldCallback = Nothing

genClosure_TypeValueTableLcopyValueFieldCallback :: TypeValueTableLcopyValueFieldCallback -> IO Closure
genClosure_TypeValueTableLcopyValueFieldCallback cb = do
    let cb' = wrap_TypeValueTableLcopyValueFieldCallback Nothing cb
    mk_TypeValueTableLcopyValueFieldCallback cb' >>= newCClosure


wrap_TypeValueTableLcopyValueFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableLcopyValueFieldCallback)) ->
    TypeValueTableLcopyValueFieldCallback ->
    Ptr GValue ->
    Word32 ->
    Ptr GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO CString
wrap_TypeValueTableLcopyValueFieldCallback funptrptr _cb value nCollectValues collectValues collectFlags = do
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        collectValues' <- (newPtr GObject.TypeCValue.TypeCValue) collectValues
        result <- _cb  value' nCollectValues collectValues' collectFlags
        maybeReleaseFunPtr funptrptr
        result' <- textToCString result
        return result'


-- callback TypeValueTableCollectValueFieldCallback
--          -> Callable {returnType = Just (TBasicType TUTF8), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_collect_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_values", argType = TInterface (Name {namespace = "GObject", name = "TypeCValue"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_TypeValueTableCollectValueFieldCallback =
    Ptr GValue ->
    Word32 ->
    Ptr GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO CString

-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_collect_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_values", argType = TInterface (Name {namespace = "GObject", name = "TypeCValue"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collect_flags", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeValueTableCollectValueFieldCallback :: FunPtr C_TypeValueTableCollectValueFieldCallback -> C_TypeValueTableCollectValueFieldCallback

dynamic_TypeValueTableCollectValueFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeValueTableCollectValueFieldCallback
    -> GValue
    -> Word32
    -> GObject.TypeCValue.TypeCValue
    -> Word32
    -> m T.Text
dynamic_TypeValueTableCollectValueFieldCallback __funPtr value nCollectValues collectValues collectFlags = liftIO $ do
    value' <- unsafeManagedPtrGetPtr value
    collectValues' <- unsafeManagedPtrGetPtr collectValues
    result <- (__dynamic_C_TypeValueTableCollectValueFieldCallback __funPtr) value' nCollectValues collectValues' collectFlags
    checkUnexpectedReturnNULL "typeValueTableCollectValueFieldCallback" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr value
    touchManagedPtr collectValues
    return result'

foreign import ccall "wrapper"
    mk_TypeValueTableCollectValueFieldCallback :: C_TypeValueTableCollectValueFieldCallback -> IO (FunPtr C_TypeValueTableCollectValueFieldCallback)

type TypeValueTableCollectValueFieldCallback =
    GValue ->
    Word32 ->
    GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO T.Text

noTypeValueTableCollectValueFieldCallback :: Maybe TypeValueTableCollectValueFieldCallback
noTypeValueTableCollectValueFieldCallback = Nothing

genClosure_TypeValueTableCollectValueFieldCallback :: TypeValueTableCollectValueFieldCallback -> IO Closure
genClosure_TypeValueTableCollectValueFieldCallback cb = do
    let cb' = wrap_TypeValueTableCollectValueFieldCallback Nothing cb
    mk_TypeValueTableCollectValueFieldCallback cb' >>= newCClosure


wrap_TypeValueTableCollectValueFieldCallback ::
    Maybe (Ptr (FunPtr C_TypeValueTableCollectValueFieldCallback)) ->
    TypeValueTableCollectValueFieldCallback ->
    Ptr GValue ->
    Word32 ->
    Ptr GObject.TypeCValue.TypeCValue ->
    Word32 ->
    IO CString
wrap_TypeValueTableCollectValueFieldCallback funptrptr _cb value nCollectValues collectValues collectFlags = do
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        collectValues' <- (newPtr GObject.TypeCValue.TypeCValue) collectValues
        result <- _cb  value' nCollectValues collectValues' collectFlags
        maybeReleaseFunPtr funptrptr
        result' <- textToCString result
        return result'


-- callback TypePluginUse
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin whose use count should be increased", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @use_plugin function of #GTypePluginClass, which gets called\nto increase the use count of @plugin.", sinceVersion = Nothing}}
type C_TypePluginUse =
    Ptr GObject.TypePlugin.TypePlugin ->
    IO ()

-- Args : [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin whose use count should be increased", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypePluginUse :: FunPtr C_TypePluginUse -> C_TypePluginUse

dynamic_TypePluginUse ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.TypePlugin.IsTypePlugin a) =>
    FunPtr C_TypePluginUse
    -> a
    {- ^ /@plugin@/: the 'GI.GObject.Interfaces.TypePlugin.TypePlugin' whose use count should be increased -}
    -> m ()
dynamic_TypePluginUse __funPtr plugin = liftIO $ do
    plugin' <- unsafeManagedPtrCastPtr plugin
    (__dynamic_C_TypePluginUse __funPtr) plugin'
    touchManagedPtr plugin
    return ()

foreign import ccall "wrapper"
    mk_TypePluginUse :: C_TypePluginUse -> IO (FunPtr C_TypePluginUse)

type TypePluginUse =
    GObject.TypePlugin.TypePlugin ->
    IO ()

noTypePluginUse :: Maybe TypePluginUse
noTypePluginUse = Nothing

genClosure_TypePluginUse :: TypePluginUse -> IO Closure
genClosure_TypePluginUse cb = do
    let cb' = wrap_TypePluginUse Nothing cb
    mk_TypePluginUse cb' >>= newCClosure


wrap_TypePluginUse ::
    Maybe (Ptr (FunPtr C_TypePluginUse)) ->
    TypePluginUse ->
    Ptr GObject.TypePlugin.TypePlugin ->
    IO ()
wrap_TypePluginUse funptrptr _cb plugin = do
    plugin' <- (newPtr GObject.TypePlugin.TypePlugin) plugin
    _cb  plugin'
    maybeReleaseFunPtr funptrptr


-- callback TypePluginUnuse
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin whose use count should be decreased", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @unuse_plugin function of #GTypePluginClass.", sinceVersion = Nothing}}
type C_TypePluginUnuse =
    Ptr GObject.TypePlugin.TypePlugin ->
    IO ()

-- Args : [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin whose use count should be decreased", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypePluginUnuse :: FunPtr C_TypePluginUnuse -> C_TypePluginUnuse

dynamic_TypePluginUnuse ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.TypePlugin.IsTypePlugin a) =>
    FunPtr C_TypePluginUnuse
    -> a
    {- ^ /@plugin@/: the 'GI.GObject.Interfaces.TypePlugin.TypePlugin' whose use count should be decreased -}
    -> m ()
dynamic_TypePluginUnuse __funPtr plugin = liftIO $ do
    plugin' <- unsafeManagedPtrCastPtr plugin
    (__dynamic_C_TypePluginUnuse __funPtr) plugin'
    touchManagedPtr plugin
    return ()

foreign import ccall "wrapper"
    mk_TypePluginUnuse :: C_TypePluginUnuse -> IO (FunPtr C_TypePluginUnuse)

type TypePluginUnuse =
    GObject.TypePlugin.TypePlugin ->
    IO ()

noTypePluginUnuse :: Maybe TypePluginUnuse
noTypePluginUnuse = Nothing

genClosure_TypePluginUnuse :: TypePluginUnuse -> IO Closure
genClosure_TypePluginUnuse cb = do
    let cb' = wrap_TypePluginUnuse Nothing cb
    mk_TypePluginUnuse cb' >>= newCClosure


wrap_TypePluginUnuse ::
    Maybe (Ptr (FunPtr C_TypePluginUnuse)) ->
    TypePluginUnuse ->
    Ptr GObject.TypePlugin.TypePlugin ->
    IO ()
wrap_TypePluginUnuse funptrptr _cb plugin = do
    plugin' <- (newPtr GObject.TypePlugin.TypePlugin) plugin
    _cb  plugin'
    maybeReleaseFunPtr funptrptr


-- callback TypePluginCompleteTypeInfo
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType whose info is completed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "info", argType = TInterface (Name {namespace = "GObject", name = "TypeInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypeInfo struct to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value_table", argType = TInterface (Name {namespace = "GObject", name = "TypeValueTable"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypeValueTable to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @complete_type_info function of #GTypePluginClass.", sinceVersion = Nothing}}
type C_TypePluginCompleteTypeInfo =
    Ptr GObject.TypePlugin.TypePlugin ->
    CGType ->
    Ptr GObject.TypeInfo.TypeInfo ->
    Ptr GObject.TypeValueTable.TypeValueTable ->
    IO ()

-- Args : [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType whose info is completed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "info", argType = TInterface (Name {namespace = "GObject", name = "TypeInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypeInfo struct to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value_table", argType = TInterface (Name {namespace = "GObject", name = "TypeValueTable"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypeValueTable to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypePluginCompleteTypeInfo :: FunPtr C_TypePluginCompleteTypeInfo -> C_TypePluginCompleteTypeInfo

dynamic_TypePluginCompleteTypeInfo ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.TypePlugin.IsTypePlugin a) =>
    FunPtr C_TypePluginCompleteTypeInfo
    -> a
    {- ^ /@plugin@/: the 'GI.GObject.Interfaces.TypePlugin.TypePlugin' -}
    -> GType
    {- ^ /@gType@/: the 'GType' whose info is completed -}
    -> GObject.TypeInfo.TypeInfo
    {- ^ /@info@/: the 'GI.GObject.Structs.TypeInfo.TypeInfo' struct to fill in -}
    -> GObject.TypeValueTable.TypeValueTable
    {- ^ /@valueTable@/: the 'GI.GObject.Structs.TypeValueTable.TypeValueTable' to fill in -}
    -> m ()
dynamic_TypePluginCompleteTypeInfo __funPtr plugin gType info valueTable = liftIO $ do
    plugin' <- unsafeManagedPtrCastPtr plugin
    let gType' = gtypeToCGType gType
    info' <- unsafeManagedPtrGetPtr info
    valueTable' <- unsafeManagedPtrGetPtr valueTable
    (__dynamic_C_TypePluginCompleteTypeInfo __funPtr) plugin' gType' info' valueTable'
    touchManagedPtr plugin
    touchManagedPtr info
    touchManagedPtr valueTable
    return ()

foreign import ccall "wrapper"
    mk_TypePluginCompleteTypeInfo :: C_TypePluginCompleteTypeInfo -> IO (FunPtr C_TypePluginCompleteTypeInfo)

type TypePluginCompleteTypeInfo =
    GObject.TypePlugin.TypePlugin ->
    GType ->
    GObject.TypeInfo.TypeInfo ->
    GObject.TypeValueTable.TypeValueTable ->
    IO ()

noTypePluginCompleteTypeInfo :: Maybe TypePluginCompleteTypeInfo
noTypePluginCompleteTypeInfo = Nothing

genClosure_TypePluginCompleteTypeInfo :: TypePluginCompleteTypeInfo -> IO Closure
genClosure_TypePluginCompleteTypeInfo cb = do
    let cb' = wrap_TypePluginCompleteTypeInfo Nothing cb
    mk_TypePluginCompleteTypeInfo cb' >>= newCClosure


wrap_TypePluginCompleteTypeInfo ::
    Maybe (Ptr (FunPtr C_TypePluginCompleteTypeInfo)) ->
    TypePluginCompleteTypeInfo ->
    Ptr GObject.TypePlugin.TypePlugin ->
    CGType ->
    Ptr GObject.TypeInfo.TypeInfo ->
    Ptr GObject.TypeValueTable.TypeValueTable ->
    IO ()
wrap_TypePluginCompleteTypeInfo funptrptr _cb plugin gType info valueTable = do
    plugin' <- (newPtr GObject.TypePlugin.TypePlugin) plugin
    let gType' = GType gType
    info' <- (newPtr GObject.TypeInfo.TypeInfo) info
    valueTable' <- (newPtr GObject.TypeValueTable.TypeValueTable) valueTable
    _cb  plugin' gType' info' valueTable'
    maybeReleaseFunPtr funptrptr


-- callback TypePluginCompleteInterfaceInfo
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "instance_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType of an instantiable type to which the interface\n is added", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interface_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType of the interface whose info is completed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "info", argType = TInterface (Name {namespace = "GObject", name = "InterfaceInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GInterfaceInfo to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @complete_interface_info function of #GTypePluginClass.", sinceVersion = Nothing}}
type C_TypePluginCompleteInterfaceInfo =
    Ptr GObject.TypePlugin.TypePlugin ->
    CGType ->
    CGType ->
    Ptr GObject.InterfaceInfo.InterfaceInfo ->
    IO ()

-- Args : [Arg {argCName = "plugin", argType = TInterface (Name {namespace = "GObject", name = "TypePlugin"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GTypePlugin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "instance_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType of an instantiable type to which the interface\n is added", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interface_type", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GType of the interface whose info is completed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "info", argType = TInterface (Name {namespace = "GObject", name = "InterfaceInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GInterfaceInfo to fill in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypePluginCompleteInterfaceInfo :: FunPtr C_TypePluginCompleteInterfaceInfo -> C_TypePluginCompleteInterfaceInfo

dynamic_TypePluginCompleteInterfaceInfo ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.TypePlugin.IsTypePlugin a) =>
    FunPtr C_TypePluginCompleteInterfaceInfo
    -> a
    {- ^ /@plugin@/: the 'GI.GObject.Interfaces.TypePlugin.TypePlugin' -}
    -> GType
    {- ^ /@instanceType@/: the 'GType' of an instantiable type to which the interface
 is added -}
    -> GType
    {- ^ /@interfaceType@/: the 'GType' of the interface whose info is completed -}
    -> GObject.InterfaceInfo.InterfaceInfo
    {- ^ /@info@/: the 'GI.GObject.Structs.InterfaceInfo.InterfaceInfo' to fill in -}
    -> m ()
dynamic_TypePluginCompleteInterfaceInfo __funPtr plugin instanceType interfaceType info = liftIO $ do
    plugin' <- unsafeManagedPtrCastPtr plugin
    let instanceType' = gtypeToCGType instanceType
    let interfaceType' = gtypeToCGType interfaceType
    info' <- unsafeManagedPtrGetPtr info
    (__dynamic_C_TypePluginCompleteInterfaceInfo __funPtr) plugin' instanceType' interfaceType' info'
    touchManagedPtr plugin
    touchManagedPtr info
    return ()

foreign import ccall "wrapper"
    mk_TypePluginCompleteInterfaceInfo :: C_TypePluginCompleteInterfaceInfo -> IO (FunPtr C_TypePluginCompleteInterfaceInfo)

type TypePluginCompleteInterfaceInfo =
    GObject.TypePlugin.TypePlugin ->
    GType ->
    GType ->
    GObject.InterfaceInfo.InterfaceInfo ->
    IO ()

noTypePluginCompleteInterfaceInfo :: Maybe TypePluginCompleteInterfaceInfo
noTypePluginCompleteInterfaceInfo = Nothing

genClosure_TypePluginCompleteInterfaceInfo :: TypePluginCompleteInterfaceInfo -> IO Closure
genClosure_TypePluginCompleteInterfaceInfo cb = do
    let cb' = wrap_TypePluginCompleteInterfaceInfo Nothing cb
    mk_TypePluginCompleteInterfaceInfo cb' >>= newCClosure


wrap_TypePluginCompleteInterfaceInfo ::
    Maybe (Ptr (FunPtr C_TypePluginCompleteInterfaceInfo)) ->
    TypePluginCompleteInterfaceInfo ->
    Ptr GObject.TypePlugin.TypePlugin ->
    CGType ->
    CGType ->
    Ptr GObject.InterfaceInfo.InterfaceInfo ->
    IO ()
wrap_TypePluginCompleteInterfaceInfo funptrptr _cb plugin instanceType interfaceType info = do
    plugin' <- (newPtr GObject.TypePlugin.TypePlugin) plugin
    let instanceType' = GType instanceType
    let interfaceType' = GType interfaceType
    info' <- (newPtr GObject.InterfaceInfo.InterfaceInfo) info
    _cb  plugin' instanceType' interfaceType' info'
    maybeReleaseFunPtr funptrptr


-- callback TypeInterfaceCheckFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "check_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data passed to g_type_add_interface_check()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the interface that has been\n   initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback called after an interface vtable is initialized.\nSee g_type_add_interface_check().", sinceVersion = Just "2.4"}}
type C_TypeInterfaceCheckFunc =
    Ptr () ->
    Ptr GObject.TypeInterface.TypeInterface ->
    IO ()

-- Args : [Arg {argCName = "check_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data passed to g_type_add_interface_check()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the interface that has been\n   initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeInterfaceCheckFunc :: FunPtr C_TypeInterfaceCheckFunc -> C_TypeInterfaceCheckFunc

dynamic_TypeInterfaceCheckFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeInterfaceCheckFunc
    -> Ptr ()
    {- ^ /@checkData@/: data passed to @/g_type_add_interface_check()/@ -}
    -> GObject.TypeInterface.TypeInterface
    {- ^ /@gIface@/: the interface that has been
   initialized -}
    -> m ()
dynamic_TypeInterfaceCheckFunc __funPtr checkData gIface = liftIO $ do
    gIface' <- unsafeManagedPtrGetPtr gIface
    (__dynamic_C_TypeInterfaceCheckFunc __funPtr) checkData gIface'
    touchManagedPtr gIface
    return ()

foreign import ccall "wrapper"
    mk_TypeInterfaceCheckFunc :: C_TypeInterfaceCheckFunc -> IO (FunPtr C_TypeInterfaceCheckFunc)

type TypeInterfaceCheckFunc =
    Ptr () ->
    GObject.TypeInterface.TypeInterface ->
    IO ()

noTypeInterfaceCheckFunc :: Maybe TypeInterfaceCheckFunc
noTypeInterfaceCheckFunc = Nothing

genClosure_TypeInterfaceCheckFunc :: TypeInterfaceCheckFunc -> IO Closure
genClosure_TypeInterfaceCheckFunc cb = do
    let cb' = wrap_TypeInterfaceCheckFunc Nothing cb
    mk_TypeInterfaceCheckFunc cb' >>= newCClosure


wrap_TypeInterfaceCheckFunc ::
    Maybe (Ptr (FunPtr C_TypeInterfaceCheckFunc)) ->
    TypeInterfaceCheckFunc ->
    Ptr () ->
    Ptr GObject.TypeInterface.TypeInterface ->
    IO ()
wrap_TypeInterfaceCheckFunc funptrptr _cb checkData gIface = do
    gIface' <- (newPtr GObject.TypeInterface.TypeInterface) gIface
    _cb  checkData gIface'
    maybeReleaseFunPtr funptrptr


-- callback TypeClassCacheFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE to stop further #GTypeClassCacheFuncs from being\n called, %FALSE to continue", sinceVersion = Nothing}, args = [Arg {argCName = "cache_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data that was given to the g_type_add_class_cache_func() call", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure which is\n   unreferenced", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function which is called when the reference count of a class\ndrops to zero. It may use g_type_class_ref() to prevent the class from\nbeing freed. You should not call g_type_class_unref() from a\n#GTypeClassCacheFunc function to prevent infinite recursion, use\ng_type_class_unref_uncached() instead.\n\nThe functions have to check the class id passed in to figure\nwhether they actually want to cache the class of this type, since all\nclasses are routed through the same #GTypeClassCacheFunc chain.", sinceVersion = Nothing}}
type C_TypeClassCacheFunc =
    Ptr () ->
    Ptr GObject.TypeClass.TypeClass ->
    IO CInt

-- Args : [Arg {argCName = "cache_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data that was given to the g_type_add_class_cache_func() call", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure which is\n   unreferenced", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TypeClassCacheFunc :: FunPtr C_TypeClassCacheFunc -> C_TypeClassCacheFunc

dynamic_TypeClassCacheFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TypeClassCacheFunc
    -> Ptr ()
    {- ^ /@cacheData@/: data that was given to the @/g_type_add_class_cache_func()/@ call -}
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The 'GI.GObject.Structs.TypeClass.TypeClass' structure which is
   unreferenced -}
    -> m Bool
    {- ^ __Returns:__ 'True' to stop further @/GTypeClassCacheFuncs/@ from being
 called, 'False' to continue -}
dynamic_TypeClassCacheFunc __funPtr cacheData gClass = liftIO $ do
    gClass' <- unsafeManagedPtrGetPtr gClass
    result <- (__dynamic_C_TypeClassCacheFunc __funPtr) cacheData gClass'
    let result' = (/= 0) result
    touchManagedPtr gClass
    return result'

foreign import ccall "wrapper"
    mk_TypeClassCacheFunc :: C_TypeClassCacheFunc -> IO (FunPtr C_TypeClassCacheFunc)

type TypeClassCacheFunc =
    Ptr () ->
    GObject.TypeClass.TypeClass ->
    IO Bool

noTypeClassCacheFunc :: Maybe TypeClassCacheFunc
noTypeClassCacheFunc = Nothing

genClosure_TypeClassCacheFunc :: TypeClassCacheFunc -> IO Closure
genClosure_TypeClassCacheFunc cb = do
    let cb' = wrap_TypeClassCacheFunc Nothing cb
    mk_TypeClassCacheFunc cb' >>= newCClosure


wrap_TypeClassCacheFunc ::
    Maybe (Ptr (FunPtr C_TypeClassCacheFunc)) ->
    TypeClassCacheFunc ->
    Ptr () ->
    Ptr GObject.TypeClass.TypeClass ->
    IO CInt
wrap_TypeClassCacheFunc funptrptr _cb cacheData gClass = do
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    result <- _cb  cacheData gClass'
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'


-- callback ToggleNotify
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback data passed to g_object_add_toggle_ref()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The object on which g_object_add_toggle_ref() was called.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_last_ref", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if the toggle reference is now the\n last reference to the object. %FALSE if the toggle\n reference was the last reference and there are now other\n references.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used for notification when the state\nof a toggle reference changes. See g_object_add_toggle_ref().", sinceVersion = Nothing}}
type C_ToggleNotify =
    Ptr () ->
    Ptr GObject.Object.Object ->
    CInt ->
    IO ()

-- Args : [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback data passed to g_object_add_toggle_ref()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The object on which g_object_add_toggle_ref() was called.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_last_ref", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if the toggle reference is now the\n last reference to the object. %FALSE if the toggle\n reference was the last reference and there are now other\n references.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ToggleNotify :: FunPtr C_ToggleNotify -> C_ToggleNotify

dynamic_ToggleNotify ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_ToggleNotify
    -> Ptr ()
    {- ^ /@data@/: Callback data passed to @/g_object_add_toggle_ref()/@ -}
    -> a
    {- ^ /@object@/: The object on which @/g_object_add_toggle_ref()/@ was called. -}
    -> Bool
    {- ^ /@isLastRef@/: 'True' if the toggle reference is now the
 last reference to the object. 'False' if the toggle
 reference was the last reference and there are now other
 references. -}
    -> m ()
dynamic_ToggleNotify __funPtr data_ object isLastRef = liftIO $ do
    object' <- unsafeManagedPtrCastPtr object
    let isLastRef' = (fromIntegral . fromEnum) isLastRef
    (__dynamic_C_ToggleNotify __funPtr) data_ object' isLastRef'
    touchManagedPtr object
    return ()

foreign import ccall "wrapper"
    mk_ToggleNotify :: C_ToggleNotify -> IO (FunPtr C_ToggleNotify)

type ToggleNotify =
    Ptr () ->
    GObject.Object.Object ->
    Bool ->
    IO ()

noToggleNotify :: Maybe ToggleNotify
noToggleNotify = Nothing

genClosure_ToggleNotify :: ToggleNotify -> IO Closure
genClosure_ToggleNotify cb = do
    let cb' = wrap_ToggleNotify Nothing cb
    mk_ToggleNotify cb' >>= newCClosure


wrap_ToggleNotify ::
    Maybe (Ptr (FunPtr C_ToggleNotify)) ->
    ToggleNotify ->
    Ptr () ->
    Ptr GObject.Object.Object ->
    CInt ->
    IO ()
wrap_ToggleNotify funptrptr _cb data_ object isLastRef = do
    object' <- (newObject GObject.Object.Object) object
    let isLastRef' = (/= 0) isLastRef
    _cb  data_ object' isLastRef'
    maybeReleaseFunPtr funptrptr


-- callback SignalEmissionHook
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "whether it wants to stay connected. If it returns %FALSE, the signal\n hook is disconnected (and destroyed).", sinceVersion = Nothing}, args = [Arg {argCName = "ihint", argType = TInterface (Name {namespace = "GObject", name = "SignalInvocationHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Signal invocation hint, see #GSignalInvocationHint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_param_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of parameters to the function, including\n the instance on which the signal was emitted.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "param_values", argType = TCArray False (-1) 1 (TInterface (Name {namespace = "GObject", name = "Value"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the instance on which\n the signal was emitted, followed by the parameters of the emission.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data associated with the hook.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A simple function pointer to get invoked when the signal is emitted. This\nallows you to tie a hook to the signal type, so that it will trap all\nemissions of that signal, from any object.\n\nYou may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag.", sinceVersion = Nothing}}
type C_SignalEmissionHook =
    Ptr GObject.SignalInvocationHint.SignalInvocationHint ->
    Word32 ->
    Ptr GValue ->
    Ptr () ->
    IO CInt

-- Args : [Arg {argCName = "ihint", argType = TInterface (Name {namespace = "GObject", name = "SignalInvocationHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Signal invocation hint, see #GSignalInvocationHint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_param_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of parameters to the function, including\n the instance on which the signal was emitted.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "param_values", argType = TCArray False (-1) 1 (TInterface (Name {namespace = "GObject", name = "Value"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the instance on which\n the signal was emitted, followed by the parameters of the emission.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data associated with the hook.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : [Arg {argCName = "n_param_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of parameters to the function, including\n the instance on which the signal was emitted.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_SignalEmissionHook :: FunPtr C_SignalEmissionHook -> C_SignalEmissionHook

dynamic_SignalEmissionHook ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_SignalEmissionHook
    -> GObject.SignalInvocationHint.SignalInvocationHint
    {- ^ /@ihint@/: Signal invocation hint, see 'GI.GObject.Structs.SignalInvocationHint.SignalInvocationHint'. -}
    -> [GValue]
    {- ^ /@paramValues@/: the instance on which
 the signal was emitted, followed by the parameters of the emission. -}
    -> Ptr ()
    {- ^ /@data@/: user data associated with the hook. -}
    -> m Bool
    {- ^ __Returns:__ whether it wants to stay connected. If it returns 'False', the signal
 hook is disconnected (and destroyed). -}
dynamic_SignalEmissionHook __funPtr ihint paramValues data_ = liftIO $ do
    let nParamValues = fromIntegral $ length paramValues
    ihint' <- unsafeManagedPtrGetPtr ihint
    paramValues' <- mapM unsafeManagedPtrGetPtr paramValues
    paramValues'' <- packBlockArray 24 paramValues'
    result <- (__dynamic_C_SignalEmissionHook __funPtr) ihint' nParamValues paramValues'' data_
    let result' = (/= 0) result
    touchManagedPtr ihint
    mapM_ touchManagedPtr paramValues
    freeMem paramValues''
    return result'

foreign import ccall "wrapper"
    mk_SignalEmissionHook :: C_SignalEmissionHook -> IO (FunPtr C_SignalEmissionHook)

type SignalEmissionHook =
    GObject.SignalInvocationHint.SignalInvocationHint ->
    [GValue] ->
    Ptr () ->
    IO Bool

noSignalEmissionHook :: Maybe SignalEmissionHook
noSignalEmissionHook = Nothing

genClosure_SignalEmissionHook :: SignalEmissionHook -> IO Closure
genClosure_SignalEmissionHook cb = do
    let cb' = wrap_SignalEmissionHook Nothing cb
    mk_SignalEmissionHook cb' >>= newCClosure


wrap_SignalEmissionHook ::
    Maybe (Ptr (FunPtr C_SignalEmissionHook)) ->
    SignalEmissionHook ->
    Ptr GObject.SignalInvocationHint.SignalInvocationHint ->
    Word32 ->
    Ptr GValue ->
    Ptr () ->
    IO CInt
wrap_SignalEmissionHook funptrptr _cb ihint nParamValues paramValues data_ = do
    ihint' <- (newPtr GObject.SignalInvocationHint.SignalInvocationHint) ihint
    paramValues' <- (unpackBoxedArrayWithLength 24 nParamValues) paramValues
    paramValues'' <- mapM (newBoxed GValue) paramValues'
    result <- _cb  ihint' paramValues'' data_
    maybeReleaseFunPtr funptrptr
    let result' = (fromIntegral . fromEnum) result
    return result'


-- callback SignalAccumulator
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "The accumulator function returns whether the signal emission\n should be aborted. Returning %FALSE means to abort the\n current emission and %TRUE is returned for continuation.", sinceVersion = Nothing}, args = [Arg {argCName = "ihint", argType = TInterface (Name {namespace = "GObject", name = "SignalInvocationHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Signal invocation hint, see #GSignalInvocationHint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_accu", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Accumulator to collect callback return values in, this\n is the return value of the current signal emission.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "handler_return", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GValue holding the return value of the signal handler.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback data that was specified when creating the signal.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The signal accumulator is a special callback function that can be used\nto collect return values of the various callbacks that are called\nduring a signal emission. The signal accumulator is specified at signal\ncreation time, if it is left %NULL, no accumulation of callback return\nvalues is performed. The return value of signal emissions is then the\nvalue returned by the last callback.", sinceVersion = Nothing}}
type C_SignalAccumulator =
    Ptr GObject.SignalInvocationHint.SignalInvocationHint ->
    Ptr GValue ->
    Ptr GValue ->
    Ptr () ->
    IO CInt

-- Args : [Arg {argCName = "ihint", argType = TInterface (Name {namespace = "GObject", name = "SignalInvocationHint"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Signal invocation hint, see #GSignalInvocationHint.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_accu", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Accumulator to collect callback return values in, this\n is the return value of the current signal emission.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "handler_return", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GValue holding the return value of the signal handler.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Callback data that was specified when creating the signal.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_SignalAccumulator :: FunPtr C_SignalAccumulator -> C_SignalAccumulator

dynamic_SignalAccumulator ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_SignalAccumulator
    -> GObject.SignalInvocationHint.SignalInvocationHint
    {- ^ /@ihint@/: Signal invocation hint, see 'GI.GObject.Structs.SignalInvocationHint.SignalInvocationHint'. -}
    -> GValue
    {- ^ /@returnAccu@/: Accumulator to collect callback return values in, this
 is the return value of the current signal emission. -}
    -> GValue
    {- ^ /@handlerReturn@/: A 'GI.GObject.Structs.Value.Value' holding the return value of the signal handler. -}
    -> Ptr ()
    {- ^ /@data@/: Callback data that was specified when creating the signal. -}
    -> m Bool
    {- ^ __Returns:__ The accumulator function returns whether the signal emission
 should be aborted. Returning 'False' means to abort the
 current emission and 'True' is returned for continuation. -}
dynamic_SignalAccumulator __funPtr ihint returnAccu handlerReturn data_ = liftIO $ do
    ihint' <- unsafeManagedPtrGetPtr ihint
    returnAccu' <- unsafeManagedPtrGetPtr returnAccu
    handlerReturn' <- unsafeManagedPtrGetPtr handlerReturn
    result <- (__dynamic_C_SignalAccumulator __funPtr) ihint' returnAccu' handlerReturn' data_
    let result' = (/= 0) result
    touchManagedPtr ihint
    touchManagedPtr returnAccu
    touchManagedPtr handlerReturn
    return result'

foreign import ccall "wrapper"
    mk_SignalAccumulator :: C_SignalAccumulator -> IO (FunPtr C_SignalAccumulator)

type SignalAccumulator =
    GObject.SignalInvocationHint.SignalInvocationHint ->
    GValue ->
    GValue ->
    Ptr () ->
    IO Bool

noSignalAccumulator :: Maybe SignalAccumulator
noSignalAccumulator = Nothing

genClosure_SignalAccumulator :: SignalAccumulator -> IO Closure
genClosure_SignalAccumulator cb = do
    let cb' = wrap_SignalAccumulator Nothing cb
    mk_SignalAccumulator cb' >>= newCClosure


wrap_SignalAccumulator ::
    Maybe (Ptr (FunPtr C_SignalAccumulator)) ->
    SignalAccumulator ->
    Ptr GObject.SignalInvocationHint.SignalInvocationHint ->
    Ptr GValue ->
    Ptr GValue ->
    Ptr () ->
    IO CInt
wrap_SignalAccumulator funptrptr _cb ihint returnAccu handlerReturn data_ = do
    ihint' <- (newPtr GObject.SignalInvocationHint.SignalInvocationHint) ihint
    B.ManagedPtr.withTransient GValue returnAccu $ \returnAccu' -> do
        B.ManagedPtr.withTransient GValue handlerReturn $ \handlerReturn' -> do
            result <- _cb  ihint' returnAccu' handlerReturn' data_
            maybeReleaseFunPtr funptrptr
            let result' = (fromIntegral . fromEnum) result
            return result'


-- callback ParamSpecTypeInfoValuesCmpFieldCallback
--          -> Callable {returnType = Just (TBasicType TInt), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value1", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value2", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ParamSpecTypeInfoValuesCmpFieldCallback =
    Ptr GParamSpec ->
    Ptr GValue ->
    Ptr GValue ->
    IO Int32

-- Args : [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value1", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value2", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ParamSpecTypeInfoValuesCmpFieldCallback :: FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback -> C_ParamSpecTypeInfoValuesCmpFieldCallback

dynamic_ParamSpecTypeInfoValuesCmpFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback
    -> GParamSpec
    -> GValue
    -> GValue
    -> m Int32
dynamic_ParamSpecTypeInfoValuesCmpFieldCallback __funPtr pspec value1 value2 = liftIO $ do
    pspec' <- unsafeManagedPtrGetPtr pspec
    value1' <- unsafeManagedPtrGetPtr value1
    value2' <- unsafeManagedPtrGetPtr value2
    result <- (__dynamic_C_ParamSpecTypeInfoValuesCmpFieldCallback __funPtr) pspec' value1' value2'
    touchManagedPtr pspec
    touchManagedPtr value1
    touchManagedPtr value2
    return result

foreign import ccall "wrapper"
    mk_ParamSpecTypeInfoValuesCmpFieldCallback :: C_ParamSpecTypeInfoValuesCmpFieldCallback -> IO (FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback)

type ParamSpecTypeInfoValuesCmpFieldCallback =
    GParamSpec ->
    GValue ->
    GValue ->
    IO Int32

noParamSpecTypeInfoValuesCmpFieldCallback :: Maybe ParamSpecTypeInfoValuesCmpFieldCallback
noParamSpecTypeInfoValuesCmpFieldCallback = Nothing

genClosure_ParamSpecTypeInfoValuesCmpFieldCallback :: ParamSpecTypeInfoValuesCmpFieldCallback -> IO Closure
genClosure_ParamSpecTypeInfoValuesCmpFieldCallback cb = do
    let cb' = wrap_ParamSpecTypeInfoValuesCmpFieldCallback Nothing cb
    mk_ParamSpecTypeInfoValuesCmpFieldCallback cb' >>= newCClosure


wrap_ParamSpecTypeInfoValuesCmpFieldCallback ::
    Maybe (Ptr (FunPtr C_ParamSpecTypeInfoValuesCmpFieldCallback)) ->
    ParamSpecTypeInfoValuesCmpFieldCallback ->
    Ptr GParamSpec ->
    Ptr GValue ->
    Ptr GValue ->
    IO Int32
wrap_ParamSpecTypeInfoValuesCmpFieldCallback funptrptr _cb pspec value1 value2 = do
    pspec' <- newGParamSpecFromPtr pspec
    B.ManagedPtr.withTransient GValue value1 $ \value1' -> do
        B.ManagedPtr.withTransient GValue value2 $ \value2' -> do
            result <- _cb  pspec' value1' value2'
            maybeReleaseFunPtr funptrptr
            return result


-- callback ParamSpecTypeInfoValueValidateFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ParamSpecTypeInfoValueValidateFieldCallback =
    Ptr GParamSpec ->
    Ptr GValue ->
    IO CInt

-- Args : [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ParamSpecTypeInfoValueValidateFieldCallback :: FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback -> C_ParamSpecTypeInfoValueValidateFieldCallback

dynamic_ParamSpecTypeInfoValueValidateFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback
    -> GParamSpec
    -> GValue
    -> m Bool
dynamic_ParamSpecTypeInfoValueValidateFieldCallback __funPtr pspec value = liftIO $ do
    pspec' <- unsafeManagedPtrGetPtr pspec
    value' <- unsafeManagedPtrGetPtr value
    result <- (__dynamic_C_ParamSpecTypeInfoValueValidateFieldCallback __funPtr) pspec' value'
    let result' = (/= 0) result
    touchManagedPtr pspec
    touchManagedPtr value
    return result'

foreign import ccall "wrapper"
    mk_ParamSpecTypeInfoValueValidateFieldCallback :: C_ParamSpecTypeInfoValueValidateFieldCallback -> IO (FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback)

type ParamSpecTypeInfoValueValidateFieldCallback =
    GParamSpec ->
    GValue ->
    IO Bool

noParamSpecTypeInfoValueValidateFieldCallback :: Maybe ParamSpecTypeInfoValueValidateFieldCallback
noParamSpecTypeInfoValueValidateFieldCallback = Nothing

genClosure_ParamSpecTypeInfoValueValidateFieldCallback :: ParamSpecTypeInfoValueValidateFieldCallback -> IO Closure
genClosure_ParamSpecTypeInfoValueValidateFieldCallback cb = do
    let cb' = wrap_ParamSpecTypeInfoValueValidateFieldCallback Nothing cb
    mk_ParamSpecTypeInfoValueValidateFieldCallback cb' >>= newCClosure


wrap_ParamSpecTypeInfoValueValidateFieldCallback ::
    Maybe (Ptr (FunPtr C_ParamSpecTypeInfoValueValidateFieldCallback)) ->
    ParamSpecTypeInfoValueValidateFieldCallback ->
    Ptr GParamSpec ->
    Ptr GValue ->
    IO CInt
wrap_ParamSpecTypeInfoValueValidateFieldCallback funptrptr _cb pspec value = do
    pspec' <- newGParamSpecFromPtr pspec
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        result <- _cb  pspec' value'
        maybeReleaseFunPtr funptrptr
        let result' = (fromIntegral . fromEnum) result
        return result'


-- callback ParamSpecTypeInfoValueSetDefaultFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ParamSpecTypeInfoValueSetDefaultFieldCallback =
    Ptr GParamSpec ->
    Ptr GValue ->
    IO ()

-- Args : [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ParamSpecTypeInfoValueSetDefaultFieldCallback :: FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> C_ParamSpecTypeInfoValueSetDefaultFieldCallback

dynamic_ParamSpecTypeInfoValueSetDefaultFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback
    -> GParamSpec
    -> GValue
    -> m ()
dynamic_ParamSpecTypeInfoValueSetDefaultFieldCallback __funPtr pspec value = liftIO $ do
    pspec' <- unsafeManagedPtrGetPtr pspec
    value' <- unsafeManagedPtrGetPtr value
    (__dynamic_C_ParamSpecTypeInfoValueSetDefaultFieldCallback __funPtr) pspec' value'
    touchManagedPtr pspec
    touchManagedPtr value
    return ()

foreign import ccall "wrapper"
    mk_ParamSpecTypeInfoValueSetDefaultFieldCallback :: C_ParamSpecTypeInfoValueSetDefaultFieldCallback -> IO (FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback)

type ParamSpecTypeInfoValueSetDefaultFieldCallback =
    GParamSpec ->
    GValue ->
    IO ()

noParamSpecTypeInfoValueSetDefaultFieldCallback :: Maybe ParamSpecTypeInfoValueSetDefaultFieldCallback
noParamSpecTypeInfoValueSetDefaultFieldCallback = Nothing

genClosure_ParamSpecTypeInfoValueSetDefaultFieldCallback :: ParamSpecTypeInfoValueSetDefaultFieldCallback -> IO Closure
genClosure_ParamSpecTypeInfoValueSetDefaultFieldCallback cb = do
    let cb' = wrap_ParamSpecTypeInfoValueSetDefaultFieldCallback Nothing cb
    mk_ParamSpecTypeInfoValueSetDefaultFieldCallback cb' >>= newCClosure


wrap_ParamSpecTypeInfoValueSetDefaultFieldCallback ::
    Maybe (Ptr (FunPtr C_ParamSpecTypeInfoValueSetDefaultFieldCallback)) ->
    ParamSpecTypeInfoValueSetDefaultFieldCallback ->
    Ptr GParamSpec ->
    Ptr GValue ->
    IO ()
wrap_ParamSpecTypeInfoValueSetDefaultFieldCallback funptrptr _cb pspec value = do
    pspec' <- newGParamSpecFromPtr pspec
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        _cb  pspec' value'
        maybeReleaseFunPtr funptrptr


-- callback ParamSpecTypeInfoInstanceInitFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ParamSpecTypeInfoInstanceInitFieldCallback =
    Ptr GParamSpec ->
    IO ()

-- Args : [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ParamSpecTypeInfoInstanceInitFieldCallback :: FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback -> C_ParamSpecTypeInfoInstanceInitFieldCallback

dynamic_ParamSpecTypeInfoInstanceInitFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback
    -> GParamSpec
    -> m ()
dynamic_ParamSpecTypeInfoInstanceInitFieldCallback __funPtr pspec = liftIO $ do
    pspec' <- unsafeManagedPtrGetPtr pspec
    (__dynamic_C_ParamSpecTypeInfoInstanceInitFieldCallback __funPtr) pspec'
    touchManagedPtr pspec
    return ()

foreign import ccall "wrapper"
    mk_ParamSpecTypeInfoInstanceInitFieldCallback :: C_ParamSpecTypeInfoInstanceInitFieldCallback -> IO (FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback)

type ParamSpecTypeInfoInstanceInitFieldCallback =
    GParamSpec ->
    IO ()

noParamSpecTypeInfoInstanceInitFieldCallback :: Maybe ParamSpecTypeInfoInstanceInitFieldCallback
noParamSpecTypeInfoInstanceInitFieldCallback = Nothing

genClosure_ParamSpecTypeInfoInstanceInitFieldCallback :: ParamSpecTypeInfoInstanceInitFieldCallback -> IO Closure
genClosure_ParamSpecTypeInfoInstanceInitFieldCallback cb = do
    let cb' = wrap_ParamSpecTypeInfoInstanceInitFieldCallback Nothing cb
    mk_ParamSpecTypeInfoInstanceInitFieldCallback cb' >>= newCClosure


wrap_ParamSpecTypeInfoInstanceInitFieldCallback ::
    Maybe (Ptr (FunPtr C_ParamSpecTypeInfoInstanceInitFieldCallback)) ->
    ParamSpecTypeInfoInstanceInitFieldCallback ->
    Ptr GParamSpec ->
    IO ()
wrap_ParamSpecTypeInfoInstanceInitFieldCallback funptrptr _cb pspec = do
    pspec' <- newGParamSpecFromPtr pspec
    _cb  pspec'
    maybeReleaseFunPtr funptrptr


-- callback ParamSpecTypeInfoFinalizeFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ParamSpecTypeInfoFinalizeFieldCallback =
    Ptr GParamSpec ->
    IO ()

-- Args : [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ParamSpecTypeInfoFinalizeFieldCallback :: FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback -> C_ParamSpecTypeInfoFinalizeFieldCallback

dynamic_ParamSpecTypeInfoFinalizeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback
    -> GParamSpec
    -> m ()
dynamic_ParamSpecTypeInfoFinalizeFieldCallback __funPtr pspec = liftIO $ do
    pspec' <- unsafeManagedPtrGetPtr pspec
    (__dynamic_C_ParamSpecTypeInfoFinalizeFieldCallback __funPtr) pspec'
    touchManagedPtr pspec
    return ()

foreign import ccall "wrapper"
    mk_ParamSpecTypeInfoFinalizeFieldCallback :: C_ParamSpecTypeInfoFinalizeFieldCallback -> IO (FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback)

type ParamSpecTypeInfoFinalizeFieldCallback =
    GParamSpec ->
    IO ()

noParamSpecTypeInfoFinalizeFieldCallback :: Maybe ParamSpecTypeInfoFinalizeFieldCallback
noParamSpecTypeInfoFinalizeFieldCallback = Nothing

genClosure_ParamSpecTypeInfoFinalizeFieldCallback :: ParamSpecTypeInfoFinalizeFieldCallback -> IO Closure
genClosure_ParamSpecTypeInfoFinalizeFieldCallback cb = do
    let cb' = wrap_ParamSpecTypeInfoFinalizeFieldCallback Nothing cb
    mk_ParamSpecTypeInfoFinalizeFieldCallback cb' >>= newCClosure


wrap_ParamSpecTypeInfoFinalizeFieldCallback ::
    Maybe (Ptr (FunPtr C_ParamSpecTypeInfoFinalizeFieldCallback)) ->
    ParamSpecTypeInfoFinalizeFieldCallback ->
    Ptr GParamSpec ->
    IO ()
wrap_ParamSpecTypeInfoFinalizeFieldCallback funptrptr _cb pspec = do
    pspec' <- newGParamSpecFromPtr pspec
    _cb  pspec'
    maybeReleaseFunPtr funptrptr


-- callback ObjectSetPropertyFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GObject", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the numeric id under which the property was registered with\n g_object_class_install_property().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new value for the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GParamSpec describing the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @set_property function of #GObjectClass.", sinceVersion = Nothing}}
type C_ObjectSetPropertyFunc =
    Ptr GObject.Object.Object ->
    Word32 ->
    Ptr GValue ->
    Ptr GParamSpec ->
    IO ()

-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GObject", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the numeric id under which the property was registered with\n g_object_class_install_property().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new value for the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GParamSpec describing the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectSetPropertyFunc :: FunPtr C_ObjectSetPropertyFunc -> C_ObjectSetPropertyFunc

dynamic_ObjectSetPropertyFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_ObjectSetPropertyFunc
    -> a
    {- ^ /@object@/: a 'GI.GObject.Objects.Object.Object' -}
    -> Word32
    {- ^ /@propertyId@/: the numeric id under which the property was registered with
 'GI.GObject.Structs.ObjectClass.objectClassInstallProperty'. -}
    -> GValue
    {- ^ /@value@/: the new value for the property -}
    -> GParamSpec
    {- ^ /@pspec@/: the 'GI.GObject.Objects.ParamSpec.ParamSpec' describing the property -}
    -> m ()
dynamic_ObjectSetPropertyFunc __funPtr object propertyId value pspec = liftIO $ do
    object' <- unsafeManagedPtrCastPtr object
    value' <- unsafeManagedPtrGetPtr value
    pspec' <- unsafeManagedPtrGetPtr pspec
    (__dynamic_C_ObjectSetPropertyFunc __funPtr) object' propertyId value' pspec'
    touchManagedPtr object
    touchManagedPtr value
    touchManagedPtr pspec
    return ()

foreign import ccall "wrapper"
    mk_ObjectSetPropertyFunc :: C_ObjectSetPropertyFunc -> IO (FunPtr C_ObjectSetPropertyFunc)

type ObjectSetPropertyFunc =
    GObject.Object.Object ->
    Word32 ->
    GValue ->
    GParamSpec ->
    IO ()

noObjectSetPropertyFunc :: Maybe ObjectSetPropertyFunc
noObjectSetPropertyFunc = Nothing

genClosure_ObjectSetPropertyFunc :: ObjectSetPropertyFunc -> IO Closure
genClosure_ObjectSetPropertyFunc cb = do
    let cb' = wrap_ObjectSetPropertyFunc Nothing cb
    mk_ObjectSetPropertyFunc cb' >>= newCClosure


wrap_ObjectSetPropertyFunc ::
    Maybe (Ptr (FunPtr C_ObjectSetPropertyFunc)) ->
    ObjectSetPropertyFunc ->
    Ptr GObject.Object.Object ->
    Word32 ->
    Ptr GValue ->
    Ptr GParamSpec ->
    IO ()
wrap_ObjectSetPropertyFunc funptrptr _cb object propertyId value pspec = do
    object' <- (newObject GObject.Object.Object) object
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        pspec' <- newGParamSpecFromPtr pspec
        _cb  object' propertyId value' pspec'
        maybeReleaseFunPtr funptrptr


-- callback ObjectGetPropertyFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GObject", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the numeric id under which the property was registered with\n g_object_class_install_property().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GValue to return the property value in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GParamSpec describing the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @get_property function of #GObjectClass.", sinceVersion = Nothing}}
type C_ObjectGetPropertyFunc =
    Ptr GObject.Object.Object ->
    Word32 ->
    Ptr GValue ->
    Ptr GParamSpec ->
    IO ()

-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GObject", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the numeric id under which the property was registered with\n g_object_class_install_property().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GValue to return the property value in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GParamSpec describing the property", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectGetPropertyFunc :: FunPtr C_ObjectGetPropertyFunc -> C_ObjectGetPropertyFunc

dynamic_ObjectGetPropertyFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_ObjectGetPropertyFunc
    -> a
    {- ^ /@object@/: a 'GI.GObject.Objects.Object.Object' -}
    -> Word32
    {- ^ /@propertyId@/: the numeric id under which the property was registered with
 'GI.GObject.Structs.ObjectClass.objectClassInstallProperty'. -}
    -> GValue
    {- ^ /@value@/: a 'GI.GObject.Structs.Value.Value' to return the property value in -}
    -> GParamSpec
    {- ^ /@pspec@/: the 'GI.GObject.Objects.ParamSpec.ParamSpec' describing the property -}
    -> m ()
dynamic_ObjectGetPropertyFunc __funPtr object propertyId value pspec = liftIO $ do
    object' <- unsafeManagedPtrCastPtr object
    value' <- unsafeManagedPtrGetPtr value
    pspec' <- unsafeManagedPtrGetPtr pspec
    (__dynamic_C_ObjectGetPropertyFunc __funPtr) object' propertyId value' pspec'
    touchManagedPtr object
    touchManagedPtr value
    touchManagedPtr pspec
    return ()

foreign import ccall "wrapper"
    mk_ObjectGetPropertyFunc :: C_ObjectGetPropertyFunc -> IO (FunPtr C_ObjectGetPropertyFunc)

type ObjectGetPropertyFunc =
    GObject.Object.Object ->
    Word32 ->
    GValue ->
    GParamSpec ->
    IO ()

noObjectGetPropertyFunc :: Maybe ObjectGetPropertyFunc
noObjectGetPropertyFunc = Nothing

genClosure_ObjectGetPropertyFunc :: ObjectGetPropertyFunc -> IO Closure
genClosure_ObjectGetPropertyFunc cb = do
    let cb' = wrap_ObjectGetPropertyFunc Nothing cb
    mk_ObjectGetPropertyFunc cb' >>= newCClosure


wrap_ObjectGetPropertyFunc ::
    Maybe (Ptr (FunPtr C_ObjectGetPropertyFunc)) ->
    ObjectGetPropertyFunc ->
    Ptr GObject.Object.Object ->
    Word32 ->
    Ptr GValue ->
    Ptr GParamSpec ->
    IO ()
wrap_ObjectGetPropertyFunc funptrptr _cb object propertyId value pspec = do
    object' <- (newObject GObject.Object.Object) object
    B.ManagedPtr.withTransient GValue value $ \value' -> do
        pspec' <- newGParamSpecFromPtr pspec
        _cb  object' propertyId value' pspec'
        maybeReleaseFunPtr funptrptr


-- callback ObjectFinalizeFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GObject being finalized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the @finalize function of #GObjectClass.", sinceVersion = Nothing}}
type C_ObjectFinalizeFunc =
    Ptr GObject.Object.Object ->
    IO ()

-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GObject being finalized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ObjectFinalizeFunc :: FunPtr C_ObjectFinalizeFunc -> C_ObjectFinalizeFunc

dynamic_ObjectFinalizeFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_ObjectFinalizeFunc
    -> a
    {- ^ /@object@/: the 'GI.GObject.Objects.Object.Object' being finalized -}
    -> m ()
dynamic_ObjectFinalizeFunc __funPtr object = liftIO $ do
    object' <- unsafeManagedPtrCastPtr object
    (__dynamic_C_ObjectFinalizeFunc __funPtr) object'
    touchManagedPtr object
    return ()

foreign import ccall "wrapper"
    mk_ObjectFinalizeFunc :: C_ObjectFinalizeFunc -> IO (FunPtr C_ObjectFinalizeFunc)

type ObjectFinalizeFunc =
    GObject.Object.Object ->
    IO ()

noObjectFinalizeFunc :: Maybe ObjectFinalizeFunc
noObjectFinalizeFunc = Nothing

genClosure_ObjectFinalizeFunc :: ObjectFinalizeFunc -> IO Closure
genClosure_ObjectFinalizeFunc cb = do
    let cb' = wrap_ObjectFinalizeFunc Nothing cb
    mk_ObjectFinalizeFunc cb' >>= newCClosure


wrap_ObjectFinalizeFunc ::
    Maybe (Ptr (FunPtr C_ObjectFinalizeFunc)) ->
    ObjectFinalizeFunc ->
    Ptr GObject.Object.Object ->
    IO ()
wrap_ObjectFinalizeFunc funptrptr _cb object = do
    object' <- (newObject GObject.Object.Object) object
    _cb  object'
    maybeReleaseFunPtr funptrptr


-- callback InterfaceInitFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The interface structure to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iface_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @interface_data supplied via the #GInterfaceInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to initialize a new\ninterface.  This function should initialize all internal data and\nallocate any resources required by the interface.\n\nThe members of @iface_data are guaranteed to have been filled with\nzeros before this function is called.", sinceVersion = Nothing}}
type C_InterfaceInitFunc =
    Ptr GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The interface structure to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iface_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @interface_data supplied via the #GInterfaceInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_InterfaceInitFunc :: FunPtr C_InterfaceInitFunc -> C_InterfaceInitFunc

dynamic_InterfaceInitFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_InterfaceInitFunc
    -> GObject.TypeInterface.TypeInterface
    {- ^ /@gIface@/: The interface structure to initialize -}
    -> Ptr ()
    {- ^ /@ifaceData@/: The /@interfaceData@/ supplied via the 'GI.GObject.Structs.InterfaceInfo.InterfaceInfo' structure -}
    -> m ()
dynamic_InterfaceInitFunc __funPtr gIface ifaceData = liftIO $ do
    gIface' <- unsafeManagedPtrGetPtr gIface
    (__dynamic_C_InterfaceInitFunc __funPtr) gIface' ifaceData
    touchManagedPtr gIface
    return ()

foreign import ccall "wrapper"
    mk_InterfaceInitFunc :: C_InterfaceInitFunc -> IO (FunPtr C_InterfaceInitFunc)

type InterfaceInitFunc =
    GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()

noInterfaceInitFunc :: Maybe InterfaceInitFunc
noInterfaceInitFunc = Nothing

genClosure_InterfaceInitFunc :: InterfaceInitFunc -> IO Closure
genClosure_InterfaceInitFunc cb = do
    let cb' = wrap_InterfaceInitFunc Nothing cb
    mk_InterfaceInitFunc cb' >>= newCClosure


wrap_InterfaceInitFunc ::
    Maybe (Ptr (FunPtr C_InterfaceInitFunc)) ->
    InterfaceInitFunc ->
    Ptr GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()
wrap_InterfaceInitFunc funptrptr _cb gIface ifaceData = do
    gIface' <- (newPtr GObject.TypeInterface.TypeInterface) gIface
    _cb  gIface' ifaceData
    maybeReleaseFunPtr funptrptr


-- callback InterfaceFinalizeFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The interface structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iface_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @interface_data supplied via the #GInterfaceInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to finalize an interface.\nThis function should destroy any internal data and release any resources\nallocated by the corresponding GInterfaceInitFunc() function.", sinceVersion = Nothing}}
type C_InterfaceFinalizeFunc =
    Ptr GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "g_iface", argType = TInterface (Name {namespace = "GObject", name = "TypeInterface"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The interface structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iface_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @interface_data supplied via the #GInterfaceInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_InterfaceFinalizeFunc :: FunPtr C_InterfaceFinalizeFunc -> C_InterfaceFinalizeFunc

dynamic_InterfaceFinalizeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_InterfaceFinalizeFunc
    -> GObject.TypeInterface.TypeInterface
    {- ^ /@gIface@/: The interface structure to finalize -}
    -> Ptr ()
    {- ^ /@ifaceData@/: The /@interfaceData@/ supplied via the 'GI.GObject.Structs.InterfaceInfo.InterfaceInfo' structure -}
    -> m ()
dynamic_InterfaceFinalizeFunc __funPtr gIface ifaceData = liftIO $ do
    gIface' <- unsafeManagedPtrGetPtr gIface
    (__dynamic_C_InterfaceFinalizeFunc __funPtr) gIface' ifaceData
    touchManagedPtr gIface
    return ()

foreign import ccall "wrapper"
    mk_InterfaceFinalizeFunc :: C_InterfaceFinalizeFunc -> IO (FunPtr C_InterfaceFinalizeFunc)

type InterfaceFinalizeFunc =
    GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()

noInterfaceFinalizeFunc :: Maybe InterfaceFinalizeFunc
noInterfaceFinalizeFunc = Nothing

genClosure_InterfaceFinalizeFunc :: InterfaceFinalizeFunc -> IO Closure
genClosure_InterfaceFinalizeFunc cb = do
    let cb' = wrap_InterfaceFinalizeFunc Nothing cb
    mk_InterfaceFinalizeFunc cb' >>= newCClosure


wrap_InterfaceFinalizeFunc ::
    Maybe (Ptr (FunPtr C_InterfaceFinalizeFunc)) ->
    InterfaceFinalizeFunc ->
    Ptr GObject.TypeInterface.TypeInterface ->
    Ptr () ->
    IO ()
wrap_InterfaceFinalizeFunc funptrptr _cb gIface ifaceData = do
    gIface' <- (newPtr GObject.TypeInterface.TypeInterface) gIface
    _cb  gIface' ifaceData
    maybeReleaseFunPtr funptrptr


-- callback InstanceInitFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "instance", argType = TInterface (Name {namespace = "GObject", name = "TypeInstance"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The instance to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The class of the type the instance is\n   created for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to initialize a new\ninstance of a type. This function initializes all instance members and\nallocates any resources required by it.\n\nInitialization of a derived instance involves calling all its parent\ntypes instance initializers, so the class member of the instance\nis altered during its initialization to always point to the class that\nbelongs to the type the current initializer was introduced for.\n\nThe extended members of @instance are guaranteed to have been filled with\nzeros before this function is called.", sinceVersion = Nothing}}
type C_InstanceInitFunc =
    Ptr GObject.TypeInstance.TypeInstance ->
    Ptr GObject.TypeClass.TypeClass ->
    IO ()

-- Args : [Arg {argCName = "instance", argType = TInterface (Name {namespace = "GObject", name = "TypeInstance"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The instance to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The class of the type the instance is\n   created for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_InstanceInitFunc :: FunPtr C_InstanceInitFunc -> C_InstanceInitFunc

dynamic_InstanceInitFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_InstanceInitFunc
    -> GObject.TypeInstance.TypeInstance
    {- ^ /@instance@/: The instance to initialize -}
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The class of the type the instance is
   created for -}
    -> m ()
dynamic_InstanceInitFunc __funPtr instance_ gClass = liftIO $ do
    instance_' <- unsafeManagedPtrGetPtr instance_
    gClass' <- unsafeManagedPtrGetPtr gClass
    (__dynamic_C_InstanceInitFunc __funPtr) instance_' gClass'
    touchManagedPtr instance_
    touchManagedPtr gClass
    return ()

foreign import ccall "wrapper"
    mk_InstanceInitFunc :: C_InstanceInitFunc -> IO (FunPtr C_InstanceInitFunc)

type InstanceInitFunc =
    GObject.TypeInstance.TypeInstance ->
    GObject.TypeClass.TypeClass ->
    IO ()

noInstanceInitFunc :: Maybe InstanceInitFunc
noInstanceInitFunc = Nothing

genClosure_InstanceInitFunc :: InstanceInitFunc -> IO Closure
genClosure_InstanceInitFunc cb = do
    let cb' = wrap_InstanceInitFunc Nothing cb
    mk_InstanceInitFunc cb' >>= newCClosure


wrap_InstanceInitFunc ::
    Maybe (Ptr (FunPtr C_InstanceInitFunc)) ->
    InstanceInitFunc ->
    Ptr GObject.TypeInstance.TypeInstance ->
    Ptr GObject.TypeClass.TypeClass ->
    IO ()
wrap_InstanceInitFunc funptrptr _cb instance_ gClass = do
    instance_' <- (newPtr GObject.TypeInstance.TypeInstance) instance_
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    _cb  instance_' gClass'
    maybeReleaseFunPtr funptrptr


-- callback ClosureNotify
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data specified when registering the notification callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "closure", argType = TInterface (Name {namespace = "GObject", name = "Closure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GClosure on which the notification is emitted", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type used for the various notification callbacks which can be registered\non closures.", sinceVersion = Nothing}}
type C_ClosureNotify =
    Ptr () ->
    Ptr Closure ->
    IO ()

-- Args : [Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data specified when registering the notification callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "closure", argType = TInterface (Name {namespace = "GObject", name = "Closure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GClosure on which the notification is emitted", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ClosureNotify :: FunPtr C_ClosureNotify -> C_ClosureNotify

dynamic_ClosureNotify ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ClosureNotify
    -> Ptr ()
    {- ^ /@data@/: data specified when registering the notification callback -}
    -> Closure
    {- ^ /@closure@/: the 'GI.GObject.Structs.Closure.Closure' on which the notification is emitted -}
    -> m ()
dynamic_ClosureNotify __funPtr data_ closure = liftIO $ do
    closure' <- unsafeManagedPtrGetPtr closure
    (__dynamic_C_ClosureNotify __funPtr) data_ closure'
    touchManagedPtr closure
    return ()

foreign import ccall "wrapper"
    mk_ClosureNotify :: C_ClosureNotify -> IO (FunPtr C_ClosureNotify)

type ClosureNotify =
    Ptr () ->
    Closure ->
    IO ()

noClosureNotify :: Maybe ClosureNotify
noClosureNotify = Nothing

genClosure_ClosureNotify :: ClosureNotify -> IO Closure
genClosure_ClosureNotify cb = do
    let cb' = wrap_ClosureNotify Nothing cb
    mk_ClosureNotify cb' >>= newCClosure


wrap_ClosureNotify ::
    Maybe (Ptr (FunPtr C_ClosureNotify)) ->
    ClosureNotify ->
    Ptr () ->
    Ptr Closure ->
    IO ()
wrap_ClosureNotify funptrptr _cb data_ closure = do
    B.ManagedPtr.withTransient Closure closure $ \closure' -> do
        _cb  data_ closure'
        maybeReleaseFunPtr funptrptr


-- callback ClosureMarshalFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "closure", argType = TInterface (Name {namespace = "GObject", name = "Closure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_param_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "param_values", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "invocation_hint", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "marshal_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
type C_ClosureMarshalFieldCallback =
    Ptr Closure ->
    Ptr GValue ->
    Word32 ->
    Ptr GValue ->
    Ptr () ->
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "closure", argType = TInterface (Name {namespace = "GObject", name = "Closure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_param_values", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "param_values", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "invocation_hint", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "marshal_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ClosureMarshalFieldCallback :: FunPtr C_ClosureMarshalFieldCallback -> C_ClosureMarshalFieldCallback

dynamic_ClosureMarshalFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ClosureMarshalFieldCallback
    -> Closure
    -> GValue
    -> Word32
    -> GValue
    -> Ptr ()
    -> Ptr ()
    -> m ()
dynamic_ClosureMarshalFieldCallback __funPtr closure returnValue nParamValues paramValues invocationHint marshalData = liftIO $ do
    closure' <- unsafeManagedPtrGetPtr closure
    returnValue' <- unsafeManagedPtrGetPtr returnValue
    paramValues' <- unsafeManagedPtrGetPtr paramValues
    (__dynamic_C_ClosureMarshalFieldCallback __funPtr) closure' returnValue' nParamValues paramValues' invocationHint marshalData
    touchManagedPtr closure
    touchManagedPtr returnValue
    touchManagedPtr paramValues
    return ()

foreign import ccall "wrapper"
    mk_ClosureMarshalFieldCallback :: C_ClosureMarshalFieldCallback -> IO (FunPtr C_ClosureMarshalFieldCallback)

type ClosureMarshalFieldCallback =
    Closure ->
    GValue ->
    Word32 ->
    GValue ->
    Ptr () ->
    Ptr () ->
    IO ()

noClosureMarshalFieldCallback :: Maybe ClosureMarshalFieldCallback
noClosureMarshalFieldCallback = Nothing

genClosure_ClosureMarshalFieldCallback :: ClosureMarshalFieldCallback -> IO Closure
genClosure_ClosureMarshalFieldCallback cb = do
    let cb' = wrap_ClosureMarshalFieldCallback Nothing cb
    mk_ClosureMarshalFieldCallback cb' >>= newCClosure


wrap_ClosureMarshalFieldCallback ::
    Maybe (Ptr (FunPtr C_ClosureMarshalFieldCallback)) ->
    ClosureMarshalFieldCallback ->
    Ptr Closure ->
    Ptr GValue ->
    Word32 ->
    Ptr GValue ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_ClosureMarshalFieldCallback funptrptr _cb closure returnValue nParamValues paramValues invocationHint marshalData = do
    B.ManagedPtr.withTransient Closure closure $ \closure' -> do
        B.ManagedPtr.withTransient GValue returnValue $ \returnValue' -> do
            B.ManagedPtr.withTransient GValue paramValues $ \paramValues' -> do
                _cb  closure' returnValue' nParamValues paramValues' invocationHint marshalData
                maybeReleaseFunPtr funptrptr


-- callback ClassInitFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to initialize.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "class_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @class_data member supplied via the #GTypeInfo structure.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to initialize the class\nof a specific type. This function should initialize all static class\nmembers.\n\nThe initialization process of a class involves:\n\n- Copying common members from the parent class over to the\n  derived class structure.\n- Zero initialization of the remaining members not copied\n  over from the parent class.\n- Invocation of the GBaseInitFunc() initializers of all parent\n  types and the class' type.\n- Invocation of the class' GClassInitFunc() initializer.\n\nSince derived classes are partially initialized through a memory copy\nof the parent class, the general rule is that GBaseInitFunc() and\nGBaseFinalizeFunc() should take care of necessary reinitialization\nand release of those class members that were introduced by the type\nthat specified these GBaseInitFunc()/GBaseFinalizeFunc().\nGClassInitFunc() should only care about initializing static\nclass members, while dynamic class members (such as allocated strings\nor reference counted resources) are better handled by a GBaseInitFunc()\nfor this type, so proper initialization of the dynamic class members\nis performed for class initialization of derived types as well.\n\nAn example may help to correspond the intend of the different class\ninitializers:\n\n|[<!-- language=\"C\" -->\ntypedef struct {\n  GObjectClass parent_class;\n  gint         static_integer;\n  gchar       *dynamic_string;\n} TypeAClass;\nstatic void\ntype_a_base_class_init (TypeAClass *class)\n{\n  class->dynamic_string = g_strdup (\"some string\");\n}\nstatic void\ntype_a_base_class_finalize (TypeAClass *class)\n{\n  g_free (class->dynamic_string);\n}\nstatic void\ntype_a_class_init (TypeAClass *class)\n{\n  class->static_integer = 42;\n}\n\ntypedef struct {\n  TypeAClass   parent_class;\n  gfloat       static_float;\n  GString     *dynamic_gstring;\n} TypeBClass;\nstatic void\ntype_b_base_class_init (TypeBClass *class)\n{\n  class->dynamic_gstring = g_string_new (\"some other string\");\n}\nstatic void\ntype_b_base_class_finalize (TypeBClass *class)\n{\n  g_string_free (class->dynamic_gstring);\n}\nstatic void\ntype_b_class_init (TypeBClass *class)\n{\n  class->static_float = 3.14159265358979323846;\n}\n]|\nInitialization of TypeBClass will first cause initialization of\nTypeAClass (derived classes reference their parent classes, see\ng_type_class_ref() on this).\n\nInitialization of TypeAClass roughly involves zero-initializing its fields,\nthen calling its GBaseInitFunc() type_a_base_class_init() to allocate\nits dynamic members (dynamic_string), and finally calling its GClassInitFunc()\ntype_a_class_init() to initialize its static members (static_integer).\nThe first step in the initialization process of TypeBClass is then\na plain memory copy of the contents of TypeAClass into TypeBClass and\nzero-initialization of the remaining fields in TypeBClass.\nThe dynamic members of TypeAClass within TypeBClass now need\nreinitialization which is performed by calling type_a_base_class_init()\nwith an argument of TypeBClass.\n\nAfter that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init()\nis called to allocate the dynamic members of TypeBClass (dynamic_gstring),\nand finally the GClassInitFunc() of TypeBClass, type_b_class_init(),\nis called to complete the initialization process with the static members\n(static_float).\n\nCorresponding finalization counter parts to the GBaseInitFunc() functions\nhave to be provided to release allocated resources at class finalization\ntime.", sinceVersion = Nothing}}
type C_ClassInitFunc =
    Ptr GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to initialize.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "class_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @class_data member supplied via the #GTypeInfo structure.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ClassInitFunc :: FunPtr C_ClassInitFunc -> C_ClassInitFunc

dynamic_ClassInitFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ClassInitFunc
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The 'GI.GObject.Structs.TypeClass.TypeClass' structure to initialize. -}
    -> Ptr ()
    {- ^ /@classData@/: The /@classData@/ member supplied via the 'GI.GObject.Structs.TypeInfo.TypeInfo' structure. -}
    -> m ()
dynamic_ClassInitFunc __funPtr gClass classData = liftIO $ do
    gClass' <- unsafeManagedPtrGetPtr gClass
    (__dynamic_C_ClassInitFunc __funPtr) gClass' classData
    touchManagedPtr gClass
    return ()

foreign import ccall "wrapper"
    mk_ClassInitFunc :: C_ClassInitFunc -> IO (FunPtr C_ClassInitFunc)

type ClassInitFunc =
    GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()

noClassInitFunc :: Maybe ClassInitFunc
noClassInitFunc = Nothing

genClosure_ClassInitFunc :: ClassInitFunc -> IO Closure
genClosure_ClassInitFunc cb = do
    let cb' = wrap_ClassInitFunc Nothing cb
    mk_ClassInitFunc cb' >>= newCClosure


wrap_ClassInitFunc ::
    Maybe (Ptr (FunPtr C_ClassInitFunc)) ->
    ClassInitFunc ->
    Ptr GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()
wrap_ClassInitFunc funptrptr _cb gClass classData = do
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    _cb  gClass' classData
    maybeReleaseFunPtr funptrptr


-- callback ClassFinalizeFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "class_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @class_data member supplied via the #GTypeInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to finalize a class.\nThis function is rarely needed, as dynamically allocated class resources\nshould be handled by GBaseInitFunc() and GBaseFinalizeFunc().\nAlso, specification of a GClassFinalizeFunc() in the #GTypeInfo\nstructure of a static type is invalid, because classes of static types\nwill never be finalized (they are artificially kept alive when their\nreference count drops to zero).", sinceVersion = Nothing}}
type C_ClassFinalizeFunc =
    Ptr GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "class_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The @class_data member supplied via the #GTypeInfo structure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ClassFinalizeFunc :: FunPtr C_ClassFinalizeFunc -> C_ClassFinalizeFunc

dynamic_ClassFinalizeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_ClassFinalizeFunc
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The 'GI.GObject.Structs.TypeClass.TypeClass' structure to finalize -}
    -> Ptr ()
    {- ^ /@classData@/: The /@classData@/ member supplied via the 'GI.GObject.Structs.TypeInfo.TypeInfo' structure -}
    -> m ()
dynamic_ClassFinalizeFunc __funPtr gClass classData = liftIO $ do
    gClass' <- unsafeManagedPtrGetPtr gClass
    (__dynamic_C_ClassFinalizeFunc __funPtr) gClass' classData
    touchManagedPtr gClass
    return ()

foreign import ccall "wrapper"
    mk_ClassFinalizeFunc :: C_ClassFinalizeFunc -> IO (FunPtr C_ClassFinalizeFunc)

type ClassFinalizeFunc =
    GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()

noClassFinalizeFunc :: Maybe ClassFinalizeFunc
noClassFinalizeFunc = Nothing

genClosure_ClassFinalizeFunc :: ClassFinalizeFunc -> IO Closure
genClosure_ClassFinalizeFunc cb = do
    let cb' = wrap_ClassFinalizeFunc Nothing cb
    mk_ClassFinalizeFunc cb' >>= newCClosure


wrap_ClassFinalizeFunc ::
    Maybe (Ptr (FunPtr C_ClassFinalizeFunc)) ->
    ClassFinalizeFunc ->
    Ptr GObject.TypeClass.TypeClass ->
    Ptr () ->
    IO ()
wrap_ClassFinalizeFunc funptrptr _cb gClass classData = do
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    _cb  gClass' classData
    maybeReleaseFunPtr funptrptr


-- callback Callback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type used for callback functions in structure definitions and function\nsignatures. This doesn't mean that all callback functions must take no\nparameters and return void. The required signature of a callback function\nis determined by the context in which is used (e.g. the signal to which it\nis connected). Use G_CALLBACK() to cast the callback function to a #GCallback.", sinceVersion = Nothing}}
type C_Callback =
    IO ()

-- Args : []
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_Callback :: FunPtr C_Callback -> C_Callback

dynamic_Callback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_Callback
    -> m ()
dynamic_Callback __funPtr = liftIO $ do
    (__dynamic_C_Callback __funPtr)
    return ()

foreign import ccall "wrapper"
    mk_Callback :: C_Callback -> IO (FunPtr C_Callback)

type Callback =
    IO ()

noCallback :: Maybe Callback
noCallback = Nothing

genClosure_Callback :: Callback -> IO Closure
genClosure_Callback cb = do
    let cb' = wrap_Callback Nothing cb
    mk_Callback cb' >>= newCClosure


wrap_Callback ::
    Maybe (Ptr (FunPtr C_Callback)) ->
    Callback ->
    IO ()
wrap_Callback funptrptr _cb = do
    _cb 
    maybeReleaseFunPtr funptrptr


-- callback BoxedFreeFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "boxed", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The boxed structure to be freed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "This function is provided by the user and should free the boxed\nstructure passed.", sinceVersion = Nothing}}
type C_BoxedFreeFunc =
    Ptr () ->
    IO ()

-- Args : [Arg {argCName = "boxed", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The boxed structure to be freed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BoxedFreeFunc :: FunPtr C_BoxedFreeFunc -> C_BoxedFreeFunc

dynamic_BoxedFreeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BoxedFreeFunc
    -> Ptr ()
    {- ^ /@boxed@/: The boxed structure to be freed. -}
    -> m ()
dynamic_BoxedFreeFunc __funPtr boxed = liftIO $ do
    (__dynamic_C_BoxedFreeFunc __funPtr) boxed
    return ()

foreign import ccall "wrapper"
    mk_BoxedFreeFunc :: C_BoxedFreeFunc -> IO (FunPtr C_BoxedFreeFunc)

type BoxedFreeFunc =
    Ptr () ->
    IO ()

noBoxedFreeFunc :: Maybe BoxedFreeFunc
noBoxedFreeFunc = Nothing

genClosure_BoxedFreeFunc :: BoxedFreeFunc -> IO Closure
genClosure_BoxedFreeFunc cb = do
    let cb' = wrap_BoxedFreeFunc Nothing cb
    mk_BoxedFreeFunc cb' >>= newCClosure


wrap_BoxedFreeFunc ::
    Maybe (Ptr (FunPtr C_BoxedFreeFunc)) ->
    BoxedFreeFunc ->
    Ptr () ->
    IO ()
wrap_BoxedFreeFunc funptrptr _cb boxed = do
    _cb  boxed
    maybeReleaseFunPtr funptrptr


-- callback BoxedCopyFunc
--          -> Callable {returnType = Just (TBasicType TPtr), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "The newly created copy of the boxed structure.", sinceVersion = Nothing}, args = [Arg {argCName = "boxed", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The boxed structure to be copied.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "This function is provided by the user and should produce a copy\nof the passed in boxed structure.", sinceVersion = Nothing}}
type C_BoxedCopyFunc =
    Ptr () ->
    IO (Ptr ())

-- Args : [Arg {argCName = "boxed", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The boxed structure to be copied.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BoxedCopyFunc :: FunPtr C_BoxedCopyFunc -> C_BoxedCopyFunc

dynamic_BoxedCopyFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BoxedCopyFunc
    -> Ptr ()
    {- ^ /@boxed@/: The boxed structure to be copied. -}
    -> m (Ptr ())
    {- ^ __Returns:__ The newly created copy of the boxed structure. -}
dynamic_BoxedCopyFunc __funPtr boxed = liftIO $ do
    result <- (__dynamic_C_BoxedCopyFunc __funPtr) boxed
    return result

foreign import ccall "wrapper"
    mk_BoxedCopyFunc :: C_BoxedCopyFunc -> IO (FunPtr C_BoxedCopyFunc)

type BoxedCopyFunc =
    Ptr () ->
    IO (Ptr ())

noBoxedCopyFunc :: Maybe BoxedCopyFunc
noBoxedCopyFunc = Nothing

genClosure_BoxedCopyFunc :: BoxedCopyFunc -> IO Closure
genClosure_BoxedCopyFunc cb = do
    let cb' = wrap_BoxedCopyFunc Nothing cb
    mk_BoxedCopyFunc cb' >>= newCClosure


wrap_BoxedCopyFunc ::
    Maybe (Ptr (FunPtr C_BoxedCopyFunc)) ->
    BoxedCopyFunc ->
    Ptr () ->
    IO (Ptr ())
wrap_BoxedCopyFunc funptrptr _cb boxed = do
    result <- _cb  boxed
    maybeReleaseFunPtr funptrptr
    return result


-- callback BindingTransformFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the transformation was successful, and %FALSE\n  otherwise", sinceVersion = Nothing}, args = [Arg {argCName = "binding", argType = TInterface (Name {namespace = "GObject", name = "Binding"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GBinding", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "from_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GValue containing the value to transform", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "to_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GValue in which to store the transformed value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data passed to the transform function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function to be called to transform @from_value to @to_value. If\nthis is the @transform_to function of a binding, then @from_value\nis the @source_property on the @source object, and @to_value is the\n@target_property on the @target object. If this is the\n@transform_from function of a %G_BINDING_BIDIRECTIONAL binding,\nthen those roles are reversed.", sinceVersion = Just "2.26"}}
type C_BindingTransformFunc =
    Ptr GObject.Binding.Binding ->
    Ptr GValue ->
    Ptr GValue ->
    Ptr () ->
    IO CInt

-- Args : [Arg {argCName = "binding", argType = TInterface (Name {namespace = "GObject", name = "Binding"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GBinding", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "from_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GValue containing the value to transform", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "to_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GValue in which to store the transformed value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data passed to the transform function", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BindingTransformFunc :: FunPtr C_BindingTransformFunc -> C_BindingTransformFunc

dynamic_BindingTransformFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Binding.IsBinding a) =>
    FunPtr C_BindingTransformFunc
    -> a
    {- ^ /@binding@/: a 'GI.GObject.Objects.Binding.Binding' -}
    -> GValue
    {- ^ /@fromValue@/: the 'GI.GObject.Structs.Value.Value' containing the value to transform -}
    -> GValue
    {- ^ /@toValue@/: the 'GI.GObject.Structs.Value.Value' in which to store the transformed value -}
    -> Ptr ()
    {- ^ /@userData@/: data passed to the transform function -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the transformation was successful, and 'False'
  otherwise -}
dynamic_BindingTransformFunc __funPtr binding fromValue toValue userData = liftIO $ do
    binding' <- unsafeManagedPtrCastPtr binding
    fromValue' <- unsafeManagedPtrGetPtr fromValue
    toValue' <- unsafeManagedPtrGetPtr toValue
    result <- (__dynamic_C_BindingTransformFunc __funPtr) binding' fromValue' toValue' userData
    let result' = (/= 0) result
    touchManagedPtr binding
    touchManagedPtr fromValue
    touchManagedPtr toValue
    return result'

foreign import ccall "wrapper"
    mk_BindingTransformFunc :: C_BindingTransformFunc -> IO (FunPtr C_BindingTransformFunc)

type BindingTransformFunc =
    GObject.Binding.Binding ->
    GValue ->
    GValue ->
    IO Bool

noBindingTransformFunc :: Maybe BindingTransformFunc
noBindingTransformFunc = Nothing

type BindingTransformFunc_WithClosures =
    GObject.Binding.Binding ->
    GValue ->
    GValue ->
    Ptr () ->
    IO Bool

noBindingTransformFunc_WithClosures :: Maybe BindingTransformFunc_WithClosures
noBindingTransformFunc_WithClosures = Nothing

drop_closures_BindingTransformFunc :: BindingTransformFunc -> BindingTransformFunc_WithClosures
drop_closures_BindingTransformFunc _f binding fromValue toValue _ = _f binding fromValue toValue

genClosure_BindingTransformFunc :: BindingTransformFunc -> IO Closure
genClosure_BindingTransformFunc cb = do
    let cb' = drop_closures_BindingTransformFunc cb
    let cb'' = wrap_BindingTransformFunc Nothing cb'
    mk_BindingTransformFunc cb'' >>= newCClosure


wrap_BindingTransformFunc ::
    Maybe (Ptr (FunPtr C_BindingTransformFunc)) ->
    BindingTransformFunc_WithClosures ->
    Ptr GObject.Binding.Binding ->
    Ptr GValue ->
    Ptr GValue ->
    Ptr () ->
    IO CInt
wrap_BindingTransformFunc funptrptr _cb binding fromValue toValue userData = do
    binding' <- (newObject GObject.Binding.Binding) binding
    B.ManagedPtr.withTransient GValue fromValue $ \fromValue' -> do
        B.ManagedPtr.withTransient GValue toValue $ \toValue' -> do
            result <- _cb  binding' fromValue' toValue' userData
            maybeReleaseFunPtr funptrptr
            let result' = (fromIntegral . fromEnum) result
            return result'


-- callback BaseInitFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to do base initialization\nof the class structures of derived types. It is called as part of the\ninitialization process of all derived classes and should reallocate\nor reset all dynamic class members copied over from the parent class.\nFor example, class members (such as strings) that are not sufficiently\nhandled by a plain memory copy of the parent class into the derived class\nhave to be altered. See GClassInitFunc() for a discussion of the class\ninitialization process.", sinceVersion = Nothing}}
type C_BaseInitFunc =
    Ptr GObject.TypeClass.TypeClass ->
    IO ()

-- Args : [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to initialize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BaseInitFunc :: FunPtr C_BaseInitFunc -> C_BaseInitFunc

dynamic_BaseInitFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BaseInitFunc
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The 'GI.GObject.Structs.TypeClass.TypeClass' structure to initialize -}
    -> m ()
dynamic_BaseInitFunc __funPtr gClass = liftIO $ do
    gClass' <- unsafeManagedPtrGetPtr gClass
    (__dynamic_C_BaseInitFunc __funPtr) gClass'
    touchManagedPtr gClass
    return ()

foreign import ccall "wrapper"
    mk_BaseInitFunc :: C_BaseInitFunc -> IO (FunPtr C_BaseInitFunc)

type BaseInitFunc =
    GObject.TypeClass.TypeClass ->
    IO ()

noBaseInitFunc :: Maybe BaseInitFunc
noBaseInitFunc = Nothing

genClosure_BaseInitFunc :: BaseInitFunc -> IO Closure
genClosure_BaseInitFunc cb = do
    let cb' = wrap_BaseInitFunc Nothing cb
    mk_BaseInitFunc cb' >>= newCClosure


wrap_BaseInitFunc ::
    Maybe (Ptr (FunPtr C_BaseInitFunc)) ->
    BaseInitFunc ->
    Ptr GObject.TypeClass.TypeClass ->
    IO ()
wrap_BaseInitFunc funptrptr _cb gClass = do
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    _cb  gClass'
    maybeReleaseFunPtr funptrptr


-- callback BaseFinalizeFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A callback function used by the type system to finalize those portions\nof a derived types class structure that were setup from the corresponding\nGBaseInitFunc() function. Class finalization basically works the inverse\nway in which class initialization is performed.\nSee GClassInitFunc() for a discussion of the class initialization process.", sinceVersion = Nothing}}
type C_BaseFinalizeFunc =
    Ptr GObject.TypeClass.TypeClass ->
    IO ()

-- Args : [Arg {argCName = "g_class", argType = TInterface (Name {namespace = "GObject", name = "TypeClass"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GTypeClass structure to finalize", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BaseFinalizeFunc :: FunPtr C_BaseFinalizeFunc -> C_BaseFinalizeFunc

dynamic_BaseFinalizeFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_BaseFinalizeFunc
    -> GObject.TypeClass.TypeClass
    {- ^ /@gClass@/: The 'GI.GObject.Structs.TypeClass.TypeClass' structure to finalize -}
    -> m ()
dynamic_BaseFinalizeFunc __funPtr gClass = liftIO $ do
    gClass' <- unsafeManagedPtrGetPtr gClass
    (__dynamic_C_BaseFinalizeFunc __funPtr) gClass'
    touchManagedPtr gClass
    return ()

foreign import ccall "wrapper"
    mk_BaseFinalizeFunc :: C_BaseFinalizeFunc -> IO (FunPtr C_BaseFinalizeFunc)

type BaseFinalizeFunc =
    GObject.TypeClass.TypeClass ->
    IO ()

noBaseFinalizeFunc :: Maybe BaseFinalizeFunc
noBaseFinalizeFunc = Nothing

genClosure_BaseFinalizeFunc :: BaseFinalizeFunc -> IO Closure
genClosure_BaseFinalizeFunc cb = do
    let cb' = wrap_BaseFinalizeFunc Nothing cb
    mk_BaseFinalizeFunc cb' >>= newCClosure


wrap_BaseFinalizeFunc ::
    Maybe (Ptr (FunPtr C_BaseFinalizeFunc)) ->
    BaseFinalizeFunc ->
    Ptr GObject.TypeClass.TypeClass ->
    IO ()
wrap_BaseFinalizeFunc funptrptr _cb gClass = do
    gClass' <- (newPtr GObject.TypeClass.TypeClass) gClass
    _cb  gClass'
    maybeReleaseFunPtr funptrptr