#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Callbacks
(
C_ChildWatchFunc ,
ChildWatchFunc ,
ChildWatchFunc_WithClosures ,
drop_closures_ChildWatchFunc ,
dynamic_ChildWatchFunc ,
genClosure_ChildWatchFunc ,
mk_ChildWatchFunc ,
noChildWatchFunc ,
noChildWatchFunc_WithClosures ,
wrap_ChildWatchFunc ,
C_ClearHandleFunc ,
ClearHandleFunc ,
dynamic_ClearHandleFunc ,
genClosure_ClearHandleFunc ,
mk_ClearHandleFunc ,
noClearHandleFunc ,
wrap_ClearHandleFunc ,
C_CompareDataFunc ,
CompareDataFunc ,
CompareDataFunc_WithClosures ,
drop_closures_CompareDataFunc ,
dynamic_CompareDataFunc ,
genClosure_CompareDataFunc ,
mk_CompareDataFunc ,
noCompareDataFunc ,
noCompareDataFunc_WithClosures ,
wrap_CompareDataFunc ,
C_CompareFunc ,
CompareFunc ,
dynamic_CompareFunc ,
genClosure_CompareFunc ,
mk_CompareFunc ,
noCompareFunc ,
wrap_CompareFunc ,
C_CopyFunc ,
CopyFunc ,
dynamic_CopyFunc ,
genClosure_CopyFunc ,
mk_CopyFunc ,
noCopyFunc ,
wrap_CopyFunc ,
C_DataForeachFunc ,
DataForeachFunc ,
DataForeachFunc_WithClosures ,
drop_closures_DataForeachFunc ,
dynamic_DataForeachFunc ,
genClosure_DataForeachFunc ,
mk_DataForeachFunc ,
noDataForeachFunc ,
noDataForeachFunc_WithClosures ,
wrap_DataForeachFunc ,
C_DestroyNotify ,
DestroyNotify ,
dynamic_DestroyNotify ,
genClosure_DestroyNotify ,
mk_DestroyNotify ,
noDestroyNotify ,
wrap_DestroyNotify ,
C_DuplicateFunc ,
DuplicateFunc ,
DuplicateFunc_WithClosures ,
drop_closures_DuplicateFunc ,
dynamic_DuplicateFunc ,
genClosure_DuplicateFunc ,
mk_DuplicateFunc ,
noDuplicateFunc ,
noDuplicateFunc_WithClosures ,
wrap_DuplicateFunc ,
C_EqualFunc ,
EqualFunc ,
dynamic_EqualFunc ,
genClosure_EqualFunc ,
mk_EqualFunc ,
noEqualFunc ,
wrap_EqualFunc ,
C_ErrorClearFunc ,
ErrorClearFunc ,
dynamic_ErrorClearFunc ,
genClosure_ErrorClearFunc ,
mk_ErrorClearFunc ,
noErrorClearFunc ,
wrap_ErrorClearFunc ,
C_ErrorCopyFunc ,
ErrorCopyFunc ,
dynamic_ErrorCopyFunc ,
genClosure_ErrorCopyFunc ,
mk_ErrorCopyFunc ,
noErrorCopyFunc ,
wrap_ErrorCopyFunc ,
C_ErrorInitFunc ,
ErrorInitFunc ,
dynamic_ErrorInitFunc ,
genClosure_ErrorInitFunc ,
mk_ErrorInitFunc ,
noErrorInitFunc ,
wrap_ErrorInitFunc ,
C_FreeFunc ,
FreeFunc ,
dynamic_FreeFunc ,
genClosure_FreeFunc ,
mk_FreeFunc ,
noFreeFunc ,
wrap_FreeFunc ,
C_Func ,
Func ,
Func_WithClosures ,
drop_closures_Func ,
dynamic_Func ,
genClosure_Func ,
mk_Func ,
noFunc ,
noFunc_WithClosures ,
wrap_Func ,
C_HFunc ,
HFunc ,
HFunc_WithClosures ,
drop_closures_HFunc ,
dynamic_HFunc ,
genClosure_HFunc ,
mk_HFunc ,
noHFunc ,
noHFunc_WithClosures ,
wrap_HFunc ,
C_HRFunc ,
HRFunc ,
HRFunc_WithClosures ,
drop_closures_HRFunc ,
dynamic_HRFunc ,
genClosure_HRFunc ,
mk_HRFunc ,
noHRFunc ,
noHRFunc_WithClosures ,
wrap_HRFunc ,
C_HashFunc ,
HashFunc ,
dynamic_HashFunc ,
genClosure_HashFunc ,
mk_HashFunc ,
noHashFunc ,
wrap_HashFunc ,
C_HookCheckFunc ,
HookCheckFunc ,
dynamic_HookCheckFunc ,
genClosure_HookCheckFunc ,
mk_HookCheckFunc ,
noHookCheckFunc ,
wrap_HookCheckFunc ,
C_HookCheckMarshaller ,
HookCheckMarshaller ,
dynamic_HookCheckMarshaller ,
genClosure_HookCheckMarshaller ,
mk_HookCheckMarshaller ,
noHookCheckMarshaller ,
wrap_HookCheckMarshaller ,
C_HookCompareFunc ,
HookCompareFunc ,
dynamic_HookCompareFunc ,
genClosure_HookCompareFunc ,
mk_HookCompareFunc ,
noHookCompareFunc ,
wrap_HookCompareFunc ,
C_HookFinalizeFunc ,
HookFinalizeFunc ,
dynamic_HookFinalizeFunc ,
genClosure_HookFinalizeFunc ,
mk_HookFinalizeFunc ,
noHookFinalizeFunc ,
wrap_HookFinalizeFunc ,
C_HookFindFunc ,
HookFindFunc ,
dynamic_HookFindFunc ,
genClosure_HookFindFunc ,
mk_HookFindFunc ,
noHookFindFunc ,
wrap_HookFindFunc ,
C_HookFunc ,
HookFunc ,
dynamic_HookFunc ,
genClosure_HookFunc ,
mk_HookFunc ,
noHookFunc ,
wrap_HookFunc ,
C_HookMarshaller ,
HookMarshaller ,
dynamic_HookMarshaller ,
genClosure_HookMarshaller ,
mk_HookMarshaller ,
noHookMarshaller ,
wrap_HookMarshaller ,
C_IOFunc ,
IOFunc ,
dynamic_IOFunc ,
genClosure_IOFunc ,
mk_IOFunc ,
noIOFunc ,
wrap_IOFunc ,
C_IOFuncsIoCloseFieldCallback ,
IOFuncsIoCloseFieldCallback ,
dynamic_IOFuncsIoCloseFieldCallback ,
mk_IOFuncsIoCloseFieldCallback ,
noIOFuncsIoCloseFieldCallback ,
C_IOFuncsIoCreateWatchFieldCallback ,
IOFuncsIoCreateWatchFieldCallback ,
dynamic_IOFuncsIoCreateWatchFieldCallback,
genClosure_IOFuncsIoCreateWatchFieldCallback,
mk_IOFuncsIoCreateWatchFieldCallback ,
noIOFuncsIoCreateWatchFieldCallback ,
wrap_IOFuncsIoCreateWatchFieldCallback ,
C_IOFuncsIoFreeFieldCallback ,
IOFuncsIoFreeFieldCallback ,
dynamic_IOFuncsIoFreeFieldCallback ,
genClosure_IOFuncsIoFreeFieldCallback ,
mk_IOFuncsIoFreeFieldCallback ,
noIOFuncsIoFreeFieldCallback ,
wrap_IOFuncsIoFreeFieldCallback ,
C_IOFuncsIoGetFlagsFieldCallback ,
IOFuncsIoGetFlagsFieldCallback ,
dynamic_IOFuncsIoGetFlagsFieldCallback ,
genClosure_IOFuncsIoGetFlagsFieldCallback,
mk_IOFuncsIoGetFlagsFieldCallback ,
noIOFuncsIoGetFlagsFieldCallback ,
wrap_IOFuncsIoGetFlagsFieldCallback ,
C_IOFuncsIoReadFieldCallback ,
IOFuncsIoReadFieldCallback ,
dynamic_IOFuncsIoReadFieldCallback ,
mk_IOFuncsIoReadFieldCallback ,
noIOFuncsIoReadFieldCallback ,
C_IOFuncsIoSeekFieldCallback ,
IOFuncsIoSeekFieldCallback ,
dynamic_IOFuncsIoSeekFieldCallback ,
mk_IOFuncsIoSeekFieldCallback ,
noIOFuncsIoSeekFieldCallback ,
C_IOFuncsIoSetFlagsFieldCallback ,
IOFuncsIoSetFlagsFieldCallback ,
dynamic_IOFuncsIoSetFlagsFieldCallback ,
mk_IOFuncsIoSetFlagsFieldCallback ,
noIOFuncsIoSetFlagsFieldCallback ,
C_IOFuncsIoWriteFieldCallback ,
IOFuncsIoWriteFieldCallback ,
dynamic_IOFuncsIoWriteFieldCallback ,
mk_IOFuncsIoWriteFieldCallback ,
noIOFuncsIoWriteFieldCallback ,
C_LogFunc ,
LogFunc ,
LogFunc_WithClosures ,
drop_closures_LogFunc ,
dynamic_LogFunc ,
genClosure_LogFunc ,
mk_LogFunc ,
noLogFunc ,
noLogFunc_WithClosures ,
wrap_LogFunc ,
C_LogWriterFunc ,
LogWriterFunc ,
LogWriterFunc_WithClosures ,
drop_closures_LogWriterFunc ,
dynamic_LogWriterFunc ,
genClosure_LogWriterFunc ,
mk_LogWriterFunc ,
noLogWriterFunc ,
noLogWriterFunc_WithClosures ,
wrap_LogWriterFunc ,
C_MarkupParserEndElementFieldCallback ,
MarkupParserEndElementFieldCallback ,
MarkupParserEndElementFieldCallback_WithClosures,
drop_closures_MarkupParserEndElementFieldCallback,
dynamic_MarkupParserEndElementFieldCallback,
mk_MarkupParserEndElementFieldCallback ,
noMarkupParserEndElementFieldCallback ,
noMarkupParserEndElementFieldCallback_WithClosures,
C_MarkupParserErrorFieldCallback ,
MarkupParserErrorFieldCallback ,
MarkupParserErrorFieldCallback_WithClosures,
drop_closures_MarkupParserErrorFieldCallback,
dynamic_MarkupParserErrorFieldCallback ,
genClosure_MarkupParserErrorFieldCallback,
mk_MarkupParserErrorFieldCallback ,
noMarkupParserErrorFieldCallback ,
noMarkupParserErrorFieldCallback_WithClosures,
wrap_MarkupParserErrorFieldCallback ,
C_MarkupParserPassthroughFieldCallback ,
MarkupParserPassthroughFieldCallback ,
MarkupParserPassthroughFieldCallback_WithClosures,
drop_closures_MarkupParserPassthroughFieldCallback,
dynamic_MarkupParserPassthroughFieldCallback,
mk_MarkupParserPassthroughFieldCallback ,
noMarkupParserPassthroughFieldCallback ,
noMarkupParserPassthroughFieldCallback_WithClosures,
C_MarkupParserStartElementFieldCallback ,
MarkupParserStartElementFieldCallback ,
MarkupParserStartElementFieldCallback_WithClosures,
drop_closures_MarkupParserStartElementFieldCallback,
dynamic_MarkupParserStartElementFieldCallback,
mk_MarkupParserStartElementFieldCallback,
noMarkupParserStartElementFieldCallback ,
noMarkupParserStartElementFieldCallback_WithClosures,
C_MarkupParserTextFieldCallback ,
MarkupParserTextFieldCallback ,
MarkupParserTextFieldCallback_WithClosures,
drop_closures_MarkupParserTextFieldCallback,
dynamic_MarkupParserTextFieldCallback ,
mk_MarkupParserTextFieldCallback ,
noMarkupParserTextFieldCallback ,
noMarkupParserTextFieldCallback_WithClosures,
C_MemVTableCallocFieldCallback ,
MemVTableCallocFieldCallback ,
dynamic_MemVTableCallocFieldCallback ,
genClosure_MemVTableCallocFieldCallback ,
mk_MemVTableCallocFieldCallback ,
noMemVTableCallocFieldCallback ,
wrap_MemVTableCallocFieldCallback ,
C_MemVTableFreeFieldCallback ,
MemVTableFreeFieldCallback ,
dynamic_MemVTableFreeFieldCallback ,
genClosure_MemVTableFreeFieldCallback ,
mk_MemVTableFreeFieldCallback ,
noMemVTableFreeFieldCallback ,
wrap_MemVTableFreeFieldCallback ,
C_MemVTableMallocFieldCallback ,
MemVTableMallocFieldCallback ,
dynamic_MemVTableMallocFieldCallback ,
genClosure_MemVTableMallocFieldCallback ,
mk_MemVTableMallocFieldCallback ,
noMemVTableMallocFieldCallback ,
wrap_MemVTableMallocFieldCallback ,
C_MemVTableReallocFieldCallback ,
MemVTableReallocFieldCallback ,
dynamic_MemVTableReallocFieldCallback ,
genClosure_MemVTableReallocFieldCallback,
mk_MemVTableReallocFieldCallback ,
noMemVTableReallocFieldCallback ,
wrap_MemVTableReallocFieldCallback ,
C_MemVTableTryMallocFieldCallback ,
MemVTableTryMallocFieldCallback ,
dynamic_MemVTableTryMallocFieldCallback ,
genClosure_MemVTableTryMallocFieldCallback,
mk_MemVTableTryMallocFieldCallback ,
noMemVTableTryMallocFieldCallback ,
wrap_MemVTableTryMallocFieldCallback ,
C_MemVTableTryReallocFieldCallback ,
MemVTableTryReallocFieldCallback ,
dynamic_MemVTableTryReallocFieldCallback,
genClosure_MemVTableTryReallocFieldCallback,
mk_MemVTableTryReallocFieldCallback ,
noMemVTableTryReallocFieldCallback ,
wrap_MemVTableTryReallocFieldCallback ,
C_NodeForeachFunc ,
NodeForeachFunc ,
dynamic_NodeForeachFunc ,
genClosure_NodeForeachFunc ,
mk_NodeForeachFunc ,
noNodeForeachFunc ,
wrap_NodeForeachFunc ,
C_NodeTraverseFunc ,
NodeTraverseFunc ,
dynamic_NodeTraverseFunc ,
genClosure_NodeTraverseFunc ,
mk_NodeTraverseFunc ,
noNodeTraverseFunc ,
wrap_NodeTraverseFunc ,
C_OptionArgFunc ,
OptionArgFunc ,
dynamic_OptionArgFunc ,
mk_OptionArgFunc ,
noOptionArgFunc ,
C_OptionErrorFunc ,
OptionErrorFunc ,
dynamic_OptionErrorFunc ,
mk_OptionErrorFunc ,
noOptionErrorFunc ,
C_OptionParseFunc ,
OptionParseFunc ,
dynamic_OptionParseFunc ,
mk_OptionParseFunc ,
noOptionParseFunc ,
C_PollFunc ,
PollFunc ,
dynamic_PollFunc ,
genClosure_PollFunc ,
mk_PollFunc ,
noPollFunc ,
wrap_PollFunc ,
C_PrintFunc ,
PrintFunc ,
dynamic_PrintFunc ,
genClosure_PrintFunc ,
mk_PrintFunc ,
noPrintFunc ,
wrap_PrintFunc ,
C_RegexEvalCallback ,
RegexEvalCallback ,
RegexEvalCallback_WithClosures ,
drop_closures_RegexEvalCallback ,
dynamic_RegexEvalCallback ,
genClosure_RegexEvalCallback ,
mk_RegexEvalCallback ,
noRegexEvalCallback ,
noRegexEvalCallback_WithClosures ,
wrap_RegexEvalCallback ,
C_ScannerMsgFunc ,
ScannerMsgFunc ,
dynamic_ScannerMsgFunc ,
genClosure_ScannerMsgFunc ,
mk_ScannerMsgFunc ,
noScannerMsgFunc ,
wrap_ScannerMsgFunc ,
C_SequenceIterCompareFunc ,
SequenceIterCompareFunc ,
dynamic_SequenceIterCompareFunc ,
genClosure_SequenceIterCompareFunc ,
mk_SequenceIterCompareFunc ,
noSequenceIterCompareFunc ,
wrap_SequenceIterCompareFunc ,
C_SourceCallbackFuncsRefFieldCallback ,
SourceCallbackFuncsRefFieldCallback ,
dynamic_SourceCallbackFuncsRefFieldCallback,
genClosure_SourceCallbackFuncsRefFieldCallback,
mk_SourceCallbackFuncsRefFieldCallback ,
noSourceCallbackFuncsRefFieldCallback ,
wrap_SourceCallbackFuncsRefFieldCallback,
C_SourceCallbackFuncsUnrefFieldCallback ,
SourceCallbackFuncsUnrefFieldCallback ,
dynamic_SourceCallbackFuncsUnrefFieldCallback,
genClosure_SourceCallbackFuncsUnrefFieldCallback,
mk_SourceCallbackFuncsUnrefFieldCallback,
noSourceCallbackFuncsUnrefFieldCallback ,
wrap_SourceCallbackFuncsUnrefFieldCallback,
C_SourceDisposeFunc ,
SourceDisposeFunc ,
dynamic_SourceDisposeFunc ,
genClosure_SourceDisposeFunc ,
mk_SourceDisposeFunc ,
noSourceDisposeFunc ,
wrap_SourceDisposeFunc ,
C_SourceDummyMarshal ,
SourceDummyMarshal ,
dynamic_SourceDummyMarshal ,
genClosure_SourceDummyMarshal ,
mk_SourceDummyMarshal ,
noSourceDummyMarshal ,
wrap_SourceDummyMarshal ,
C_SourceFunc ,
SourceFunc ,
SourceFunc_WithClosures ,
drop_closures_SourceFunc ,
dynamic_SourceFunc ,
genClosure_SourceFunc ,
mk_SourceFunc ,
noSourceFunc ,
noSourceFunc_WithClosures ,
wrap_SourceFunc ,
C_SourceFuncsCheckFieldCallback ,
SourceFuncsCheckFieldCallback ,
dynamic_SourceFuncsCheckFieldCallback ,
genClosure_SourceFuncsCheckFieldCallback,
mk_SourceFuncsCheckFieldCallback ,
noSourceFuncsCheckFieldCallback ,
wrap_SourceFuncsCheckFieldCallback ,
C_SourceFuncsFinalizeFieldCallback ,
SourceFuncsFinalizeFieldCallback ,
dynamic_SourceFuncsFinalizeFieldCallback,
genClosure_SourceFuncsFinalizeFieldCallback,
mk_SourceFuncsFinalizeFieldCallback ,
noSourceFuncsFinalizeFieldCallback ,
wrap_SourceFuncsFinalizeFieldCallback ,
C_SourceFuncsPrepareFieldCallback ,
SourceFuncsPrepareFieldCallback ,
dynamic_SourceFuncsPrepareFieldCallback ,
genClosure_SourceFuncsPrepareFieldCallback,
mk_SourceFuncsPrepareFieldCallback ,
noSourceFuncsPrepareFieldCallback ,
wrap_SourceFuncsPrepareFieldCallback ,
C_SpawnChildSetupFunc ,
SpawnChildSetupFunc ,
SpawnChildSetupFunc_WithClosures ,
drop_closures_SpawnChildSetupFunc ,
dynamic_SpawnChildSetupFunc ,
genClosure_SpawnChildSetupFunc ,
mk_SpawnChildSetupFunc ,
noSpawnChildSetupFunc ,
noSpawnChildSetupFunc_WithClosures ,
wrap_SpawnChildSetupFunc ,
C_TestDataFunc ,
TestDataFunc ,
TestDataFunc_WithClosures ,
drop_closures_TestDataFunc ,
dynamic_TestDataFunc ,
genClosure_TestDataFunc ,
mk_TestDataFunc ,
noTestDataFunc ,
noTestDataFunc_WithClosures ,
wrap_TestDataFunc ,
C_TestFixtureFunc ,
TestFixtureFunc ,
TestFixtureFunc_WithClosures ,
drop_closures_TestFixtureFunc ,
dynamic_TestFixtureFunc ,
genClosure_TestFixtureFunc ,
mk_TestFixtureFunc ,
noTestFixtureFunc ,
noTestFixtureFunc_WithClosures ,
wrap_TestFixtureFunc ,
C_TestFunc ,
TestFunc ,
dynamic_TestFunc ,
genClosure_TestFunc ,
mk_TestFunc ,
noTestFunc ,
wrap_TestFunc ,
C_TestLogFatalFunc ,
TestLogFatalFunc ,
TestLogFatalFunc_WithClosures ,
drop_closures_TestLogFatalFunc ,
dynamic_TestLogFatalFunc ,
genClosure_TestLogFatalFunc ,
mk_TestLogFatalFunc ,
noTestLogFatalFunc ,
noTestLogFatalFunc_WithClosures ,
wrap_TestLogFatalFunc ,
C_ThreadFunc ,
ThreadFunc ,
dynamic_ThreadFunc ,
genClosure_ThreadFunc ,
mk_ThreadFunc ,
noThreadFunc ,
wrap_ThreadFunc ,
C_TranslateFunc ,
TranslateFunc ,
dynamic_TranslateFunc ,
genClosure_TranslateFunc ,
mk_TranslateFunc ,
noTranslateFunc ,
wrap_TranslateFunc ,
C_TraverseFunc ,
TraverseFunc ,
dynamic_TraverseFunc ,
genClosure_TraverseFunc ,
mk_TraverseFunc ,
noTraverseFunc ,
wrap_TraverseFunc ,
C_TraverseNodeFunc ,
TraverseNodeFunc ,
dynamic_TraverseNodeFunc ,
genClosure_TraverseNodeFunc ,
mk_TraverseNodeFunc ,
noTraverseNodeFunc ,
wrap_TraverseNodeFunc ,
C_UnixFDSourceFunc ,
UnixFDSourceFunc ,
UnixFDSourceFunc_WithClosures ,
drop_closures_UnixFDSourceFunc ,
dynamic_UnixFDSourceFunc ,
genClosure_UnixFDSourceFunc ,
mk_UnixFDSourceFunc ,
noUnixFDSourceFunc ,
noUnixFDSourceFunc_WithClosures ,
wrap_UnixFDSourceFunc ,
C_VoidFunc ,
VoidFunc ,
dynamic_VoidFunc ,
genClosure_VoidFunc ,
mk_VoidFunc ,
noVoidFunc ,
wrap_VoidFunc ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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 qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.GLib.Enums as GLib.Enums
import {-# SOURCE #-} qualified GI.GLib.Flags as GLib.Flags
import {-# SOURCE #-} qualified GI.GLib.Structs.Hook as GLib.Hook
import {-# SOURCE #-} qualified GI.GLib.Structs.HookList as GLib.HookList
import {-# SOURCE #-} qualified GI.GLib.Structs.IOChannel as GLib.IOChannel
import {-# SOURCE #-} qualified GI.GLib.Structs.LogField as GLib.LogField
import {-# SOURCE #-} qualified GI.GLib.Structs.MarkupParseContext as GLib.MarkupParseContext
import {-# SOURCE #-} qualified GI.GLib.Structs.MatchInfo as GLib.MatchInfo
import {-# SOURCE #-} qualified GI.GLib.Structs.Node as GLib.Node
import {-# SOURCE #-} qualified GI.GLib.Structs.OptionContext as GLib.OptionContext
import {-# SOURCE #-} qualified GI.GLib.Structs.OptionGroup as GLib.OptionGroup
import {-# SOURCE #-} qualified GI.GLib.Structs.PollFD as GLib.PollFD
import {-# SOURCE #-} qualified GI.GLib.Structs.Scanner as GLib.Scanner
import {-# SOURCE #-} qualified GI.GLib.Structs.SequenceIter as GLib.SequenceIter
import {-# SOURCE #-} qualified GI.GLib.Structs.Source as GLib.Source
import {-# SOURCE #-} qualified GI.GLib.Structs.String as GLib.String
import {-# SOURCE #-} qualified GI.GLib.Structs.TreeNode as GLib.TreeNode
type C_VoidFunc =
IO ()
foreign import ccall "dynamic" __dynamic_C_VoidFunc :: FunPtr C_VoidFunc -> C_VoidFunc
dynamic_VoidFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_VoidFunc
-> m ()
dynamic_VoidFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_VoidFunc -> m ()
dynamic_VoidFunc FunPtr C_VoidFunc
__funPtr = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_VoidFunc -> C_VoidFunc
__dynamic_C_VoidFunc FunPtr C_VoidFunc
__funPtr)
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_VoidFunc :: C_VoidFunc -> IO (FunPtr C_VoidFunc)
type VoidFunc =
IO ()
noVoidFunc :: Maybe VoidFunc
noVoidFunc :: Maybe C_VoidFunc
noVoidFunc = Maybe C_VoidFunc
forall a. Maybe a
Nothing
genClosure_VoidFunc :: MonadIO m => VoidFunc -> m (GClosure C_VoidFunc)
genClosure_VoidFunc :: forall (m :: * -> *).
MonadIO m =>
C_VoidFunc -> m (GClosure C_VoidFunc)
genClosure_VoidFunc C_VoidFunc
cb = IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VoidFunc
cb' = Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_VoidFunc Maybe (Ptr (FunPtr C_VoidFunc))
forall a. Maybe a
Nothing C_VoidFunc
cb
C_VoidFunc -> IO (FunPtr C_VoidFunc)
mk_VoidFunc C_VoidFunc
cb' IO (FunPtr C_VoidFunc)
-> (FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_VoidFunc ::
Maybe (Ptr (FunPtr C_VoidFunc)) ->
VoidFunc ->
C_VoidFunc
wrap_VoidFunc :: Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_VoidFunc Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr C_VoidFunc
gi'cb = do
C_VoidFunc
gi'cb
Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr
type C_UnixFDSourceFunc =
Int32 ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_UnixFDSourceFunc :: FunPtr C_UnixFDSourceFunc -> C_UnixFDSourceFunc
dynamic_UnixFDSourceFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_UnixFDSourceFunc
-> Int32
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> m Bool
dynamic_UnixFDSourceFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_UnixFDSourceFunc
-> Int32 -> [IOCondition] -> Ptr () -> m Bool
dynamic_UnixFDSourceFunc FunPtr C_UnixFDSourceFunc
__funPtr Int32
fd [IOCondition]
condition Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
let condition' :: CUInt
condition' = [IOCondition] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOCondition]
condition
CInt
result <- (FunPtr C_UnixFDSourceFunc -> C_UnixFDSourceFunc
__dynamic_C_UnixFDSourceFunc FunPtr C_UnixFDSourceFunc
__funPtr) Int32
fd CUInt
condition' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_UnixFDSourceFunc :: C_UnixFDSourceFunc -> IO (FunPtr C_UnixFDSourceFunc)
type UnixFDSourceFunc =
Int32
-> [GLib.Flags.IOCondition]
-> IO Bool
noUnixFDSourceFunc :: Maybe UnixFDSourceFunc
noUnixFDSourceFunc :: Maybe UnixFDSourceFunc
noUnixFDSourceFunc = Maybe UnixFDSourceFunc
forall a. Maybe a
Nothing
type UnixFDSourceFunc_WithClosures =
Int32
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> IO Bool
noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures
noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures
noUnixFDSourceFunc_WithClosures = Maybe UnixFDSourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_UnixFDSourceFunc :: UnixFDSourceFunc -> UnixFDSourceFunc_WithClosures
drop_closures_UnixFDSourceFunc :: UnixFDSourceFunc -> UnixFDSourceFunc_WithClosures
drop_closures_UnixFDSourceFunc UnixFDSourceFunc
_f Int32
fd [IOCondition]
condition Ptr ()
_ = UnixFDSourceFunc
_f Int32
fd [IOCondition]
condition
genClosure_UnixFDSourceFunc :: MonadIO m => UnixFDSourceFunc -> m (GClosure C_UnixFDSourceFunc)
genClosure_UnixFDSourceFunc :: forall (m :: * -> *).
MonadIO m =>
UnixFDSourceFunc -> m (GClosure C_UnixFDSourceFunc)
genClosure_UnixFDSourceFunc UnixFDSourceFunc
cb = IO (GClosure C_UnixFDSourceFunc) -> m (GClosure C_UnixFDSourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UnixFDSourceFunc)
-> m (GClosure C_UnixFDSourceFunc))
-> IO (GClosure C_UnixFDSourceFunc)
-> m (GClosure C_UnixFDSourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: UnixFDSourceFunc_WithClosures
cb' = UnixFDSourceFunc -> UnixFDSourceFunc_WithClosures
drop_closures_UnixFDSourceFunc UnixFDSourceFunc
cb
let cb'' :: C_UnixFDSourceFunc
cb'' = Maybe (Ptr (FunPtr C_UnixFDSourceFunc))
-> UnixFDSourceFunc_WithClosures -> C_UnixFDSourceFunc
wrap_UnixFDSourceFunc Maybe (Ptr (FunPtr C_UnixFDSourceFunc))
forall a. Maybe a
Nothing UnixFDSourceFunc_WithClosures
cb'
C_UnixFDSourceFunc -> IO (FunPtr C_UnixFDSourceFunc)
mk_UnixFDSourceFunc C_UnixFDSourceFunc
cb'' IO (FunPtr C_UnixFDSourceFunc)
-> (FunPtr C_UnixFDSourceFunc -> IO (GClosure C_UnixFDSourceFunc))
-> IO (GClosure C_UnixFDSourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UnixFDSourceFunc -> IO (GClosure C_UnixFDSourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UnixFDSourceFunc ::
Maybe (Ptr (FunPtr C_UnixFDSourceFunc)) ->
UnixFDSourceFunc_WithClosures ->
C_UnixFDSourceFunc
wrap_UnixFDSourceFunc :: Maybe (Ptr (FunPtr C_UnixFDSourceFunc))
-> UnixFDSourceFunc_WithClosures -> C_UnixFDSourceFunc
wrap_UnixFDSourceFunc Maybe (Ptr (FunPtr C_UnixFDSourceFunc))
gi'funptrptr UnixFDSourceFunc_WithClosures
gi'cb Int32
fd CUInt
condition Ptr ()
userData = do
let condition' :: [IOCondition]
condition' = CUInt -> [IOCondition]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
condition
Bool
result <- UnixFDSourceFunc_WithClosures
gi'cb Int32
fd [IOCondition]
condition' Ptr ()
userData
Maybe (Ptr (FunPtr C_UnixFDSourceFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_UnixFDSourceFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_TraverseNodeFunc =
Ptr GLib.TreeNode.TreeNode ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_TraverseNodeFunc :: FunPtr C_TraverseNodeFunc -> C_TraverseNodeFunc
dynamic_TraverseNodeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TraverseNodeFunc
-> GLib.TreeNode.TreeNode
-> Ptr ()
-> m Bool
dynamic_TraverseNodeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TraverseNodeFunc -> TreeNode -> Ptr () -> m Bool
dynamic_TraverseNodeFunc FunPtr C_TraverseNodeFunc
__funPtr TreeNode
node Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeNode
node' <- TreeNode -> IO (Ptr TreeNode)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeNode
node
CInt
result <- (FunPtr C_TraverseNodeFunc -> C_TraverseNodeFunc
__dynamic_C_TraverseNodeFunc FunPtr C_TraverseNodeFunc
__funPtr) Ptr TreeNode
node' Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
TreeNode -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr TreeNode
node
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_TraverseNodeFunc :: C_TraverseNodeFunc -> IO (FunPtr C_TraverseNodeFunc)
type TraverseNodeFunc =
GLib.TreeNode.TreeNode
-> Ptr ()
-> IO Bool
noTraverseNodeFunc :: Maybe TraverseNodeFunc
noTraverseNodeFunc :: Maybe TraverseNodeFunc
noTraverseNodeFunc = Maybe TraverseNodeFunc
forall a. Maybe a
Nothing
genClosure_TraverseNodeFunc :: MonadIO m => TraverseNodeFunc -> m (GClosure C_TraverseNodeFunc)
genClosure_TraverseNodeFunc :: forall (m :: * -> *).
MonadIO m =>
TraverseNodeFunc -> m (GClosure C_TraverseNodeFunc)
genClosure_TraverseNodeFunc TraverseNodeFunc
cb = IO (GClosure C_TraverseNodeFunc) -> m (GClosure C_TraverseNodeFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TraverseNodeFunc)
-> m (GClosure C_TraverseNodeFunc))
-> IO (GClosure C_TraverseNodeFunc)
-> m (GClosure C_TraverseNodeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TraverseNodeFunc
cb' = Maybe (Ptr (FunPtr C_TraverseNodeFunc))
-> TraverseNodeFunc -> C_TraverseNodeFunc
wrap_TraverseNodeFunc Maybe (Ptr (FunPtr C_TraverseNodeFunc))
forall a. Maybe a
Nothing TraverseNodeFunc
cb
C_TraverseNodeFunc -> IO (FunPtr C_TraverseNodeFunc)
mk_TraverseNodeFunc C_TraverseNodeFunc
cb' IO (FunPtr C_TraverseNodeFunc)
-> (FunPtr C_TraverseNodeFunc -> IO (GClosure C_TraverseNodeFunc))
-> IO (GClosure C_TraverseNodeFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TraverseNodeFunc -> IO (GClosure C_TraverseNodeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TraverseNodeFunc ::
Maybe (Ptr (FunPtr C_TraverseNodeFunc)) ->
TraverseNodeFunc ->
C_TraverseNodeFunc
wrap_TraverseNodeFunc :: Maybe (Ptr (FunPtr C_TraverseNodeFunc))
-> TraverseNodeFunc -> C_TraverseNodeFunc
wrap_TraverseNodeFunc Maybe (Ptr (FunPtr C_TraverseNodeFunc))
gi'funptrptr TraverseNodeFunc
gi'cb Ptr TreeNode
node Ptr ()
data_ = do
TreeNode
node' <- ((ManagedPtr TreeNode -> TreeNode) -> Ptr TreeNode -> IO TreeNode
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr TreeNode -> TreeNode
GLib.TreeNode.TreeNode) Ptr TreeNode
node
Bool
result <- TraverseNodeFunc
gi'cb TreeNode
node' Ptr ()
data_
Maybe (Ptr (FunPtr C_TraverseNodeFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TraverseNodeFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_TraverseFunc =
Ptr () ->
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_TraverseFunc :: FunPtr C_TraverseFunc -> C_TraverseFunc
dynamic_TraverseFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TraverseFunc
-> Ptr ()
-> Ptr ()
-> Ptr ()
-> m Bool
dynamic_TraverseFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TraverseFunc -> Ptr () -> Ptr () -> Ptr () -> m Bool
dynamic_TraverseFunc FunPtr C_TraverseFunc
__funPtr Ptr ()
key Ptr ()
value Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- (FunPtr C_TraverseFunc -> C_TraverseFunc
__dynamic_C_TraverseFunc FunPtr C_TraverseFunc
__funPtr) Ptr ()
key Ptr ()
value Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_TraverseFunc :: C_TraverseFunc -> IO (FunPtr C_TraverseFunc)
type TraverseFunc =
Ptr ()
-> Ptr ()
-> Ptr ()
-> IO Bool
noTraverseFunc :: Maybe TraverseFunc
noTraverseFunc :: Maybe TraverseFunc
noTraverseFunc = Maybe TraverseFunc
forall a. Maybe a
Nothing
genClosure_TraverseFunc :: MonadIO m => TraverseFunc -> m (GClosure C_TraverseFunc)
genClosure_TraverseFunc :: forall (m :: * -> *).
MonadIO m =>
TraverseFunc -> m (GClosure C_TraverseFunc)
genClosure_TraverseFunc TraverseFunc
cb = IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc))
-> IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TraverseFunc
cb' = Maybe (Ptr (FunPtr C_TraverseFunc))
-> TraverseFunc -> C_TraverseFunc
wrap_TraverseFunc Maybe (Ptr (FunPtr C_TraverseFunc))
forall a. Maybe a
Nothing TraverseFunc
cb
C_TraverseFunc -> IO (FunPtr C_TraverseFunc)
mk_TraverseFunc C_TraverseFunc
cb' IO (FunPtr C_TraverseFunc)
-> (FunPtr C_TraverseFunc -> IO (GClosure C_TraverseFunc))
-> IO (GClosure C_TraverseFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TraverseFunc -> IO (GClosure C_TraverseFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TraverseFunc ::
Maybe (Ptr (FunPtr C_TraverseFunc)) ->
TraverseFunc ->
C_TraverseFunc
wrap_TraverseFunc :: Maybe (Ptr (FunPtr C_TraverseFunc))
-> TraverseFunc -> C_TraverseFunc
wrap_TraverseFunc Maybe (Ptr (FunPtr C_TraverseFunc))
gi'funptrptr TraverseFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
data_ = do
Bool
result <- TraverseFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
data_
Maybe (Ptr (FunPtr C_TraverseFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TraverseFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_TranslateFunc =
CString ->
Ptr () ->
IO CString
foreign import ccall "dynamic" __dynamic_C_TranslateFunc :: FunPtr C_TranslateFunc -> C_TranslateFunc
dynamic_TranslateFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TranslateFunc
-> T.Text
-> Ptr ()
-> m T.Text
dynamic_TranslateFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TranslateFunc -> Text -> Ptr () -> m Text
dynamic_TranslateFunc FunPtr C_TranslateFunc
__funPtr Text
str Ptr ()
data_ = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
CString
str' <- Text -> IO CString
textToCString Text
str
CString
result <- (FunPtr C_TranslateFunc -> C_TranslateFunc
__dynamic_C_TranslateFunc FunPtr C_TranslateFunc
__funPtr) CString
str' Ptr ()
data_
Text -> CString -> C_VoidFunc
forall a. HasCallStack => Text -> Ptr a -> C_VoidFunc
checkUnexpectedReturnNULL Text
"translateFunc" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
str'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
foreign import ccall "wrapper"
mk_TranslateFunc :: C_TranslateFunc -> IO (FunPtr C_TranslateFunc)
type TranslateFunc =
T.Text
-> Ptr ()
-> IO T.Text
noTranslateFunc :: Maybe TranslateFunc
noTranslateFunc :: Maybe TranslateFunc
noTranslateFunc = Maybe TranslateFunc
forall a. Maybe a
Nothing
genClosure_TranslateFunc :: MonadIO m => TranslateFunc -> m (GClosure C_TranslateFunc)
genClosure_TranslateFunc :: forall (m :: * -> *).
MonadIO m =>
TranslateFunc -> m (GClosure C_TranslateFunc)
genClosure_TranslateFunc TranslateFunc
cb = IO (GClosure C_TranslateFunc) -> m (GClosure C_TranslateFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TranslateFunc) -> m (GClosure C_TranslateFunc))
-> IO (GClosure C_TranslateFunc) -> m (GClosure C_TranslateFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TranslateFunc
cb' = Maybe (Ptr (FunPtr C_TranslateFunc))
-> TranslateFunc -> C_TranslateFunc
wrap_TranslateFunc Maybe (Ptr (FunPtr C_TranslateFunc))
forall a. Maybe a
Nothing TranslateFunc
cb
C_TranslateFunc -> IO (FunPtr C_TranslateFunc)
mk_TranslateFunc C_TranslateFunc
cb' IO (FunPtr C_TranslateFunc)
-> (FunPtr C_TranslateFunc -> IO (GClosure C_TranslateFunc))
-> IO (GClosure C_TranslateFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TranslateFunc -> IO (GClosure C_TranslateFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TranslateFunc ::
Maybe (Ptr (FunPtr C_TranslateFunc)) ->
TranslateFunc ->
C_TranslateFunc
wrap_TranslateFunc :: Maybe (Ptr (FunPtr C_TranslateFunc))
-> TranslateFunc -> C_TranslateFunc
wrap_TranslateFunc Maybe (Ptr (FunPtr C_TranslateFunc))
gi'funptrptr TranslateFunc
gi'cb CString
str Ptr ()
data_ = do
Text
str' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
str
Text
result <- TranslateFunc
gi'cb Text
str' Ptr ()
data_
Maybe (Ptr (FunPtr C_TranslateFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TranslateFunc))
gi'funptrptr
CString
result' <- Text -> IO CString
textToCString Text
result
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
result'
type C_ThreadFunc =
Ptr () ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_ThreadFunc :: FunPtr C_ThreadFunc -> C_ThreadFunc
dynamic_ThreadFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ThreadFunc
-> Ptr ()
-> m (Ptr ())
dynamic_ThreadFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ThreadFunc -> Ptr () -> m (Ptr ())
dynamic_ThreadFunc FunPtr C_ThreadFunc
__funPtr Ptr ()
data_ = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_ThreadFunc -> C_ThreadFunc
__dynamic_C_ThreadFunc FunPtr C_ThreadFunc
__funPtr) Ptr ()
data_
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_ThreadFunc :: C_ThreadFunc -> IO (FunPtr C_ThreadFunc)
type ThreadFunc =
Ptr ()
-> IO (Ptr ())
noThreadFunc :: Maybe ThreadFunc
noThreadFunc :: Maybe C_ThreadFunc
noThreadFunc = Maybe C_ThreadFunc
forall a. Maybe a
Nothing
genClosure_ThreadFunc :: MonadIO m => ThreadFunc -> m (GClosure C_ThreadFunc)
genClosure_ThreadFunc :: forall (m :: * -> *).
MonadIO m =>
C_ThreadFunc -> m (GClosure C_ThreadFunc)
genClosure_ThreadFunc C_ThreadFunc
cb = IO (GClosure C_ThreadFunc) -> m (GClosure C_ThreadFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ThreadFunc) -> m (GClosure C_ThreadFunc))
-> IO (GClosure C_ThreadFunc) -> m (GClosure C_ThreadFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ThreadFunc
cb' = Maybe (Ptr (FunPtr C_ThreadFunc)) -> C_ThreadFunc -> C_ThreadFunc
wrap_ThreadFunc Maybe (Ptr (FunPtr C_ThreadFunc))
forall a. Maybe a
Nothing C_ThreadFunc
cb
C_ThreadFunc -> IO (FunPtr C_ThreadFunc)
mk_ThreadFunc C_ThreadFunc
cb' IO (FunPtr C_ThreadFunc)
-> (FunPtr C_ThreadFunc -> IO (GClosure C_ThreadFunc))
-> IO (GClosure C_ThreadFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ThreadFunc -> IO (GClosure C_ThreadFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ThreadFunc ::
Maybe (Ptr (FunPtr C_ThreadFunc)) ->
ThreadFunc ->
C_ThreadFunc
wrap_ThreadFunc :: Maybe (Ptr (FunPtr C_ThreadFunc)) -> C_ThreadFunc -> C_ThreadFunc
wrap_ThreadFunc Maybe (Ptr (FunPtr C_ThreadFunc))
gi'funptrptr C_ThreadFunc
gi'cb Ptr ()
data_ = do
Ptr ()
result <- C_ThreadFunc
gi'cb Ptr ()
data_
Maybe (Ptr (FunPtr C_ThreadFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ThreadFunc))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_TestLogFatalFunc =
CString ->
CInt ->
CString ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_TestLogFatalFunc :: FunPtr C_TestLogFatalFunc -> C_TestLogFatalFunc
dynamic_TestLogFatalFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TestLogFatalFunc
-> T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> Ptr ()
-> m Bool
dynamic_TestLogFatalFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TestLogFatalFunc
-> Text -> [LogLevelFlags] -> Text -> Ptr () -> m Bool
dynamic_TestLogFatalFunc FunPtr C_TestLogFatalFunc
__funPtr Text
logDomain [LogLevelFlags]
logLevel Text
message Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CString
logDomain' <- Text -> IO CString
textToCString Text
logDomain
let logLevel' :: CInt
logLevel' = [LogLevelFlags] -> CInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [LogLevelFlags]
logLevel
CString
message' <- Text -> IO CString
textToCString Text
message
CInt
result <- (FunPtr C_TestLogFatalFunc -> C_TestLogFatalFunc
__dynamic_C_TestLogFatalFunc FunPtr C_TestLogFatalFunc
__funPtr) CString
logDomain' CInt
logLevel' CString
message' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
logDomain'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
message'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_TestLogFatalFunc :: C_TestLogFatalFunc -> IO (FunPtr C_TestLogFatalFunc)
type TestLogFatalFunc =
T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> IO Bool
noTestLogFatalFunc :: Maybe TestLogFatalFunc
noTestLogFatalFunc :: Maybe TestLogFatalFunc
noTestLogFatalFunc = Maybe TestLogFatalFunc
forall a. Maybe a
Nothing
type TestLogFatalFunc_WithClosures =
T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> Ptr ()
-> IO Bool
noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures
noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures
noTestLogFatalFunc_WithClosures = Maybe TestLogFatalFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_TestLogFatalFunc :: TestLogFatalFunc -> TestLogFatalFunc_WithClosures
drop_closures_TestLogFatalFunc :: TestLogFatalFunc -> TestLogFatalFunc_WithClosures
drop_closures_TestLogFatalFunc TestLogFatalFunc
_f Text
logDomain [LogLevelFlags]
logLevel Text
message Ptr ()
_ = TestLogFatalFunc
_f Text
logDomain [LogLevelFlags]
logLevel Text
message
genClosure_TestLogFatalFunc :: MonadIO m => TestLogFatalFunc -> m (GClosure C_TestLogFatalFunc)
genClosure_TestLogFatalFunc :: forall (m :: * -> *).
MonadIO m =>
TestLogFatalFunc -> m (GClosure C_TestLogFatalFunc)
genClosure_TestLogFatalFunc TestLogFatalFunc
cb = IO (GClosure C_TestLogFatalFunc) -> m (GClosure C_TestLogFatalFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TestLogFatalFunc)
-> m (GClosure C_TestLogFatalFunc))
-> IO (GClosure C_TestLogFatalFunc)
-> m (GClosure C_TestLogFatalFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestLogFatalFunc_WithClosures
cb' = TestLogFatalFunc -> TestLogFatalFunc_WithClosures
drop_closures_TestLogFatalFunc TestLogFatalFunc
cb
let cb'' :: C_TestLogFatalFunc
cb'' = Maybe (Ptr (FunPtr C_TestLogFatalFunc))
-> TestLogFatalFunc_WithClosures -> C_TestLogFatalFunc
wrap_TestLogFatalFunc Maybe (Ptr (FunPtr C_TestLogFatalFunc))
forall a. Maybe a
Nothing TestLogFatalFunc_WithClosures
cb'
C_TestLogFatalFunc -> IO (FunPtr C_TestLogFatalFunc)
mk_TestLogFatalFunc C_TestLogFatalFunc
cb'' IO (FunPtr C_TestLogFatalFunc)
-> (FunPtr C_TestLogFatalFunc -> IO (GClosure C_TestLogFatalFunc))
-> IO (GClosure C_TestLogFatalFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TestLogFatalFunc -> IO (GClosure C_TestLogFatalFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TestLogFatalFunc ::
Maybe (Ptr (FunPtr C_TestLogFatalFunc)) ->
TestLogFatalFunc_WithClosures ->
C_TestLogFatalFunc
wrap_TestLogFatalFunc :: Maybe (Ptr (FunPtr C_TestLogFatalFunc))
-> TestLogFatalFunc_WithClosures -> C_TestLogFatalFunc
wrap_TestLogFatalFunc Maybe (Ptr (FunPtr C_TestLogFatalFunc))
gi'funptrptr TestLogFatalFunc_WithClosures
gi'cb CString
logDomain CInt
logLevel CString
message Ptr ()
userData = do
Text
logDomain' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
logDomain
let logLevel' :: [LogLevelFlags]
logLevel' = CInt -> [LogLevelFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CInt
logLevel
Text
message' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
message
Bool
result <- TestLogFatalFunc_WithClosures
gi'cb Text
logDomain' [LogLevelFlags]
logLevel' Text
message' Ptr ()
userData
Maybe (Ptr (FunPtr C_TestLogFatalFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TestLogFatalFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_TestFunc =
IO ()
foreign import ccall "dynamic" __dynamic_C_TestFunc :: FunPtr C_TestFunc -> C_TestFunc
dynamic_TestFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TestFunc
-> m ()
dynamic_TestFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_VoidFunc -> m ()
dynamic_TestFunc FunPtr C_VoidFunc
__funPtr = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_VoidFunc -> C_VoidFunc
__dynamic_C_TestFunc FunPtr C_VoidFunc
__funPtr)
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_TestFunc :: C_TestFunc -> IO (FunPtr C_TestFunc)
type TestFunc =
IO ()
noTestFunc :: Maybe TestFunc
noTestFunc :: Maybe C_VoidFunc
noTestFunc = Maybe C_VoidFunc
forall a. Maybe a
Nothing
genClosure_TestFunc :: MonadIO m => TestFunc -> m (GClosure C_TestFunc)
genClosure_TestFunc :: forall (m :: * -> *).
MonadIO m =>
C_VoidFunc -> m (GClosure C_VoidFunc)
genClosure_TestFunc C_VoidFunc
cb = IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VoidFunc
cb' = Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_TestFunc Maybe (Ptr (FunPtr C_VoidFunc))
forall a. Maybe a
Nothing C_VoidFunc
cb
C_VoidFunc -> IO (FunPtr C_VoidFunc)
mk_TestFunc C_VoidFunc
cb' IO (FunPtr C_VoidFunc)
-> (FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TestFunc ::
Maybe (Ptr (FunPtr C_TestFunc)) ->
TestFunc ->
C_TestFunc
wrap_TestFunc :: Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_TestFunc Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr C_VoidFunc
gi'cb = do
C_VoidFunc
gi'cb
Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr
type C_TestFixtureFunc =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_TestFixtureFunc :: FunPtr C_TestFixtureFunc -> C_TestFixtureFunc
dynamic_TestFixtureFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TestFixtureFunc
-> Ptr ()
-> Ptr ()
-> m ()
dynamic_TestFixtureFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TestFixtureFunc -> Ptr () -> Ptr () -> m ()
dynamic_TestFixtureFunc FunPtr C_TestFixtureFunc
__funPtr Ptr ()
fixture Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_TestFixtureFunc -> C_TestFixtureFunc
__dynamic_C_TestFixtureFunc FunPtr C_TestFixtureFunc
__funPtr) Ptr ()
fixture Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_TestFixtureFunc :: C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)
type TestFixtureFunc =
Ptr ()
-> IO ()
noTestFixtureFunc :: Maybe TestFixtureFunc
noTestFixtureFunc :: Maybe TestFixtureFunc
noTestFixtureFunc = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
type TestFixtureFunc_WithClosures =
Ptr ()
-> Ptr ()
-> IO ()
noTestFixtureFunc_WithClosures :: Maybe TestFixtureFunc_WithClosures
noTestFixtureFunc_WithClosures :: Maybe C_TestFixtureFunc
noTestFixtureFunc_WithClosures = Maybe C_TestFixtureFunc
forall a. Maybe a
Nothing
drop_closures_TestFixtureFunc :: TestFixtureFunc -> TestFixtureFunc_WithClosures
drop_closures_TestFixtureFunc :: TestFixtureFunc -> C_TestFixtureFunc
drop_closures_TestFixtureFunc TestFixtureFunc
_f Ptr ()
fixture Ptr ()
_ = TestFixtureFunc
_f Ptr ()
fixture
genClosure_TestFixtureFunc :: MonadIO m => TestFixtureFunc -> m (GClosure C_TestFixtureFunc)
genClosure_TestFixtureFunc :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure C_TestFixtureFunc)
genClosure_TestFixtureFunc TestFixtureFunc
cb = IO (GClosure C_TestFixtureFunc) -> m (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TestFixtureFunc) -> m (GClosure C_TestFixtureFunc))
-> IO (GClosure C_TestFixtureFunc)
-> m (GClosure C_TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TestFixtureFunc
cb' = TestFixtureFunc -> C_TestFixtureFunc
drop_closures_TestFixtureFunc TestFixtureFunc
cb
let cb'' :: C_TestFixtureFunc
cb'' = Maybe (Ptr (FunPtr C_TestFixtureFunc))
-> C_TestFixtureFunc -> C_TestFixtureFunc
wrap_TestFixtureFunc Maybe (Ptr (FunPtr C_TestFixtureFunc))
forall a. Maybe a
Nothing C_TestFixtureFunc
cb'
C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)
mk_TestFixtureFunc C_TestFixtureFunc
cb'' IO (FunPtr C_TestFixtureFunc)
-> (FunPtr C_TestFixtureFunc -> IO (GClosure C_TestFixtureFunc))
-> IO (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TestFixtureFunc -> IO (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TestFixtureFunc ::
Maybe (Ptr (FunPtr C_TestFixtureFunc)) ->
TestFixtureFunc_WithClosures ->
C_TestFixtureFunc
wrap_TestFixtureFunc :: Maybe (Ptr (FunPtr C_TestFixtureFunc))
-> C_TestFixtureFunc -> C_TestFixtureFunc
wrap_TestFixtureFunc Maybe (Ptr (FunPtr C_TestFixtureFunc))
gi'funptrptr C_TestFixtureFunc
gi'cb Ptr ()
fixture Ptr ()
userData = do
C_TestFixtureFunc
gi'cb Ptr ()
fixture Ptr ()
userData
Maybe (Ptr (FunPtr C_TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TestFixtureFunc))
gi'funptrptr
type C_TestDataFunc =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_TestDataFunc :: FunPtr C_TestDataFunc -> C_TestDataFunc
dynamic_TestDataFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_TestDataFunc
-> Ptr ()
-> m ()
dynamic_TestDataFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_TestDataFunc FunPtr TestFixtureFunc
__funPtr Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_TestDataFunc FunPtr TestFixtureFunc
__funPtr) Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_TestDataFunc :: C_TestDataFunc -> IO (FunPtr C_TestDataFunc)
type TestDataFunc =
IO ()
noTestDataFunc :: Maybe TestDataFunc
noTestDataFunc :: Maybe C_VoidFunc
noTestDataFunc = Maybe C_VoidFunc
forall a. Maybe a
Nothing
type TestDataFunc_WithClosures =
Ptr ()
-> IO ()
noTestDataFunc_WithClosures :: Maybe TestDataFunc_WithClosures
noTestDataFunc_WithClosures :: Maybe TestFixtureFunc
noTestDataFunc_WithClosures = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
drop_closures_TestDataFunc :: TestDataFunc -> TestDataFunc_WithClosures
drop_closures_TestDataFunc :: C_VoidFunc -> TestFixtureFunc
drop_closures_TestDataFunc C_VoidFunc
_f Ptr ()
_ = C_VoidFunc
_f
genClosure_TestDataFunc :: MonadIO m => TestDataFunc -> m (GClosure C_TestDataFunc)
genClosure_TestDataFunc :: forall (m :: * -> *).
MonadIO m =>
C_VoidFunc -> m (GClosure TestFixtureFunc)
genClosure_TestDataFunc C_VoidFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = C_VoidFunc -> TestFixtureFunc
drop_closures_TestDataFunc C_VoidFunc
cb
let cb'' :: TestFixtureFunc
cb'' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_TestDataFunc Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb'
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_TestDataFunc TestFixtureFunc
cb'' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TestDataFunc ::
Maybe (Ptr (FunPtr C_TestDataFunc)) ->
TestDataFunc_WithClosures ->
C_TestDataFunc
wrap_TestDataFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_TestDataFunc Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
userData = do
TestFixtureFunc
gi'cb Ptr ()
userData
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_SpawnChildSetupFunc =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SpawnChildSetupFunc :: FunPtr C_SpawnChildSetupFunc -> C_SpawnChildSetupFunc
dynamic_SpawnChildSetupFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SpawnChildSetupFunc
-> Ptr ()
-> m ()
dynamic_SpawnChildSetupFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_SpawnChildSetupFunc FunPtr TestFixtureFunc
__funPtr Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_SpawnChildSetupFunc FunPtr TestFixtureFunc
__funPtr) Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SpawnChildSetupFunc :: C_SpawnChildSetupFunc -> IO (FunPtr C_SpawnChildSetupFunc)
type SpawnChildSetupFunc =
IO ()
noSpawnChildSetupFunc :: Maybe SpawnChildSetupFunc
noSpawnChildSetupFunc :: Maybe C_VoidFunc
noSpawnChildSetupFunc = Maybe C_VoidFunc
forall a. Maybe a
Nothing
type SpawnChildSetupFunc_WithClosures =
Ptr ()
-> IO ()
noSpawnChildSetupFunc_WithClosures :: Maybe SpawnChildSetupFunc_WithClosures
noSpawnChildSetupFunc_WithClosures :: Maybe TestFixtureFunc
noSpawnChildSetupFunc_WithClosures = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
drop_closures_SpawnChildSetupFunc :: SpawnChildSetupFunc -> SpawnChildSetupFunc_WithClosures
drop_closures_SpawnChildSetupFunc :: C_VoidFunc -> TestFixtureFunc
drop_closures_SpawnChildSetupFunc C_VoidFunc
_f Ptr ()
_ = C_VoidFunc
_f
genClosure_SpawnChildSetupFunc :: MonadIO m => SpawnChildSetupFunc -> m (GClosure C_SpawnChildSetupFunc)
genClosure_SpawnChildSetupFunc :: forall (m :: * -> *).
MonadIO m =>
C_VoidFunc -> m (GClosure TestFixtureFunc)
genClosure_SpawnChildSetupFunc C_VoidFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = C_VoidFunc -> TestFixtureFunc
drop_closures_SpawnChildSetupFunc C_VoidFunc
cb
let cb'' :: TestFixtureFunc
cb'' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SpawnChildSetupFunc Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb'
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_SpawnChildSetupFunc TestFixtureFunc
cb'' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SpawnChildSetupFunc ::
Maybe (Ptr (FunPtr C_SpawnChildSetupFunc)) ->
SpawnChildSetupFunc_WithClosures ->
C_SpawnChildSetupFunc
wrap_SpawnChildSetupFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SpawnChildSetupFunc Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
userData = do
TestFixtureFunc
gi'cb Ptr ()
userData
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_SourceFuncsPrepareFieldCallback =
Ptr GLib.Source.Source ->
Int32 ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SourceFuncsPrepareFieldCallback :: FunPtr C_SourceFuncsPrepareFieldCallback -> C_SourceFuncsPrepareFieldCallback
dynamic_SourceFuncsPrepareFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsPrepareFieldCallback
-> GLib.Source.Source
-> Int32
-> m Bool
dynamic_SourceFuncsPrepareFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsPrepareFieldCallback
-> Source -> Int32 -> m Bool
dynamic_SourceFuncsPrepareFieldCallback FunPtr C_SourceFuncsPrepareFieldCallback
__funPtr Source
source Int32
timeout_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Source
source' <- Source -> IO (Ptr Source)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Source
source
CInt
result <- (FunPtr C_SourceFuncsPrepareFieldCallback
-> C_SourceFuncsPrepareFieldCallback
__dynamic_C_SourceFuncsPrepareFieldCallback FunPtr C_SourceFuncsPrepareFieldCallback
__funPtr) Ptr Source
source' Int32
timeout_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Source -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Source
source
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SourceFuncsPrepareFieldCallback :: C_SourceFuncsPrepareFieldCallback -> IO (FunPtr C_SourceFuncsPrepareFieldCallback)
type SourceFuncsPrepareFieldCallback =
GLib.Source.Source
-> Int32
-> IO Bool
noSourceFuncsPrepareFieldCallback :: Maybe SourceFuncsPrepareFieldCallback
noSourceFuncsPrepareFieldCallback :: Maybe SourceFuncsPrepareFieldCallback
noSourceFuncsPrepareFieldCallback = Maybe SourceFuncsPrepareFieldCallback
forall a. Maybe a
Nothing
genClosure_SourceFuncsPrepareFieldCallback :: MonadIO m => SourceFuncsPrepareFieldCallback -> m (GClosure C_SourceFuncsPrepareFieldCallback)
genClosure_SourceFuncsPrepareFieldCallback :: forall (m :: * -> *).
MonadIO m =>
SourceFuncsPrepareFieldCallback
-> m (GClosure C_SourceFuncsPrepareFieldCallback)
genClosure_SourceFuncsPrepareFieldCallback SourceFuncsPrepareFieldCallback
cb = IO (GClosure C_SourceFuncsPrepareFieldCallback)
-> m (GClosure C_SourceFuncsPrepareFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFuncsPrepareFieldCallback)
-> m (GClosure C_SourceFuncsPrepareFieldCallback))
-> IO (GClosure C_SourceFuncsPrepareFieldCallback)
-> m (GClosure C_SourceFuncsPrepareFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SourceFuncsPrepareFieldCallback
cb' = Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
-> SourceFuncsPrepareFieldCallback
-> C_SourceFuncsPrepareFieldCallback
wrap_SourceFuncsPrepareFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
forall a. Maybe a
Nothing SourceFuncsPrepareFieldCallback
cb
C_SourceFuncsPrepareFieldCallback
-> IO (FunPtr C_SourceFuncsPrepareFieldCallback)
mk_SourceFuncsPrepareFieldCallback C_SourceFuncsPrepareFieldCallback
cb' IO (FunPtr C_SourceFuncsPrepareFieldCallback)
-> (FunPtr C_SourceFuncsPrepareFieldCallback
-> IO (GClosure C_SourceFuncsPrepareFieldCallback))
-> IO (GClosure C_SourceFuncsPrepareFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFuncsPrepareFieldCallback
-> IO (GClosure C_SourceFuncsPrepareFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceFuncsPrepareFieldCallback ::
Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback)) ->
SourceFuncsPrepareFieldCallback ->
C_SourceFuncsPrepareFieldCallback
wrap_SourceFuncsPrepareFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
-> SourceFuncsPrepareFieldCallback
-> C_SourceFuncsPrepareFieldCallback
wrap_SourceFuncsPrepareFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
gi'funptrptr SourceFuncsPrepareFieldCallback
gi'cb Ptr Source
source Int32
timeout_ = do
Ptr Source -> (Source -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Source
source ((Source -> IO CInt) -> IO CInt) -> (Source -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Source
source' -> do
Bool
result <- SourceFuncsPrepareFieldCallback
gi'cb Source
source' Int32
timeout_
Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsPrepareFieldCallback))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SourceFuncsFinalizeFieldCallback =
Ptr GLib.Source.Source ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SourceFuncsFinalizeFieldCallback :: FunPtr C_SourceFuncsFinalizeFieldCallback -> C_SourceFuncsFinalizeFieldCallback
dynamic_SourceFuncsFinalizeFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsFinalizeFieldCallback
-> GLib.Source.Source
-> m ()
dynamic_SourceFuncsFinalizeFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsFinalizeFieldCallback -> Source -> m ()
dynamic_SourceFuncsFinalizeFieldCallback FunPtr C_SourceFuncsFinalizeFieldCallback
__funPtr Source
source = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Source
source' <- Source -> IO (Ptr Source)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Source
source
(FunPtr C_SourceFuncsFinalizeFieldCallback
-> C_SourceFuncsFinalizeFieldCallback
__dynamic_C_SourceFuncsFinalizeFieldCallback FunPtr C_SourceFuncsFinalizeFieldCallback
__funPtr) Ptr Source
source'
Source -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Source
source
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SourceFuncsFinalizeFieldCallback :: C_SourceFuncsFinalizeFieldCallback -> IO (FunPtr C_SourceFuncsFinalizeFieldCallback)
type SourceFuncsFinalizeFieldCallback =
GLib.Source.Source
-> IO ()
noSourceFuncsFinalizeFieldCallback :: Maybe SourceFuncsFinalizeFieldCallback
noSourceFuncsFinalizeFieldCallback :: Maybe (Source -> C_VoidFunc)
noSourceFuncsFinalizeFieldCallback = Maybe (Source -> C_VoidFunc)
forall a. Maybe a
Nothing
genClosure_SourceFuncsFinalizeFieldCallback :: MonadIO m => SourceFuncsFinalizeFieldCallback -> m (GClosure C_SourceFuncsFinalizeFieldCallback)
genClosure_SourceFuncsFinalizeFieldCallback :: forall (m :: * -> *).
MonadIO m =>
(Source -> C_VoidFunc)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
genClosure_SourceFuncsFinalizeFieldCallback Source -> C_VoidFunc
cb = IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback))
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SourceFuncsFinalizeFieldCallback
cb' = Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFieldCallback
wrap_SourceFuncsFinalizeFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
forall a. Maybe a
Nothing Source -> C_VoidFunc
cb
C_SourceFuncsFinalizeFieldCallback
-> IO (FunPtr C_SourceFuncsFinalizeFieldCallback)
mk_SourceFuncsFinalizeFieldCallback C_SourceFuncsFinalizeFieldCallback
cb' IO (FunPtr C_SourceFuncsFinalizeFieldCallback)
-> (FunPtr C_SourceFuncsFinalizeFieldCallback
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback))
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFuncsFinalizeFieldCallback
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceFuncsFinalizeFieldCallback ::
Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback)) ->
SourceFuncsFinalizeFieldCallback ->
C_SourceFuncsFinalizeFieldCallback
wrap_SourceFuncsFinalizeFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFieldCallback
wrap_SourceFuncsFinalizeFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
gi'funptrptr Source -> C_VoidFunc
gi'cb Ptr Source
source = do
Ptr Source -> (Source -> C_VoidFunc) -> C_VoidFunc
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Source
source ((Source -> C_VoidFunc) -> C_VoidFunc)
-> (Source -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ \Source
source' -> do
Source -> C_VoidFunc
gi'cb Source
source'
Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
gi'funptrptr
type C_SourceFuncsCheckFieldCallback =
Ptr GLib.Source.Source ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SourceFuncsCheckFieldCallback :: FunPtr C_SourceFuncsCheckFieldCallback -> C_SourceFuncsCheckFieldCallback
dynamic_SourceFuncsCheckFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsCheckFieldCallback
-> GLib.Source.Source
-> m Bool
dynamic_SourceFuncsCheckFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsCheckFieldCallback -> Source -> m Bool
dynamic_SourceFuncsCheckFieldCallback FunPtr C_SourceFuncsCheckFieldCallback
__funPtr Source
source = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Source
source' <- Source -> IO (Ptr Source)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Source
source
CInt
result <- (FunPtr C_SourceFuncsCheckFieldCallback
-> C_SourceFuncsCheckFieldCallback
__dynamic_C_SourceFuncsCheckFieldCallback FunPtr C_SourceFuncsCheckFieldCallback
__funPtr) Ptr Source
source'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Source -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Source
source
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SourceFuncsCheckFieldCallback :: C_SourceFuncsCheckFieldCallback -> IO (FunPtr C_SourceFuncsCheckFieldCallback)
type SourceFuncsCheckFieldCallback =
GLib.Source.Source
-> IO Bool
noSourceFuncsCheckFieldCallback :: Maybe SourceFuncsCheckFieldCallback
noSourceFuncsCheckFieldCallback :: Maybe SourceFuncsCheckFieldCallback
noSourceFuncsCheckFieldCallback = Maybe SourceFuncsCheckFieldCallback
forall a. Maybe a
Nothing
genClosure_SourceFuncsCheckFieldCallback :: MonadIO m => SourceFuncsCheckFieldCallback -> m (GClosure C_SourceFuncsCheckFieldCallback)
genClosure_SourceFuncsCheckFieldCallback :: forall (m :: * -> *).
MonadIO m =>
SourceFuncsCheckFieldCallback
-> m (GClosure C_SourceFuncsCheckFieldCallback)
genClosure_SourceFuncsCheckFieldCallback SourceFuncsCheckFieldCallback
cb = IO (GClosure C_SourceFuncsCheckFieldCallback)
-> m (GClosure C_SourceFuncsCheckFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFuncsCheckFieldCallback)
-> m (GClosure C_SourceFuncsCheckFieldCallback))
-> IO (GClosure C_SourceFuncsCheckFieldCallback)
-> m (GClosure C_SourceFuncsCheckFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SourceFuncsCheckFieldCallback
cb' = Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback))
-> SourceFuncsCheckFieldCallback -> C_SourceFuncsCheckFieldCallback
wrap_SourceFuncsCheckFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback))
forall a. Maybe a
Nothing SourceFuncsCheckFieldCallback
cb
C_SourceFuncsCheckFieldCallback
-> IO (FunPtr C_SourceFuncsCheckFieldCallback)
mk_SourceFuncsCheckFieldCallback C_SourceFuncsCheckFieldCallback
cb' IO (FunPtr C_SourceFuncsCheckFieldCallback)
-> (FunPtr C_SourceFuncsCheckFieldCallback
-> IO (GClosure C_SourceFuncsCheckFieldCallback))
-> IO (GClosure C_SourceFuncsCheckFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFuncsCheckFieldCallback
-> IO (GClosure C_SourceFuncsCheckFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceFuncsCheckFieldCallback ::
Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback)) ->
SourceFuncsCheckFieldCallback ->
C_SourceFuncsCheckFieldCallback
wrap_SourceFuncsCheckFieldCallback :: Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback))
-> SourceFuncsCheckFieldCallback -> C_SourceFuncsCheckFieldCallback
wrap_SourceFuncsCheckFieldCallback Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback))
gi'funptrptr SourceFuncsCheckFieldCallback
gi'cb Ptr Source
source = do
Ptr Source -> (Source -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Source
source ((Source -> IO CInt) -> IO CInt) -> (Source -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Source
source' -> do
Bool
result <- SourceFuncsCheckFieldCallback
gi'cb Source
source'
Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsCheckFieldCallback))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SourceFunc =
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_SourceFunc :: FunPtr C_SourceFunc -> C_SourceFunc
dynamic_SourceFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceFunc
-> Ptr ()
-> m Bool
dynamic_SourceFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFunc -> Ptr () -> m Bool
dynamic_SourceFunc FunPtr C_SourceFunc
__funPtr Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- (FunPtr C_SourceFunc -> C_SourceFunc
__dynamic_C_SourceFunc FunPtr C_SourceFunc
__funPtr) Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_SourceFunc :: C_SourceFunc -> IO (FunPtr C_SourceFunc)
type SourceFunc =
IO Bool
noSourceFunc :: Maybe SourceFunc
noSourceFunc :: Maybe (IO Bool)
noSourceFunc = Maybe (IO Bool)
forall a. Maybe a
Nothing
type SourceFunc_WithClosures =
Ptr ()
-> IO Bool
noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures
noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures
noSourceFunc_WithClosures = Maybe SourceFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_SourceFunc :: SourceFunc -> SourceFunc_WithClosures
drop_closures_SourceFunc :: IO Bool -> SourceFunc_WithClosures
drop_closures_SourceFunc IO Bool
_f Ptr ()
_ = IO Bool
_f
genClosure_SourceFunc :: MonadIO m => SourceFunc -> m (GClosure C_SourceFunc)
genClosure_SourceFunc :: forall (m :: * -> *).
MonadIO m =>
IO Bool -> m (GClosure C_SourceFunc)
genClosure_SourceFunc IO Bool
cb = IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc))
-> IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: SourceFunc_WithClosures
cb' = IO Bool -> SourceFunc_WithClosures
drop_closures_SourceFunc IO Bool
cb
let cb'' :: C_SourceFunc
cb'' = Maybe (Ptr (FunPtr C_SourceFunc))
-> SourceFunc_WithClosures -> C_SourceFunc
wrap_SourceFunc Maybe (Ptr (FunPtr C_SourceFunc))
forall a. Maybe a
Nothing SourceFunc_WithClosures
cb'
C_SourceFunc -> IO (FunPtr C_SourceFunc)
mk_SourceFunc C_SourceFunc
cb'' IO (FunPtr C_SourceFunc)
-> (FunPtr C_SourceFunc -> IO (GClosure C_SourceFunc))
-> IO (GClosure C_SourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFunc -> IO (GClosure C_SourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceFunc ::
Maybe (Ptr (FunPtr C_SourceFunc)) ->
SourceFunc_WithClosures ->
C_SourceFunc
wrap_SourceFunc :: Maybe (Ptr (FunPtr C_SourceFunc))
-> SourceFunc_WithClosures -> C_SourceFunc
wrap_SourceFunc Maybe (Ptr (FunPtr C_SourceFunc))
gi'funptrptr SourceFunc_WithClosures
gi'cb Ptr ()
userData = do
Bool
result <- SourceFunc_WithClosures
gi'cb Ptr ()
userData
Maybe (Ptr (FunPtr C_SourceFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_SourceDummyMarshal =
IO ()
foreign import ccall "dynamic" __dynamic_C_SourceDummyMarshal :: FunPtr C_SourceDummyMarshal -> C_SourceDummyMarshal
dynamic_SourceDummyMarshal ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceDummyMarshal
-> m ()
dynamic_SourceDummyMarshal :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_VoidFunc -> m ()
dynamic_SourceDummyMarshal FunPtr C_VoidFunc
__funPtr = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_VoidFunc -> C_VoidFunc
__dynamic_C_SourceDummyMarshal FunPtr C_VoidFunc
__funPtr)
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SourceDummyMarshal :: C_SourceDummyMarshal -> IO (FunPtr C_SourceDummyMarshal)
type SourceDummyMarshal =
IO ()
noSourceDummyMarshal :: Maybe SourceDummyMarshal
noSourceDummyMarshal :: Maybe C_VoidFunc
noSourceDummyMarshal = Maybe C_VoidFunc
forall a. Maybe a
Nothing
genClosure_SourceDummyMarshal :: MonadIO m => SourceDummyMarshal -> m (GClosure C_SourceDummyMarshal)
genClosure_SourceDummyMarshal :: forall (m :: * -> *).
MonadIO m =>
C_VoidFunc -> m (GClosure C_VoidFunc)
genClosure_SourceDummyMarshal C_VoidFunc
cb = IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc) -> m (GClosure C_VoidFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_VoidFunc
cb' = Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_SourceDummyMarshal Maybe (Ptr (FunPtr C_VoidFunc))
forall a. Maybe a
Nothing C_VoidFunc
cb
C_VoidFunc -> IO (FunPtr C_VoidFunc)
mk_SourceDummyMarshal C_VoidFunc
cb' IO (FunPtr C_VoidFunc)
-> (FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc))
-> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_VoidFunc -> IO (GClosure C_VoidFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceDummyMarshal ::
Maybe (Ptr (FunPtr C_SourceDummyMarshal)) ->
SourceDummyMarshal ->
C_SourceDummyMarshal
wrap_SourceDummyMarshal :: Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc -> C_VoidFunc
wrap_SourceDummyMarshal Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr C_VoidFunc
gi'cb = do
C_VoidFunc
gi'cb
Maybe (Ptr (FunPtr C_VoidFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_VoidFunc))
gi'funptrptr
type C_SourceDisposeFunc =
Ptr GLib.Source.Source ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SourceDisposeFunc :: FunPtr C_SourceDisposeFunc -> C_SourceDisposeFunc
dynamic_SourceDisposeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceDisposeFunc
-> GLib.Source.Source
-> m ()
dynamic_SourceDisposeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFuncsFinalizeFieldCallback -> Source -> m ()
dynamic_SourceDisposeFunc FunPtr C_SourceFuncsFinalizeFieldCallback
__funPtr Source
source = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Source
source' <- Source -> IO (Ptr Source)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Source
source
(FunPtr C_SourceFuncsFinalizeFieldCallback
-> C_SourceFuncsFinalizeFieldCallback
__dynamic_C_SourceDisposeFunc FunPtr C_SourceFuncsFinalizeFieldCallback
__funPtr) Ptr Source
source'
Source -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Source
source
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SourceDisposeFunc :: C_SourceDisposeFunc -> IO (FunPtr C_SourceDisposeFunc)
type SourceDisposeFunc =
GLib.Source.Source
-> IO ()
noSourceDisposeFunc :: Maybe SourceDisposeFunc
noSourceDisposeFunc :: Maybe (Source -> C_VoidFunc)
noSourceDisposeFunc = Maybe (Source -> C_VoidFunc)
forall a. Maybe a
Nothing
genClosure_SourceDisposeFunc :: MonadIO m => SourceDisposeFunc -> m (GClosure C_SourceDisposeFunc)
genClosure_SourceDisposeFunc :: forall (m :: * -> *).
MonadIO m =>
(Source -> C_VoidFunc)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
genClosure_SourceDisposeFunc Source -> C_VoidFunc
cb = IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback))
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
-> m (GClosure C_SourceFuncsFinalizeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SourceFuncsFinalizeFieldCallback
cb' = Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFieldCallback
wrap_SourceDisposeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
forall a. Maybe a
Nothing Source -> C_VoidFunc
cb
C_SourceFuncsFinalizeFieldCallback
-> IO (FunPtr C_SourceFuncsFinalizeFieldCallback)
mk_SourceDisposeFunc C_SourceFuncsFinalizeFieldCallback
cb' IO (FunPtr C_SourceFuncsFinalizeFieldCallback)
-> (FunPtr C_SourceFuncsFinalizeFieldCallback
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback))
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFuncsFinalizeFieldCallback
-> IO (GClosure C_SourceFuncsFinalizeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceDisposeFunc ::
Maybe (Ptr (FunPtr C_SourceDisposeFunc)) ->
SourceDisposeFunc ->
C_SourceDisposeFunc
wrap_SourceDisposeFunc :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFieldCallback
wrap_SourceDisposeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
gi'funptrptr Source -> C_VoidFunc
gi'cb Ptr Source
source = do
Ptr Source -> (Source -> C_VoidFunc) -> C_VoidFunc
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Source
source ((Source -> C_VoidFunc) -> C_VoidFunc)
-> (Source -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ \Source
source' -> do
Source -> C_VoidFunc
gi'cb Source
source'
Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFieldCallback))
gi'funptrptr
type C_SourceCallbackFuncsUnrefFieldCallback =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SourceCallbackFuncsUnrefFieldCallback :: FunPtr C_SourceCallbackFuncsUnrefFieldCallback -> C_SourceCallbackFuncsUnrefFieldCallback
dynamic_SourceCallbackFuncsUnrefFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceCallbackFuncsUnrefFieldCallback
-> Ptr ()
-> m ()
dynamic_SourceCallbackFuncsUnrefFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_SourceCallbackFuncsUnrefFieldCallback FunPtr TestFixtureFunc
__funPtr Ptr ()
cbData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_SourceCallbackFuncsUnrefFieldCallback FunPtr TestFixtureFunc
__funPtr) Ptr ()
cbData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SourceCallbackFuncsUnrefFieldCallback :: C_SourceCallbackFuncsUnrefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)
type SourceCallbackFuncsUnrefFieldCallback =
Ptr ()
-> IO ()
noSourceCallbackFuncsUnrefFieldCallback :: Maybe SourceCallbackFuncsUnrefFieldCallback
noSourceCallbackFuncsUnrefFieldCallback :: Maybe TestFixtureFunc
noSourceCallbackFuncsUnrefFieldCallback = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_SourceCallbackFuncsUnrefFieldCallback :: MonadIO m => SourceCallbackFuncsUnrefFieldCallback -> m (GClosure C_SourceCallbackFuncsUnrefFieldCallback)
genClosure_SourceCallbackFuncsUnrefFieldCallback :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_SourceCallbackFuncsUnrefFieldCallback TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SourceCallbackFuncsUnrefFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_SourceCallbackFuncsUnrefFieldCallback TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceCallbackFuncsUnrefFieldCallback ::
Maybe (Ptr (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)) ->
SourceCallbackFuncsUnrefFieldCallback ->
C_SourceCallbackFuncsUnrefFieldCallback
wrap_SourceCallbackFuncsUnrefFieldCallback :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SourceCallbackFuncsUnrefFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
cbData = do
TestFixtureFunc
gi'cb Ptr ()
cbData
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_SourceCallbackFuncsRefFieldCallback =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_SourceCallbackFuncsRefFieldCallback :: FunPtr C_SourceCallbackFuncsRefFieldCallback -> C_SourceCallbackFuncsRefFieldCallback
dynamic_SourceCallbackFuncsRefFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SourceCallbackFuncsRefFieldCallback
-> Ptr ()
-> m ()
dynamic_SourceCallbackFuncsRefFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_SourceCallbackFuncsRefFieldCallback FunPtr TestFixtureFunc
__funPtr Ptr ()
cbData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_SourceCallbackFuncsRefFieldCallback FunPtr TestFixtureFunc
__funPtr) Ptr ()
cbData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_SourceCallbackFuncsRefFieldCallback :: C_SourceCallbackFuncsRefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsRefFieldCallback)
type SourceCallbackFuncsRefFieldCallback =
Ptr ()
-> IO ()
noSourceCallbackFuncsRefFieldCallback :: Maybe SourceCallbackFuncsRefFieldCallback
noSourceCallbackFuncsRefFieldCallback :: Maybe TestFixtureFunc
noSourceCallbackFuncsRefFieldCallback = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_SourceCallbackFuncsRefFieldCallback :: MonadIO m => SourceCallbackFuncsRefFieldCallback -> m (GClosure C_SourceCallbackFuncsRefFieldCallback)
genClosure_SourceCallbackFuncsRefFieldCallback :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_SourceCallbackFuncsRefFieldCallback TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SourceCallbackFuncsRefFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_SourceCallbackFuncsRefFieldCallback TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SourceCallbackFuncsRefFieldCallback ::
Maybe (Ptr (FunPtr C_SourceCallbackFuncsRefFieldCallback)) ->
SourceCallbackFuncsRefFieldCallback ->
C_SourceCallbackFuncsRefFieldCallback
wrap_SourceCallbackFuncsRefFieldCallback :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_SourceCallbackFuncsRefFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
cbData = do
TestFixtureFunc
gi'cb Ptr ()
cbData
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_SequenceIterCompareFunc =
Ptr GLib.SequenceIter.SequenceIter ->
Ptr GLib.SequenceIter.SequenceIter ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_SequenceIterCompareFunc :: FunPtr C_SequenceIterCompareFunc -> C_SequenceIterCompareFunc
dynamic_SequenceIterCompareFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_SequenceIterCompareFunc
-> GLib.SequenceIter.SequenceIter
-> GLib.SequenceIter.SequenceIter
-> Ptr ()
-> m Int32
dynamic_SequenceIterCompareFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SequenceIterCompareFunc
-> SequenceIter -> SequenceIter -> Ptr () -> m Int32
dynamic_SequenceIterCompareFunc FunPtr C_SequenceIterCompareFunc
__funPtr SequenceIter
a SequenceIter
b Ptr ()
data_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr SequenceIter
a' <- SequenceIter -> IO (Ptr SequenceIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SequenceIter
a
Ptr SequenceIter
b' <- SequenceIter -> IO (Ptr SequenceIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SequenceIter
b
Int32
result <- (FunPtr C_SequenceIterCompareFunc -> C_SequenceIterCompareFunc
__dynamic_C_SequenceIterCompareFunc FunPtr C_SequenceIterCompareFunc
__funPtr) Ptr SequenceIter
a' Ptr SequenceIter
b' Ptr ()
data_
SequenceIter -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr SequenceIter
a
SequenceIter -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr SequenceIter
b
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_SequenceIterCompareFunc :: C_SequenceIterCompareFunc -> IO (FunPtr C_SequenceIterCompareFunc)
type SequenceIterCompareFunc =
GLib.SequenceIter.SequenceIter
-> GLib.SequenceIter.SequenceIter
-> Ptr ()
-> IO Int32
noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc
noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc
noSequenceIterCompareFunc = Maybe SequenceIterCompareFunc
forall a. Maybe a
Nothing
genClosure_SequenceIterCompareFunc :: MonadIO m => SequenceIterCompareFunc -> m (GClosure C_SequenceIterCompareFunc)
genClosure_SequenceIterCompareFunc :: forall (m :: * -> *).
MonadIO m =>
SequenceIterCompareFunc -> m (GClosure C_SequenceIterCompareFunc)
genClosure_SequenceIterCompareFunc SequenceIterCompareFunc
cb = IO (GClosure C_SequenceIterCompareFunc)
-> m (GClosure C_SequenceIterCompareFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SequenceIterCompareFunc)
-> m (GClosure C_SequenceIterCompareFunc))
-> IO (GClosure C_SequenceIterCompareFunc)
-> m (GClosure C_SequenceIterCompareFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SequenceIterCompareFunc
cb' = Maybe (Ptr (FunPtr C_SequenceIterCompareFunc))
-> SequenceIterCompareFunc -> C_SequenceIterCompareFunc
wrap_SequenceIterCompareFunc Maybe (Ptr (FunPtr C_SequenceIterCompareFunc))
forall a. Maybe a
Nothing SequenceIterCompareFunc
cb
C_SequenceIterCompareFunc -> IO (FunPtr C_SequenceIterCompareFunc)
mk_SequenceIterCompareFunc C_SequenceIterCompareFunc
cb' IO (FunPtr C_SequenceIterCompareFunc)
-> (FunPtr C_SequenceIterCompareFunc
-> IO (GClosure C_SequenceIterCompareFunc))
-> IO (GClosure C_SequenceIterCompareFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SequenceIterCompareFunc
-> IO (GClosure C_SequenceIterCompareFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SequenceIterCompareFunc ::
Maybe (Ptr (FunPtr C_SequenceIterCompareFunc)) ->
SequenceIterCompareFunc ->
C_SequenceIterCompareFunc
wrap_SequenceIterCompareFunc :: Maybe (Ptr (FunPtr C_SequenceIterCompareFunc))
-> SequenceIterCompareFunc -> C_SequenceIterCompareFunc
wrap_SequenceIterCompareFunc Maybe (Ptr (FunPtr C_SequenceIterCompareFunc))
gi'funptrptr SequenceIterCompareFunc
gi'cb Ptr SequenceIter
a Ptr SequenceIter
b Ptr ()
data_ = do
SequenceIter
a' <- ((ManagedPtr SequenceIter -> SequenceIter)
-> Ptr SequenceIter -> IO SequenceIter
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr SequenceIter -> SequenceIter
GLib.SequenceIter.SequenceIter) Ptr SequenceIter
a
SequenceIter
b' <- ((ManagedPtr SequenceIter -> SequenceIter)
-> Ptr SequenceIter -> IO SequenceIter
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr SequenceIter -> SequenceIter
GLib.SequenceIter.SequenceIter) Ptr SequenceIter
b
Int32
result <- SequenceIterCompareFunc
gi'cb SequenceIter
a' SequenceIter
b' Ptr ()
data_
Maybe (Ptr (FunPtr C_SequenceIterCompareFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SequenceIterCompareFunc))
gi'funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_ScannerMsgFunc =
Ptr GLib.Scanner.Scanner ->
CString ->
CInt ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ScannerMsgFunc :: FunPtr C_ScannerMsgFunc -> C_ScannerMsgFunc
dynamic_ScannerMsgFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ScannerMsgFunc
-> GLib.Scanner.Scanner
-> T.Text
-> Bool
-> m ()
dynamic_ScannerMsgFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ScannerMsgFunc -> Scanner -> Text -> Bool -> m ()
dynamic_ScannerMsgFunc FunPtr C_ScannerMsgFunc
__funPtr Scanner
scanner Text
message Bool
error_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Scanner
scanner' <- Scanner -> IO (Ptr Scanner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Scanner
scanner
CString
message' <- Text -> IO CString
textToCString Text
message
let error_' :: CInt
error_' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
error_
(FunPtr C_ScannerMsgFunc -> C_ScannerMsgFunc
__dynamic_C_ScannerMsgFunc FunPtr C_ScannerMsgFunc
__funPtr) Ptr Scanner
scanner' CString
message' CInt
error_'
Scanner -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Scanner
scanner
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
message'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ScannerMsgFunc :: C_ScannerMsgFunc -> IO (FunPtr C_ScannerMsgFunc)
type ScannerMsgFunc =
GLib.Scanner.Scanner
-> T.Text
-> Bool
-> IO ()
noScannerMsgFunc :: Maybe ScannerMsgFunc
noScannerMsgFunc :: Maybe ScannerMsgFunc
noScannerMsgFunc = Maybe ScannerMsgFunc
forall a. Maybe a
Nothing
genClosure_ScannerMsgFunc :: MonadIO m => ScannerMsgFunc -> m (GClosure C_ScannerMsgFunc)
genClosure_ScannerMsgFunc :: forall (m :: * -> *).
MonadIO m =>
ScannerMsgFunc -> m (GClosure C_ScannerMsgFunc)
genClosure_ScannerMsgFunc ScannerMsgFunc
cb = IO (GClosure C_ScannerMsgFunc) -> m (GClosure C_ScannerMsgFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ScannerMsgFunc) -> m (GClosure C_ScannerMsgFunc))
-> IO (GClosure C_ScannerMsgFunc) -> m (GClosure C_ScannerMsgFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ScannerMsgFunc
cb' = Maybe (Ptr (FunPtr C_ScannerMsgFunc))
-> ScannerMsgFunc -> C_ScannerMsgFunc
wrap_ScannerMsgFunc Maybe (Ptr (FunPtr C_ScannerMsgFunc))
forall a. Maybe a
Nothing ScannerMsgFunc
cb
C_ScannerMsgFunc -> IO (FunPtr C_ScannerMsgFunc)
mk_ScannerMsgFunc C_ScannerMsgFunc
cb' IO (FunPtr C_ScannerMsgFunc)
-> (FunPtr C_ScannerMsgFunc -> IO (GClosure C_ScannerMsgFunc))
-> IO (GClosure C_ScannerMsgFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ScannerMsgFunc -> IO (GClosure C_ScannerMsgFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ScannerMsgFunc ::
Maybe (Ptr (FunPtr C_ScannerMsgFunc)) ->
ScannerMsgFunc ->
C_ScannerMsgFunc
wrap_ScannerMsgFunc :: Maybe (Ptr (FunPtr C_ScannerMsgFunc))
-> ScannerMsgFunc -> C_ScannerMsgFunc
wrap_ScannerMsgFunc Maybe (Ptr (FunPtr C_ScannerMsgFunc))
gi'funptrptr ScannerMsgFunc
gi'cb Ptr Scanner
scanner CString
message CInt
error_ = do
Scanner
scanner' <- ((ManagedPtr Scanner -> Scanner) -> Ptr Scanner -> IO Scanner
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Scanner -> Scanner
GLib.Scanner.Scanner) Ptr Scanner
scanner
Text
message' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
message
let error_' :: Bool
error_' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
error_
ScannerMsgFunc
gi'cb Scanner
scanner' Text
message' Bool
error_'
Maybe (Ptr (FunPtr C_ScannerMsgFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ScannerMsgFunc))
gi'funptrptr
type C_RegexEvalCallback =
Ptr GLib.MatchInfo.MatchInfo ->
Ptr GLib.String.String ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_RegexEvalCallback :: FunPtr C_RegexEvalCallback -> C_RegexEvalCallback
dynamic_RegexEvalCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_RegexEvalCallback
-> GLib.MatchInfo.MatchInfo
-> GLib.String.String
-> Ptr ()
-> m Bool
dynamic_RegexEvalCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_RegexEvalCallback
-> MatchInfo -> String -> Ptr () -> m Bool
dynamic_RegexEvalCallback FunPtr C_RegexEvalCallback
__funPtr MatchInfo
matchInfo String
result_ Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr MatchInfo
matchInfo' <- MatchInfo -> IO (Ptr MatchInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MatchInfo
matchInfo
Ptr String
result_' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
result_
CInt
result <- (FunPtr C_RegexEvalCallback -> C_RegexEvalCallback
__dynamic_C_RegexEvalCallback FunPtr C_RegexEvalCallback
__funPtr) Ptr MatchInfo
matchInfo' Ptr String
result_' Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
MatchInfo -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MatchInfo
matchInfo
String -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr String
result_
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_RegexEvalCallback :: C_RegexEvalCallback -> IO (FunPtr C_RegexEvalCallback)
type RegexEvalCallback =
GLib.MatchInfo.MatchInfo
-> GLib.String.String
-> IO Bool
noRegexEvalCallback :: Maybe RegexEvalCallback
noRegexEvalCallback :: Maybe RegexEvalCallback
noRegexEvalCallback = Maybe RegexEvalCallback
forall a. Maybe a
Nothing
type RegexEvalCallback_WithClosures =
GLib.MatchInfo.MatchInfo
-> GLib.String.String
-> Ptr ()
-> IO Bool
noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures
noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures
noRegexEvalCallback_WithClosures = Maybe RegexEvalCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_RegexEvalCallback :: RegexEvalCallback -> RegexEvalCallback_WithClosures
drop_closures_RegexEvalCallback :: RegexEvalCallback -> RegexEvalCallback_WithClosures
drop_closures_RegexEvalCallback RegexEvalCallback
_f MatchInfo
matchInfo String
result_ Ptr ()
_ = RegexEvalCallback
_f MatchInfo
matchInfo String
result_
genClosure_RegexEvalCallback :: MonadIO m => RegexEvalCallback -> m (GClosure C_RegexEvalCallback)
genClosure_RegexEvalCallback :: forall (m :: * -> *).
MonadIO m =>
RegexEvalCallback -> m (GClosure C_RegexEvalCallback)
genClosure_RegexEvalCallback RegexEvalCallback
cb = IO (GClosure C_RegexEvalCallback)
-> m (GClosure C_RegexEvalCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RegexEvalCallback)
-> m (GClosure C_RegexEvalCallback))
-> IO (GClosure C_RegexEvalCallback)
-> m (GClosure C_RegexEvalCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: RegexEvalCallback_WithClosures
cb' = RegexEvalCallback -> RegexEvalCallback_WithClosures
drop_closures_RegexEvalCallback RegexEvalCallback
cb
let cb'' :: C_RegexEvalCallback
cb'' = Maybe (Ptr (FunPtr C_RegexEvalCallback))
-> RegexEvalCallback_WithClosures -> C_RegexEvalCallback
wrap_RegexEvalCallback Maybe (Ptr (FunPtr C_RegexEvalCallback))
forall a. Maybe a
Nothing RegexEvalCallback_WithClosures
cb'
C_RegexEvalCallback -> IO (FunPtr C_RegexEvalCallback)
mk_RegexEvalCallback C_RegexEvalCallback
cb'' IO (FunPtr C_RegexEvalCallback)
-> (FunPtr C_RegexEvalCallback
-> IO (GClosure C_RegexEvalCallback))
-> IO (GClosure C_RegexEvalCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RegexEvalCallback -> IO (GClosure C_RegexEvalCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_RegexEvalCallback ::
Maybe (Ptr (FunPtr C_RegexEvalCallback)) ->
RegexEvalCallback_WithClosures ->
C_RegexEvalCallback
wrap_RegexEvalCallback :: Maybe (Ptr (FunPtr C_RegexEvalCallback))
-> RegexEvalCallback_WithClosures -> C_RegexEvalCallback
wrap_RegexEvalCallback Maybe (Ptr (FunPtr C_RegexEvalCallback))
gi'funptrptr RegexEvalCallback_WithClosures
gi'cb Ptr MatchInfo
matchInfo Ptr String
result_ Ptr ()
userData = do
Ptr MatchInfo -> (MatchInfo -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr MatchInfo
matchInfo ((MatchInfo -> IO CInt) -> IO CInt)
-> (MatchInfo -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \MatchInfo
matchInfo' -> do
Ptr String -> (String -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr String
result_ ((String -> IO CInt) -> IO CInt) -> (String -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \String
result_' -> do
Bool
result <- RegexEvalCallback_WithClosures
gi'cb MatchInfo
matchInfo' String
result_' Ptr ()
userData
Maybe (Ptr (FunPtr C_RegexEvalCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RegexEvalCallback))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_PrintFunc =
CString ->
IO ()
foreign import ccall "dynamic" __dynamic_C_PrintFunc :: FunPtr C_PrintFunc -> C_PrintFunc
dynamic_PrintFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PrintFunc
-> T.Text
-> m ()
dynamic_PrintFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr (CString -> C_VoidFunc) -> Text -> m ()
dynamic_PrintFunc FunPtr (CString -> C_VoidFunc)
__funPtr Text
string = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
string' <- Text -> IO CString
textToCString Text
string
(FunPtr (CString -> C_VoidFunc) -> CString -> C_VoidFunc
__dynamic_C_PrintFunc FunPtr (CString -> C_VoidFunc)
__funPtr) CString
string'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
string'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_PrintFunc :: C_PrintFunc -> IO (FunPtr C_PrintFunc)
type PrintFunc =
T.Text
-> IO ()
noPrintFunc :: Maybe PrintFunc
noPrintFunc :: Maybe PrintFunc
noPrintFunc = Maybe PrintFunc
forall a. Maybe a
Nothing
genClosure_PrintFunc :: MonadIO m => PrintFunc -> m (GClosure C_PrintFunc)
genClosure_PrintFunc :: forall (m :: * -> *).
MonadIO m =>
PrintFunc -> m (GClosure (CString -> C_VoidFunc))
genClosure_PrintFunc PrintFunc
cb = IO (GClosure (CString -> C_VoidFunc))
-> m (GClosure (CString -> C_VoidFunc))
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure (CString -> C_VoidFunc))
-> m (GClosure (CString -> C_VoidFunc)))
-> IO (GClosure (CString -> C_VoidFunc))
-> m (GClosure (CString -> C_VoidFunc))
forall a b. (a -> b) -> a -> b
$ do
let cb' :: CString -> C_VoidFunc
cb' = Maybe (Ptr (FunPtr (CString -> C_VoidFunc)))
-> PrintFunc -> CString -> C_VoidFunc
wrap_PrintFunc Maybe (Ptr (FunPtr (CString -> C_VoidFunc)))
forall a. Maybe a
Nothing PrintFunc
cb
(CString -> C_VoidFunc) -> IO (FunPtr (CString -> C_VoidFunc))
mk_PrintFunc CString -> C_VoidFunc
cb' IO (FunPtr (CString -> C_VoidFunc))
-> (FunPtr (CString -> C_VoidFunc)
-> IO (GClosure (CString -> C_VoidFunc)))
-> IO (GClosure (CString -> C_VoidFunc))
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr (CString -> C_VoidFunc)
-> IO (GClosure (CString -> C_VoidFunc))
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PrintFunc ::
Maybe (Ptr (FunPtr C_PrintFunc)) ->
PrintFunc ->
C_PrintFunc
wrap_PrintFunc :: Maybe (Ptr (FunPtr (CString -> C_VoidFunc)))
-> PrintFunc -> CString -> C_VoidFunc
wrap_PrintFunc Maybe (Ptr (FunPtr (CString -> C_VoidFunc)))
gi'funptrptr PrintFunc
gi'cb CString
string = do
Text
string' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
string
PrintFunc
gi'cb Text
string'
Maybe (Ptr (FunPtr (CString -> C_VoidFunc))) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr (CString -> C_VoidFunc)))
gi'funptrptr
type C_PollFunc =
Ptr GLib.PollFD.PollFD ->
Word32 ->
Int32 ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_PollFunc :: FunPtr C_PollFunc -> C_PollFunc
dynamic_PollFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_PollFunc
-> GLib.PollFD.PollFD
-> Word32
-> Int32
-> m Int32
dynamic_PollFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_PollFunc -> PollFD -> Word32 -> Int32 -> m Int32
dynamic_PollFunc FunPtr C_PollFunc
__funPtr PollFD
ufds Word32
nfsd Int32
timeout_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PollFD
ufds' <- PollFD -> IO (Ptr PollFD)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PollFD
ufds
Int32
result <- (FunPtr C_PollFunc -> C_PollFunc
__dynamic_C_PollFunc FunPtr C_PollFunc
__funPtr) Ptr PollFD
ufds' Word32
nfsd Int32
timeout_
PollFD -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr PollFD
ufds
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_PollFunc :: C_PollFunc -> IO (FunPtr C_PollFunc)
type PollFunc =
GLib.PollFD.PollFD
-> Word32
-> Int32
-> IO Int32
noPollFunc :: Maybe PollFunc
noPollFunc :: Maybe PollFunc
noPollFunc = Maybe PollFunc
forall a. Maybe a
Nothing
genClosure_PollFunc :: MonadIO m => PollFunc -> m (GClosure C_PollFunc)
genClosure_PollFunc :: forall (m :: * -> *).
MonadIO m =>
PollFunc -> m (GClosure C_PollFunc)
genClosure_PollFunc PollFunc
cb = IO (GClosure C_PollFunc) -> m (GClosure C_PollFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PollFunc) -> m (GClosure C_PollFunc))
-> IO (GClosure C_PollFunc) -> m (GClosure C_PollFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_PollFunc
cb' = Maybe (Ptr (FunPtr C_PollFunc)) -> PollFunc -> C_PollFunc
wrap_PollFunc Maybe (Ptr (FunPtr C_PollFunc))
forall a. Maybe a
Nothing PollFunc
cb
C_PollFunc -> IO (FunPtr C_PollFunc)
mk_PollFunc C_PollFunc
cb' IO (FunPtr C_PollFunc)
-> (FunPtr C_PollFunc -> IO (GClosure C_PollFunc))
-> IO (GClosure C_PollFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PollFunc -> IO (GClosure C_PollFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_PollFunc ::
Maybe (Ptr (FunPtr C_PollFunc)) ->
PollFunc ->
C_PollFunc
wrap_PollFunc :: Maybe (Ptr (FunPtr C_PollFunc)) -> PollFunc -> C_PollFunc
wrap_PollFunc Maybe (Ptr (FunPtr C_PollFunc))
gi'funptrptr PollFunc
gi'cb Ptr PollFD
ufds Word32
nfsd Int32
timeout_ = do
Ptr PollFD -> (PollFD -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr PollFD
ufds ((PollFD -> IO Int32) -> IO Int32)
-> (PollFD -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \PollFD
ufds' -> do
Int32
result <- PollFunc
gi'cb PollFD
ufds' Word32
nfsd Int32
timeout_
Maybe (Ptr (FunPtr C_PollFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PollFunc))
gi'funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_OptionParseFunc =
Ptr GLib.OptionContext.OptionContext ->
Ptr GLib.OptionGroup.OptionGroup ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_OptionParseFunc :: FunPtr C_OptionParseFunc -> C_OptionParseFunc
dynamic_OptionParseFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_OptionParseFunc
-> GLib.OptionContext.OptionContext
-> GLib.OptionGroup.OptionGroup
-> Ptr ()
-> m ()
dynamic_OptionParseFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_OptionParseFunc
-> OptionContext -> OptionGroup -> Ptr () -> m ()
dynamic_OptionParseFunc FunPtr C_OptionParseFunc
__funPtr OptionContext
context OptionGroup
group Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr OptionContext
context' <- OptionContext -> IO (Ptr OptionContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OptionContext
context
Ptr OptionGroup
group' <- OptionGroup -> IO (Ptr OptionGroup)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OptionGroup
group
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_OptionParseFunc -> C_OptionParseFunc
__dynamic_C_OptionParseFunc FunPtr C_OptionParseFunc
__funPtr) Ptr OptionContext
context' Ptr OptionGroup
group' Ptr ()
data_
OptionContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr OptionContext
context
OptionGroup -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr OptionGroup
group
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_OptionParseFunc :: C_OptionParseFunc -> IO (FunPtr C_OptionParseFunc)
type OptionParseFunc =
GLib.OptionContext.OptionContext
-> GLib.OptionGroup.OptionGroup
-> Ptr ()
-> IO ()
noOptionParseFunc :: Maybe OptionParseFunc
noOptionParseFunc :: Maybe OptionParseFunc
noOptionParseFunc = Maybe OptionParseFunc
forall a. Maybe a
Nothing
type C_OptionErrorFunc =
Ptr GLib.OptionContext.OptionContext ->
Ptr GLib.OptionGroup.OptionGroup ->
Ptr () ->
Ptr (Ptr GError) ->
IO ()
foreign import ccall "dynamic" __dynamic_C_OptionErrorFunc :: FunPtr C_OptionErrorFunc -> C_OptionErrorFunc
dynamic_OptionErrorFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_OptionErrorFunc
-> GLib.OptionContext.OptionContext
-> GLib.OptionGroup.OptionGroup
-> Ptr ()
-> m ()
dynamic_OptionErrorFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_OptionErrorFunc
-> OptionContext -> OptionGroup -> Ptr () -> m ()
dynamic_OptionErrorFunc FunPtr C_OptionErrorFunc
__funPtr OptionContext
context OptionGroup
group Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr OptionContext
context' <- OptionContext -> IO (Ptr OptionContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OptionContext
context
Ptr OptionGroup
group' <- OptionGroup -> IO (Ptr OptionGroup)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OptionGroup
group
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc)
-> (Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ (FunPtr C_OptionErrorFunc -> C_OptionErrorFunc
__dynamic_C_OptionErrorFunc FunPtr C_OptionErrorFunc
__funPtr) Ptr OptionContext
context' Ptr OptionGroup
group' Ptr ()
data_
OptionContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr OptionContext
context
OptionGroup -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr OptionGroup
group
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_OptionErrorFunc :: C_OptionErrorFunc -> IO (FunPtr C_OptionErrorFunc)
type OptionErrorFunc =
GLib.OptionContext.OptionContext
-> GLib.OptionGroup.OptionGroup
-> Ptr ()
-> IO ()
noOptionErrorFunc :: Maybe OptionErrorFunc
noOptionErrorFunc :: Maybe OptionParseFunc
noOptionErrorFunc = Maybe OptionParseFunc
forall a. Maybe a
Nothing
type C_OptionArgFunc =
CString ->
CString ->
Ptr () ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_OptionArgFunc :: FunPtr C_OptionArgFunc -> C_OptionArgFunc
dynamic_OptionArgFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_OptionArgFunc
-> T.Text
-> T.Text
-> Ptr ()
-> m ()
dynamic_OptionArgFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_OptionArgFunc -> Text -> Text -> Ptr () -> m ()
dynamic_OptionArgFunc FunPtr C_OptionArgFunc
__funPtr Text
optionName Text
value Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
optionName' <- Text -> IO CString
textToCString Text
optionName
CString
value' <- Text -> IO CString
textToCString Text
value
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_OptionArgFunc -> C_OptionArgFunc
__dynamic_C_OptionArgFunc FunPtr C_OptionArgFunc
__funPtr) CString
optionName' CString
value' Ptr ()
data_
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
optionName'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
value'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
optionName'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
value'
)
foreign import ccall "wrapper"
mk_OptionArgFunc :: C_OptionArgFunc -> IO (FunPtr C_OptionArgFunc)
type OptionArgFunc =
T.Text
-> T.Text
-> Ptr ()
-> IO ()
noOptionArgFunc :: Maybe OptionArgFunc
noOptionArgFunc :: Maybe OptionArgFunc
noOptionArgFunc = Maybe OptionArgFunc
forall a. Maybe a
Nothing
type C_NodeTraverseFunc =
Ptr GLib.Node.Node ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_NodeTraverseFunc :: FunPtr C_NodeTraverseFunc -> C_NodeTraverseFunc
dynamic_NodeTraverseFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_NodeTraverseFunc
-> GLib.Node.Node
-> Ptr ()
-> m Bool
dynamic_NodeTraverseFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_NodeTraverseFunc -> Node -> Ptr () -> m Bool
dynamic_NodeTraverseFunc FunPtr C_NodeTraverseFunc
__funPtr Node
node Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Node
node' <- Node -> IO (Ptr Node)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Node
node
CInt
result <- (FunPtr C_NodeTraverseFunc -> C_NodeTraverseFunc
__dynamic_C_NodeTraverseFunc FunPtr C_NodeTraverseFunc
__funPtr) Ptr Node
node' Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Node -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Node
node
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_NodeTraverseFunc :: C_NodeTraverseFunc -> IO (FunPtr C_NodeTraverseFunc)
type NodeTraverseFunc =
GLib.Node.Node
-> Ptr ()
-> IO Bool
noNodeTraverseFunc :: Maybe NodeTraverseFunc
noNodeTraverseFunc :: Maybe NodeTraverseFunc
noNodeTraverseFunc = Maybe NodeTraverseFunc
forall a. Maybe a
Nothing
genClosure_NodeTraverseFunc :: MonadIO m => NodeTraverseFunc -> m (GClosure C_NodeTraverseFunc)
genClosure_NodeTraverseFunc :: forall (m :: * -> *).
MonadIO m =>
NodeTraverseFunc -> m (GClosure C_NodeTraverseFunc)
genClosure_NodeTraverseFunc NodeTraverseFunc
cb = IO (GClosure C_NodeTraverseFunc) -> m (GClosure C_NodeTraverseFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_NodeTraverseFunc)
-> m (GClosure C_NodeTraverseFunc))
-> IO (GClosure C_NodeTraverseFunc)
-> m (GClosure C_NodeTraverseFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_NodeTraverseFunc
cb' = Maybe (Ptr (FunPtr C_NodeTraverseFunc))
-> NodeTraverseFunc -> C_NodeTraverseFunc
wrap_NodeTraverseFunc Maybe (Ptr (FunPtr C_NodeTraverseFunc))
forall a. Maybe a
Nothing NodeTraverseFunc
cb
C_NodeTraverseFunc -> IO (FunPtr C_NodeTraverseFunc)
mk_NodeTraverseFunc C_NodeTraverseFunc
cb' IO (FunPtr C_NodeTraverseFunc)
-> (FunPtr C_NodeTraverseFunc -> IO (GClosure C_NodeTraverseFunc))
-> IO (GClosure C_NodeTraverseFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_NodeTraverseFunc -> IO (GClosure C_NodeTraverseFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_NodeTraverseFunc ::
Maybe (Ptr (FunPtr C_NodeTraverseFunc)) ->
NodeTraverseFunc ->
C_NodeTraverseFunc
wrap_NodeTraverseFunc :: Maybe (Ptr (FunPtr C_NodeTraverseFunc))
-> NodeTraverseFunc -> C_NodeTraverseFunc
wrap_NodeTraverseFunc Maybe (Ptr (FunPtr C_NodeTraverseFunc))
gi'funptrptr NodeTraverseFunc
gi'cb Ptr Node
node Ptr ()
data_ = do
Node
node' <- ((ManagedPtr Node -> Node) -> Ptr Node -> IO Node
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Node -> Node
GLib.Node.Node) Ptr Node
node
Bool
result <- NodeTraverseFunc
gi'cb Node
node' Ptr ()
data_
Maybe (Ptr (FunPtr C_NodeTraverseFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_NodeTraverseFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_NodeForeachFunc =
Ptr GLib.Node.Node ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_NodeForeachFunc :: FunPtr C_NodeForeachFunc -> C_NodeForeachFunc
dynamic_NodeForeachFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_NodeForeachFunc
-> GLib.Node.Node
-> Ptr ()
-> m ()
dynamic_NodeForeachFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_NodeForeachFunc -> Node -> Ptr () -> m ()
dynamic_NodeForeachFunc FunPtr C_NodeForeachFunc
__funPtr Node
node Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Node
node' <- Node -> IO (Ptr Node)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Node
node
(FunPtr C_NodeForeachFunc -> C_NodeForeachFunc
__dynamic_C_NodeForeachFunc FunPtr C_NodeForeachFunc
__funPtr) Ptr Node
node' Ptr ()
data_
Node -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Node
node
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_NodeForeachFunc :: C_NodeForeachFunc -> IO (FunPtr C_NodeForeachFunc)
type NodeForeachFunc =
GLib.Node.Node
-> Ptr ()
-> IO ()
noNodeForeachFunc :: Maybe NodeForeachFunc
noNodeForeachFunc :: Maybe NodeForeachFunc
noNodeForeachFunc = Maybe NodeForeachFunc
forall a. Maybe a
Nothing
genClosure_NodeForeachFunc :: MonadIO m => NodeForeachFunc -> m (GClosure C_NodeForeachFunc)
genClosure_NodeForeachFunc :: forall (m :: * -> *).
MonadIO m =>
NodeForeachFunc -> m (GClosure C_NodeForeachFunc)
genClosure_NodeForeachFunc NodeForeachFunc
cb = IO (GClosure C_NodeForeachFunc) -> m (GClosure C_NodeForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_NodeForeachFunc) -> m (GClosure C_NodeForeachFunc))
-> IO (GClosure C_NodeForeachFunc)
-> m (GClosure C_NodeForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_NodeForeachFunc
cb' = Maybe (Ptr (FunPtr C_NodeForeachFunc))
-> NodeForeachFunc -> C_NodeForeachFunc
wrap_NodeForeachFunc Maybe (Ptr (FunPtr C_NodeForeachFunc))
forall a. Maybe a
Nothing NodeForeachFunc
cb
C_NodeForeachFunc -> IO (FunPtr C_NodeForeachFunc)
mk_NodeForeachFunc C_NodeForeachFunc
cb' IO (FunPtr C_NodeForeachFunc)
-> (FunPtr C_NodeForeachFunc -> IO (GClosure C_NodeForeachFunc))
-> IO (GClosure C_NodeForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_NodeForeachFunc -> IO (GClosure C_NodeForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_NodeForeachFunc ::
Maybe (Ptr (FunPtr C_NodeForeachFunc)) ->
NodeForeachFunc ->
C_NodeForeachFunc
wrap_NodeForeachFunc :: Maybe (Ptr (FunPtr C_NodeForeachFunc))
-> NodeForeachFunc -> C_NodeForeachFunc
wrap_NodeForeachFunc Maybe (Ptr (FunPtr C_NodeForeachFunc))
gi'funptrptr NodeForeachFunc
gi'cb Ptr Node
node Ptr ()
data_ = do
Node
node' <- ((ManagedPtr Node -> Node) -> Ptr Node -> IO Node
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Node -> Node
GLib.Node.Node) Ptr Node
node
NodeForeachFunc
gi'cb Node
node' Ptr ()
data_
Maybe (Ptr (FunPtr C_NodeForeachFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_NodeForeachFunc))
gi'funptrptr
type C_MemVTableTryReallocFieldCallback =
Ptr () ->
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_MemVTableTryReallocFieldCallback :: FunPtr C_MemVTableTryReallocFieldCallback -> C_MemVTableTryReallocFieldCallback
dynamic_MemVTableTryReallocFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryReallocFieldCallback
-> Ptr ()
-> Word64
-> m (Ptr ())
dynamic_MemVTableTryReallocFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryReallocFieldCallback
-> Ptr () -> Word64 -> m (Ptr ())
dynamic_MemVTableTryReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
__funPtr Ptr ()
mem Word64
nBytes = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
__dynamic_C_MemVTableTryReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
__funPtr) Ptr ()
mem Word64
nBytes
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_MemVTableTryReallocFieldCallback :: C_MemVTableTryReallocFieldCallback -> IO (FunPtr C_MemVTableTryReallocFieldCallback)
type MemVTableTryReallocFieldCallback =
Ptr ()
-> Word64
-> IO (Ptr ())
noMemVTableTryReallocFieldCallback :: Maybe MemVTableTryReallocFieldCallback
noMemVTableTryReallocFieldCallback :: Maybe C_MemVTableTryReallocFieldCallback
noMemVTableTryReallocFieldCallback = Maybe C_MemVTableTryReallocFieldCallback
forall a. Maybe a
Nothing
genClosure_MemVTableTryReallocFieldCallback :: MonadIO m => MemVTableTryReallocFieldCallback -> m (GClosure C_MemVTableTryReallocFieldCallback)
genClosure_MemVTableTryReallocFieldCallback :: forall (m :: * -> *).
MonadIO m =>
C_MemVTableTryReallocFieldCallback
-> m (GClosure C_MemVTableTryReallocFieldCallback)
genClosure_MemVTableTryReallocFieldCallback C_MemVTableTryReallocFieldCallback
cb = IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback))
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MemVTableTryReallocFieldCallback
cb' = Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
wrap_MemVTableTryReallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
forall a. Maybe a
Nothing C_MemVTableTryReallocFieldCallback
cb
C_MemVTableTryReallocFieldCallback
-> IO (FunPtr C_MemVTableTryReallocFieldCallback)
mk_MemVTableTryReallocFieldCallback C_MemVTableTryReallocFieldCallback
cb' IO (FunPtr C_MemVTableTryReallocFieldCallback)
-> (FunPtr C_MemVTableTryReallocFieldCallback
-> IO (GClosure C_MemVTableTryReallocFieldCallback))
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MemVTableTryReallocFieldCallback
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableTryReallocFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback)) ->
MemVTableTryReallocFieldCallback ->
C_MemVTableTryReallocFieldCallback
wrap_MemVTableTryReallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
wrap_MemVTableTryReallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
gi'funptrptr C_MemVTableTryReallocFieldCallback
gi'cb Ptr ()
mem Word64
nBytes = do
Ptr ()
result <- C_MemVTableTryReallocFieldCallback
gi'cb Ptr ()
mem Word64
nBytes
Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_MemVTableTryMallocFieldCallback =
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_MemVTableTryMallocFieldCallback :: FunPtr C_MemVTableTryMallocFieldCallback -> C_MemVTableTryMallocFieldCallback
dynamic_MemVTableTryMallocFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryMallocFieldCallback
-> Word64
-> m (Ptr ())
dynamic_MemVTableTryMallocFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryMallocFieldCallback -> Word64 -> m (Ptr ())
dynamic_MemVTableTryMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
__funPtr Word64
nBytes = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
__dynamic_C_MemVTableTryMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
__funPtr) Word64
nBytes
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_MemVTableTryMallocFieldCallback :: C_MemVTableTryMallocFieldCallback -> IO (FunPtr C_MemVTableTryMallocFieldCallback)
type MemVTableTryMallocFieldCallback =
Word64
-> IO (Ptr ())
noMemVTableTryMallocFieldCallback :: Maybe MemVTableTryMallocFieldCallback
noMemVTableTryMallocFieldCallback :: Maybe C_MemVTableTryMallocFieldCallback
noMemVTableTryMallocFieldCallback = Maybe C_MemVTableTryMallocFieldCallback
forall a. Maybe a
Nothing
genClosure_MemVTableTryMallocFieldCallback :: MonadIO m => MemVTableTryMallocFieldCallback -> m (GClosure C_MemVTableTryMallocFieldCallback)
genClosure_MemVTableTryMallocFieldCallback :: forall (m :: * -> *).
MonadIO m =>
C_MemVTableTryMallocFieldCallback
-> m (GClosure C_MemVTableTryMallocFieldCallback)
genClosure_MemVTableTryMallocFieldCallback C_MemVTableTryMallocFieldCallback
cb = IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback))
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MemVTableTryMallocFieldCallback
cb' = Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
wrap_MemVTableTryMallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
forall a. Maybe a
Nothing C_MemVTableTryMallocFieldCallback
cb
C_MemVTableTryMallocFieldCallback
-> IO (FunPtr C_MemVTableTryMallocFieldCallback)
mk_MemVTableTryMallocFieldCallback C_MemVTableTryMallocFieldCallback
cb' IO (FunPtr C_MemVTableTryMallocFieldCallback)
-> (FunPtr C_MemVTableTryMallocFieldCallback
-> IO (GClosure C_MemVTableTryMallocFieldCallback))
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MemVTableTryMallocFieldCallback
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableTryMallocFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback)) ->
MemVTableTryMallocFieldCallback ->
C_MemVTableTryMallocFieldCallback
wrap_MemVTableTryMallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
wrap_MemVTableTryMallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
gi'funptrptr C_MemVTableTryMallocFieldCallback
gi'cb Word64
nBytes = do
Ptr ()
result <- C_MemVTableTryMallocFieldCallback
gi'cb Word64
nBytes
Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_MemVTableReallocFieldCallback =
Ptr () ->
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_MemVTableReallocFieldCallback :: FunPtr C_MemVTableReallocFieldCallback -> C_MemVTableReallocFieldCallback
dynamic_MemVTableReallocFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableReallocFieldCallback
-> Ptr ()
-> Word64
-> m (Ptr ())
dynamic_MemVTableReallocFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryReallocFieldCallback
-> Ptr () -> Word64 -> m (Ptr ())
dynamic_MemVTableReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
__funPtr Ptr ()
mem Word64
nBytes = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
__dynamic_C_MemVTableReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
__funPtr) Ptr ()
mem Word64
nBytes
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_MemVTableReallocFieldCallback :: C_MemVTableReallocFieldCallback -> IO (FunPtr C_MemVTableReallocFieldCallback)
type MemVTableReallocFieldCallback =
Ptr ()
-> Word64
-> IO (Ptr ())
noMemVTableReallocFieldCallback :: Maybe MemVTableReallocFieldCallback
noMemVTableReallocFieldCallback :: Maybe C_MemVTableTryReallocFieldCallback
noMemVTableReallocFieldCallback = Maybe C_MemVTableTryReallocFieldCallback
forall a. Maybe a
Nothing
genClosure_MemVTableReallocFieldCallback :: MonadIO m => MemVTableReallocFieldCallback -> m (GClosure C_MemVTableReallocFieldCallback)
genClosure_MemVTableReallocFieldCallback :: forall (m :: * -> *).
MonadIO m =>
C_MemVTableTryReallocFieldCallback
-> m (GClosure C_MemVTableTryReallocFieldCallback)
genClosure_MemVTableReallocFieldCallback C_MemVTableTryReallocFieldCallback
cb = IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback))
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
-> m (GClosure C_MemVTableTryReallocFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MemVTableTryReallocFieldCallback
cb' = Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
wrap_MemVTableReallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
forall a. Maybe a
Nothing C_MemVTableTryReallocFieldCallback
cb
C_MemVTableTryReallocFieldCallback
-> IO (FunPtr C_MemVTableTryReallocFieldCallback)
mk_MemVTableReallocFieldCallback C_MemVTableTryReallocFieldCallback
cb' IO (FunPtr C_MemVTableTryReallocFieldCallback)
-> (FunPtr C_MemVTableTryReallocFieldCallback
-> IO (GClosure C_MemVTableTryReallocFieldCallback))
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MemVTableTryReallocFieldCallback
-> IO (GClosure C_MemVTableTryReallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableReallocFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableReallocFieldCallback)) ->
MemVTableReallocFieldCallback ->
C_MemVTableReallocFieldCallback
wrap_MemVTableReallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_MemVTableTryReallocFieldCallback
-> C_MemVTableTryReallocFieldCallback
wrap_MemVTableReallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
gi'funptrptr C_MemVTableTryReallocFieldCallback
gi'cb Ptr ()
mem Word64
nBytes = do
Ptr ()
result <- C_MemVTableTryReallocFieldCallback
gi'cb Ptr ()
mem Word64
nBytes
Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MemVTableTryReallocFieldCallback))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_MemVTableMallocFieldCallback =
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_MemVTableMallocFieldCallback :: FunPtr C_MemVTableMallocFieldCallback -> C_MemVTableMallocFieldCallback
dynamic_MemVTableMallocFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableMallocFieldCallback
-> Word64
-> m (Ptr ())
dynamic_MemVTableMallocFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MemVTableTryMallocFieldCallback -> Word64 -> m (Ptr ())
dynamic_MemVTableMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
__funPtr Word64
nBytes = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
__dynamic_C_MemVTableMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
__funPtr) Word64
nBytes
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_MemVTableMallocFieldCallback :: C_MemVTableMallocFieldCallback -> IO (FunPtr C_MemVTableMallocFieldCallback)
type MemVTableMallocFieldCallback =
Word64
-> IO (Ptr ())
noMemVTableMallocFieldCallback :: Maybe MemVTableMallocFieldCallback
noMemVTableMallocFieldCallback :: Maybe C_MemVTableTryMallocFieldCallback
noMemVTableMallocFieldCallback = Maybe C_MemVTableTryMallocFieldCallback
forall a. Maybe a
Nothing
genClosure_MemVTableMallocFieldCallback :: MonadIO m => MemVTableMallocFieldCallback -> m (GClosure C_MemVTableMallocFieldCallback)
genClosure_MemVTableMallocFieldCallback :: forall (m :: * -> *).
MonadIO m =>
C_MemVTableTryMallocFieldCallback
-> m (GClosure C_MemVTableTryMallocFieldCallback)
genClosure_MemVTableMallocFieldCallback C_MemVTableTryMallocFieldCallback
cb = IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback))
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
-> m (GClosure C_MemVTableTryMallocFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MemVTableTryMallocFieldCallback
cb' = Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
wrap_MemVTableMallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
forall a. Maybe a
Nothing C_MemVTableTryMallocFieldCallback
cb
C_MemVTableTryMallocFieldCallback
-> IO (FunPtr C_MemVTableTryMallocFieldCallback)
mk_MemVTableMallocFieldCallback C_MemVTableTryMallocFieldCallback
cb' IO (FunPtr C_MemVTableTryMallocFieldCallback)
-> (FunPtr C_MemVTableTryMallocFieldCallback
-> IO (GClosure C_MemVTableTryMallocFieldCallback))
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MemVTableTryMallocFieldCallback
-> IO (GClosure C_MemVTableTryMallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableMallocFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableMallocFieldCallback)) ->
MemVTableMallocFieldCallback ->
C_MemVTableMallocFieldCallback
wrap_MemVTableMallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_MemVTableTryMallocFieldCallback
-> C_MemVTableTryMallocFieldCallback
wrap_MemVTableMallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
gi'funptrptr C_MemVTableTryMallocFieldCallback
gi'cb Word64
nBytes = do
Ptr ()
result <- C_MemVTableTryMallocFieldCallback
gi'cb Word64
nBytes
Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MemVTableTryMallocFieldCallback))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_MemVTableFreeFieldCallback =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MemVTableFreeFieldCallback :: FunPtr C_MemVTableFreeFieldCallback -> C_MemVTableFreeFieldCallback
dynamic_MemVTableFreeFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableFreeFieldCallback
-> Ptr ()
-> m ()
dynamic_MemVTableFreeFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_MemVTableFreeFieldCallback FunPtr TestFixtureFunc
__funPtr Ptr ()
mem = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_MemVTableFreeFieldCallback FunPtr TestFixtureFunc
__funPtr) Ptr ()
mem
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_MemVTableFreeFieldCallback :: C_MemVTableFreeFieldCallback -> IO (FunPtr C_MemVTableFreeFieldCallback)
type MemVTableFreeFieldCallback =
Ptr ()
-> IO ()
noMemVTableFreeFieldCallback :: Maybe MemVTableFreeFieldCallback
noMemVTableFreeFieldCallback :: Maybe TestFixtureFunc
noMemVTableFreeFieldCallback = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_MemVTableFreeFieldCallback :: MonadIO m => MemVTableFreeFieldCallback -> m (GClosure C_MemVTableFreeFieldCallback)
genClosure_MemVTableFreeFieldCallback :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_MemVTableFreeFieldCallback TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_MemVTableFreeFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_MemVTableFreeFieldCallback TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableFreeFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableFreeFieldCallback)) ->
MemVTableFreeFieldCallback ->
C_MemVTableFreeFieldCallback
wrap_MemVTableFreeFieldCallback :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_MemVTableFreeFieldCallback Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
mem = do
TestFixtureFunc
gi'cb Ptr ()
mem
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_MemVTableCallocFieldCallback =
Word64 ->
Word64 ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_MemVTableCallocFieldCallback :: FunPtr C_MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback
dynamic_MemVTableCallocFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MemVTableCallocFieldCallback
-> Word64
-> Word64
-> m (Ptr ())
dynamic_MemVTableCallocFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MemVTableCallocFieldCallback
-> Word64 -> Word64 -> m (Ptr ())
dynamic_MemVTableCallocFieldCallback FunPtr C_MemVTableCallocFieldCallback
__funPtr Word64
nBlocks Word64
nBlockBytes = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_MemVTableCallocFieldCallback
-> C_MemVTableCallocFieldCallback
__dynamic_C_MemVTableCallocFieldCallback FunPtr C_MemVTableCallocFieldCallback
__funPtr) Word64
nBlocks Word64
nBlockBytes
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_MemVTableCallocFieldCallback :: C_MemVTableCallocFieldCallback -> IO (FunPtr C_MemVTableCallocFieldCallback)
type MemVTableCallocFieldCallback =
Word64
-> Word64
-> IO (Ptr ())
noMemVTableCallocFieldCallback :: Maybe MemVTableCallocFieldCallback
noMemVTableCallocFieldCallback :: Maybe C_MemVTableCallocFieldCallback
noMemVTableCallocFieldCallback = Maybe C_MemVTableCallocFieldCallback
forall a. Maybe a
Nothing
genClosure_MemVTableCallocFieldCallback :: MonadIO m => MemVTableCallocFieldCallback -> m (GClosure C_MemVTableCallocFieldCallback)
genClosure_MemVTableCallocFieldCallback :: forall (m :: * -> *).
MonadIO m =>
C_MemVTableCallocFieldCallback
-> m (GClosure C_MemVTableCallocFieldCallback)
genClosure_MemVTableCallocFieldCallback C_MemVTableCallocFieldCallback
cb = IO (GClosure C_MemVTableCallocFieldCallback)
-> m (GClosure C_MemVTableCallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MemVTableCallocFieldCallback)
-> m (GClosure C_MemVTableCallocFieldCallback))
-> IO (GClosure C_MemVTableCallocFieldCallback)
-> m (GClosure C_MemVTableCallocFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_MemVTableCallocFieldCallback
cb' = Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback))
-> C_MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback
wrap_MemVTableCallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback))
forall a. Maybe a
Nothing C_MemVTableCallocFieldCallback
cb
C_MemVTableCallocFieldCallback
-> IO (FunPtr C_MemVTableCallocFieldCallback)
mk_MemVTableCallocFieldCallback C_MemVTableCallocFieldCallback
cb' IO (FunPtr C_MemVTableCallocFieldCallback)
-> (FunPtr C_MemVTableCallocFieldCallback
-> IO (GClosure C_MemVTableCallocFieldCallback))
-> IO (GClosure C_MemVTableCallocFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MemVTableCallocFieldCallback
-> IO (GClosure C_MemVTableCallocFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MemVTableCallocFieldCallback ::
Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback)) ->
MemVTableCallocFieldCallback ->
C_MemVTableCallocFieldCallback
wrap_MemVTableCallocFieldCallback :: Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback))
-> C_MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback
wrap_MemVTableCallocFieldCallback Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback))
gi'funptrptr C_MemVTableCallocFieldCallback
gi'cb Word64
nBlocks Word64
nBlockBytes = do
Ptr ()
result <- C_MemVTableCallocFieldCallback
gi'cb Word64
nBlocks Word64
nBlockBytes
Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MemVTableCallocFieldCallback))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_MarkupParserTextFieldCallback =
Ptr GLib.MarkupParseContext.MarkupParseContext ->
CString ->
Word64 ->
Ptr () ->
Ptr (Ptr GError) ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MarkupParserTextFieldCallback :: FunPtr C_MarkupParserTextFieldCallback -> C_MarkupParserTextFieldCallback
dynamic_MarkupParserTextFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserTextFieldCallback
-> GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> Ptr ()
-> m ()
dynamic_MarkupParserTextFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserTextFieldCallback
-> MarkupParseContext -> Text -> Word64 -> Ptr () -> m ()
dynamic_MarkupParserTextFieldCallback FunPtr C_MarkupParserTextFieldCallback
__funPtr MarkupParseContext
context Text
text Word64
textLen Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MarkupParseContext
context' <- MarkupParseContext -> IO (Ptr MarkupParseContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MarkupParseContext
context
CString
text' <- Text -> IO CString
textToCString Text
text
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc)
-> (Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ (FunPtr C_MarkupParserTextFieldCallback
-> C_MarkupParserTextFieldCallback
__dynamic_C_MarkupParserTextFieldCallback FunPtr C_MarkupParserTextFieldCallback
__funPtr) Ptr MarkupParseContext
context' CString
text' Word64
textLen Ptr ()
userData
MarkupParseContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MarkupParseContext
context
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
text'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
text'
)
foreign import ccall "wrapper"
mk_MarkupParserTextFieldCallback :: C_MarkupParserTextFieldCallback -> IO (FunPtr C_MarkupParserTextFieldCallback)
type MarkupParserTextFieldCallback =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> IO ()
noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback
noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback
noMarkupParserTextFieldCallback = Maybe MarkupParserTextFieldCallback
forall a. Maybe a
Nothing
type MarkupParserTextFieldCallback_WithClosures =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> Ptr ()
-> IO ()
noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
noMarkupParserTextFieldCallback_WithClosures = Maybe MarkupParserTextFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_MarkupParserTextFieldCallback :: MarkupParserTextFieldCallback -> MarkupParserTextFieldCallback_WithClosures
drop_closures_MarkupParserTextFieldCallback :: MarkupParserTextFieldCallback
-> MarkupParserTextFieldCallback_WithClosures
drop_closures_MarkupParserTextFieldCallback MarkupParserTextFieldCallback
_f MarkupParseContext
context Text
text Word64
textLen Ptr ()
_ = MarkupParserTextFieldCallback
_f MarkupParseContext
context Text
text Word64
textLen
type C_MarkupParserStartElementFieldCallback =
Ptr GLib.MarkupParseContext.MarkupParseContext ->
CString ->
CString ->
CString ->
Ptr () ->
Ptr (Ptr GError) ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MarkupParserStartElementFieldCallback :: FunPtr C_MarkupParserStartElementFieldCallback -> C_MarkupParserStartElementFieldCallback
dynamic_MarkupParserStartElementFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserStartElementFieldCallback
-> GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> m ()
dynamic_MarkupParserStartElementFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserStartElementFieldCallback
-> MarkupParseContext -> Text -> Text -> Text -> Ptr () -> m ()
dynamic_MarkupParserStartElementFieldCallback FunPtr C_MarkupParserStartElementFieldCallback
__funPtr MarkupParseContext
context Text
elementName Text
attributeNames Text
attributeValues Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MarkupParseContext
context' <- MarkupParseContext -> IO (Ptr MarkupParseContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MarkupParseContext
context
CString
elementName' <- Text -> IO CString
textToCString Text
elementName
CString
attributeNames' <- Text -> IO CString
textToCString Text
attributeNames
CString
attributeValues' <- Text -> IO CString
textToCString Text
attributeValues
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc)
-> (Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ (FunPtr C_MarkupParserStartElementFieldCallback
-> C_MarkupParserStartElementFieldCallback
__dynamic_C_MarkupParserStartElementFieldCallback FunPtr C_MarkupParserStartElementFieldCallback
__funPtr) Ptr MarkupParseContext
context' CString
elementName' CString
attributeNames' CString
attributeValues' Ptr ()
userData
MarkupParseContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MarkupParseContext
context
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
elementName'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
attributeNames'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
attributeValues'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
elementName'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
attributeNames'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
attributeValues'
)
foreign import ccall "wrapper"
mk_MarkupParserStartElementFieldCallback :: C_MarkupParserStartElementFieldCallback -> IO (FunPtr C_MarkupParserStartElementFieldCallback)
type MarkupParserStartElementFieldCallback =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> T.Text
-> T.Text
-> IO ()
noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback
noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback
noMarkupParserStartElementFieldCallback = Maybe MarkupParserStartElementFieldCallback
forall a. Maybe a
Nothing
type MarkupParserStartElementFieldCallback_WithClosures =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> T.Text
-> T.Text
-> Ptr ()
-> IO ()
noMarkupParserStartElementFieldCallback_WithClosures :: Maybe MarkupParserStartElementFieldCallback_WithClosures
noMarkupParserStartElementFieldCallback_WithClosures :: Maybe MarkupParserStartElementFieldCallback_WithClosures
noMarkupParserStartElementFieldCallback_WithClosures = Maybe MarkupParserStartElementFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_MarkupParserStartElementFieldCallback :: MarkupParserStartElementFieldCallback -> MarkupParserStartElementFieldCallback_WithClosures
drop_closures_MarkupParserStartElementFieldCallback :: MarkupParserStartElementFieldCallback
-> MarkupParserStartElementFieldCallback_WithClosures
drop_closures_MarkupParserStartElementFieldCallback MarkupParserStartElementFieldCallback
_f MarkupParseContext
context Text
elementName Text
attributeNames Text
attributeValues Ptr ()
_ = MarkupParserStartElementFieldCallback
_f MarkupParseContext
context Text
elementName Text
attributeNames Text
attributeValues
type C_MarkupParserPassthroughFieldCallback =
Ptr GLib.MarkupParseContext.MarkupParseContext ->
CString ->
Word64 ->
Ptr () ->
Ptr (Ptr GError) ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MarkupParserPassthroughFieldCallback :: FunPtr C_MarkupParserPassthroughFieldCallback -> C_MarkupParserPassthroughFieldCallback
dynamic_MarkupParserPassthroughFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserPassthroughFieldCallback
-> GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> Ptr ()
-> m ()
dynamic_MarkupParserPassthroughFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserTextFieldCallback
-> MarkupParseContext -> Text -> Word64 -> Ptr () -> m ()
dynamic_MarkupParserPassthroughFieldCallback FunPtr C_MarkupParserTextFieldCallback
__funPtr MarkupParseContext
context Text
passthroughText Word64
textLen Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MarkupParseContext
context' <- MarkupParseContext -> IO (Ptr MarkupParseContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MarkupParseContext
context
CString
passthroughText' <- Text -> IO CString
textToCString Text
passthroughText
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc)
-> (Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ (FunPtr C_MarkupParserTextFieldCallback
-> C_MarkupParserTextFieldCallback
__dynamic_C_MarkupParserPassthroughFieldCallback FunPtr C_MarkupParserTextFieldCallback
__funPtr) Ptr MarkupParseContext
context' CString
passthroughText' Word64
textLen Ptr ()
userData
MarkupParseContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MarkupParseContext
context
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
passthroughText'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
passthroughText'
)
foreign import ccall "wrapper"
mk_MarkupParserPassthroughFieldCallback :: C_MarkupParserPassthroughFieldCallback -> IO (FunPtr C_MarkupParserPassthroughFieldCallback)
type MarkupParserPassthroughFieldCallback =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> IO ()
noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserPassthroughFieldCallback
noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserTextFieldCallback
noMarkupParserPassthroughFieldCallback = Maybe MarkupParserTextFieldCallback
forall a. Maybe a
Nothing
type MarkupParserPassthroughFieldCallback_WithClosures =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Word64
-> Ptr ()
-> IO ()
noMarkupParserPassthroughFieldCallback_WithClosures :: Maybe MarkupParserPassthroughFieldCallback_WithClosures
noMarkupParserPassthroughFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
noMarkupParserPassthroughFieldCallback_WithClosures = Maybe MarkupParserTextFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_MarkupParserPassthroughFieldCallback :: MarkupParserPassthroughFieldCallback -> MarkupParserPassthroughFieldCallback_WithClosures
drop_closures_MarkupParserPassthroughFieldCallback :: MarkupParserTextFieldCallback
-> MarkupParserTextFieldCallback_WithClosures
drop_closures_MarkupParserPassthroughFieldCallback MarkupParserTextFieldCallback
_f MarkupParseContext
context Text
passthroughText Word64
textLen Ptr ()
_ = MarkupParserTextFieldCallback
_f MarkupParseContext
context Text
passthroughText Word64
textLen
type C_MarkupParserErrorFieldCallback =
Ptr GLib.MarkupParseContext.MarkupParseContext ->
Ptr GError ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MarkupParserErrorFieldCallback :: FunPtr C_MarkupParserErrorFieldCallback -> C_MarkupParserErrorFieldCallback
dynamic_MarkupParserErrorFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserErrorFieldCallback
-> GLib.MarkupParseContext.MarkupParseContext
-> GError
-> Ptr ()
-> m ()
dynamic_MarkupParserErrorFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserErrorFieldCallback
-> MarkupParseContext -> GError -> Ptr () -> m ()
dynamic_MarkupParserErrorFieldCallback FunPtr C_MarkupParserErrorFieldCallback
__funPtr MarkupParseContext
context GError
error_ Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MarkupParseContext
context' <- MarkupParseContext -> IO (Ptr MarkupParseContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MarkupParseContext
context
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
(FunPtr C_MarkupParserErrorFieldCallback
-> C_MarkupParserErrorFieldCallback
__dynamic_C_MarkupParserErrorFieldCallback FunPtr C_MarkupParserErrorFieldCallback
__funPtr) Ptr MarkupParseContext
context' Ptr GError
error_' Ptr ()
userData
MarkupParseContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MarkupParseContext
context
GError -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr GError
error_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_MarkupParserErrorFieldCallback :: C_MarkupParserErrorFieldCallback -> IO (FunPtr C_MarkupParserErrorFieldCallback)
type MarkupParserErrorFieldCallback =
GLib.MarkupParseContext.MarkupParseContext
-> GError
-> IO ()
noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback
noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback
noMarkupParserErrorFieldCallback = Maybe MarkupParserErrorFieldCallback
forall a. Maybe a
Nothing
type MarkupParserErrorFieldCallback_WithClosures =
GLib.MarkupParseContext.MarkupParseContext
-> GError
-> Ptr ()
-> IO ()
noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures
noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures
noMarkupParserErrorFieldCallback_WithClosures = Maybe MarkupParserErrorFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_MarkupParserErrorFieldCallback :: MarkupParserErrorFieldCallback -> MarkupParserErrorFieldCallback_WithClosures
drop_closures_MarkupParserErrorFieldCallback :: MarkupParserErrorFieldCallback
-> MarkupParserErrorFieldCallback_WithClosures
drop_closures_MarkupParserErrorFieldCallback MarkupParserErrorFieldCallback
_f MarkupParseContext
context GError
error_ Ptr ()
_ = MarkupParserErrorFieldCallback
_f MarkupParseContext
context GError
error_
genClosure_MarkupParserErrorFieldCallback :: MonadIO m => MarkupParserErrorFieldCallback -> m (GClosure C_MarkupParserErrorFieldCallback)
genClosure_MarkupParserErrorFieldCallback :: forall (m :: * -> *).
MonadIO m =>
MarkupParserErrorFieldCallback
-> m (GClosure C_MarkupParserErrorFieldCallback)
genClosure_MarkupParserErrorFieldCallback MarkupParserErrorFieldCallback
cb = IO (GClosure C_MarkupParserErrorFieldCallback)
-> m (GClosure C_MarkupParserErrorFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MarkupParserErrorFieldCallback)
-> m (GClosure C_MarkupParserErrorFieldCallback))
-> IO (GClosure C_MarkupParserErrorFieldCallback)
-> m (GClosure C_MarkupParserErrorFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: MarkupParserErrorFieldCallback_WithClosures
cb' = MarkupParserErrorFieldCallback
-> MarkupParserErrorFieldCallback_WithClosures
drop_closures_MarkupParserErrorFieldCallback MarkupParserErrorFieldCallback
cb
let cb'' :: C_MarkupParserErrorFieldCallback
cb'' = Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback))
-> MarkupParserErrorFieldCallback_WithClosures
-> C_MarkupParserErrorFieldCallback
wrap_MarkupParserErrorFieldCallback Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback))
forall a. Maybe a
Nothing MarkupParserErrorFieldCallback_WithClosures
cb'
C_MarkupParserErrorFieldCallback
-> IO (FunPtr C_MarkupParserErrorFieldCallback)
mk_MarkupParserErrorFieldCallback C_MarkupParserErrorFieldCallback
cb'' IO (FunPtr C_MarkupParserErrorFieldCallback)
-> (FunPtr C_MarkupParserErrorFieldCallback
-> IO (GClosure C_MarkupParserErrorFieldCallback))
-> IO (GClosure C_MarkupParserErrorFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MarkupParserErrorFieldCallback
-> IO (GClosure C_MarkupParserErrorFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MarkupParserErrorFieldCallback ::
Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback)) ->
MarkupParserErrorFieldCallback_WithClosures ->
C_MarkupParserErrorFieldCallback
wrap_MarkupParserErrorFieldCallback :: Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback))
-> MarkupParserErrorFieldCallback_WithClosures
-> C_MarkupParserErrorFieldCallback
wrap_MarkupParserErrorFieldCallback Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback))
gi'funptrptr MarkupParserErrorFieldCallback_WithClosures
gi'cb Ptr MarkupParseContext
context Ptr GError
error_ Ptr ()
userData = do
Ptr MarkupParseContext
-> (MarkupParseContext -> C_VoidFunc) -> C_VoidFunc
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr MarkupParseContext
context ((MarkupParseContext -> C_VoidFunc) -> C_VoidFunc)
-> (MarkupParseContext -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ \MarkupParseContext
context' -> do
GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
MarkupParserErrorFieldCallback_WithClosures
gi'cb MarkupParseContext
context' GError
error_' Ptr ()
userData
Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MarkupParserErrorFieldCallback))
gi'funptrptr
type C_MarkupParserEndElementFieldCallback =
Ptr GLib.MarkupParseContext.MarkupParseContext ->
CString ->
Ptr () ->
Ptr (Ptr GError) ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MarkupParserEndElementFieldCallback :: FunPtr C_MarkupParserEndElementFieldCallback -> C_MarkupParserEndElementFieldCallback
dynamic_MarkupParserEndElementFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserEndElementFieldCallback
-> GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Ptr ()
-> m ()
dynamic_MarkupParserEndElementFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MarkupParserEndElementFieldCallback
-> MarkupParseContext -> Text -> Ptr () -> m ()
dynamic_MarkupParserEndElementFieldCallback FunPtr C_MarkupParserEndElementFieldCallback
__funPtr MarkupParseContext
context Text
elementName Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MarkupParseContext
context' <- MarkupParseContext -> IO (Ptr MarkupParseContext)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MarkupParseContext
context
CString
elementName' <- Text -> IO CString
textToCString Text
elementName
C_VoidFunc -> C_VoidFunc -> C_VoidFunc
forall a b. IO a -> IO b -> IO a
onException (do
(Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc)
-> (Ptr (Ptr GError) -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ (FunPtr C_MarkupParserEndElementFieldCallback
-> C_MarkupParserEndElementFieldCallback
__dynamic_C_MarkupParserEndElementFieldCallback FunPtr C_MarkupParserEndElementFieldCallback
__funPtr) Ptr MarkupParseContext
context' CString
elementName' Ptr ()
userData
MarkupParseContext -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr MarkupParseContext
context
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
elementName'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
elementName'
)
foreign import ccall "wrapper"
mk_MarkupParserEndElementFieldCallback :: C_MarkupParserEndElementFieldCallback -> IO (FunPtr C_MarkupParserEndElementFieldCallback)
type MarkupParserEndElementFieldCallback =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> IO ()
noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback
noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback
noMarkupParserEndElementFieldCallback = Maybe MarkupParserEndElementFieldCallback
forall a. Maybe a
Nothing
type MarkupParserEndElementFieldCallback_WithClosures =
GLib.MarkupParseContext.MarkupParseContext
-> T.Text
-> Ptr ()
-> IO ()
noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures
noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures
noMarkupParserEndElementFieldCallback_WithClosures = Maybe MarkupParserEndElementFieldCallback_WithClosures
forall a. Maybe a
Nothing
drop_closures_MarkupParserEndElementFieldCallback :: MarkupParserEndElementFieldCallback -> MarkupParserEndElementFieldCallback_WithClosures
drop_closures_MarkupParserEndElementFieldCallback :: MarkupParserEndElementFieldCallback
-> MarkupParserEndElementFieldCallback_WithClosures
drop_closures_MarkupParserEndElementFieldCallback MarkupParserEndElementFieldCallback
_f MarkupParseContext
context Text
elementName Ptr ()
_ = MarkupParserEndElementFieldCallback
_f MarkupParseContext
context Text
elementName
type C_LogWriterFunc =
CInt ->
Ptr GLib.LogField.LogField ->
Word64 ->
Ptr () ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_LogWriterFunc :: FunPtr C_LogWriterFunc -> C_LogWriterFunc
dynamic_LogWriterFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_LogWriterFunc
-> [GLib.Flags.LogLevelFlags]
-> [GLib.LogField.LogField]
-> Ptr ()
-> m GLib.Enums.LogWriterOutput
dynamic_LogWriterFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_LogWriterFunc
-> [LogLevelFlags] -> [LogField] -> Ptr () -> m LogWriterOutput
dynamic_LogWriterFunc FunPtr C_LogWriterFunc
__funPtr [LogLevelFlags]
logLevel [LogField]
fields Ptr ()
userData = IO LogWriterOutput -> m LogWriterOutput
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO LogWriterOutput -> m LogWriterOutput)
-> IO LogWriterOutput -> m LogWriterOutput
forall a b. (a -> b) -> a -> b
$ do
let nFields :: Word64
nFields = Int -> Word64
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word64) -> Int -> Word64
forall a b. (a -> b) -> a -> b
$ [LogField] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [LogField]
fields
let logLevel' :: CInt
logLevel' = [LogLevelFlags] -> CInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [LogLevelFlags]
logLevel
[Ptr LogField]
fields' <- (LogField -> IO (Ptr LogField)) -> [LogField] -> IO [Ptr LogField]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM LogField -> IO (Ptr LogField)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [LogField]
fields
Ptr LogField
fields'' <- Int -> [Ptr LogField] -> IO (Ptr LogField)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
24 [Ptr LogField]
fields'
CUInt
result <- (FunPtr C_LogWriterFunc -> C_LogWriterFunc
__dynamic_C_LogWriterFunc FunPtr C_LogWriterFunc
__funPtr) CInt
logLevel' Ptr LogField
fields'' Word64
nFields Ptr ()
userData
let result' :: LogWriterOutput
result' = (Int -> LogWriterOutput
forall a. Enum a => Int -> a
toEnum (Int -> LogWriterOutput)
-> (CUInt -> Int) -> CUInt -> LogWriterOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
(LogField -> C_VoidFunc) -> [LogField] -> C_VoidFunc
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ LogField -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr [LogField]
fields
Ptr LogField -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem Ptr LogField
fields''
LogWriterOutput -> IO LogWriterOutput
forall (m :: * -> *) a. Monad m => a -> m a
return LogWriterOutput
result'
foreign import ccall "wrapper"
mk_LogWriterFunc :: C_LogWriterFunc -> IO (FunPtr C_LogWriterFunc)
type LogWriterFunc =
[GLib.Flags.LogLevelFlags]
-> [GLib.LogField.LogField]
-> IO GLib.Enums.LogWriterOutput
noLogWriterFunc :: Maybe LogWriterFunc
noLogWriterFunc :: Maybe LogWriterFunc
noLogWriterFunc = Maybe LogWriterFunc
forall a. Maybe a
Nothing
type LogWriterFunc_WithClosures =
[GLib.Flags.LogLevelFlags]
-> [GLib.LogField.LogField]
-> Ptr ()
-> IO GLib.Enums.LogWriterOutput
noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures
noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures
noLogWriterFunc_WithClosures = Maybe LogWriterFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_LogWriterFunc :: LogWriterFunc -> LogWriterFunc_WithClosures
drop_closures_LogWriterFunc :: LogWriterFunc -> LogWriterFunc_WithClosures
drop_closures_LogWriterFunc LogWriterFunc
_f [LogLevelFlags]
logLevel [LogField]
fields Ptr ()
_ = LogWriterFunc
_f [LogLevelFlags]
logLevel [LogField]
fields
genClosure_LogWriterFunc :: MonadIO m => LogWriterFunc -> m (GClosure C_LogWriterFunc)
genClosure_LogWriterFunc :: forall (m :: * -> *).
MonadIO m =>
LogWriterFunc -> m (GClosure C_LogWriterFunc)
genClosure_LogWriterFunc LogWriterFunc
cb = IO (GClosure C_LogWriterFunc) -> m (GClosure C_LogWriterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_LogWriterFunc) -> m (GClosure C_LogWriterFunc))
-> IO (GClosure C_LogWriterFunc) -> m (GClosure C_LogWriterFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: LogWriterFunc_WithClosures
cb' = LogWriterFunc -> LogWriterFunc_WithClosures
drop_closures_LogWriterFunc LogWriterFunc
cb
let cb'' :: C_LogWriterFunc
cb'' = Maybe (Ptr (FunPtr C_LogWriterFunc))
-> LogWriterFunc_WithClosures -> C_LogWriterFunc
wrap_LogWriterFunc Maybe (Ptr (FunPtr C_LogWriterFunc))
forall a. Maybe a
Nothing LogWriterFunc_WithClosures
cb'
C_LogWriterFunc -> IO (FunPtr C_LogWriterFunc)
mk_LogWriterFunc C_LogWriterFunc
cb'' IO (FunPtr C_LogWriterFunc)
-> (FunPtr C_LogWriterFunc -> IO (GClosure C_LogWriterFunc))
-> IO (GClosure C_LogWriterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_LogWriterFunc -> IO (GClosure C_LogWriterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_LogWriterFunc ::
Maybe (Ptr (FunPtr C_LogWriterFunc)) ->
LogWriterFunc_WithClosures ->
C_LogWriterFunc
wrap_LogWriterFunc :: Maybe (Ptr (FunPtr C_LogWriterFunc))
-> LogWriterFunc_WithClosures -> C_LogWriterFunc
wrap_LogWriterFunc Maybe (Ptr (FunPtr C_LogWriterFunc))
gi'funptrptr LogWriterFunc_WithClosures
gi'cb CInt
logLevel Ptr LogField
fields Word64
nFields Ptr ()
userData = do
let logLevel' :: [LogLevelFlags]
logLevel' = CInt -> [LogLevelFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CInt
logLevel
[Ptr LogField]
fields' <- (Int -> Word64 -> Ptr LogField -> IO [Ptr LogField]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
24 Word64
nFields) Ptr LogField
fields
[LogField]
fields'' <- (Ptr LogField -> IO LogField) -> [Ptr LogField] -> IO [LogField]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr LogField -> LogField) -> Ptr LogField -> IO LogField
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr LogField -> LogField
GLib.LogField.LogField) [Ptr LogField]
fields'
LogWriterOutput
result <- LogWriterFunc_WithClosures
gi'cb [LogLevelFlags]
logLevel' [LogField]
fields'' Ptr ()
userData
Maybe (Ptr (FunPtr C_LogWriterFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_LogWriterFunc))
gi'funptrptr
let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (LogWriterOutput -> Int) -> LogWriterOutput -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. LogWriterOutput -> Int
forall a. Enum a => a -> Int
fromEnum) LogWriterOutput
result
CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
type C_LogFunc =
CString ->
CInt ->
CString ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_LogFunc :: FunPtr C_LogFunc -> C_LogFunc
dynamic_LogFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_LogFunc
-> T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> Ptr ()
-> m ()
dynamic_LogFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_LogFunc
-> Text -> [LogLevelFlags] -> Text -> Ptr () -> m ()
dynamic_LogFunc FunPtr C_LogFunc
__funPtr Text
logDomain [LogLevelFlags]
logLevel Text
message Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
CString
logDomain' <- Text -> IO CString
textToCString Text
logDomain
let logLevel' :: CInt
logLevel' = [LogLevelFlags] -> CInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [LogLevelFlags]
logLevel
CString
message' <- Text -> IO CString
textToCString Text
message
(FunPtr C_LogFunc -> C_LogFunc
__dynamic_C_LogFunc FunPtr C_LogFunc
__funPtr) CString
logDomain' CInt
logLevel' CString
message' Ptr ()
userData
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
logDomain'
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
message'
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_LogFunc :: C_LogFunc -> IO (FunPtr C_LogFunc)
type LogFunc =
T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> IO ()
noLogFunc :: Maybe LogFunc
noLogFunc :: Maybe LogFunc
noLogFunc = Maybe LogFunc
forall a. Maybe a
Nothing
type LogFunc_WithClosures =
T.Text
-> [GLib.Flags.LogLevelFlags]
-> T.Text
-> Ptr ()
-> IO ()
noLogFunc_WithClosures :: Maybe LogFunc_WithClosures
noLogFunc_WithClosures :: Maybe LogFunc_WithClosures
noLogFunc_WithClosures = Maybe LogFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_LogFunc :: LogFunc -> LogFunc_WithClosures
drop_closures_LogFunc :: LogFunc -> LogFunc_WithClosures
drop_closures_LogFunc LogFunc
_f Text
logDomain [LogLevelFlags]
logLevel Text
message Ptr ()
_ = LogFunc
_f Text
logDomain [LogLevelFlags]
logLevel Text
message
genClosure_LogFunc :: MonadIO m => LogFunc -> m (GClosure C_LogFunc)
genClosure_LogFunc :: forall (m :: * -> *).
MonadIO m =>
LogFunc -> m (GClosure C_LogFunc)
genClosure_LogFunc LogFunc
cb = IO (GClosure C_LogFunc) -> m (GClosure C_LogFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_LogFunc) -> m (GClosure C_LogFunc))
-> IO (GClosure C_LogFunc) -> m (GClosure C_LogFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: LogFunc_WithClosures
cb' = LogFunc -> LogFunc_WithClosures
drop_closures_LogFunc LogFunc
cb
let cb'' :: C_LogFunc
cb'' = Maybe (Ptr (FunPtr C_LogFunc)) -> LogFunc_WithClosures -> C_LogFunc
wrap_LogFunc Maybe (Ptr (FunPtr C_LogFunc))
forall a. Maybe a
Nothing LogFunc_WithClosures
cb'
C_LogFunc -> IO (FunPtr C_LogFunc)
mk_LogFunc C_LogFunc
cb'' IO (FunPtr C_LogFunc)
-> (FunPtr C_LogFunc -> IO (GClosure C_LogFunc))
-> IO (GClosure C_LogFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_LogFunc -> IO (GClosure C_LogFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_LogFunc ::
Maybe (Ptr (FunPtr C_LogFunc)) ->
LogFunc_WithClosures ->
C_LogFunc
wrap_LogFunc :: Maybe (Ptr (FunPtr C_LogFunc)) -> LogFunc_WithClosures -> C_LogFunc
wrap_LogFunc Maybe (Ptr (FunPtr C_LogFunc))
gi'funptrptr LogFunc_WithClosures
gi'cb CString
logDomain CInt
logLevel CString
message Ptr ()
userData = do
Text
logDomain' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
logDomain
let logLevel' :: [LogLevelFlags]
logLevel' = CInt -> [LogLevelFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CInt
logLevel
Text
message' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
message
LogFunc_WithClosures
gi'cb Text
logDomain' [LogLevelFlags]
logLevel' Text
message' Ptr ()
userData
Maybe (Ptr (FunPtr C_LogFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_LogFunc))
gi'funptrptr
type C_IOFuncsIoWriteFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
CString ->
Word64 ->
Word64 ->
Ptr (Ptr GError) ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoWriteFieldCallback :: FunPtr C_IOFuncsIoWriteFieldCallback -> C_IOFuncsIoWriteFieldCallback
dynamic_IOFuncsIoWriteFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoWriteFieldCallback
-> GLib.IOChannel.IOChannel
-> T.Text
-> Word64
-> Word64
-> m GLib.Enums.IOStatus
dynamic_IOFuncsIoWriteFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoWriteFieldCallback
-> IOChannel -> Text -> Word64 -> Word64 -> m IOStatus
dynamic_IOFuncsIoWriteFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
__funPtr IOChannel
channel Text
buf Word64
count Word64
bytesWritten = IO IOStatus -> m IOStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStatus -> m IOStatus) -> IO IOStatus -> m IOStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
CString
buf' <- Text -> IO CString
textToCString Text
buf
IO IOStatus -> C_VoidFunc -> IO IOStatus
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_IOFuncsIoWriteFieldCallback
-> C_IOFuncsIoWriteFieldCallback
__dynamic_C_IOFuncsIoWriteFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
__funPtr) Ptr IOChannel
channel' CString
buf' Word64
count Word64
bytesWritten
let result' :: IOStatus
result' = (Int -> IOStatus
forall a. Enum a => Int -> a
toEnum (Int -> IOStatus) -> (CUInt -> Int) -> CUInt -> IOStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
buf'
IOStatus -> IO IOStatus
forall (m :: * -> *) a. Monad m => a -> m a
return IOStatus
result'
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
buf'
)
foreign import ccall "wrapper"
mk_IOFuncsIoWriteFieldCallback :: C_IOFuncsIoWriteFieldCallback -> IO (FunPtr C_IOFuncsIoWriteFieldCallback)
type IOFuncsIoWriteFieldCallback =
GLib.IOChannel.IOChannel
-> T.Text
-> Word64
-> Word64
-> IO GLib.Enums.IOStatus
noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
noIOFuncsIoWriteFieldCallback = Maybe IOFuncsIoWriteFieldCallback
forall a. Maybe a
Nothing
type C_IOFuncsIoSetFlagsFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
CUInt ->
Ptr (Ptr GError) ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoSetFlagsFieldCallback :: FunPtr C_IOFuncsIoSetFlagsFieldCallback -> C_IOFuncsIoSetFlagsFieldCallback
dynamic_IOFuncsIoSetFlagsFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoSetFlagsFieldCallback
-> GLib.IOChannel.IOChannel
-> [GLib.Flags.IOFlags]
-> m GLib.Enums.IOStatus
dynamic_IOFuncsIoSetFlagsFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoSetFlagsFieldCallback
-> IOChannel -> [IOFlags] -> m IOStatus
dynamic_IOFuncsIoSetFlagsFieldCallback FunPtr C_IOFuncsIoSetFlagsFieldCallback
__funPtr IOChannel
channel [IOFlags]
flags = IO IOStatus -> m IOStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStatus -> m IOStatus) -> IO IOStatus -> m IOStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
let flags' :: CUInt
flags' = [IOFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOFlags]
flags
IO IOStatus -> C_VoidFunc -> IO IOStatus
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_IOFuncsIoSetFlagsFieldCallback
-> C_IOFuncsIoSetFlagsFieldCallback
__dynamic_C_IOFuncsIoSetFlagsFieldCallback FunPtr C_IOFuncsIoSetFlagsFieldCallback
__funPtr) Ptr IOChannel
channel' CUInt
flags'
let result' :: IOStatus
result' = (Int -> IOStatus
forall a. Enum a => Int -> a
toEnum (Int -> IOStatus) -> (CUInt -> Int) -> CUInt -> IOStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
IOStatus -> IO IOStatus
forall (m :: * -> *) a. Monad m => a -> m a
return IOStatus
result'
) (do
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_IOFuncsIoSetFlagsFieldCallback :: C_IOFuncsIoSetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoSetFlagsFieldCallback)
type IOFuncsIoSetFlagsFieldCallback =
GLib.IOChannel.IOChannel
-> [GLib.Flags.IOFlags]
-> IO GLib.Enums.IOStatus
noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback
noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback
noIOFuncsIoSetFlagsFieldCallback = Maybe IOFuncsIoSetFlagsFieldCallback
forall a. Maybe a
Nothing
type C_IOFuncsIoSeekFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
Int64 ->
CUInt ->
Ptr (Ptr GError) ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoSeekFieldCallback :: FunPtr C_IOFuncsIoSeekFieldCallback -> C_IOFuncsIoSeekFieldCallback
dynamic_IOFuncsIoSeekFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoSeekFieldCallback
-> GLib.IOChannel.IOChannel
-> Int64
-> GLib.Enums.SeekType
-> m GLib.Enums.IOStatus
dynamic_IOFuncsIoSeekFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoSeekFieldCallback
-> IOChannel -> Int64 -> SeekType -> m IOStatus
dynamic_IOFuncsIoSeekFieldCallback FunPtr C_IOFuncsIoSeekFieldCallback
__funPtr IOChannel
channel Int64
offset SeekType
type_ = IO IOStatus -> m IOStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStatus -> m IOStatus) -> IO IOStatus -> m IOStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SeekType -> Int) -> SeekType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SeekType -> Int
forall a. Enum a => a -> Int
fromEnum) SeekType
type_
IO IOStatus -> C_VoidFunc -> IO IOStatus
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_IOFuncsIoSeekFieldCallback -> C_IOFuncsIoSeekFieldCallback
__dynamic_C_IOFuncsIoSeekFieldCallback FunPtr C_IOFuncsIoSeekFieldCallback
__funPtr) Ptr IOChannel
channel' Int64
offset CUInt
type_'
let result' :: IOStatus
result' = (Int -> IOStatus
forall a. Enum a => Int -> a
toEnum (Int -> IOStatus) -> (CUInt -> Int) -> CUInt -> IOStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
IOStatus -> IO IOStatus
forall (m :: * -> *) a. Monad m => a -> m a
return IOStatus
result'
) (do
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_IOFuncsIoSeekFieldCallback :: C_IOFuncsIoSeekFieldCallback -> IO (FunPtr C_IOFuncsIoSeekFieldCallback)
type IOFuncsIoSeekFieldCallback =
GLib.IOChannel.IOChannel
-> Int64
-> GLib.Enums.SeekType
-> IO GLib.Enums.IOStatus
noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback
noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback
noIOFuncsIoSeekFieldCallback = Maybe IOFuncsIoSeekFieldCallback
forall a. Maybe a
Nothing
type C_IOFuncsIoReadFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
CString ->
Word64 ->
Word64 ->
Ptr (Ptr GError) ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoReadFieldCallback :: FunPtr C_IOFuncsIoReadFieldCallback -> C_IOFuncsIoReadFieldCallback
dynamic_IOFuncsIoReadFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoReadFieldCallback
-> GLib.IOChannel.IOChannel
-> T.Text
-> Word64
-> Word64
-> m GLib.Enums.IOStatus
dynamic_IOFuncsIoReadFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoWriteFieldCallback
-> IOChannel -> Text -> Word64 -> Word64 -> m IOStatus
dynamic_IOFuncsIoReadFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
__funPtr IOChannel
channel Text
buf Word64
count Word64
bytesRead = IO IOStatus -> m IOStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStatus -> m IOStatus) -> IO IOStatus -> m IOStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
CString
buf' <- Text -> IO CString
textToCString Text
buf
IO IOStatus -> C_VoidFunc -> IO IOStatus
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_IOFuncsIoWriteFieldCallback
-> C_IOFuncsIoWriteFieldCallback
__dynamic_C_IOFuncsIoReadFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
__funPtr) Ptr IOChannel
channel' CString
buf' Word64
count Word64
bytesRead
let result' :: IOStatus
result' = (Int -> IOStatus
forall a. Enum a => Int -> a
toEnum (Int -> IOStatus) -> (CUInt -> Int) -> CUInt -> IOStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
buf'
IOStatus -> IO IOStatus
forall (m :: * -> *) a. Monad m => a -> m a
return IOStatus
result'
) (do
CString -> C_VoidFunc
forall a. Ptr a -> C_VoidFunc
freeMem CString
buf'
)
foreign import ccall "wrapper"
mk_IOFuncsIoReadFieldCallback :: C_IOFuncsIoReadFieldCallback -> IO (FunPtr C_IOFuncsIoReadFieldCallback)
type IOFuncsIoReadFieldCallback =
GLib.IOChannel.IOChannel
-> T.Text
-> Word64
-> Word64
-> IO GLib.Enums.IOStatus
noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoReadFieldCallback
noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
noIOFuncsIoReadFieldCallback = Maybe IOFuncsIoWriteFieldCallback
forall a. Maybe a
Nothing
type C_IOFuncsIoGetFlagsFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoGetFlagsFieldCallback :: FunPtr C_IOFuncsIoGetFlagsFieldCallback -> C_IOFuncsIoGetFlagsFieldCallback
dynamic_IOFuncsIoGetFlagsFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoGetFlagsFieldCallback
-> GLib.IOChannel.IOChannel
-> m [GLib.Flags.IOFlags]
dynamic_IOFuncsIoGetFlagsFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoGetFlagsFieldCallback -> IOChannel -> m [IOFlags]
dynamic_IOFuncsIoGetFlagsFieldCallback FunPtr C_IOFuncsIoGetFlagsFieldCallback
__funPtr IOChannel
channel = IO [IOFlags] -> m [IOFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [IOFlags] -> m [IOFlags]) -> IO [IOFlags] -> m [IOFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
CUInt
result <- (FunPtr C_IOFuncsIoGetFlagsFieldCallback
-> C_IOFuncsIoGetFlagsFieldCallback
__dynamic_C_IOFuncsIoGetFlagsFieldCallback FunPtr C_IOFuncsIoGetFlagsFieldCallback
__funPtr) Ptr IOChannel
channel'
let result' :: [IOFlags]
result' = CUInt -> [IOFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
[IOFlags] -> IO [IOFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [IOFlags]
result'
foreign import ccall "wrapper"
mk_IOFuncsIoGetFlagsFieldCallback :: C_IOFuncsIoGetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)
type IOFuncsIoGetFlagsFieldCallback =
GLib.IOChannel.IOChannel
-> IO [GLib.Flags.IOFlags]
noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback
noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback
noIOFuncsIoGetFlagsFieldCallback = Maybe IOFuncsIoGetFlagsFieldCallback
forall a. Maybe a
Nothing
genClosure_IOFuncsIoGetFlagsFieldCallback :: MonadIO m => IOFuncsIoGetFlagsFieldCallback -> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)
genClosure_IOFuncsIoGetFlagsFieldCallback :: forall (m :: * -> *).
MonadIO m =>
IOFuncsIoGetFlagsFieldCallback
-> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)
genClosure_IOFuncsIoGetFlagsFieldCallback IOFuncsIoGetFlagsFieldCallback
cb = IO (GClosure C_IOFuncsIoGetFlagsFieldCallback)
-> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IOFuncsIoGetFlagsFieldCallback)
-> m (GClosure C_IOFuncsIoGetFlagsFieldCallback))
-> IO (GClosure C_IOFuncsIoGetFlagsFieldCallback)
-> m (GClosure C_IOFuncsIoGetFlagsFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_IOFuncsIoGetFlagsFieldCallback
cb' = Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback))
-> IOFuncsIoGetFlagsFieldCallback
-> C_IOFuncsIoGetFlagsFieldCallback
wrap_IOFuncsIoGetFlagsFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback))
forall a. Maybe a
Nothing IOFuncsIoGetFlagsFieldCallback
cb
C_IOFuncsIoGetFlagsFieldCallback
-> IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)
mk_IOFuncsIoGetFlagsFieldCallback C_IOFuncsIoGetFlagsFieldCallback
cb' IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)
-> (FunPtr C_IOFuncsIoGetFlagsFieldCallback
-> IO (GClosure C_IOFuncsIoGetFlagsFieldCallback))
-> IO (GClosure C_IOFuncsIoGetFlagsFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IOFuncsIoGetFlagsFieldCallback
-> IO (GClosure C_IOFuncsIoGetFlagsFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_IOFuncsIoGetFlagsFieldCallback ::
Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback)) ->
IOFuncsIoGetFlagsFieldCallback ->
C_IOFuncsIoGetFlagsFieldCallback
wrap_IOFuncsIoGetFlagsFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback))
-> IOFuncsIoGetFlagsFieldCallback
-> C_IOFuncsIoGetFlagsFieldCallback
wrap_IOFuncsIoGetFlagsFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback))
gi'funptrptr IOFuncsIoGetFlagsFieldCallback
gi'cb Ptr IOChannel
channel = do
Ptr IOChannel -> (IOChannel -> IO CUInt) -> IO CUInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr IOChannel
channel ((IOChannel -> IO CUInt) -> IO CUInt)
-> (IOChannel -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \IOChannel
channel' -> do
[IOFlags]
result <- IOFuncsIoGetFlagsFieldCallback
gi'cb IOChannel
channel'
Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IOFuncsIoGetFlagsFieldCallback))
gi'funptrptr
let result' :: CUInt
result' = [IOFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOFlags]
result
CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
type C_IOFuncsIoFreeFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
IO ()
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoFreeFieldCallback :: FunPtr C_IOFuncsIoFreeFieldCallback -> C_IOFuncsIoFreeFieldCallback
dynamic_IOFuncsIoFreeFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoFreeFieldCallback
-> GLib.IOChannel.IOChannel
-> m ()
dynamic_IOFuncsIoFreeFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoFreeFieldCallback -> IOChannel -> m ()
dynamic_IOFuncsIoFreeFieldCallback FunPtr C_IOFuncsIoFreeFieldCallback
__funPtr IOChannel
channel = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
(FunPtr C_IOFuncsIoFreeFieldCallback -> C_IOFuncsIoFreeFieldCallback
__dynamic_C_IOFuncsIoFreeFieldCallback FunPtr C_IOFuncsIoFreeFieldCallback
__funPtr) Ptr IOChannel
channel'
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_IOFuncsIoFreeFieldCallback :: C_IOFuncsIoFreeFieldCallback -> IO (FunPtr C_IOFuncsIoFreeFieldCallback)
type IOFuncsIoFreeFieldCallback =
GLib.IOChannel.IOChannel
-> IO ()
noIOFuncsIoFreeFieldCallback :: Maybe IOFuncsIoFreeFieldCallback
noIOFuncsIoFreeFieldCallback :: Maybe (IOChannel -> C_VoidFunc)
noIOFuncsIoFreeFieldCallback = Maybe (IOChannel -> C_VoidFunc)
forall a. Maybe a
Nothing
genClosure_IOFuncsIoFreeFieldCallback :: MonadIO m => IOFuncsIoFreeFieldCallback -> m (GClosure C_IOFuncsIoFreeFieldCallback)
genClosure_IOFuncsIoFreeFieldCallback :: forall (m :: * -> *).
MonadIO m =>
(IOChannel -> C_VoidFunc)
-> m (GClosure C_IOFuncsIoFreeFieldCallback)
genClosure_IOFuncsIoFreeFieldCallback IOChannel -> C_VoidFunc
cb = IO (GClosure C_IOFuncsIoFreeFieldCallback)
-> m (GClosure C_IOFuncsIoFreeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IOFuncsIoFreeFieldCallback)
-> m (GClosure C_IOFuncsIoFreeFieldCallback))
-> IO (GClosure C_IOFuncsIoFreeFieldCallback)
-> m (GClosure C_IOFuncsIoFreeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_IOFuncsIoFreeFieldCallback
cb' = Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback))
-> (IOChannel -> C_VoidFunc) -> C_IOFuncsIoFreeFieldCallback
wrap_IOFuncsIoFreeFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback))
forall a. Maybe a
Nothing IOChannel -> C_VoidFunc
cb
C_IOFuncsIoFreeFieldCallback
-> IO (FunPtr C_IOFuncsIoFreeFieldCallback)
mk_IOFuncsIoFreeFieldCallback C_IOFuncsIoFreeFieldCallback
cb' IO (FunPtr C_IOFuncsIoFreeFieldCallback)
-> (FunPtr C_IOFuncsIoFreeFieldCallback
-> IO (GClosure C_IOFuncsIoFreeFieldCallback))
-> IO (GClosure C_IOFuncsIoFreeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IOFuncsIoFreeFieldCallback
-> IO (GClosure C_IOFuncsIoFreeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_IOFuncsIoFreeFieldCallback ::
Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback)) ->
IOFuncsIoFreeFieldCallback ->
C_IOFuncsIoFreeFieldCallback
wrap_IOFuncsIoFreeFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback))
-> (IOChannel -> C_VoidFunc) -> C_IOFuncsIoFreeFieldCallback
wrap_IOFuncsIoFreeFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback))
gi'funptrptr IOChannel -> C_VoidFunc
gi'cb Ptr IOChannel
channel = do
Ptr IOChannel -> (IOChannel -> C_VoidFunc) -> C_VoidFunc
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr IOChannel
channel ((IOChannel -> C_VoidFunc) -> C_VoidFunc)
-> (IOChannel -> C_VoidFunc) -> C_VoidFunc
forall a b. (a -> b) -> a -> b
$ \IOChannel
channel' -> do
IOChannel -> C_VoidFunc
gi'cb IOChannel
channel'
Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IOFuncsIoFreeFieldCallback))
gi'funptrptr
type C_IOFuncsIoCreateWatchFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
CUInt ->
IO (Ptr GLib.Source.Source)
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoCreateWatchFieldCallback :: FunPtr C_IOFuncsIoCreateWatchFieldCallback -> C_IOFuncsIoCreateWatchFieldCallback
dynamic_IOFuncsIoCreateWatchFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoCreateWatchFieldCallback
-> GLib.IOChannel.IOChannel
-> [GLib.Flags.IOCondition]
-> m GLib.Source.Source
dynamic_IOFuncsIoCreateWatchFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoCreateWatchFieldCallback
-> IOChannel -> [IOCondition] -> m Source
dynamic_IOFuncsIoCreateWatchFieldCallback FunPtr C_IOFuncsIoCreateWatchFieldCallback
__funPtr IOChannel
channel [IOCondition]
condition = IO Source -> m Source
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Source -> m Source) -> IO Source -> m Source
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
let condition' :: CUInt
condition' = [IOCondition] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOCondition]
condition
Ptr Source
result <- (FunPtr C_IOFuncsIoCreateWatchFieldCallback
-> C_IOFuncsIoCreateWatchFieldCallback
__dynamic_C_IOFuncsIoCreateWatchFieldCallback FunPtr C_IOFuncsIoCreateWatchFieldCallback
__funPtr) Ptr IOChannel
channel' CUInt
condition'
Text -> C_SourceFuncsFinalizeFieldCallback
forall a. HasCallStack => Text -> Ptr a -> C_VoidFunc
checkUnexpectedReturnNULL Text
"iOFuncsIoCreateWatchFieldCallback" Ptr Source
result
Source
result' <- ((ManagedPtr Source -> Source) -> Ptr Source -> IO Source
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Source -> Source
GLib.Source.Source) Ptr Source
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
Source -> IO Source
forall (m :: * -> *) a. Monad m => a -> m a
return Source
result'
foreign import ccall "wrapper"
mk_IOFuncsIoCreateWatchFieldCallback :: C_IOFuncsIoCreateWatchFieldCallback -> IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)
type IOFuncsIoCreateWatchFieldCallback =
GLib.IOChannel.IOChannel
-> [GLib.Flags.IOCondition]
-> IO GLib.Source.Source
noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback
noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback
noIOFuncsIoCreateWatchFieldCallback = Maybe IOFuncsIoCreateWatchFieldCallback
forall a. Maybe a
Nothing
genClosure_IOFuncsIoCreateWatchFieldCallback :: MonadIO m => IOFuncsIoCreateWatchFieldCallback -> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)
genClosure_IOFuncsIoCreateWatchFieldCallback :: forall (m :: * -> *).
MonadIO m =>
IOFuncsIoCreateWatchFieldCallback
-> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)
genClosure_IOFuncsIoCreateWatchFieldCallback IOFuncsIoCreateWatchFieldCallback
cb = IO (GClosure C_IOFuncsIoCreateWatchFieldCallback)
-> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IOFuncsIoCreateWatchFieldCallback)
-> m (GClosure C_IOFuncsIoCreateWatchFieldCallback))
-> IO (GClosure C_IOFuncsIoCreateWatchFieldCallback)
-> m (GClosure C_IOFuncsIoCreateWatchFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_IOFuncsIoCreateWatchFieldCallback
cb' = Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
-> IOFuncsIoCreateWatchFieldCallback
-> C_IOFuncsIoCreateWatchFieldCallback
wrap_IOFuncsIoCreateWatchFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
forall a. Maybe a
Nothing IOFuncsIoCreateWatchFieldCallback
cb
C_IOFuncsIoCreateWatchFieldCallback
-> IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)
mk_IOFuncsIoCreateWatchFieldCallback C_IOFuncsIoCreateWatchFieldCallback
cb' IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)
-> (FunPtr C_IOFuncsIoCreateWatchFieldCallback
-> IO (GClosure C_IOFuncsIoCreateWatchFieldCallback))
-> IO (GClosure C_IOFuncsIoCreateWatchFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IOFuncsIoCreateWatchFieldCallback
-> IO (GClosure C_IOFuncsIoCreateWatchFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_IOFuncsIoCreateWatchFieldCallback ::
Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback)) ->
IOFuncsIoCreateWatchFieldCallback ->
C_IOFuncsIoCreateWatchFieldCallback
wrap_IOFuncsIoCreateWatchFieldCallback :: Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
-> IOFuncsIoCreateWatchFieldCallback
-> C_IOFuncsIoCreateWatchFieldCallback
wrap_IOFuncsIoCreateWatchFieldCallback Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
gi'funptrptr IOFuncsIoCreateWatchFieldCallback
gi'cb Ptr IOChannel
channel CUInt
condition = do
Ptr IOChannel -> (IOChannel -> IO (Ptr Source)) -> IO (Ptr Source)
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr IOChannel
channel ((IOChannel -> IO (Ptr Source)) -> IO (Ptr Source))
-> (IOChannel -> IO (Ptr Source)) -> IO (Ptr Source)
forall a b. (a -> b) -> a -> b
$ \IOChannel
channel' -> do
let condition' :: [IOCondition]
condition' = CUInt -> [IOCondition]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
condition
Source
result <- IOFuncsIoCreateWatchFieldCallback
gi'cb IOChannel
channel' [IOCondition]
condition'
Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
-> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IOFuncsIoCreateWatchFieldCallback))
gi'funptrptr
Ptr Source
result' <- Source -> IO (Ptr Source)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Source
result
Ptr Source -> IO (Ptr Source)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Source
result'
type C_IOFuncsIoCloseFieldCallback =
Ptr GLib.IOChannel.IOChannel ->
Ptr (Ptr GError) ->
IO CUInt
foreign import ccall "dynamic" __dynamic_C_IOFuncsIoCloseFieldCallback :: FunPtr C_IOFuncsIoCloseFieldCallback -> C_IOFuncsIoCloseFieldCallback
dynamic_IOFuncsIoCloseFieldCallback ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoCloseFieldCallback
-> GLib.IOChannel.IOChannel
-> m GLib.Enums.IOStatus
dynamic_IOFuncsIoCloseFieldCallback :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFuncsIoCloseFieldCallback -> IOChannel -> m IOStatus
dynamic_IOFuncsIoCloseFieldCallback FunPtr C_IOFuncsIoCloseFieldCallback
__funPtr IOChannel
channel = IO IOStatus -> m IOStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStatus -> m IOStatus) -> IO IOStatus -> m IOStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
channel' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
channel
IO IOStatus -> C_VoidFunc -> IO IOStatus
forall a b. IO a -> IO b -> IO a
onException (do
CUInt
result <- (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CUInt) -> IO CUInt)
-> (Ptr (Ptr GError) -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_IOFuncsIoCloseFieldCallback
-> C_IOFuncsIoCloseFieldCallback
__dynamic_C_IOFuncsIoCloseFieldCallback FunPtr C_IOFuncsIoCloseFieldCallback
__funPtr) Ptr IOChannel
channel'
let result' :: IOStatus
result' = (Int -> IOStatus
forall a. Enum a => Int -> a
toEnum (Int -> IOStatus) -> (CUInt -> Int) -> CUInt -> IOStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
channel
IOStatus -> IO IOStatus
forall (m :: * -> *) a. Monad m => a -> m a
return IOStatus
result'
) (do
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
foreign import ccall "wrapper"
mk_IOFuncsIoCloseFieldCallback :: C_IOFuncsIoCloseFieldCallback -> IO (FunPtr C_IOFuncsIoCloseFieldCallback)
type IOFuncsIoCloseFieldCallback =
GLib.IOChannel.IOChannel
-> IO GLib.Enums.IOStatus
noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback
noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback
noIOFuncsIoCloseFieldCallback = Maybe IOFuncsIoCloseFieldCallback
forall a. Maybe a
Nothing
type C_IOFunc =
Ptr GLib.IOChannel.IOChannel ->
CUInt ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_IOFunc :: FunPtr C_IOFunc -> C_IOFunc
dynamic_IOFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_IOFunc
-> GLib.IOChannel.IOChannel
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> m Bool
dynamic_IOFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_IOFunc -> IOChannel -> [IOCondition] -> Ptr () -> m Bool
dynamic_IOFunc FunPtr C_IOFunc
__funPtr IOChannel
source [IOCondition]
condition Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr IOChannel
source' <- IOChannel -> IO (Ptr IOChannel)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IOChannel
source
let condition' :: CUInt
condition' = [IOCondition] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [IOCondition]
condition
CInt
result <- (FunPtr C_IOFunc -> C_IOFunc
__dynamic_C_IOFunc FunPtr C_IOFunc
__funPtr) Ptr IOChannel
source' CUInt
condition' Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
IOChannel -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr IOChannel
source
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_IOFunc :: C_IOFunc -> IO (FunPtr C_IOFunc)
type IOFunc =
GLib.IOChannel.IOChannel
-> [GLib.Flags.IOCondition]
-> Ptr ()
-> IO Bool
noIOFunc :: Maybe IOFunc
noIOFunc :: Maybe IOFunc
noIOFunc = Maybe IOFunc
forall a. Maybe a
Nothing
genClosure_IOFunc :: MonadIO m => IOFunc -> m (GClosure C_IOFunc)
genClosure_IOFunc :: forall (m :: * -> *). MonadIO m => IOFunc -> m (GClosure C_IOFunc)
genClosure_IOFunc IOFunc
cb = IO (GClosure C_IOFunc) -> m (GClosure C_IOFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IOFunc) -> m (GClosure C_IOFunc))
-> IO (GClosure C_IOFunc) -> m (GClosure C_IOFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_IOFunc
cb' = Maybe (Ptr (FunPtr C_IOFunc)) -> IOFunc -> C_IOFunc
wrap_IOFunc Maybe (Ptr (FunPtr C_IOFunc))
forall a. Maybe a
Nothing IOFunc
cb
C_IOFunc -> IO (FunPtr C_IOFunc)
mk_IOFunc C_IOFunc
cb' IO (FunPtr C_IOFunc)
-> (FunPtr C_IOFunc -> IO (GClosure C_IOFunc))
-> IO (GClosure C_IOFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IOFunc -> IO (GClosure C_IOFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_IOFunc ::
Maybe (Ptr (FunPtr C_IOFunc)) ->
IOFunc ->
C_IOFunc
wrap_IOFunc :: Maybe (Ptr (FunPtr C_IOFunc)) -> IOFunc -> C_IOFunc
wrap_IOFunc Maybe (Ptr (FunPtr C_IOFunc))
gi'funptrptr IOFunc
gi'cb Ptr IOChannel
source CUInt
condition Ptr ()
data_ = do
Ptr IOChannel -> (IOChannel -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr IOChannel
source ((IOChannel -> IO CInt) -> IO CInt)
-> (IOChannel -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \IOChannel
source' -> do
let condition' :: [IOCondition]
condition' = CUInt -> [IOCondition]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
condition
Bool
result <- IOFunc
gi'cb IOChannel
source' [IOCondition]
condition' Ptr ()
data_
Maybe (Ptr (FunPtr C_IOFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IOFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_HookMarshaller =
Ptr GLib.Hook.Hook ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_HookMarshaller :: FunPtr C_HookMarshaller -> C_HookMarshaller
dynamic_HookMarshaller ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookMarshaller
-> GLib.Hook.Hook
-> Ptr ()
-> m ()
dynamic_HookMarshaller :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HookMarshaller -> Hook -> Ptr () -> m ()
dynamic_HookMarshaller FunPtr C_HookMarshaller
__funPtr Hook
hook Ptr ()
marshalData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Hook
hook' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
hook
(FunPtr C_HookMarshaller -> C_HookMarshaller
__dynamic_C_HookMarshaller FunPtr C_HookMarshaller
__funPtr) Ptr Hook
hook' Ptr ()
marshalData
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
hook
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_HookMarshaller :: C_HookMarshaller -> IO (FunPtr C_HookMarshaller)
type HookMarshaller =
GLib.Hook.Hook
-> Ptr ()
-> IO ()
noHookMarshaller :: Maybe HookMarshaller
noHookMarshaller :: Maybe HookMarshaller
noHookMarshaller = Maybe HookMarshaller
forall a. Maybe a
Nothing
genClosure_HookMarshaller :: MonadIO m => HookMarshaller -> m (GClosure C_HookMarshaller)
genClosure_HookMarshaller :: forall (m :: * -> *).
MonadIO m =>
HookMarshaller -> m (GClosure C_HookMarshaller)
genClosure_HookMarshaller HookMarshaller
cb = IO (GClosure C_HookMarshaller) -> m (GClosure C_HookMarshaller)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HookMarshaller) -> m (GClosure C_HookMarshaller))
-> IO (GClosure C_HookMarshaller) -> m (GClosure C_HookMarshaller)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HookMarshaller
cb' = Maybe (Ptr (FunPtr C_HookMarshaller))
-> HookMarshaller -> C_HookMarshaller
wrap_HookMarshaller Maybe (Ptr (FunPtr C_HookMarshaller))
forall a. Maybe a
Nothing HookMarshaller
cb
C_HookMarshaller -> IO (FunPtr C_HookMarshaller)
mk_HookMarshaller C_HookMarshaller
cb' IO (FunPtr C_HookMarshaller)
-> (FunPtr C_HookMarshaller -> IO (GClosure C_HookMarshaller))
-> IO (GClosure C_HookMarshaller)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HookMarshaller -> IO (GClosure C_HookMarshaller)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookMarshaller ::
Maybe (Ptr (FunPtr C_HookMarshaller)) ->
HookMarshaller ->
C_HookMarshaller
wrap_HookMarshaller :: Maybe (Ptr (FunPtr C_HookMarshaller))
-> HookMarshaller -> C_HookMarshaller
wrap_HookMarshaller Maybe (Ptr (FunPtr C_HookMarshaller))
gi'funptrptr HookMarshaller
gi'cb Ptr Hook
hook Ptr ()
marshalData = do
Hook
hook' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
hook
HookMarshaller
gi'cb Hook
hook' Ptr ()
marshalData
Maybe (Ptr (FunPtr C_HookMarshaller)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HookMarshaller))
gi'funptrptr
type C_HookFunc =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_HookFunc :: FunPtr C_HookFunc -> C_HookFunc
dynamic_HookFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookFunc
-> Ptr ()
-> m ()
dynamic_HookFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_HookFunc FunPtr TestFixtureFunc
__funPtr Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_HookFunc FunPtr TestFixtureFunc
__funPtr) Ptr ()
data_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_HookFunc :: C_HookFunc -> IO (FunPtr C_HookFunc)
type HookFunc =
Ptr ()
-> IO ()
noHookFunc :: Maybe HookFunc
noHookFunc :: Maybe TestFixtureFunc
noHookFunc = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_HookFunc :: MonadIO m => HookFunc -> m (GClosure C_HookFunc)
genClosure_HookFunc :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_HookFunc TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_HookFunc Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_HookFunc TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookFunc ::
Maybe (Ptr (FunPtr C_HookFunc)) ->
HookFunc ->
C_HookFunc
wrap_HookFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_HookFunc Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
data_ = do
TestFixtureFunc
gi'cb Ptr ()
data_
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_HookFindFunc =
Ptr GLib.Hook.Hook ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_HookFindFunc :: FunPtr C_HookFindFunc -> C_HookFindFunc
dynamic_HookFindFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookFindFunc
-> GLib.Hook.Hook
-> Ptr ()
-> m Bool
dynamic_HookFindFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HookFindFunc -> Hook -> Ptr () -> m Bool
dynamic_HookFindFunc FunPtr C_HookFindFunc
__funPtr Hook
hook Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Hook
hook' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
hook
CInt
result <- (FunPtr C_HookFindFunc -> C_HookFindFunc
__dynamic_C_HookFindFunc FunPtr C_HookFindFunc
__funPtr) Ptr Hook
hook' Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
hook
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_HookFindFunc :: C_HookFindFunc -> IO (FunPtr C_HookFindFunc)
type HookFindFunc =
GLib.Hook.Hook
-> Ptr ()
-> IO Bool
noHookFindFunc :: Maybe HookFindFunc
noHookFindFunc :: Maybe HookFindFunc
noHookFindFunc = Maybe HookFindFunc
forall a. Maybe a
Nothing
genClosure_HookFindFunc :: MonadIO m => HookFindFunc -> m (GClosure C_HookFindFunc)
genClosure_HookFindFunc :: forall (m :: * -> *).
MonadIO m =>
HookFindFunc -> m (GClosure C_HookFindFunc)
genClosure_HookFindFunc HookFindFunc
cb = IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc))
-> IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HookFindFunc
cb' = Maybe (Ptr (FunPtr C_HookFindFunc))
-> HookFindFunc -> C_HookFindFunc
wrap_HookFindFunc Maybe (Ptr (FunPtr C_HookFindFunc))
forall a. Maybe a
Nothing HookFindFunc
cb
C_HookFindFunc -> IO (FunPtr C_HookFindFunc)
mk_HookFindFunc C_HookFindFunc
cb' IO (FunPtr C_HookFindFunc)
-> (FunPtr C_HookFindFunc -> IO (GClosure C_HookFindFunc))
-> IO (GClosure C_HookFindFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HookFindFunc -> IO (GClosure C_HookFindFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookFindFunc ::
Maybe (Ptr (FunPtr C_HookFindFunc)) ->
HookFindFunc ->
C_HookFindFunc
wrap_HookFindFunc :: Maybe (Ptr (FunPtr C_HookFindFunc))
-> HookFindFunc -> C_HookFindFunc
wrap_HookFindFunc Maybe (Ptr (FunPtr C_HookFindFunc))
gi'funptrptr HookFindFunc
gi'cb Ptr Hook
hook Ptr ()
data_ = do
Hook
hook' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
hook
Bool
result <- HookFindFunc
gi'cb Hook
hook' Ptr ()
data_
Maybe (Ptr (FunPtr C_HookFindFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HookFindFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_HookFinalizeFunc =
Ptr GLib.HookList.HookList ->
Ptr GLib.Hook.Hook ->
IO ()
foreign import ccall "dynamic" __dynamic_C_HookFinalizeFunc :: FunPtr C_HookFinalizeFunc -> C_HookFinalizeFunc
dynamic_HookFinalizeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookFinalizeFunc
-> GLib.HookList.HookList
-> GLib.Hook.Hook
-> m ()
dynamic_HookFinalizeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HookFinalizeFunc -> HookList -> Hook -> m ()
dynamic_HookFinalizeFunc FunPtr C_HookFinalizeFunc
__funPtr HookList
hookList Hook
hook = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr HookList
hookList' <- HookList -> IO (Ptr HookList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr HookList
hookList
Ptr Hook
hook' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
hook
(FunPtr C_HookFinalizeFunc -> C_HookFinalizeFunc
__dynamic_C_HookFinalizeFunc FunPtr C_HookFinalizeFunc
__funPtr) Ptr HookList
hookList' Ptr Hook
hook'
HookList -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr HookList
hookList
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
hook
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_HookFinalizeFunc :: C_HookFinalizeFunc -> IO (FunPtr C_HookFinalizeFunc)
type HookFinalizeFunc =
GLib.HookList.HookList
-> GLib.Hook.Hook
-> IO ()
noHookFinalizeFunc :: Maybe HookFinalizeFunc
noHookFinalizeFunc :: Maybe HookFinalizeFunc
noHookFinalizeFunc = Maybe HookFinalizeFunc
forall a. Maybe a
Nothing
genClosure_HookFinalizeFunc :: MonadIO m => HookFinalizeFunc -> m (GClosure C_HookFinalizeFunc)
genClosure_HookFinalizeFunc :: forall (m :: * -> *).
MonadIO m =>
HookFinalizeFunc -> m (GClosure C_HookFinalizeFunc)
genClosure_HookFinalizeFunc HookFinalizeFunc
cb = IO (GClosure C_HookFinalizeFunc) -> m (GClosure C_HookFinalizeFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HookFinalizeFunc)
-> m (GClosure C_HookFinalizeFunc))
-> IO (GClosure C_HookFinalizeFunc)
-> m (GClosure C_HookFinalizeFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HookFinalizeFunc
cb' = Maybe (Ptr (FunPtr C_HookFinalizeFunc))
-> HookFinalizeFunc -> C_HookFinalizeFunc
wrap_HookFinalizeFunc Maybe (Ptr (FunPtr C_HookFinalizeFunc))
forall a. Maybe a
Nothing HookFinalizeFunc
cb
C_HookFinalizeFunc -> IO (FunPtr C_HookFinalizeFunc)
mk_HookFinalizeFunc C_HookFinalizeFunc
cb' IO (FunPtr C_HookFinalizeFunc)
-> (FunPtr C_HookFinalizeFunc -> IO (GClosure C_HookFinalizeFunc))
-> IO (GClosure C_HookFinalizeFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HookFinalizeFunc -> IO (GClosure C_HookFinalizeFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookFinalizeFunc ::
Maybe (Ptr (FunPtr C_HookFinalizeFunc)) ->
HookFinalizeFunc ->
C_HookFinalizeFunc
wrap_HookFinalizeFunc :: Maybe (Ptr (FunPtr C_HookFinalizeFunc))
-> HookFinalizeFunc -> C_HookFinalizeFunc
wrap_HookFinalizeFunc Maybe (Ptr (FunPtr C_HookFinalizeFunc))
gi'funptrptr HookFinalizeFunc
gi'cb Ptr HookList
hookList Ptr Hook
hook = do
HookList
hookList' <- ((ManagedPtr HookList -> HookList) -> Ptr HookList -> IO HookList
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr HookList -> HookList
GLib.HookList.HookList) Ptr HookList
hookList
Hook
hook' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
hook
HookFinalizeFunc
gi'cb HookList
hookList' Hook
hook'
Maybe (Ptr (FunPtr C_HookFinalizeFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HookFinalizeFunc))
gi'funptrptr
type C_HookCompareFunc =
Ptr GLib.Hook.Hook ->
Ptr GLib.Hook.Hook ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_HookCompareFunc :: FunPtr C_HookCompareFunc -> C_HookCompareFunc
dynamic_HookCompareFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookCompareFunc
-> GLib.Hook.Hook
-> GLib.Hook.Hook
-> m Int32
dynamic_HookCompareFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HookCompareFunc -> Hook -> Hook -> m Int32
dynamic_HookCompareFunc FunPtr C_HookCompareFunc
__funPtr Hook
newHook Hook
sibling = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Hook
newHook' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
newHook
Ptr Hook
sibling' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
sibling
Int32
result <- (FunPtr C_HookCompareFunc -> C_HookCompareFunc
__dynamic_C_HookCompareFunc FunPtr C_HookCompareFunc
__funPtr) Ptr Hook
newHook' Ptr Hook
sibling'
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
newHook
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
sibling
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_HookCompareFunc :: C_HookCompareFunc -> IO (FunPtr C_HookCompareFunc)
type HookCompareFunc =
GLib.Hook.Hook
-> GLib.Hook.Hook
-> IO Int32
noHookCompareFunc :: Maybe HookCompareFunc
noHookCompareFunc :: Maybe HookCompareFunc
noHookCompareFunc = Maybe HookCompareFunc
forall a. Maybe a
Nothing
genClosure_HookCompareFunc :: MonadIO m => HookCompareFunc -> m (GClosure C_HookCompareFunc)
genClosure_HookCompareFunc :: forall (m :: * -> *).
MonadIO m =>
HookCompareFunc -> m (GClosure C_HookCompareFunc)
genClosure_HookCompareFunc HookCompareFunc
cb = IO (GClosure C_HookCompareFunc) -> m (GClosure C_HookCompareFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HookCompareFunc) -> m (GClosure C_HookCompareFunc))
-> IO (GClosure C_HookCompareFunc)
-> m (GClosure C_HookCompareFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HookCompareFunc
cb' = Maybe (Ptr (FunPtr C_HookCompareFunc))
-> HookCompareFunc -> C_HookCompareFunc
wrap_HookCompareFunc Maybe (Ptr (FunPtr C_HookCompareFunc))
forall a. Maybe a
Nothing HookCompareFunc
cb
C_HookCompareFunc -> IO (FunPtr C_HookCompareFunc)
mk_HookCompareFunc C_HookCompareFunc
cb' IO (FunPtr C_HookCompareFunc)
-> (FunPtr C_HookCompareFunc -> IO (GClosure C_HookCompareFunc))
-> IO (GClosure C_HookCompareFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HookCompareFunc -> IO (GClosure C_HookCompareFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookCompareFunc ::
Maybe (Ptr (FunPtr C_HookCompareFunc)) ->
HookCompareFunc ->
C_HookCompareFunc
wrap_HookCompareFunc :: Maybe (Ptr (FunPtr C_HookCompareFunc))
-> HookCompareFunc -> C_HookCompareFunc
wrap_HookCompareFunc Maybe (Ptr (FunPtr C_HookCompareFunc))
gi'funptrptr HookCompareFunc
gi'cb Ptr Hook
newHook Ptr Hook
sibling = do
Hook
newHook' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
newHook
Hook
sibling' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
sibling
Int32
result <- HookCompareFunc
gi'cb Hook
newHook' Hook
sibling'
Maybe (Ptr (FunPtr C_HookCompareFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HookCompareFunc))
gi'funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_HookCheckMarshaller =
Ptr GLib.Hook.Hook ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_HookCheckMarshaller :: FunPtr C_HookCheckMarshaller -> C_HookCheckMarshaller
dynamic_HookCheckMarshaller ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookCheckMarshaller
-> GLib.Hook.Hook
-> Ptr ()
-> m Bool
dynamic_HookCheckMarshaller :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HookFindFunc -> Hook -> Ptr () -> m Bool
dynamic_HookCheckMarshaller FunPtr C_HookFindFunc
__funPtr Hook
hook Ptr ()
marshalData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Hook
hook' <- Hook -> IO (Ptr Hook)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Hook
hook
CInt
result <- (FunPtr C_HookFindFunc -> C_HookFindFunc
__dynamic_C_HookCheckMarshaller FunPtr C_HookFindFunc
__funPtr) Ptr Hook
hook' Ptr ()
marshalData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Hook -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr Hook
hook
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_HookCheckMarshaller :: C_HookCheckMarshaller -> IO (FunPtr C_HookCheckMarshaller)
type HookCheckMarshaller =
GLib.Hook.Hook
-> Ptr ()
-> IO Bool
noHookCheckMarshaller :: Maybe HookCheckMarshaller
noHookCheckMarshaller :: Maybe HookFindFunc
noHookCheckMarshaller = Maybe HookFindFunc
forall a. Maybe a
Nothing
genClosure_HookCheckMarshaller :: MonadIO m => HookCheckMarshaller -> m (GClosure C_HookCheckMarshaller)
genClosure_HookCheckMarshaller :: forall (m :: * -> *).
MonadIO m =>
HookFindFunc -> m (GClosure C_HookFindFunc)
genClosure_HookCheckMarshaller HookFindFunc
cb = IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc))
-> IO (GClosure C_HookFindFunc) -> m (GClosure C_HookFindFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HookFindFunc
cb' = Maybe (Ptr (FunPtr C_HookFindFunc))
-> HookFindFunc -> C_HookFindFunc
wrap_HookCheckMarshaller Maybe (Ptr (FunPtr C_HookFindFunc))
forall a. Maybe a
Nothing HookFindFunc
cb
C_HookFindFunc -> IO (FunPtr C_HookFindFunc)
mk_HookCheckMarshaller C_HookFindFunc
cb' IO (FunPtr C_HookFindFunc)
-> (FunPtr C_HookFindFunc -> IO (GClosure C_HookFindFunc))
-> IO (GClosure C_HookFindFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HookFindFunc -> IO (GClosure C_HookFindFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookCheckMarshaller ::
Maybe (Ptr (FunPtr C_HookCheckMarshaller)) ->
HookCheckMarshaller ->
C_HookCheckMarshaller
wrap_HookCheckMarshaller :: Maybe (Ptr (FunPtr C_HookFindFunc))
-> HookFindFunc -> C_HookFindFunc
wrap_HookCheckMarshaller Maybe (Ptr (FunPtr C_HookFindFunc))
gi'funptrptr HookFindFunc
gi'cb Ptr Hook
hook Ptr ()
marshalData = do
Hook
hook' <- ((ManagedPtr Hook -> Hook) -> Ptr Hook -> IO Hook
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Hook -> Hook
GLib.Hook.Hook) Ptr Hook
hook
Bool
result <- HookFindFunc
gi'cb Hook
hook' Ptr ()
marshalData
Maybe (Ptr (FunPtr C_HookFindFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HookFindFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_HookCheckFunc =
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_HookCheckFunc :: FunPtr C_HookCheckFunc -> C_HookCheckFunc
dynamic_HookCheckFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HookCheckFunc
-> Ptr ()
-> m Bool
dynamic_HookCheckFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_SourceFunc -> Ptr () -> m Bool
dynamic_HookCheckFunc FunPtr C_SourceFunc
__funPtr Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- (FunPtr C_SourceFunc -> C_SourceFunc
__dynamic_C_HookCheckFunc FunPtr C_SourceFunc
__funPtr) Ptr ()
data_
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_HookCheckFunc :: C_HookCheckFunc -> IO (FunPtr C_HookCheckFunc)
type HookCheckFunc =
Ptr ()
-> IO Bool
noHookCheckFunc :: Maybe HookCheckFunc
noHookCheckFunc :: Maybe SourceFunc_WithClosures
noHookCheckFunc = Maybe SourceFunc_WithClosures
forall a. Maybe a
Nothing
genClosure_HookCheckFunc :: MonadIO m => HookCheckFunc -> m (GClosure C_HookCheckFunc)
genClosure_HookCheckFunc :: forall (m :: * -> *).
MonadIO m =>
SourceFunc_WithClosures -> m (GClosure C_SourceFunc)
genClosure_HookCheckFunc SourceFunc_WithClosures
cb = IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc))
-> IO (GClosure C_SourceFunc) -> m (GClosure C_SourceFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SourceFunc
cb' = Maybe (Ptr (FunPtr C_SourceFunc))
-> SourceFunc_WithClosures -> C_SourceFunc
wrap_HookCheckFunc Maybe (Ptr (FunPtr C_SourceFunc))
forall a. Maybe a
Nothing SourceFunc_WithClosures
cb
C_SourceFunc -> IO (FunPtr C_SourceFunc)
mk_HookCheckFunc C_SourceFunc
cb' IO (FunPtr C_SourceFunc)
-> (FunPtr C_SourceFunc -> IO (GClosure C_SourceFunc))
-> IO (GClosure C_SourceFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SourceFunc -> IO (GClosure C_SourceFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HookCheckFunc ::
Maybe (Ptr (FunPtr C_HookCheckFunc)) ->
HookCheckFunc ->
C_HookCheckFunc
wrap_HookCheckFunc :: Maybe (Ptr (FunPtr C_SourceFunc))
-> SourceFunc_WithClosures -> C_SourceFunc
wrap_HookCheckFunc Maybe (Ptr (FunPtr C_SourceFunc))
gi'funptrptr SourceFunc_WithClosures
gi'cb Ptr ()
data_ = do
Bool
result <- SourceFunc_WithClosures
gi'cb Ptr ()
data_
Maybe (Ptr (FunPtr C_SourceFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_HashFunc =
Ptr () ->
IO Word32
foreign import ccall "dynamic" __dynamic_C_HashFunc :: FunPtr C_HashFunc -> C_HashFunc
dynamic_HashFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HashFunc
-> Ptr ()
-> m Word32
dynamic_HashFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HashFunc -> Ptr () -> m Word32
dynamic_HashFunc FunPtr C_HashFunc
__funPtr Ptr ()
key = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Word32
result <- (FunPtr C_HashFunc -> C_HashFunc
__dynamic_C_HashFunc FunPtr C_HashFunc
__funPtr) Ptr ()
key
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
foreign import ccall "wrapper"
mk_HashFunc :: C_HashFunc -> IO (FunPtr C_HashFunc)
type HashFunc =
Ptr ()
-> IO Word32
noHashFunc :: Maybe HashFunc
noHashFunc :: Maybe C_HashFunc
noHashFunc = Maybe C_HashFunc
forall a. Maybe a
Nothing
genClosure_HashFunc :: MonadIO m => HashFunc -> m (GClosure C_HashFunc)
genClosure_HashFunc :: forall (m :: * -> *).
MonadIO m =>
C_HashFunc -> m (GClosure C_HashFunc)
genClosure_HashFunc C_HashFunc
cb = IO (GClosure C_HashFunc) -> m (GClosure C_HashFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HashFunc) -> m (GClosure C_HashFunc))
-> IO (GClosure C_HashFunc) -> m (GClosure C_HashFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HashFunc
cb' = Maybe (Ptr (FunPtr C_HashFunc)) -> C_HashFunc -> C_HashFunc
wrap_HashFunc Maybe (Ptr (FunPtr C_HashFunc))
forall a. Maybe a
Nothing C_HashFunc
cb
C_HashFunc -> IO (FunPtr C_HashFunc)
mk_HashFunc C_HashFunc
cb' IO (FunPtr C_HashFunc)
-> (FunPtr C_HashFunc -> IO (GClosure C_HashFunc))
-> IO (GClosure C_HashFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HashFunc -> IO (GClosure C_HashFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HashFunc ::
Maybe (Ptr (FunPtr C_HashFunc)) ->
HashFunc ->
C_HashFunc
wrap_HashFunc :: Maybe (Ptr (FunPtr C_HashFunc)) -> C_HashFunc -> C_HashFunc
wrap_HashFunc Maybe (Ptr (FunPtr C_HashFunc))
gi'funptrptr C_HashFunc
gi'cb Ptr ()
key = do
Word32
result <- C_HashFunc
gi'cb Ptr ()
key
Maybe (Ptr (FunPtr C_HashFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HashFunc))
gi'funptrptr
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
type C_HRFunc =
Ptr () ->
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_HRFunc :: FunPtr C_HRFunc -> C_HRFunc
dynamic_HRFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HRFunc
-> Ptr ()
-> Ptr ()
-> Ptr ()
-> m Bool
dynamic_HRFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TraverseFunc -> Ptr () -> Ptr () -> Ptr () -> m Bool
dynamic_HRFunc FunPtr C_TraverseFunc
__funPtr Ptr ()
key Ptr ()
value Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- (FunPtr C_TraverseFunc -> C_TraverseFunc
__dynamic_C_HRFunc FunPtr C_TraverseFunc
__funPtr) Ptr ()
key Ptr ()
value Ptr ()
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_HRFunc :: C_HRFunc -> IO (FunPtr C_HRFunc)
type HRFunc =
Ptr ()
-> Ptr ()
-> IO Bool
noHRFunc :: Maybe HRFunc
noHRFunc :: Maybe HRFunc
noHRFunc = Maybe HRFunc
forall a. Maybe a
Nothing
type HRFunc_WithClosures =
Ptr ()
-> Ptr ()
-> Ptr ()
-> IO Bool
noHRFunc_WithClosures :: Maybe HRFunc_WithClosures
noHRFunc_WithClosures :: Maybe TraverseFunc
noHRFunc_WithClosures = Maybe TraverseFunc
forall a. Maybe a
Nothing
drop_closures_HRFunc :: HRFunc -> HRFunc_WithClosures
drop_closures_HRFunc :: HRFunc -> TraverseFunc
drop_closures_HRFunc HRFunc
_f Ptr ()
key Ptr ()
value Ptr ()
_ = HRFunc
_f Ptr ()
key Ptr ()
value
genClosure_HRFunc :: MonadIO m => HRFunc -> m (GClosure C_HRFunc)
genClosure_HRFunc :: forall (m :: * -> *).
MonadIO m =>
HRFunc -> m (GClosure C_TraverseFunc)
genClosure_HRFunc HRFunc
cb = IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc))
-> IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TraverseFunc
cb' = HRFunc -> TraverseFunc
drop_closures_HRFunc HRFunc
cb
let cb'' :: C_TraverseFunc
cb'' = Maybe (Ptr (FunPtr C_TraverseFunc))
-> TraverseFunc -> C_TraverseFunc
wrap_HRFunc Maybe (Ptr (FunPtr C_TraverseFunc))
forall a. Maybe a
Nothing TraverseFunc
cb'
C_TraverseFunc -> IO (FunPtr C_TraverseFunc)
mk_HRFunc C_TraverseFunc
cb'' IO (FunPtr C_TraverseFunc)
-> (FunPtr C_TraverseFunc -> IO (GClosure C_TraverseFunc))
-> IO (GClosure C_TraverseFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TraverseFunc -> IO (GClosure C_TraverseFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HRFunc ::
Maybe (Ptr (FunPtr C_HRFunc)) ->
HRFunc_WithClosures ->
C_HRFunc
wrap_HRFunc :: Maybe (Ptr (FunPtr C_TraverseFunc))
-> TraverseFunc -> C_TraverseFunc
wrap_HRFunc Maybe (Ptr (FunPtr C_TraverseFunc))
gi'funptrptr TraverseFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
userData = do
Bool
result <- TraverseFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
userData
Maybe (Ptr (FunPtr C_TraverseFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TraverseFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_HFunc =
Ptr () ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_HFunc :: FunPtr C_HFunc -> C_HFunc
dynamic_HFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_HFunc
-> Ptr ()
-> Ptr ()
-> Ptr ()
-> m ()
dynamic_HFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_HFunc -> Ptr () -> Ptr () -> Ptr () -> m ()
dynamic_HFunc FunPtr C_HFunc
__funPtr Ptr ()
key Ptr ()
value Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_HFunc -> C_HFunc
__dynamic_C_HFunc FunPtr C_HFunc
__funPtr) Ptr ()
key Ptr ()
value Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_HFunc :: C_HFunc -> IO (FunPtr C_HFunc)
type HFunc =
Ptr ()
-> Ptr ()
-> IO ()
noHFunc :: Maybe HFunc
noHFunc :: Maybe C_TestFixtureFunc
noHFunc = Maybe C_TestFixtureFunc
forall a. Maybe a
Nothing
type HFunc_WithClosures =
Ptr ()
-> Ptr ()
-> Ptr ()
-> IO ()
noHFunc_WithClosures :: Maybe HFunc_WithClosures
noHFunc_WithClosures :: Maybe C_HFunc
noHFunc_WithClosures = Maybe C_HFunc
forall a. Maybe a
Nothing
drop_closures_HFunc :: HFunc -> HFunc_WithClosures
drop_closures_HFunc :: C_TestFixtureFunc -> C_HFunc
drop_closures_HFunc C_TestFixtureFunc
_f Ptr ()
key Ptr ()
value Ptr ()
_ = C_TestFixtureFunc
_f Ptr ()
key Ptr ()
value
genClosure_HFunc :: MonadIO m => HFunc -> m (GClosure C_HFunc)
genClosure_HFunc :: forall (m :: * -> *).
MonadIO m =>
C_TestFixtureFunc -> m (GClosure C_HFunc)
genClosure_HFunc C_TestFixtureFunc
cb = IO (GClosure C_HFunc) -> m (GClosure C_HFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_HFunc) -> m (GClosure C_HFunc))
-> IO (GClosure C_HFunc) -> m (GClosure C_HFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_HFunc
cb' = C_TestFixtureFunc -> C_HFunc
drop_closures_HFunc C_TestFixtureFunc
cb
let cb'' :: C_HFunc
cb'' = Maybe (Ptr (FunPtr C_HFunc)) -> C_HFunc -> C_HFunc
wrap_HFunc Maybe (Ptr (FunPtr C_HFunc))
forall a. Maybe a
Nothing C_HFunc
cb'
C_HFunc -> IO (FunPtr C_HFunc)
mk_HFunc C_HFunc
cb'' IO (FunPtr C_HFunc)
-> (FunPtr C_HFunc -> IO (GClosure C_HFunc))
-> IO (GClosure C_HFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_HFunc -> IO (GClosure C_HFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_HFunc ::
Maybe (Ptr (FunPtr C_HFunc)) ->
HFunc_WithClosures ->
C_HFunc
wrap_HFunc :: Maybe (Ptr (FunPtr C_HFunc)) -> C_HFunc -> C_HFunc
wrap_HFunc Maybe (Ptr (FunPtr C_HFunc))
gi'funptrptr C_HFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
userData = do
C_HFunc
gi'cb Ptr ()
key Ptr ()
value Ptr ()
userData
Maybe (Ptr (FunPtr C_HFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_HFunc))
gi'funptrptr
type C_Func =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_Func :: FunPtr C_Func -> C_Func
dynamic_Func ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_Func
-> Ptr ()
-> Ptr ()
-> m ()
dynamic_Func :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_TestFixtureFunc -> Ptr () -> Ptr () -> m ()
dynamic_Func FunPtr C_TestFixtureFunc
__funPtr Ptr ()
data_ Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_TestFixtureFunc -> C_TestFixtureFunc
__dynamic_C_Func FunPtr C_TestFixtureFunc
__funPtr) Ptr ()
data_ Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_Func :: C_Func -> IO (FunPtr C_Func)
type Func =
Ptr ()
-> IO ()
noFunc :: Maybe Func
noFunc :: Maybe TestFixtureFunc
noFunc = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
type Func_WithClosures =
Ptr ()
-> Ptr ()
-> IO ()
noFunc_WithClosures :: Maybe Func_WithClosures
noFunc_WithClosures :: Maybe C_TestFixtureFunc
noFunc_WithClosures = Maybe C_TestFixtureFunc
forall a. Maybe a
Nothing
drop_closures_Func :: Func -> Func_WithClosures
drop_closures_Func :: TestFixtureFunc -> C_TestFixtureFunc
drop_closures_Func TestFixtureFunc
_f Ptr ()
data_ Ptr ()
_ = TestFixtureFunc
_f Ptr ()
data_
genClosure_Func :: MonadIO m => Func -> m (GClosure C_Func)
genClosure_Func :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure C_TestFixtureFunc)
genClosure_Func TestFixtureFunc
cb = IO (GClosure C_TestFixtureFunc) -> m (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TestFixtureFunc) -> m (GClosure C_TestFixtureFunc))
-> IO (GClosure C_TestFixtureFunc)
-> m (GClosure C_TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TestFixtureFunc
cb' = TestFixtureFunc -> C_TestFixtureFunc
drop_closures_Func TestFixtureFunc
cb
let cb'' :: C_TestFixtureFunc
cb'' = Maybe (Ptr (FunPtr C_TestFixtureFunc))
-> C_TestFixtureFunc -> C_TestFixtureFunc
wrap_Func Maybe (Ptr (FunPtr C_TestFixtureFunc))
forall a. Maybe a
Nothing C_TestFixtureFunc
cb'
C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)
mk_Func C_TestFixtureFunc
cb'' IO (FunPtr C_TestFixtureFunc)
-> (FunPtr C_TestFixtureFunc -> IO (GClosure C_TestFixtureFunc))
-> IO (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TestFixtureFunc -> IO (GClosure C_TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_Func ::
Maybe (Ptr (FunPtr C_Func)) ->
Func_WithClosures ->
C_Func
wrap_Func :: Maybe (Ptr (FunPtr C_TestFixtureFunc))
-> C_TestFixtureFunc -> C_TestFixtureFunc
wrap_Func Maybe (Ptr (FunPtr C_TestFixtureFunc))
gi'funptrptr C_TestFixtureFunc
gi'cb Ptr ()
data_ Ptr ()
userData = do
C_TestFixtureFunc
gi'cb Ptr ()
data_ Ptr ()
userData
Maybe (Ptr (FunPtr C_TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TestFixtureFunc))
gi'funptrptr
type C_FreeFunc =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_FreeFunc :: FunPtr C_FreeFunc -> C_FreeFunc
dynamic_FreeFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_FreeFunc
-> Ptr ()
-> m ()
dynamic_FreeFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_FreeFunc FunPtr TestFixtureFunc
__funPtr Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_FreeFunc FunPtr TestFixtureFunc
__funPtr) Ptr ()
data_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_FreeFunc :: C_FreeFunc -> IO (FunPtr C_FreeFunc)
type FreeFunc =
Ptr ()
-> IO ()
noFreeFunc :: Maybe FreeFunc
noFreeFunc :: Maybe TestFixtureFunc
noFreeFunc = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_FreeFunc :: MonadIO m => FreeFunc -> m (GClosure C_FreeFunc)
genClosure_FreeFunc :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_FreeFunc TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_FreeFunc Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_FreeFunc TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FreeFunc ::
Maybe (Ptr (FunPtr C_FreeFunc)) ->
FreeFunc ->
C_FreeFunc
wrap_FreeFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_FreeFunc Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
data_ = do
TestFixtureFunc
gi'cb Ptr ()
data_
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_ErrorInitFunc =
Ptr GError ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ErrorInitFunc :: FunPtr C_ErrorInitFunc -> C_ErrorInitFunc
dynamic_ErrorInitFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ErrorInitFunc
-> GError
-> m ()
dynamic_ErrorInitFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ErrorInitFunc -> GError -> m ()
dynamic_ErrorInitFunc FunPtr C_ErrorInitFunc
__funPtr GError
error_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
(FunPtr C_ErrorInitFunc -> C_ErrorInitFunc
__dynamic_C_ErrorInitFunc FunPtr C_ErrorInitFunc
__funPtr) Ptr GError
error_'
GError -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr GError
error_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ErrorInitFunc :: C_ErrorInitFunc -> IO (FunPtr C_ErrorInitFunc)
type ErrorInitFunc =
GError
-> IO ()
noErrorInitFunc :: Maybe ErrorInitFunc
noErrorInitFunc :: Maybe (GError -> C_VoidFunc)
noErrorInitFunc = Maybe (GError -> C_VoidFunc)
forall a. Maybe a
Nothing
genClosure_ErrorInitFunc :: MonadIO m => ErrorInitFunc -> m (GClosure C_ErrorInitFunc)
genClosure_ErrorInitFunc :: forall (m :: * -> *).
MonadIO m =>
(GError -> C_VoidFunc) -> m (GClosure C_ErrorInitFunc)
genClosure_ErrorInitFunc GError -> C_VoidFunc
cb = IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc))
-> IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ErrorInitFunc
cb' = Maybe (Ptr (FunPtr C_ErrorInitFunc))
-> (GError -> C_VoidFunc) -> C_ErrorInitFunc
wrap_ErrorInitFunc Maybe (Ptr (FunPtr C_ErrorInitFunc))
forall a. Maybe a
Nothing GError -> C_VoidFunc
cb
C_ErrorInitFunc -> IO (FunPtr C_ErrorInitFunc)
mk_ErrorInitFunc C_ErrorInitFunc
cb' IO (FunPtr C_ErrorInitFunc)
-> (FunPtr C_ErrorInitFunc -> IO (GClosure C_ErrorInitFunc))
-> IO (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ErrorInitFunc -> IO (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ErrorInitFunc ::
Maybe (Ptr (FunPtr C_ErrorInitFunc)) ->
ErrorInitFunc ->
C_ErrorInitFunc
wrap_ErrorInitFunc :: Maybe (Ptr (FunPtr C_ErrorInitFunc))
-> (GError -> C_VoidFunc) -> C_ErrorInitFunc
wrap_ErrorInitFunc Maybe (Ptr (FunPtr C_ErrorInitFunc))
gi'funptrptr GError -> C_VoidFunc
gi'cb Ptr GError
error_ = do
GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
GError -> C_VoidFunc
gi'cb GError
error_'
Maybe (Ptr (FunPtr C_ErrorInitFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ErrorInitFunc))
gi'funptrptr
type C_ErrorCopyFunc =
Ptr GError ->
Ptr GError ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ErrorCopyFunc :: FunPtr C_ErrorCopyFunc -> C_ErrorCopyFunc
dynamic_ErrorCopyFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ErrorCopyFunc
-> GError
-> GError
-> m ()
dynamic_ErrorCopyFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ErrorCopyFunc -> GError -> GError -> m ()
dynamic_ErrorCopyFunc FunPtr C_ErrorCopyFunc
__funPtr GError
srcError GError
destError = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GError
srcError' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
srcError
Ptr GError
destError' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
destError
(FunPtr C_ErrorCopyFunc -> C_ErrorCopyFunc
__dynamic_C_ErrorCopyFunc FunPtr C_ErrorCopyFunc
__funPtr) Ptr GError
srcError' Ptr GError
destError'
GError -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr GError
srcError
GError -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr GError
destError
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ErrorCopyFunc :: C_ErrorCopyFunc -> IO (FunPtr C_ErrorCopyFunc)
type ErrorCopyFunc =
GError
-> GError
-> IO ()
noErrorCopyFunc :: Maybe ErrorCopyFunc
noErrorCopyFunc :: Maybe ErrorCopyFunc
noErrorCopyFunc = Maybe ErrorCopyFunc
forall a. Maybe a
Nothing
genClosure_ErrorCopyFunc :: MonadIO m => ErrorCopyFunc -> m (GClosure C_ErrorCopyFunc)
genClosure_ErrorCopyFunc :: forall (m :: * -> *).
MonadIO m =>
ErrorCopyFunc -> m (GClosure C_ErrorCopyFunc)
genClosure_ErrorCopyFunc ErrorCopyFunc
cb = IO (GClosure C_ErrorCopyFunc) -> m (GClosure C_ErrorCopyFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ErrorCopyFunc) -> m (GClosure C_ErrorCopyFunc))
-> IO (GClosure C_ErrorCopyFunc) -> m (GClosure C_ErrorCopyFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ErrorCopyFunc
cb' = Maybe (Ptr (FunPtr C_ErrorCopyFunc))
-> ErrorCopyFunc -> C_ErrorCopyFunc
wrap_ErrorCopyFunc Maybe (Ptr (FunPtr C_ErrorCopyFunc))
forall a. Maybe a
Nothing ErrorCopyFunc
cb
C_ErrorCopyFunc -> IO (FunPtr C_ErrorCopyFunc)
mk_ErrorCopyFunc C_ErrorCopyFunc
cb' IO (FunPtr C_ErrorCopyFunc)
-> (FunPtr C_ErrorCopyFunc -> IO (GClosure C_ErrorCopyFunc))
-> IO (GClosure C_ErrorCopyFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ErrorCopyFunc -> IO (GClosure C_ErrorCopyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ErrorCopyFunc ::
Maybe (Ptr (FunPtr C_ErrorCopyFunc)) ->
ErrorCopyFunc ->
C_ErrorCopyFunc
wrap_ErrorCopyFunc :: Maybe (Ptr (FunPtr C_ErrorCopyFunc))
-> ErrorCopyFunc -> C_ErrorCopyFunc
wrap_ErrorCopyFunc Maybe (Ptr (FunPtr C_ErrorCopyFunc))
gi'funptrptr ErrorCopyFunc
gi'cb Ptr GError
srcError Ptr GError
destError = do
GError
srcError' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
srcError
GError
destError' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
destError
ErrorCopyFunc
gi'cb GError
srcError' GError
destError'
Maybe (Ptr (FunPtr C_ErrorCopyFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ErrorCopyFunc))
gi'funptrptr
type C_ErrorClearFunc =
Ptr GError ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ErrorClearFunc :: FunPtr C_ErrorClearFunc -> C_ErrorClearFunc
dynamic_ErrorClearFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ErrorClearFunc
-> GError
-> m ()
dynamic_ErrorClearFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ErrorInitFunc -> GError -> m ()
dynamic_ErrorClearFunc FunPtr C_ErrorInitFunc
__funPtr GError
error_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
(FunPtr C_ErrorInitFunc -> C_ErrorInitFunc
__dynamic_C_ErrorClearFunc FunPtr C_ErrorInitFunc
__funPtr) Ptr GError
error_'
GError -> C_VoidFunc
forall a. ManagedPtrNewtype a => a -> C_VoidFunc
touchManagedPtr GError
error_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ErrorClearFunc :: C_ErrorClearFunc -> IO (FunPtr C_ErrorClearFunc)
type ErrorClearFunc =
GError
-> IO ()
noErrorClearFunc :: Maybe ErrorClearFunc
noErrorClearFunc :: Maybe (GError -> C_VoidFunc)
noErrorClearFunc = Maybe (GError -> C_VoidFunc)
forall a. Maybe a
Nothing
genClosure_ErrorClearFunc :: MonadIO m => ErrorClearFunc -> m (GClosure C_ErrorClearFunc)
genClosure_ErrorClearFunc :: forall (m :: * -> *).
MonadIO m =>
(GError -> C_VoidFunc) -> m (GClosure C_ErrorInitFunc)
genClosure_ErrorClearFunc GError -> C_VoidFunc
cb = IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc))
-> IO (GClosure C_ErrorInitFunc) -> m (GClosure C_ErrorInitFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ErrorInitFunc
cb' = Maybe (Ptr (FunPtr C_ErrorInitFunc))
-> (GError -> C_VoidFunc) -> C_ErrorInitFunc
wrap_ErrorClearFunc Maybe (Ptr (FunPtr C_ErrorInitFunc))
forall a. Maybe a
Nothing GError -> C_VoidFunc
cb
C_ErrorInitFunc -> IO (FunPtr C_ErrorInitFunc)
mk_ErrorClearFunc C_ErrorInitFunc
cb' IO (FunPtr C_ErrorInitFunc)
-> (FunPtr C_ErrorInitFunc -> IO (GClosure C_ErrorInitFunc))
-> IO (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ErrorInitFunc -> IO (GClosure C_ErrorInitFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ErrorClearFunc ::
Maybe (Ptr (FunPtr C_ErrorClearFunc)) ->
ErrorClearFunc ->
C_ErrorClearFunc
wrap_ErrorClearFunc :: Maybe (Ptr (FunPtr C_ErrorInitFunc))
-> (GError -> C_VoidFunc) -> C_ErrorInitFunc
wrap_ErrorClearFunc Maybe (Ptr (FunPtr C_ErrorInitFunc))
gi'funptrptr GError -> C_VoidFunc
gi'cb Ptr GError
error_ = do
GError
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
GError -> C_VoidFunc
gi'cb GError
error_'
Maybe (Ptr (FunPtr C_ErrorInitFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ErrorInitFunc))
gi'funptrptr
type C_EqualFunc =
Ptr () ->
Ptr () ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_EqualFunc :: FunPtr C_EqualFunc -> C_EqualFunc
dynamic_EqualFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_EqualFunc
-> Ptr ()
-> Ptr ()
-> m Bool
dynamic_EqualFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_EqualFunc -> Ptr () -> Ptr () -> m Bool
dynamic_EqualFunc FunPtr C_EqualFunc
__funPtr Ptr ()
a Ptr ()
b = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
CInt
result <- (FunPtr C_EqualFunc -> C_EqualFunc
__dynamic_C_EqualFunc FunPtr C_EqualFunc
__funPtr) Ptr ()
a Ptr ()
b
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_EqualFunc :: C_EqualFunc -> IO (FunPtr C_EqualFunc)
type EqualFunc =
Ptr ()
-> Ptr ()
-> IO Bool
noEqualFunc :: Maybe EqualFunc
noEqualFunc :: Maybe HRFunc
noEqualFunc = Maybe HRFunc
forall a. Maybe a
Nothing
genClosure_EqualFunc :: MonadIO m => EqualFunc -> m (GClosure C_EqualFunc)
genClosure_EqualFunc :: forall (m :: * -> *).
MonadIO m =>
HRFunc -> m (GClosure C_EqualFunc)
genClosure_EqualFunc HRFunc
cb = IO (GClosure C_EqualFunc) -> m (GClosure C_EqualFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EqualFunc) -> m (GClosure C_EqualFunc))
-> IO (GClosure C_EqualFunc) -> m (GClosure C_EqualFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_EqualFunc
cb' = Maybe (Ptr (FunPtr C_EqualFunc)) -> HRFunc -> C_EqualFunc
wrap_EqualFunc Maybe (Ptr (FunPtr C_EqualFunc))
forall a. Maybe a
Nothing HRFunc
cb
C_EqualFunc -> IO (FunPtr C_EqualFunc)
mk_EqualFunc C_EqualFunc
cb' IO (FunPtr C_EqualFunc)
-> (FunPtr C_EqualFunc -> IO (GClosure C_EqualFunc))
-> IO (GClosure C_EqualFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EqualFunc -> IO (GClosure C_EqualFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_EqualFunc ::
Maybe (Ptr (FunPtr C_EqualFunc)) ->
EqualFunc ->
C_EqualFunc
wrap_EqualFunc :: Maybe (Ptr (FunPtr C_EqualFunc)) -> HRFunc -> C_EqualFunc
wrap_EqualFunc Maybe (Ptr (FunPtr C_EqualFunc))
gi'funptrptr HRFunc
gi'cb Ptr ()
a Ptr ()
b = do
Bool
result <- HRFunc
gi'cb Ptr ()
a Ptr ()
b
Maybe (Ptr (FunPtr C_EqualFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_EqualFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type C_DuplicateFunc =
Ptr () ->
Ptr () ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_DuplicateFunc :: FunPtr C_DuplicateFunc -> C_DuplicateFunc
dynamic_DuplicateFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_DuplicateFunc
-> Ptr ()
-> Ptr ()
-> m (Ptr ())
dynamic_DuplicateFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_DuplicateFunc -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_DuplicateFunc FunPtr C_DuplicateFunc
__funPtr Ptr ()
data_ Ptr ()
userData = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_DuplicateFunc -> C_DuplicateFunc
__dynamic_C_DuplicateFunc FunPtr C_DuplicateFunc
__funPtr) Ptr ()
data_ Ptr ()
userData
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_DuplicateFunc :: C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)
type DuplicateFunc =
Ptr ()
-> IO (Ptr ())
noDuplicateFunc :: Maybe DuplicateFunc
noDuplicateFunc :: Maybe C_ThreadFunc
noDuplicateFunc = Maybe C_ThreadFunc
forall a. Maybe a
Nothing
type DuplicateFunc_WithClosures =
Ptr ()
-> Ptr ()
-> IO (Ptr ())
noDuplicateFunc_WithClosures :: Maybe DuplicateFunc_WithClosures
noDuplicateFunc_WithClosures :: Maybe C_DuplicateFunc
noDuplicateFunc_WithClosures = Maybe C_DuplicateFunc
forall a. Maybe a
Nothing
drop_closures_DuplicateFunc :: DuplicateFunc -> DuplicateFunc_WithClosures
drop_closures_DuplicateFunc :: C_ThreadFunc -> C_DuplicateFunc
drop_closures_DuplicateFunc C_ThreadFunc
_f Ptr ()
data_ Ptr ()
_ = C_ThreadFunc
_f Ptr ()
data_
genClosure_DuplicateFunc :: MonadIO m => DuplicateFunc -> m (GClosure C_DuplicateFunc)
genClosure_DuplicateFunc :: forall (m :: * -> *).
MonadIO m =>
C_ThreadFunc -> m (GClosure C_DuplicateFunc)
genClosure_DuplicateFunc C_ThreadFunc
cb = IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc))
-> IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DuplicateFunc
cb' = C_ThreadFunc -> C_DuplicateFunc
drop_closures_DuplicateFunc C_ThreadFunc
cb
let cb'' :: C_DuplicateFunc
cb'' = Maybe (Ptr (FunPtr C_DuplicateFunc))
-> C_DuplicateFunc -> C_DuplicateFunc
wrap_DuplicateFunc Maybe (Ptr (FunPtr C_DuplicateFunc))
forall a. Maybe a
Nothing C_DuplicateFunc
cb'
C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)
mk_DuplicateFunc C_DuplicateFunc
cb'' IO (FunPtr C_DuplicateFunc)
-> (FunPtr C_DuplicateFunc -> IO (GClosure C_DuplicateFunc))
-> IO (GClosure C_DuplicateFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DuplicateFunc -> IO (GClosure C_DuplicateFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DuplicateFunc ::
Maybe (Ptr (FunPtr C_DuplicateFunc)) ->
DuplicateFunc_WithClosures ->
C_DuplicateFunc
wrap_DuplicateFunc :: Maybe (Ptr (FunPtr C_DuplicateFunc))
-> C_DuplicateFunc -> C_DuplicateFunc
wrap_DuplicateFunc Maybe (Ptr (FunPtr C_DuplicateFunc))
gi'funptrptr C_DuplicateFunc
gi'cb Ptr ()
data_ Ptr ()
userData = do
Ptr ()
result <- C_DuplicateFunc
gi'cb Ptr ()
data_ Ptr ()
userData
Maybe (Ptr (FunPtr C_DuplicateFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DuplicateFunc))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_DestroyNotify =
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DestroyNotify :: FunPtr C_DestroyNotify -> C_DestroyNotify
dynamic_DestroyNotify ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_DestroyNotify
-> Ptr ()
-> m ()
dynamic_DestroyNotify :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr TestFixtureFunc -> Ptr () -> m ()
dynamic_DestroyNotify FunPtr TestFixtureFunc
__funPtr Ptr ()
data_ = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr TestFixtureFunc -> TestFixtureFunc
__dynamic_C_DestroyNotify FunPtr TestFixtureFunc
__funPtr) Ptr ()
data_
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DestroyNotify :: C_DestroyNotify -> IO (FunPtr C_DestroyNotify)
type DestroyNotify =
Ptr ()
-> IO ()
noDestroyNotify :: Maybe DestroyNotify
noDestroyNotify :: Maybe TestFixtureFunc
noDestroyNotify = Maybe TestFixtureFunc
forall a. Maybe a
Nothing
genClosure_DestroyNotify :: MonadIO m => DestroyNotify -> m (GClosure C_DestroyNotify)
genClosure_DestroyNotify :: forall (m :: * -> *).
MonadIO m =>
TestFixtureFunc -> m (GClosure TestFixtureFunc)
genClosure_DestroyNotify TestFixtureFunc
cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: TestFixtureFunc
cb' = Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_DestroyNotify Maybe (Ptr (FunPtr TestFixtureFunc))
forall a. Maybe a
Nothing TestFixtureFunc
cb
TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
mk_DestroyNotify TestFixtureFunc
cb' IO (FunPtr TestFixtureFunc)
-> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
-> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DestroyNotify ::
Maybe (Ptr (FunPtr C_DestroyNotify)) ->
DestroyNotify ->
C_DestroyNotify
wrap_DestroyNotify :: Maybe (Ptr (FunPtr TestFixtureFunc))
-> TestFixtureFunc -> TestFixtureFunc
wrap_DestroyNotify Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr TestFixtureFunc
gi'cb Ptr ()
data_ = do
TestFixtureFunc
gi'cb Ptr ()
data_
Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
gi'funptrptr
type C_DataForeachFunc =
Word32 ->
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_DataForeachFunc :: FunPtr C_DataForeachFunc -> C_DataForeachFunc
dynamic_DataForeachFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_DataForeachFunc
-> Word32
-> Ptr ()
-> Ptr ()
-> m ()
dynamic_DataForeachFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_DataForeachFunc -> Word32 -> Ptr () -> Ptr () -> m ()
dynamic_DataForeachFunc FunPtr C_DataForeachFunc
__funPtr Word32
keyId Ptr ()
data_ Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_DataForeachFunc -> C_DataForeachFunc
__dynamic_C_DataForeachFunc FunPtr C_DataForeachFunc
__funPtr) Word32
keyId Ptr ()
data_ Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_DataForeachFunc :: C_DataForeachFunc -> IO (FunPtr C_DataForeachFunc)
type DataForeachFunc =
Word32
-> Ptr ()
-> IO ()
noDataForeachFunc :: Maybe DataForeachFunc
noDataForeachFunc :: Maybe DataForeachFunc
noDataForeachFunc = Maybe DataForeachFunc
forall a. Maybe a
Nothing
type DataForeachFunc_WithClosures =
Word32
-> Ptr ()
-> Ptr ()
-> IO ()
noDataForeachFunc_WithClosures :: Maybe DataForeachFunc_WithClosures
noDataForeachFunc_WithClosures :: Maybe C_DataForeachFunc
noDataForeachFunc_WithClosures = Maybe C_DataForeachFunc
forall a. Maybe a
Nothing
drop_closures_DataForeachFunc :: DataForeachFunc -> DataForeachFunc_WithClosures
drop_closures_DataForeachFunc :: DataForeachFunc -> C_DataForeachFunc
drop_closures_DataForeachFunc DataForeachFunc
_f Word32
keyId Ptr ()
data_ Ptr ()
_ = DataForeachFunc
_f Word32
keyId Ptr ()
data_
genClosure_DataForeachFunc :: MonadIO m => DataForeachFunc -> m (GClosure C_DataForeachFunc)
genClosure_DataForeachFunc :: forall (m :: * -> *).
MonadIO m =>
DataForeachFunc -> m (GClosure C_DataForeachFunc)
genClosure_DataForeachFunc DataForeachFunc
cb = IO (GClosure C_DataForeachFunc) -> m (GClosure C_DataForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DataForeachFunc) -> m (GClosure C_DataForeachFunc))
-> IO (GClosure C_DataForeachFunc)
-> m (GClosure C_DataForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DataForeachFunc
cb' = DataForeachFunc -> C_DataForeachFunc
drop_closures_DataForeachFunc DataForeachFunc
cb
let cb'' :: C_DataForeachFunc
cb'' = Maybe (Ptr (FunPtr C_DataForeachFunc))
-> C_DataForeachFunc -> C_DataForeachFunc
wrap_DataForeachFunc Maybe (Ptr (FunPtr C_DataForeachFunc))
forall a. Maybe a
Nothing C_DataForeachFunc
cb'
C_DataForeachFunc -> IO (FunPtr C_DataForeachFunc)
mk_DataForeachFunc C_DataForeachFunc
cb'' IO (FunPtr C_DataForeachFunc)
-> (FunPtr C_DataForeachFunc -> IO (GClosure C_DataForeachFunc))
-> IO (GClosure C_DataForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DataForeachFunc -> IO (GClosure C_DataForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DataForeachFunc ::
Maybe (Ptr (FunPtr C_DataForeachFunc)) ->
DataForeachFunc_WithClosures ->
C_DataForeachFunc
wrap_DataForeachFunc :: Maybe (Ptr (FunPtr C_DataForeachFunc))
-> C_DataForeachFunc -> C_DataForeachFunc
wrap_DataForeachFunc Maybe (Ptr (FunPtr C_DataForeachFunc))
gi'funptrptr C_DataForeachFunc
gi'cb Word32
keyId Ptr ()
data_ Ptr ()
userData = do
C_DataForeachFunc
gi'cb Word32
keyId Ptr ()
data_ Ptr ()
userData
Maybe (Ptr (FunPtr C_DataForeachFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DataForeachFunc))
gi'funptrptr
type C_CopyFunc =
Ptr () ->
Ptr () ->
IO (Ptr ())
foreign import ccall "dynamic" __dynamic_C_CopyFunc :: FunPtr C_CopyFunc -> C_CopyFunc
dynamic_CopyFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_CopyFunc
-> Ptr ()
-> Ptr ()
-> m (Ptr ())
dynamic_CopyFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_DuplicateFunc -> Ptr () -> Ptr () -> m (Ptr ())
dynamic_CopyFunc FunPtr C_DuplicateFunc
__funPtr Ptr ()
src Ptr ()
data_ = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr ()
result <- (FunPtr C_DuplicateFunc -> C_DuplicateFunc
__dynamic_C_CopyFunc FunPtr C_DuplicateFunc
__funPtr) Ptr ()
src Ptr ()
data_
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
foreign import ccall "wrapper"
mk_CopyFunc :: C_CopyFunc -> IO (FunPtr C_CopyFunc)
type CopyFunc =
Ptr ()
-> Ptr ()
-> IO (Ptr ())
noCopyFunc :: Maybe CopyFunc
noCopyFunc :: Maybe C_DuplicateFunc
noCopyFunc = Maybe C_DuplicateFunc
forall a. Maybe a
Nothing
genClosure_CopyFunc :: MonadIO m => CopyFunc -> m (GClosure C_CopyFunc)
genClosure_CopyFunc :: forall (m :: * -> *).
MonadIO m =>
C_DuplicateFunc -> m (GClosure C_DuplicateFunc)
genClosure_CopyFunc C_DuplicateFunc
cb = IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc))
-> IO (GClosure C_DuplicateFunc) -> m (GClosure C_DuplicateFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DuplicateFunc
cb' = Maybe (Ptr (FunPtr C_DuplicateFunc))
-> C_DuplicateFunc -> C_DuplicateFunc
wrap_CopyFunc Maybe (Ptr (FunPtr C_DuplicateFunc))
forall a. Maybe a
Nothing C_DuplicateFunc
cb
C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)
mk_CopyFunc C_DuplicateFunc
cb' IO (FunPtr C_DuplicateFunc)
-> (FunPtr C_DuplicateFunc -> IO (GClosure C_DuplicateFunc))
-> IO (GClosure C_DuplicateFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DuplicateFunc -> IO (GClosure C_DuplicateFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CopyFunc ::
Maybe (Ptr (FunPtr C_CopyFunc)) ->
CopyFunc ->
C_CopyFunc
wrap_CopyFunc :: Maybe (Ptr (FunPtr C_DuplicateFunc))
-> C_DuplicateFunc -> C_DuplicateFunc
wrap_CopyFunc Maybe (Ptr (FunPtr C_DuplicateFunc))
gi'funptrptr C_DuplicateFunc
gi'cb Ptr ()
src Ptr ()
data_ = do
Ptr ()
result <- C_DuplicateFunc
gi'cb Ptr ()
src Ptr ()
data_
Maybe (Ptr (FunPtr C_DuplicateFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DuplicateFunc))
gi'funptrptr
C_ThreadFunc
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
type C_CompareFunc =
Ptr () ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_CompareFunc :: FunPtr C_CompareFunc -> C_CompareFunc
dynamic_CompareFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_CompareFunc
-> Ptr ()
-> Ptr ()
-> m Int32
dynamic_CompareFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_CompareFunc -> Ptr () -> Ptr () -> m Int32
dynamic_CompareFunc FunPtr C_CompareFunc
__funPtr Ptr ()
a Ptr ()
b = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Int32
result <- (FunPtr C_CompareFunc -> C_CompareFunc
__dynamic_C_CompareFunc FunPtr C_CompareFunc
__funPtr) Ptr ()
a Ptr ()
b
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_CompareFunc :: C_CompareFunc -> IO (FunPtr C_CompareFunc)
type CompareFunc =
Ptr ()
-> Ptr ()
-> IO Int32
noCompareFunc :: Maybe CompareFunc
noCompareFunc :: Maybe C_CompareFunc
noCompareFunc = Maybe C_CompareFunc
forall a. Maybe a
Nothing
genClosure_CompareFunc :: MonadIO m => CompareFunc -> m (GClosure C_CompareFunc)
genClosure_CompareFunc :: forall (m :: * -> *).
MonadIO m =>
C_CompareFunc -> m (GClosure C_CompareFunc)
genClosure_CompareFunc C_CompareFunc
cb = IO (GClosure C_CompareFunc) -> m (GClosure C_CompareFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CompareFunc) -> m (GClosure C_CompareFunc))
-> IO (GClosure C_CompareFunc) -> m (GClosure C_CompareFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_CompareFunc
cb' = Maybe (Ptr (FunPtr C_CompareFunc))
-> C_CompareFunc -> C_CompareFunc
wrap_CompareFunc Maybe (Ptr (FunPtr C_CompareFunc))
forall a. Maybe a
Nothing C_CompareFunc
cb
C_CompareFunc -> IO (FunPtr C_CompareFunc)
mk_CompareFunc C_CompareFunc
cb' IO (FunPtr C_CompareFunc)
-> (FunPtr C_CompareFunc -> IO (GClosure C_CompareFunc))
-> IO (GClosure C_CompareFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CompareFunc -> IO (GClosure C_CompareFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CompareFunc ::
Maybe (Ptr (FunPtr C_CompareFunc)) ->
CompareFunc ->
C_CompareFunc
wrap_CompareFunc :: Maybe (Ptr (FunPtr C_CompareFunc))
-> C_CompareFunc -> C_CompareFunc
wrap_CompareFunc Maybe (Ptr (FunPtr C_CompareFunc))
gi'funptrptr C_CompareFunc
gi'cb Ptr ()
a Ptr ()
b = do
Int32
result <- C_CompareFunc
gi'cb Ptr ()
a Ptr ()
b
Maybe (Ptr (FunPtr C_CompareFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CompareFunc))
gi'funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_CompareDataFunc =
Ptr () ->
Ptr () ->
Ptr () ->
IO Int32
foreign import ccall "dynamic" __dynamic_C_CompareDataFunc :: FunPtr C_CompareDataFunc -> C_CompareDataFunc
dynamic_CompareDataFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_CompareDataFunc
-> Ptr ()
-> Ptr ()
-> Ptr ()
-> m Int32
dynamic_CompareDataFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_CompareDataFunc -> Ptr () -> Ptr () -> Ptr () -> m Int32
dynamic_CompareDataFunc FunPtr C_CompareDataFunc
__funPtr Ptr ()
a Ptr ()
b Ptr ()
userData = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Int32
result <- (FunPtr C_CompareDataFunc -> C_CompareDataFunc
__dynamic_C_CompareDataFunc FunPtr C_CompareDataFunc
__funPtr) Ptr ()
a Ptr ()
b Ptr ()
userData
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
foreign import ccall "wrapper"
mk_CompareDataFunc :: C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)
type CompareDataFunc =
Ptr ()
-> Ptr ()
-> IO Int32
noCompareDataFunc :: Maybe CompareDataFunc
noCompareDataFunc :: Maybe C_CompareFunc
noCompareDataFunc = Maybe C_CompareFunc
forall a. Maybe a
Nothing
type CompareDataFunc_WithClosures =
Ptr ()
-> Ptr ()
-> Ptr ()
-> IO Int32
noCompareDataFunc_WithClosures :: Maybe CompareDataFunc_WithClosures
noCompareDataFunc_WithClosures :: Maybe C_CompareDataFunc
noCompareDataFunc_WithClosures = Maybe C_CompareDataFunc
forall a. Maybe a
Nothing
drop_closures_CompareDataFunc :: CompareDataFunc -> CompareDataFunc_WithClosures
drop_closures_CompareDataFunc :: C_CompareFunc -> C_CompareDataFunc
drop_closures_CompareDataFunc C_CompareFunc
_f Ptr ()
a Ptr ()
b Ptr ()
_ = C_CompareFunc
_f Ptr ()
a Ptr ()
b
genClosure_CompareDataFunc :: MonadIO m => CompareDataFunc -> m (GClosure C_CompareDataFunc)
genClosure_CompareDataFunc :: forall (m :: * -> *).
MonadIO m =>
C_CompareFunc -> m (GClosure C_CompareDataFunc)
genClosure_CompareDataFunc C_CompareFunc
cb = IO (GClosure C_CompareDataFunc) -> m (GClosure C_CompareDataFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CompareDataFunc) -> m (GClosure C_CompareDataFunc))
-> IO (GClosure C_CompareDataFunc)
-> m (GClosure C_CompareDataFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_CompareDataFunc
cb' = C_CompareFunc -> C_CompareDataFunc
drop_closures_CompareDataFunc C_CompareFunc
cb
let cb'' :: C_CompareDataFunc
cb'' = Maybe (Ptr (FunPtr C_CompareDataFunc))
-> C_CompareDataFunc -> C_CompareDataFunc
wrap_CompareDataFunc Maybe (Ptr (FunPtr C_CompareDataFunc))
forall a. Maybe a
Nothing C_CompareDataFunc
cb'
C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)
mk_CompareDataFunc C_CompareDataFunc
cb'' IO (FunPtr C_CompareDataFunc)
-> (FunPtr C_CompareDataFunc -> IO (GClosure C_CompareDataFunc))
-> IO (GClosure C_CompareDataFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CompareDataFunc -> IO (GClosure C_CompareDataFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CompareDataFunc ::
Maybe (Ptr (FunPtr C_CompareDataFunc)) ->
CompareDataFunc_WithClosures ->
C_CompareDataFunc
wrap_CompareDataFunc :: Maybe (Ptr (FunPtr C_CompareDataFunc))
-> C_CompareDataFunc -> C_CompareDataFunc
wrap_CompareDataFunc Maybe (Ptr (FunPtr C_CompareDataFunc))
gi'funptrptr C_CompareDataFunc
gi'cb Ptr ()
a Ptr ()
b Ptr ()
userData = do
Int32
result <- C_CompareDataFunc
gi'cb Ptr ()
a Ptr ()
b Ptr ()
userData
Maybe (Ptr (FunPtr C_CompareDataFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CompareDataFunc))
gi'funptrptr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
type C_ClearHandleFunc =
Word32 ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ClearHandleFunc :: FunPtr C_ClearHandleFunc -> C_ClearHandleFunc
dynamic_ClearHandleFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ClearHandleFunc
-> Word32
-> m ()
dynamic_ClearHandleFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ClearHandleFunc -> Word32 -> m ()
dynamic_ClearHandleFunc FunPtr C_ClearHandleFunc
__funPtr Word32
handleId = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_ClearHandleFunc -> C_ClearHandleFunc
__dynamic_C_ClearHandleFunc FunPtr C_ClearHandleFunc
__funPtr) Word32
handleId
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ClearHandleFunc :: C_ClearHandleFunc -> IO (FunPtr C_ClearHandleFunc)
type ClearHandleFunc =
Word32
-> IO ()
noClearHandleFunc :: Maybe ClearHandleFunc
noClearHandleFunc :: Maybe C_ClearHandleFunc
noClearHandleFunc = Maybe C_ClearHandleFunc
forall a. Maybe a
Nothing
genClosure_ClearHandleFunc :: MonadIO m => ClearHandleFunc -> m (GClosure C_ClearHandleFunc)
genClosure_ClearHandleFunc :: forall (m :: * -> *).
MonadIO m =>
C_ClearHandleFunc -> m (GClosure C_ClearHandleFunc)
genClosure_ClearHandleFunc C_ClearHandleFunc
cb = IO (GClosure C_ClearHandleFunc) -> m (GClosure C_ClearHandleFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ClearHandleFunc) -> m (GClosure C_ClearHandleFunc))
-> IO (GClosure C_ClearHandleFunc)
-> m (GClosure C_ClearHandleFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ClearHandleFunc
cb' = Maybe (Ptr (FunPtr C_ClearHandleFunc))
-> C_ClearHandleFunc -> C_ClearHandleFunc
wrap_ClearHandleFunc Maybe (Ptr (FunPtr C_ClearHandleFunc))
forall a. Maybe a
Nothing C_ClearHandleFunc
cb
C_ClearHandleFunc -> IO (FunPtr C_ClearHandleFunc)
mk_ClearHandleFunc C_ClearHandleFunc
cb' IO (FunPtr C_ClearHandleFunc)
-> (FunPtr C_ClearHandleFunc -> IO (GClosure C_ClearHandleFunc))
-> IO (GClosure C_ClearHandleFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ClearHandleFunc -> IO (GClosure C_ClearHandleFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ClearHandleFunc ::
Maybe (Ptr (FunPtr C_ClearHandleFunc)) ->
ClearHandleFunc ->
C_ClearHandleFunc
wrap_ClearHandleFunc :: Maybe (Ptr (FunPtr C_ClearHandleFunc))
-> C_ClearHandleFunc -> C_ClearHandleFunc
wrap_ClearHandleFunc Maybe (Ptr (FunPtr C_ClearHandleFunc))
gi'funptrptr C_ClearHandleFunc
gi'cb Word32
handleId = do
C_ClearHandleFunc
gi'cb Word32
handleId
Maybe (Ptr (FunPtr C_ClearHandleFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ClearHandleFunc))
gi'funptrptr
type C_ChildWatchFunc =
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_ChildWatchFunc :: FunPtr C_ChildWatchFunc -> C_ChildWatchFunc
dynamic_ChildWatchFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ChildWatchFunc
-> Int32
-> Int32
-> Ptr ()
-> m ()
dynamic_ChildWatchFunc :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_ChildWatchFunc -> Int32 -> Int32 -> Ptr () -> m ()
dynamic_ChildWatchFunc FunPtr C_ChildWatchFunc
__funPtr Int32
pid Int32
waitStatus Ptr ()
userData = C_VoidFunc -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (C_VoidFunc -> m ()) -> C_VoidFunc -> m ()
forall a b. (a -> b) -> a -> b
$ do
(FunPtr C_ChildWatchFunc -> C_ChildWatchFunc
__dynamic_C_ChildWatchFunc FunPtr C_ChildWatchFunc
__funPtr) Int32
pid Int32
waitStatus Ptr ()
userData
() -> C_VoidFunc
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_ChildWatchFunc :: C_ChildWatchFunc -> IO (FunPtr C_ChildWatchFunc)
type ChildWatchFunc =
Int32
-> Int32
-> IO ()
noChildWatchFunc :: Maybe ChildWatchFunc
noChildWatchFunc :: Maybe ChildWatchFunc
noChildWatchFunc = Maybe ChildWatchFunc
forall a. Maybe a
Nothing
type ChildWatchFunc_WithClosures =
Int32
-> Int32
-> Ptr ()
-> IO ()
noChildWatchFunc_WithClosures :: Maybe ChildWatchFunc_WithClosures
noChildWatchFunc_WithClosures :: Maybe C_ChildWatchFunc
noChildWatchFunc_WithClosures = Maybe C_ChildWatchFunc
forall a. Maybe a
Nothing
drop_closures_ChildWatchFunc :: ChildWatchFunc -> ChildWatchFunc_WithClosures
drop_closures_ChildWatchFunc :: ChildWatchFunc -> C_ChildWatchFunc
drop_closures_ChildWatchFunc ChildWatchFunc
_f Int32
pid Int32
waitStatus Ptr ()
_ = ChildWatchFunc
_f Int32
pid Int32
waitStatus
genClosure_ChildWatchFunc :: MonadIO m => ChildWatchFunc -> m (GClosure C_ChildWatchFunc)
genClosure_ChildWatchFunc :: forall (m :: * -> *).
MonadIO m =>
ChildWatchFunc -> m (GClosure C_ChildWatchFunc)
genClosure_ChildWatchFunc ChildWatchFunc
cb = IO (GClosure C_ChildWatchFunc) -> m (GClosure C_ChildWatchFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ChildWatchFunc) -> m (GClosure C_ChildWatchFunc))
-> IO (GClosure C_ChildWatchFunc) -> m (GClosure C_ChildWatchFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ChildWatchFunc
cb' = ChildWatchFunc -> C_ChildWatchFunc
drop_closures_ChildWatchFunc ChildWatchFunc
cb
let cb'' :: C_ChildWatchFunc
cb'' = Maybe (Ptr (FunPtr C_ChildWatchFunc))
-> C_ChildWatchFunc -> C_ChildWatchFunc
wrap_ChildWatchFunc Maybe (Ptr (FunPtr C_ChildWatchFunc))
forall a. Maybe a
Nothing C_ChildWatchFunc
cb'
C_ChildWatchFunc -> IO (FunPtr C_ChildWatchFunc)
mk_ChildWatchFunc C_ChildWatchFunc
cb'' IO (FunPtr C_ChildWatchFunc)
-> (FunPtr C_ChildWatchFunc -> IO (GClosure C_ChildWatchFunc))
-> IO (GClosure C_ChildWatchFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ChildWatchFunc -> IO (GClosure C_ChildWatchFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ChildWatchFunc ::
Maybe (Ptr (FunPtr C_ChildWatchFunc)) ->
ChildWatchFunc_WithClosures ->
C_ChildWatchFunc
wrap_ChildWatchFunc :: Maybe (Ptr (FunPtr C_ChildWatchFunc))
-> C_ChildWatchFunc -> C_ChildWatchFunc
wrap_ChildWatchFunc Maybe (Ptr (FunPtr C_ChildWatchFunc))
gi'funptrptr C_ChildWatchFunc
gi'cb Int32
pid Int32
waitStatus Ptr ()
userData = do
C_ChildWatchFunc
gi'cb Int32
pid Int32
waitStatus Ptr ()
userData
Maybe (Ptr (FunPtr C_ChildWatchFunc)) -> C_VoidFunc
forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ChildWatchFunc))
gi'funptrptr