    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.GLib.Callbacks
        (

     -- * Signals

    -- ** CacheDestroyFunc #signal:CacheDestroyFunc#

        C_CacheDestroyFunc                      ,
        CacheDestroyFunc                        ,
        dynamic_CacheDestroyFunc                ,
        genClosure_CacheDestroyFunc             ,
        mk_CacheDestroyFunc                     ,
        noCacheDestroyFunc                      ,
        wrap_CacheDestroyFunc                   ,

    -- ** CacheDupFunc #signal:CacheDupFunc#

        C_CacheDupFunc                          ,
        CacheDupFunc                            ,
        dynamic_CacheDupFunc                    ,
        genClosure_CacheDupFunc                 ,
        mk_CacheDupFunc                         ,
        noCacheDupFunc                          ,
        wrap_CacheDupFunc                       ,

    -- ** CacheNewFunc #signal:CacheNewFunc#

        C_CacheNewFunc                          ,
        CacheNewFunc                            ,
        dynamic_CacheNewFunc                    ,
        genClosure_CacheNewFunc                 ,
        mk_CacheNewFunc                         ,
        noCacheNewFunc                          ,
        wrap_CacheNewFunc                       ,

    -- ** ChildWatchFunc #signal:ChildWatchFunc#

        C_ChildWatchFunc                        ,
        ChildWatchFunc                          ,
        ChildWatchFunc_WithClosures             ,
        drop_closures_ChildWatchFunc            ,
        dynamic_ChildWatchFunc                  ,
        genClosure_ChildWatchFunc               ,
        mk_ChildWatchFunc                       ,
        noChildWatchFunc                        ,
        noChildWatchFunc_WithClosures           ,
        wrap_ChildWatchFunc                     ,

    -- ** ClearHandleFunc #signal:ClearHandleFunc#

        C_ClearHandleFunc                       ,
        ClearHandleFunc                         ,
        dynamic_ClearHandleFunc                 ,
        genClosure_ClearHandleFunc              ,
        mk_ClearHandleFunc                      ,
        noClearHandleFunc                       ,
        wrap_ClearHandleFunc                    ,

    -- ** CompareDataFunc #signal:CompareDataFunc#

        C_CompareDataFunc                       ,
        CompareDataFunc                         ,
        CompareDataFunc_WithClosures            ,
        drop_closures_CompareDataFunc           ,
        dynamic_CompareDataFunc                 ,
        genClosure_CompareDataFunc              ,
        mk_CompareDataFunc                      ,
        noCompareDataFunc                       ,
        noCompareDataFunc_WithClosures          ,
        wrap_CompareDataFunc                    ,

    -- ** CompareFunc #signal:CompareFunc#

        C_CompareFunc                           ,
        CompareFunc                             ,
        dynamic_CompareFunc                     ,
        genClosure_CompareFunc                  ,
        mk_CompareFunc                          ,
        noCompareFunc                           ,
        wrap_CompareFunc                        ,

    -- ** CompletionFunc #signal:CompletionFunc#

        C_CompletionFunc                        ,
        CompletionFunc                          ,
        dynamic_CompletionFunc                  ,
        genClosure_CompletionFunc               ,
        mk_CompletionFunc                       ,
        noCompletionFunc                        ,
        wrap_CompletionFunc                     ,

    -- ** CompletionStrncmpFunc #signal:CompletionStrncmpFunc#

        C_CompletionStrncmpFunc                 ,
        CompletionStrncmpFunc                   ,
        dynamic_CompletionStrncmpFunc           ,
        genClosure_CompletionStrncmpFunc        ,
        mk_CompletionStrncmpFunc                ,
        noCompletionStrncmpFunc                 ,
        wrap_CompletionStrncmpFunc              ,

    -- ** CopyFunc #signal:CopyFunc#

        C_CopyFunc                              ,
        CopyFunc                                ,
        dynamic_CopyFunc                        ,
        genClosure_CopyFunc                     ,
        mk_CopyFunc                             ,
        noCopyFunc                              ,
        wrap_CopyFunc                           ,

    -- ** DataForeachFunc #signal:DataForeachFunc#

        C_DataForeachFunc                       ,
        DataForeachFunc                         ,
        DataForeachFunc_WithClosures            ,
        drop_closures_DataForeachFunc           ,
        dynamic_DataForeachFunc                 ,
        genClosure_DataForeachFunc              ,
        mk_DataForeachFunc                      ,
        noDataForeachFunc                       ,
        noDataForeachFunc_WithClosures          ,
        wrap_DataForeachFunc                    ,

    -- ** DestroyNotify #signal:DestroyNotify#

        C_DestroyNotify                         ,
        DestroyNotify                           ,
        dynamic_DestroyNotify                   ,
        genClosure_DestroyNotify                ,
        mk_DestroyNotify                        ,
        noDestroyNotify                         ,
        wrap_DestroyNotify                      ,

    -- ** DuplicateFunc #signal:DuplicateFunc#

        C_DuplicateFunc                         ,
        DuplicateFunc                           ,
        DuplicateFunc_WithClosures              ,
        drop_closures_DuplicateFunc             ,
        dynamic_DuplicateFunc                   ,
        genClosure_DuplicateFunc                ,
        mk_DuplicateFunc                        ,
        noDuplicateFunc                         ,
        noDuplicateFunc_WithClosures            ,
        wrap_DuplicateFunc                      ,

    -- ** EqualFunc #signal:EqualFunc#

        C_EqualFunc                             ,
        EqualFunc                               ,
        dynamic_EqualFunc                       ,
        genClosure_EqualFunc                    ,
        mk_EqualFunc                            ,
        noEqualFunc                             ,
        wrap_EqualFunc                          ,

    -- ** EqualFuncFull #signal:EqualFuncFull#

        C_EqualFuncFull                         ,
        EqualFuncFull                           ,
        EqualFuncFull_WithClosures              ,
        drop_closures_EqualFuncFull             ,
        dynamic_EqualFuncFull                   ,
        genClosure_EqualFuncFull                ,
        mk_EqualFuncFull                        ,
        noEqualFuncFull                         ,
        noEqualFuncFull_WithClosures            ,
        wrap_EqualFuncFull                      ,

    -- ** ErrorClearFunc #signal:ErrorClearFunc#

        C_ErrorClearFunc                        ,
        ErrorClearFunc                          ,
        dynamic_ErrorClearFunc                  ,
        genClosure_ErrorClearFunc               ,
        mk_ErrorClearFunc                       ,
        noErrorClearFunc                        ,
        wrap_ErrorClearFunc                     ,

    -- ** ErrorCopyFunc #signal:ErrorCopyFunc#

        C_ErrorCopyFunc                         ,
        ErrorCopyFunc                           ,
        dynamic_ErrorCopyFunc                   ,
        genClosure_ErrorCopyFunc                ,
        mk_ErrorCopyFunc                        ,
        noErrorCopyFunc                         ,
        wrap_ErrorCopyFunc                      ,

    -- ** ErrorInitFunc #signal:ErrorInitFunc#

        C_ErrorInitFunc                         ,
        ErrorInitFunc                           ,
        dynamic_ErrorInitFunc                   ,
        genClosure_ErrorInitFunc                ,
        mk_ErrorInitFunc                        ,
        noErrorInitFunc                         ,
        wrap_ErrorInitFunc                      ,

    -- ** FreeFunc #signal:FreeFunc#

        C_FreeFunc                              ,
        FreeFunc                                ,
        dynamic_FreeFunc                        ,
        genClosure_FreeFunc                     ,
        mk_FreeFunc                             ,
        noFreeFunc                              ,
        wrap_FreeFunc                           ,

    -- ** Func #signal:Func#

        C_Func                                  ,
        Func                                    ,
        Func_WithClosures                       ,
        drop_closures_Func                      ,
        dynamic_Func                            ,
        genClosure_Func                         ,
        mk_Func                                 ,
        noFunc                                  ,
        noFunc_WithClosures                     ,
        wrap_Func                               ,

    -- ** HFunc #signal:HFunc#

        C_HFunc                                 ,
        HFunc                                   ,
        HFunc_WithClosures                      ,
        drop_closures_HFunc                     ,
        dynamic_HFunc                           ,
        genClosure_HFunc                        ,
        mk_HFunc                                ,
        noHFunc                                 ,
        noHFunc_WithClosures                    ,
        wrap_HFunc                              ,

    -- ** HRFunc #signal:HRFunc#

        C_HRFunc                                ,
        HRFunc                                  ,
        HRFunc_WithClosures                     ,
        drop_closures_HRFunc                    ,
        dynamic_HRFunc                          ,
        genClosure_HRFunc                       ,
        mk_HRFunc                               ,
        noHRFunc                                ,
        noHRFunc_WithClosures                   ,
        wrap_HRFunc                             ,

    -- ** HashFunc #signal:HashFunc#

        C_HashFunc                              ,
        HashFunc                                ,
        dynamic_HashFunc                        ,
        genClosure_HashFunc                     ,
        mk_HashFunc                             ,
        noHashFunc                              ,
        wrap_HashFunc                           ,

    -- ** HookCheckFunc #signal:HookCheckFunc#

        C_HookCheckFunc                         ,
        HookCheckFunc                           ,
        dynamic_HookCheckFunc                   ,
        genClosure_HookCheckFunc                ,
        mk_HookCheckFunc                        ,
        noHookCheckFunc                         ,
        wrap_HookCheckFunc                      ,

    -- ** HookCheckMarshaller #signal:HookCheckMarshaller#

        C_HookCheckMarshaller                   ,
        HookCheckMarshaller                     ,
        dynamic_HookCheckMarshaller             ,
        genClosure_HookCheckMarshaller          ,
        mk_HookCheckMarshaller                  ,
        noHookCheckMarshaller                   ,
        wrap_HookCheckMarshaller                ,

    -- ** HookCompareFunc #signal:HookCompareFunc#

        C_HookCompareFunc                       ,
        HookCompareFunc                         ,
        dynamic_HookCompareFunc                 ,
        genClosure_HookCompareFunc              ,
        mk_HookCompareFunc                      ,
        noHookCompareFunc                       ,
        wrap_HookCompareFunc                    ,

    -- ** HookFinalizeFunc #signal:HookFinalizeFunc#

        C_HookFinalizeFunc                      ,
        HookFinalizeFunc                        ,
        dynamic_HookFinalizeFunc                ,
        genClosure_HookFinalizeFunc             ,
        mk_HookFinalizeFunc                     ,
        noHookFinalizeFunc                      ,
        wrap_HookFinalizeFunc                   ,

    -- ** HookFindFunc #signal:HookFindFunc#

        C_HookFindFunc                          ,
        HookFindFunc                            ,
        dynamic_HookFindFunc                    ,
        genClosure_HookFindFunc                 ,
        mk_HookFindFunc                         ,
        noHookFindFunc                          ,
        wrap_HookFindFunc                       ,

    -- ** HookFunc #signal:HookFunc#

        C_HookFunc                              ,
        HookFunc                                ,
        dynamic_HookFunc                        ,
        genClosure_HookFunc                     ,
        mk_HookFunc                             ,
        noHookFunc                              ,
        wrap_HookFunc                           ,

    -- ** HookMarshaller #signal:HookMarshaller#

        C_HookMarshaller                        ,
        HookMarshaller                          ,
        dynamic_HookMarshaller                  ,
        genClosure_HookMarshaller               ,
        mk_HookMarshaller                       ,
        noHookMarshaller                        ,
        wrap_HookMarshaller                     ,

    -- ** IOFunc #signal:IOFunc#

        C_IOFunc                                ,
        IOFunc                                  ,
        dynamic_IOFunc                          ,
        genClosure_IOFunc                       ,
        mk_IOFunc                               ,
        noIOFunc                                ,
        wrap_IOFunc                             ,

    -- ** IOFuncsIoCloseFieldCallback #signal:IOFuncsIoCloseFieldCallback#

        C_IOFuncsIoCloseFieldCallback           ,
        IOFuncsIoCloseFieldCallback             ,
        dynamic_IOFuncsIoCloseFieldCallback     ,
        mk_IOFuncsIoCloseFieldCallback          ,
        noIOFuncsIoCloseFieldCallback           ,

    -- ** IOFuncsIoCreateWatchFieldCallback #signal:IOFuncsIoCreateWatchFieldCallback#

        C_IOFuncsIoCreateWatchFieldCallback     ,
        IOFuncsIoCreateWatchFieldCallback       ,
        dynamic_IOFuncsIoCreateWatchFieldCallback,
        genClosure_IOFuncsIoCreateWatchFieldCallback,
        mk_IOFuncsIoCreateWatchFieldCallback    ,
        noIOFuncsIoCreateWatchFieldCallback     ,
        wrap_IOFuncsIoCreateWatchFieldCallback  ,

    -- ** IOFuncsIoFreeFieldCallback #signal:IOFuncsIoFreeFieldCallback#

        C_IOFuncsIoFreeFieldCallback            ,
        IOFuncsIoFreeFieldCallback              ,
        dynamic_IOFuncsIoFreeFieldCallback      ,
        genClosure_IOFuncsIoFreeFieldCallback   ,
        mk_IOFuncsIoFreeFieldCallback           ,
        noIOFuncsIoFreeFieldCallback            ,
        wrap_IOFuncsIoFreeFieldCallback         ,

    -- ** IOFuncsIoGetFlagsFieldCallback #signal:IOFuncsIoGetFlagsFieldCallback#

        C_IOFuncsIoGetFlagsFieldCallback        ,
        IOFuncsIoGetFlagsFieldCallback          ,
        dynamic_IOFuncsIoGetFlagsFieldCallback  ,
        genClosure_IOFuncsIoGetFlagsFieldCallback,
        mk_IOFuncsIoGetFlagsFieldCallback       ,
        noIOFuncsIoGetFlagsFieldCallback        ,
        wrap_IOFuncsIoGetFlagsFieldCallback     ,

    -- ** IOFuncsIoReadFieldCallback #signal:IOFuncsIoReadFieldCallback#

        C_IOFuncsIoReadFieldCallback            ,
        IOFuncsIoReadFieldCallback              ,
        dynamic_IOFuncsIoReadFieldCallback      ,
        mk_IOFuncsIoReadFieldCallback           ,
        noIOFuncsIoReadFieldCallback            ,

    -- ** IOFuncsIoSeekFieldCallback #signal:IOFuncsIoSeekFieldCallback#

        C_IOFuncsIoSeekFieldCallback            ,
        IOFuncsIoSeekFieldCallback              ,
        dynamic_IOFuncsIoSeekFieldCallback      ,
        mk_IOFuncsIoSeekFieldCallback           ,
        noIOFuncsIoSeekFieldCallback            ,

    -- ** IOFuncsIoSetFlagsFieldCallback #signal:IOFuncsIoSetFlagsFieldCallback#

        C_IOFuncsIoSetFlagsFieldCallback        ,
        IOFuncsIoSetFlagsFieldCallback          ,
        dynamic_IOFuncsIoSetFlagsFieldCallback  ,
        mk_IOFuncsIoSetFlagsFieldCallback       ,
        noIOFuncsIoSetFlagsFieldCallback        ,

    -- ** IOFuncsIoWriteFieldCallback #signal:IOFuncsIoWriteFieldCallback#

        C_IOFuncsIoWriteFieldCallback           ,
        IOFuncsIoWriteFieldCallback             ,
        dynamic_IOFuncsIoWriteFieldCallback     ,
        mk_IOFuncsIoWriteFieldCallback          ,
        noIOFuncsIoWriteFieldCallback           ,

    -- ** LogFunc #signal:LogFunc#

        C_LogFunc                               ,
        LogFunc                                 ,
        LogFunc_WithClosures                    ,
        drop_closures_LogFunc                   ,
        dynamic_LogFunc                         ,
        genClosure_LogFunc                      ,
        mk_LogFunc                              ,
        noLogFunc                               ,
        noLogFunc_WithClosures                  ,
        wrap_LogFunc                            ,

    -- ** LogWriterFunc #signal:LogWriterFunc#

        C_LogWriterFunc                         ,
        LogWriterFunc                           ,
        LogWriterFunc_WithClosures              ,
        drop_closures_LogWriterFunc             ,
        dynamic_LogWriterFunc                   ,
        genClosure_LogWriterFunc                ,
        mk_LogWriterFunc                        ,
        noLogWriterFunc                         ,
        noLogWriterFunc_WithClosures            ,
        wrap_LogWriterFunc                      ,

    -- ** MarkupParserEndElementFieldCallback #signal:MarkupParserEndElementFieldCallback#

        C_MarkupParserEndElementFieldCallback   ,
        MarkupParserEndElementFieldCallback     ,
        MarkupParserEndElementFieldCallback_WithClosures,
        drop_closures_MarkupParserEndElementFieldCallback,
        dynamic_MarkupParserEndElementFieldCallback,
        mk_MarkupParserEndElementFieldCallback  ,
        noMarkupParserEndElementFieldCallback   ,
        noMarkupParserEndElementFieldCallback_WithClosures,

    -- ** MarkupParserErrorFieldCallback #signal:MarkupParserErrorFieldCallback#

        C_MarkupParserErrorFieldCallback        ,
        MarkupParserErrorFieldCallback          ,
        MarkupParserErrorFieldCallback_WithClosures,
        drop_closures_MarkupParserErrorFieldCallback,
        dynamic_MarkupParserErrorFieldCallback  ,
        genClosure_MarkupParserErrorFieldCallback,
        mk_MarkupParserErrorFieldCallback       ,
        noMarkupParserErrorFieldCallback        ,
        noMarkupParserErrorFieldCallback_WithClosures,
        wrap_MarkupParserErrorFieldCallback     ,

    -- ** MarkupParserPassthroughFieldCallback #signal:MarkupParserPassthroughFieldCallback#

        C_MarkupParserPassthroughFieldCallback  ,
        MarkupParserPassthroughFieldCallback    ,
        MarkupParserPassthroughFieldCallback_WithClosures,
        drop_closures_MarkupParserPassthroughFieldCallback,
        dynamic_MarkupParserPassthroughFieldCallback,
        mk_MarkupParserPassthroughFieldCallback ,
        noMarkupParserPassthroughFieldCallback  ,
        noMarkupParserPassthroughFieldCallback_WithClosures,

    -- ** MarkupParserStartElementFieldCallback #signal:MarkupParserStartElementFieldCallback#

        C_MarkupParserStartElementFieldCallback ,
        MarkupParserStartElementFieldCallback   ,
        MarkupParserStartElementFieldCallback_WithClosures,
        drop_closures_MarkupParserStartElementFieldCallback,
        dynamic_MarkupParserStartElementFieldCallback,
        mk_MarkupParserStartElementFieldCallback,
        noMarkupParserStartElementFieldCallback ,
        noMarkupParserStartElementFieldCallback_WithClosures,

    -- ** MarkupParserTextFieldCallback #signal:MarkupParserTextFieldCallback#

        C_MarkupParserTextFieldCallback         ,
        MarkupParserTextFieldCallback           ,
        MarkupParserTextFieldCallback_WithClosures,
        drop_closures_MarkupParserTextFieldCallback,
        dynamic_MarkupParserTextFieldCallback   ,
        mk_MarkupParserTextFieldCallback        ,
        noMarkupParserTextFieldCallback         ,
        noMarkupParserTextFieldCallback_WithClosures,

    -- ** MemVTableCallocFieldCallback #signal:MemVTableCallocFieldCallback#

        C_MemVTableCallocFieldCallback          ,
        MemVTableCallocFieldCallback            ,
        dynamic_MemVTableCallocFieldCallback    ,
        genClosure_MemVTableCallocFieldCallback ,
        mk_MemVTableCallocFieldCallback         ,
        noMemVTableCallocFieldCallback          ,
        wrap_MemVTableCallocFieldCallback       ,

    -- ** MemVTableFreeFieldCallback #signal:MemVTableFreeFieldCallback#

        C_MemVTableFreeFieldCallback            ,
        MemVTableFreeFieldCallback              ,
        dynamic_MemVTableFreeFieldCallback      ,
        genClosure_MemVTableFreeFieldCallback   ,
        mk_MemVTableFreeFieldCallback           ,
        noMemVTableFreeFieldCallback            ,
        wrap_MemVTableFreeFieldCallback         ,

    -- ** MemVTableMallocFieldCallback #signal:MemVTableMallocFieldCallback#

        C_MemVTableMallocFieldCallback          ,
        MemVTableMallocFieldCallback            ,
        dynamic_MemVTableMallocFieldCallback    ,
        genClosure_MemVTableMallocFieldCallback ,
        mk_MemVTableMallocFieldCallback         ,
        noMemVTableMallocFieldCallback          ,
        wrap_MemVTableMallocFieldCallback       ,

    -- ** MemVTableReallocFieldCallback #signal:MemVTableReallocFieldCallback#

        C_MemVTableReallocFieldCallback         ,
        MemVTableReallocFieldCallback           ,
        dynamic_MemVTableReallocFieldCallback   ,
        genClosure_MemVTableReallocFieldCallback,
        mk_MemVTableReallocFieldCallback        ,
        noMemVTableReallocFieldCallback         ,
        wrap_MemVTableReallocFieldCallback      ,

    -- ** MemVTableTryMallocFieldCallback #signal:MemVTableTryMallocFieldCallback#

        C_MemVTableTryMallocFieldCallback       ,
        MemVTableTryMallocFieldCallback         ,
        dynamic_MemVTableTryMallocFieldCallback ,
        genClosure_MemVTableTryMallocFieldCallback,
        mk_MemVTableTryMallocFieldCallback      ,
        noMemVTableTryMallocFieldCallback       ,
        wrap_MemVTableTryMallocFieldCallback    ,

    -- ** MemVTableTryReallocFieldCallback #signal:MemVTableTryReallocFieldCallback#

        C_MemVTableTryReallocFieldCallback      ,
        MemVTableTryReallocFieldCallback        ,
        dynamic_MemVTableTryReallocFieldCallback,
        genClosure_MemVTableTryReallocFieldCallback,
        mk_MemVTableTryReallocFieldCallback     ,
        noMemVTableTryReallocFieldCallback      ,
        wrap_MemVTableTryReallocFieldCallback   ,

    -- ** NodeForeachFunc #signal:NodeForeachFunc#

        C_NodeForeachFunc                       ,
        NodeForeachFunc                         ,
        dynamic_NodeForeachFunc                 ,
        genClosure_NodeForeachFunc              ,
        mk_NodeForeachFunc                      ,
        noNodeForeachFunc                       ,
        wrap_NodeForeachFunc                    ,

    -- ** NodeTraverseFunc #signal:NodeTraverseFunc#

        C_NodeTraverseFunc                      ,
        NodeTraverseFunc                        ,
        dynamic_NodeTraverseFunc                ,
        genClosure_NodeTraverseFunc             ,
        mk_NodeTraverseFunc                     ,
        noNodeTraverseFunc                      ,
        wrap_NodeTraverseFunc                   ,

    -- ** OptionArgFunc #signal:OptionArgFunc#

        C_OptionArgFunc                         ,
        OptionArgFunc                           ,
        dynamic_OptionArgFunc                   ,
        mk_OptionArgFunc                        ,
        noOptionArgFunc                         ,

    -- ** OptionErrorFunc #signal:OptionErrorFunc#

        C_OptionErrorFunc                       ,
        OptionErrorFunc                         ,
        dynamic_OptionErrorFunc                 ,
        mk_OptionErrorFunc                      ,
        noOptionErrorFunc                       ,

    -- ** OptionParseFunc #signal:OptionParseFunc#

        C_OptionParseFunc                       ,
        OptionParseFunc                         ,
        dynamic_OptionParseFunc                 ,
        mk_OptionParseFunc                      ,
        noOptionParseFunc                       ,

    -- ** PollFunc #signal:PollFunc#

        C_PollFunc                              ,
        PollFunc                                ,
        dynamic_PollFunc                        ,
        genClosure_PollFunc                     ,
        mk_PollFunc                             ,
        noPollFunc                              ,
        wrap_PollFunc                           ,

    -- ** PrintFunc #signal:PrintFunc#

        C_PrintFunc                             ,
        PrintFunc                               ,
        dynamic_PrintFunc                       ,
        genClosure_PrintFunc                    ,
        mk_PrintFunc                            ,
        noPrintFunc                             ,
        wrap_PrintFunc                          ,

    -- ** RegexEvalCallback #signal:RegexEvalCallback#

        C_RegexEvalCallback                     ,
        RegexEvalCallback                       ,
        RegexEvalCallback_WithClosures          ,
        drop_closures_RegexEvalCallback         ,
        dynamic_RegexEvalCallback               ,
        genClosure_RegexEvalCallback            ,
        mk_RegexEvalCallback                    ,
        noRegexEvalCallback                     ,
        noRegexEvalCallback_WithClosures        ,
        wrap_RegexEvalCallback                  ,

    -- ** ScannerMsgFunc #signal:ScannerMsgFunc#

        C_ScannerMsgFunc                        ,
        ScannerMsgFunc                          ,
        dynamic_ScannerMsgFunc                  ,
        genClosure_ScannerMsgFunc               ,
        mk_ScannerMsgFunc                       ,
        noScannerMsgFunc                        ,
        wrap_ScannerMsgFunc                     ,

    -- ** SequenceIterCompareFunc #signal:SequenceIterCompareFunc#

        C_SequenceIterCompareFunc               ,
        SequenceIterCompareFunc                 ,
        dynamic_SequenceIterCompareFunc         ,
        genClosure_SequenceIterCompareFunc      ,
        mk_SequenceIterCompareFunc              ,
        noSequenceIterCompareFunc               ,
        wrap_SequenceIterCompareFunc            ,

    -- ** SourceCallbackFuncsRefFieldCallback #signal:SourceCallbackFuncsRefFieldCallback#

        C_SourceCallbackFuncsRefFieldCallback   ,
        SourceCallbackFuncsRefFieldCallback     ,
        dynamic_SourceCallbackFuncsRefFieldCallback,
        genClosure_SourceCallbackFuncsRefFieldCallback,
        mk_SourceCallbackFuncsRefFieldCallback  ,
        noSourceCallbackFuncsRefFieldCallback   ,
        wrap_SourceCallbackFuncsRefFieldCallback,

    -- ** SourceCallbackFuncsUnrefFieldCallback #signal:SourceCallbackFuncsUnrefFieldCallback#

        C_SourceCallbackFuncsUnrefFieldCallback ,
        SourceCallbackFuncsUnrefFieldCallback   ,
        dynamic_SourceCallbackFuncsUnrefFieldCallback,
        genClosure_SourceCallbackFuncsUnrefFieldCallback,
        mk_SourceCallbackFuncsUnrefFieldCallback,
        noSourceCallbackFuncsUnrefFieldCallback ,
        wrap_SourceCallbackFuncsUnrefFieldCallback,

    -- ** SourceDisposeFunc #signal:SourceDisposeFunc#

        C_SourceDisposeFunc                     ,
        SourceDisposeFunc                       ,
        dynamic_SourceDisposeFunc               ,
        genClosure_SourceDisposeFunc            ,
        mk_SourceDisposeFunc                    ,
        noSourceDisposeFunc                     ,
        wrap_SourceDisposeFunc                  ,

    -- ** SourceDummyMarshal #signal:SourceDummyMarshal#

        C_SourceDummyMarshal                    ,
        SourceDummyMarshal                      ,
        dynamic_SourceDummyMarshal              ,
        genClosure_SourceDummyMarshal           ,
        mk_SourceDummyMarshal                   ,
        noSourceDummyMarshal                    ,
        wrap_SourceDummyMarshal                 ,

    -- ** SourceFunc #signal:SourceFunc#

        C_SourceFunc                            ,
        SourceFunc                              ,
        SourceFunc_WithClosures                 ,
        drop_closures_SourceFunc                ,
        dynamic_SourceFunc                      ,
        genClosure_SourceFunc                   ,
        mk_SourceFunc                           ,
        noSourceFunc                            ,
        noSourceFunc_WithClosures               ,
        wrap_SourceFunc                         ,

    -- ** SourceFuncsCheckFunc #signal:SourceFuncsCheckFunc#

        C_SourceFuncsCheckFunc                  ,
        SourceFuncsCheckFunc                    ,
        dynamic_SourceFuncsCheckFunc            ,
        genClosure_SourceFuncsCheckFunc         ,
        mk_SourceFuncsCheckFunc                 ,
        noSourceFuncsCheckFunc                  ,
        wrap_SourceFuncsCheckFunc               ,

    -- ** SourceFuncsFinalizeFunc #signal:SourceFuncsFinalizeFunc#

        C_SourceFuncsFinalizeFunc               ,
        SourceFuncsFinalizeFunc                 ,
        dynamic_SourceFuncsFinalizeFunc         ,
        genClosure_SourceFuncsFinalizeFunc      ,
        mk_SourceFuncsFinalizeFunc              ,
        noSourceFuncsFinalizeFunc               ,
        wrap_SourceFuncsFinalizeFunc            ,

    -- ** SourceFuncsPrepareFunc #signal:SourceFuncsPrepareFunc#

        C_SourceFuncsPrepareFunc                ,
        SourceFuncsPrepareFunc                  ,
        dynamic_SourceFuncsPrepareFunc          ,
        genClosure_SourceFuncsPrepareFunc       ,
        mk_SourceFuncsPrepareFunc               ,
        noSourceFuncsPrepareFunc                ,
        wrap_SourceFuncsPrepareFunc             ,

    -- ** SourceOnceFunc #signal:SourceOnceFunc#

        C_SourceOnceFunc                        ,
        SourceOnceFunc                          ,
        SourceOnceFunc_WithClosures             ,
        drop_closures_SourceOnceFunc            ,
        dynamic_SourceOnceFunc                  ,
        genClosure_SourceOnceFunc               ,
        mk_SourceOnceFunc                       ,
        noSourceOnceFunc                        ,
        noSourceOnceFunc_WithClosures           ,
        wrap_SourceOnceFunc                     ,

    -- ** SpawnChildSetupFunc #signal:SpawnChildSetupFunc#

        C_SpawnChildSetupFunc                   ,
        SpawnChildSetupFunc                     ,
        dynamic_SpawnChildSetupFunc             ,
        genClosure_SpawnChildSetupFunc          ,
        mk_SpawnChildSetupFunc                  ,
        noSpawnChildSetupFunc                   ,
        wrap_SpawnChildSetupFunc                ,

    -- ** TestDataFunc #signal:TestDataFunc#

        C_TestDataFunc                          ,
        TestDataFunc                            ,
        TestDataFunc_WithClosures               ,
        drop_closures_TestDataFunc              ,
        dynamic_TestDataFunc                    ,
        genClosure_TestDataFunc                 ,
        mk_TestDataFunc                         ,
        noTestDataFunc                          ,
        noTestDataFunc_WithClosures             ,
        wrap_TestDataFunc                       ,

    -- ** TestFixtureFunc #signal:TestFixtureFunc#

        C_TestFixtureFunc                       ,
        TestFixtureFunc                         ,
        TestFixtureFunc_WithClosures            ,
        drop_closures_TestFixtureFunc           ,
        dynamic_TestFixtureFunc                 ,
        genClosure_TestFixtureFunc              ,
        mk_TestFixtureFunc                      ,
        noTestFixtureFunc                       ,
        noTestFixtureFunc_WithClosures          ,
        wrap_TestFixtureFunc                    ,

    -- ** TestFunc #signal:TestFunc#

        C_TestFunc                              ,
        TestFunc                                ,
        dynamic_TestFunc                        ,
        genClosure_TestFunc                     ,
        mk_TestFunc                             ,
        noTestFunc                              ,
        wrap_TestFunc                           ,

    -- ** TestLogFatalFunc #signal:TestLogFatalFunc#

        C_TestLogFatalFunc                      ,
        TestLogFatalFunc                        ,
        TestLogFatalFunc_WithClosures           ,
        drop_closures_TestLogFatalFunc          ,
        dynamic_TestLogFatalFunc                ,
        genClosure_TestLogFatalFunc             ,
        mk_TestLogFatalFunc                     ,
        noTestLogFatalFunc                      ,
        noTestLogFatalFunc_WithClosures         ,
        wrap_TestLogFatalFunc                   ,

    -- ** ThreadFunc #signal:ThreadFunc#

        C_ThreadFunc                            ,
        ThreadFunc                              ,
        dynamic_ThreadFunc                      ,
        genClosure_ThreadFunc                   ,
        mk_ThreadFunc                           ,
        noThreadFunc                            ,
        wrap_ThreadFunc                         ,

    -- ** TranslateFunc #signal:TranslateFunc#

        C_TranslateFunc                         ,
        TranslateFunc                           ,
        dynamic_TranslateFunc                   ,
        genClosure_TranslateFunc                ,
        mk_TranslateFunc                        ,
        noTranslateFunc                         ,
        wrap_TranslateFunc                      ,

    -- ** TraverseFunc #signal:TraverseFunc#

        C_TraverseFunc                          ,
        TraverseFunc                            ,
        dynamic_TraverseFunc                    ,
        genClosure_TraverseFunc                 ,
        mk_TraverseFunc                         ,
        noTraverseFunc                          ,
        wrap_TraverseFunc                       ,

    -- ** TraverseNodeFunc #signal:TraverseNodeFunc#

        C_TraverseNodeFunc                      ,
        TraverseNodeFunc                        ,
        dynamic_TraverseNodeFunc                ,
        genClosure_TraverseNodeFunc             ,
        mk_TraverseNodeFunc                     ,
        noTraverseNodeFunc                      ,
        wrap_TraverseNodeFunc                   ,

    -- ** UnixFDSourceFunc #signal:UnixFDSourceFunc#

        C_UnixFDSourceFunc                      ,
        UnixFDSourceFunc                        ,
        UnixFDSourceFunc_WithClosures           ,
        drop_closures_UnixFDSourceFunc          ,
        dynamic_UnixFDSourceFunc                ,
        genClosure_UnixFDSourceFunc             ,
        mk_UnixFDSourceFunc                     ,
        noUnixFDSourceFunc                      ,
        noUnixFDSourceFunc_WithClosures         ,
        wrap_UnixFDSourceFunc                   ,

    -- ** VoidFunc #signal:VoidFunc#

        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.GHashTable as B.GHT
    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.Kind as DK
    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 qualified Data.Word as DW
    import qualified Data.Int as DI
    import qualified System.Posix.Types as SPT
    import qualified Foreign.C.Types as FCT

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import {-# SOURCE #-} qualified GI.GLib.Enums as GLib.Enums
    import {-# SOURCE #-} qualified GI.GLib.Flags as GLib.Flags
    import {-# SOURCE #-} qualified GI.GLib.Structs.Allocator as GLib.Allocator
    import {-# SOURCE #-} qualified GI.GLib.Structs.Bytes as GLib.Bytes
    import {-# SOURCE #-} qualified GI.GLib.Structs.Cond as GLib.Cond
    import {-# SOURCE #-} qualified GI.GLib.Structs.Data as GLib.Data
    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.MainContext as GLib.MainContext
    import {-# SOURCE #-} qualified GI.GLib.Structs.MarkupParseContext as GLib.MarkupParseContext
    import {-# SOURCE #-} qualified GI.GLib.Structs.MarkupParser as GLib.MarkupParser
    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.OptionEntry as GLib.OptionEntry
    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.Regex as GLib.Regex
    import {-# SOURCE #-} qualified GI.GLib.Structs.Scanner as GLib.Scanner
    import {-# SOURCE #-} qualified GI.GLib.Structs.ScannerConfig as GLib.ScannerConfig
    import {-# SOURCE #-} qualified GI.GLib.Structs.Sequence as GLib.Sequence
    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.SourceCallbackFuncs as GLib.SourceCallbackFuncs
    import {-# SOURCE #-} qualified GI.GLib.Structs.SourceFuncs as GLib.SourceFuncs
    import {-# SOURCE #-} qualified GI.GLib.Structs.String as GLib.String
    import {-# SOURCE #-} qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
    import {-# SOURCE #-} qualified GI.GLib.Structs.TreeNode as GLib.TreeNode
    import {-# SOURCE #-} qualified GI.GLib.Unions.Mutex as GLib.Mutex
    import {-# SOURCE #-} qualified GI.GLib.Unions.TokenValue as GLib.TokenValue

    #else
    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

    #endif

    -- callback VoidFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args = []
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Declares a type of function which takes no arguments\nand has no return value. It is used to specify the type\nfunction passed to g_atexit()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_VoidFunc =
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_VoidFunc :: FunPtr C_VoidFunc -> C_VoidFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_VoidFunc`.
    foreign import ccall "wrapper"
        mk_VoidFunc :: C_VoidFunc -> IO (FunPtr C_VoidFunc)

    -- | Declares a type of function which takes no arguments
    -- and has no return value. It is used to specify the type
    -- function passed to 'GI.GLib.Functions.atexit'.
    type VoidFunc =
        IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `VoidFunc`@.
    noVoidFunc :: Maybe VoidFunc
    noVoidFunc :: Maybe C_VoidFunc
    noVoidFunc = Maybe C_VoidFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `VoidFunc` into a `C_VoidFunc`.
    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

    -- callback UnixFDSourceFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%FALSE if the source should be removed"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "fd"
              , argType = TBasicType TInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the fd that triggered the event"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "condition"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOCondition" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the IO conditions reported on @fd"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_unix_fd_add()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of functions to be called when a UNIX fd watch source\ntriggers."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_UnixFDSourceFunc =
        Int32 ->
        CUInt ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "fd"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the fd that triggered the event"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "condition"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOCondition" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the IO conditions reported on @fd"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_unix_fd_add()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_UnixFDSourceFunc :: FunPtr C_UnixFDSourceFunc -> C_UnixFDSourceFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_UnixFDSourceFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_UnixFDSourceFunc
        -> Int32
        -- ^ /@fd@/: the fd that triggered the event
        -> [GLib.Flags.IOCondition]
        -- ^ /@condition@/: the IO conditions reported on /@fd@/
        -> Ptr ()
        -- ^ /@userData@/: user data passed to @/g_unix_fd_add()/@
        -> m Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_UnixFDSourceFunc`.
    foreign import ccall "wrapper"
        mk_UnixFDSourceFunc :: C_UnixFDSourceFunc -> IO (FunPtr C_UnixFDSourceFunc)

    -- | The type of functions to be called when a UNIX fd watch source
    -- triggers.
    type UnixFDSourceFunc =
        Int32
        -- ^ /@fd@/: the fd that triggered the event
        -> [GLib.Flags.IOCondition]
        -- ^ /@condition@/: the IO conditions reported on /@fd@/
        -> IO Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed

    -- | A convenience synonym for @`Nothing` :: `Maybe` `UnixFDSourceFunc`@.
    noUnixFDSourceFunc :: Maybe UnixFDSourceFunc
    noUnixFDSourceFunc :: Maybe UnixFDSourceFunc
    noUnixFDSourceFunc = Maybe UnixFDSourceFunc
    forall a. Maybe a
    Nothing

    -- | The type of functions to be called when a UNIX fd watch source
    -- triggers.
    type UnixFDSourceFunc_WithClosures =
        Int32
        -- ^ /@fd@/: the fd that triggered the event
        -> [GLib.Flags.IOCondition]
        -- ^ /@condition@/: the IO conditions reported on /@fd@/
        -> Ptr ()
        -- ^ /@userData@/: user data passed to @/g_unix_fd_add()/@
        -> IO Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed

    -- | A convenience synonym for @`Nothing` :: `Maybe` `UnixFDSourceFunc_WithClosures`@.
    noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures
    noUnixFDSourceFunc_WithClosures :: Maybe UnixFDSourceFunc_WithClosures
    noUnixFDSourceFunc_WithClosures = Maybe UnixFDSourceFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `UnixFDSourceFunc` into a `C_UnixFDSourceFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback TraverseNodeFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE to stop the traversal"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "node"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "TreeNode" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GTreeNode" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_tree_foreach_node()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_tree_foreach_node(). It is\npassed each node, together with the @user_data parameter passed to\ng_tree_foreach_node(). If the function returns %TRUE, the traversal is\nstopped."
            , sinceVersion = Just "2.68"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TraverseNodeFunc =
        Ptr GLib.TreeNode.TreeNode ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "node"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "TreeNode" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GTreeNode" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_tree_foreach_node()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TraverseNodeFunc :: FunPtr C_TraverseNodeFunc -> C_TraverseNodeFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TraverseNodeFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TraverseNodeFunc
        -> GLib.TreeNode.TreeNode
        -- ^ /@node@/: a t'GI.GLib.Structs.TreeNode.TreeNode'
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeForeachNode'
        -> m Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_TraverseNodeFunc`.
    foreign import ccall "wrapper"
        mk_TraverseNodeFunc :: C_TraverseNodeFunc -> IO (FunPtr C_TraverseNodeFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Structs.Tree.treeForeachNode'. It is
    -- passed each node, together with the /@userData@/ parameter passed to
    -- 'GI.GLib.Structs.Tree.treeForeachNode'. If the function returns 'P.True', the traversal is
    -- stopped.
    --
    -- /Since: 2.68/
    type TraverseNodeFunc =
        GLib.TreeNode.TreeNode
        -- ^ /@node@/: a t'GI.GLib.Structs.TreeNode.TreeNode'
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeForeachNode'
        -> IO Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TraverseNodeFunc`@.
    noTraverseNodeFunc :: Maybe TraverseNodeFunc
    noTraverseNodeFunc :: Maybe TraverseNodeFunc
    noTraverseNodeFunc = Maybe TraverseNodeFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TraverseNodeFunc` into a `C_TraverseNodeFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback TraverseFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE to stop the traversal"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "key"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a key of a #GTree node"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "value"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the value corresponding to the key"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_tree_traverse()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_tree_traverse(). It is\npassed the key and value of each node, together with the @user_data\nparameter passed to g_tree_traverse(). If the function returns\n%TRUE, the traversal is stopped."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TraverseFunc =
        Ptr () ->
        Ptr () ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "key"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a key of a #GTree node"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "value"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the value corresponding to the key"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_tree_traverse()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TraverseFunc :: FunPtr C_TraverseFunc -> C_TraverseFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TraverseFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TraverseFunc
        -> Ptr ()
        -- ^ /@key@/: a key of a t'GI.GLib.Structs.Tree.Tree' node
        -> Ptr ()
        -- ^ /@value@/: the value corresponding to the key
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeTraverse'
        -> m Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_TraverseFunc`.
    foreign import ccall "wrapper"
        mk_TraverseFunc :: C_TraverseFunc -> IO (FunPtr C_TraverseFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Structs.Tree.treeTraverse'. It is
    -- passed the key and value of each node, together with the /@userData@/
    -- parameter passed to 'GI.GLib.Structs.Tree.treeTraverse'. If the function returns
    -- 'P.True', the traversal is stopped.
    type TraverseFunc =
        Ptr ()
        -- ^ /@key@/: a key of a t'GI.GLib.Structs.Tree.Tree' node
        -> Ptr ()
        -- ^ /@value@/: the value corresponding to the key
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Tree.treeTraverse'
        -> IO Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TraverseFunc`@.
    noTraverseFunc :: Maybe TraverseFunc
    noTraverseFunc :: Maybe TraverseFunc
    noTraverseFunc = Maybe TraverseFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TraverseFunc` into a `C_TraverseFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback TranslateFunc
    {- Callable
      { returnType = Just (TBasicType TUTF8)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "a translation of the string for the current locale.\n The returned string is owned by GLib and must not be freed."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "str"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the untranslated string"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "user data specified when installing the function, e.g.\n in g_option_group_set_translate_func()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of functions which are used to translate user-visible\nstrings, for <option>--help</option> output."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TranslateFunc =
        CString ->
        Ptr () ->
        IO CString

    -- Args: [ Arg
    --           { argCName = "str"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the untranslated string"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "user data specified when installing the function, e.g.\n in g_option_group_set_translate_func()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUTF8)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TranslateFunc :: FunPtr C_TranslateFunc -> C_TranslateFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TranslateFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TranslateFunc
        -> T.Text
        -- ^ /@str@/: the untranslated string
        -> Ptr ()
        -- ^ /@data@/: user data specified when installing the function, e.g.
        --  in 'GI.GLib.Structs.OptionGroup.optionGroupSetTranslateFunc'
        -> m T.Text
        -- ^ __Returns:__ a translation of the string for the current locale.
        --  The returned string is owned by GLib and must not be freed.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Text
    result'

    -- | Generate a function pointer callable from C code, from a `C_TranslateFunc`.
    foreign import ccall "wrapper"
        mk_TranslateFunc :: C_TranslateFunc -> IO (FunPtr C_TranslateFunc)

    -- | The type of functions which are used to translate user-visible
    -- strings, for \<option>--help\<\/option> output.
    type TranslateFunc =
        T.Text
        -- ^ /@str@/: the untranslated string
        -> Ptr ()
        -- ^ /@data@/: user data specified when installing the function, e.g.
        --  in 'GI.GLib.Structs.OptionGroup.optionGroupSetTranslateFunc'
        -> IO T.Text
        -- ^ __Returns:__ a translation of the string for the current locale.
        --  The returned string is owned by GLib and must not be freed.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TranslateFunc`@.
    noTranslateFunc :: Maybe TranslateFunc
    noTranslateFunc :: Maybe TranslateFunc
    noTranslateFunc = Maybe TranslateFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TranslateFunc` into a `C_TranslateFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CString
    result'

    -- callback ThreadFunc
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = True
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "the return value of the thread"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "data passed to the thread"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the @func functions passed to g_thread_new()\nor g_thread_try_new()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ThreadFunc =
        Ptr () ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "data passed to the thread"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ThreadFunc :: FunPtr C_ThreadFunc -> C_ThreadFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ThreadFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ThreadFunc
        -> Ptr ()
        -- ^ /@data@/: data passed to the thread
        -> m (Ptr ())
        -- ^ __Returns:__ the return value of the thread
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_ThreadFunc`.
    foreign import ccall "wrapper"
        mk_ThreadFunc :: C_ThreadFunc -> IO (FunPtr C_ThreadFunc)

    -- | Specifies the type of the /@func@/ functions passed to 'GI.GLib.Structs.Thread.threadNew'
    -- or 'GI.GLib.Structs.Thread.threadTryNew'.
    type ThreadFunc =
        Ptr ()
        -- ^ /@data@/: data passed to the thread
        -> IO (Ptr ())
        -- ^ __Returns:__ the return value of the thread

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ThreadFunc`@.
    noThreadFunc :: Maybe ThreadFunc
    noThreadFunc :: Maybe C_ThreadFunc
    noThreadFunc = Maybe C_ThreadFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ThreadFunc` into a `C_ThreadFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback TestLogFatalFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "%TRUE if the program should abort, %FALSE otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "log_domain"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the log domain of the message"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "log_level"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the log level of the message (including the fatal and recursion flags)"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "message"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the message to process"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "user data, set in g_test_log_set_fatal_handler()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just "Specifies the prototype of fatal log handler functions."
            , sinceVersion = Just "2.22"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TestLogFatalFunc =
        CString ->
        CInt ->
        CString ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "log_domain"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the log domain of the message"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "log_level"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the log level of the message (including the fatal and recursion flags)"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "message"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the message to process"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "user data, set in g_test_log_set_fatal_handler()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TestLogFatalFunc :: FunPtr C_TestLogFatalFunc -> C_TestLogFatalFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TestLogFatalFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TestLogFatalFunc
        -> T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> Ptr ()
        -- ^ /@userData@/: user data, set in @/g_test_log_set_fatal_handler()/@
        -> m Bool
        -- ^ __Returns:__ 'P.True' if the program should abort, 'P.False' otherwise
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_TestLogFatalFunc`.
    foreign import ccall "wrapper"
        mk_TestLogFatalFunc :: C_TestLogFatalFunc -> IO (FunPtr C_TestLogFatalFunc)

    -- | Specifies the prototype of fatal log handler functions.
    --
    -- /Since: 2.22/
    type TestLogFatalFunc =
        T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if the program should abort, 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestLogFatalFunc`@.
    noTestLogFatalFunc :: Maybe TestLogFatalFunc
    noTestLogFatalFunc :: Maybe TestLogFatalFunc
    noTestLogFatalFunc = Maybe TestLogFatalFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the prototype of fatal log handler functions.
    --
    -- /Since: 2.22/
    type TestLogFatalFunc_WithClosures =
        T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> Ptr ()
        -- ^ /@userData@/: user data, set in @/g_test_log_set_fatal_handler()/@
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if the program should abort, 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestLogFatalFunc_WithClosures`@.
    noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures
    noTestLogFatalFunc_WithClosures :: Maybe TestLogFatalFunc_WithClosures
    noTestLogFatalFunc_WithClosures = Maybe TestLogFatalFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TestLogFatalFunc` into a `C_TestLogFatalFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback TestFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args = []
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText = Just "The type used for test case functions."
            , sinceVersion = Just "2.28"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TestFunc =
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_TestFunc :: FunPtr C_TestFunc -> C_TestFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_TestFunc`.
    foreign import ccall "wrapper"
        mk_TestFunc :: C_TestFunc -> IO (FunPtr C_TestFunc)

    -- | The type used for test case functions.
    --
    -- /Since: 2.28/
    type TestFunc =
        IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestFunc`@.
    noTestFunc :: Maybe TestFunc
    noTestFunc :: Maybe C_VoidFunc
    noTestFunc = Maybe C_VoidFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TestFunc` into a `C_TestFunc`.
    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

    -- callback TestFixtureFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "fixture"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the test fixture" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the data provided when registering the test"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type used for functions that operate on test fixtures.  This is\nused for the fixture setup and teardown functions as well as for the\ntestcases themselves.\n\n@user_data is a pointer to the data that was given when registering\nthe test case.\n\n@fixture will be a pointer to the area of memory allocated by the\ntest framework, of the size requested.  If the requested size was\nzero then @fixture will be equal to @user_data."
            , sinceVersion = Just "2.28"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TestFixtureFunc =
        Ptr () ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "fixture"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the test fixture" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data provided when registering the test"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TestFixtureFunc :: FunPtr C_TestFixtureFunc -> C_TestFixtureFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TestFixtureFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TestFixtureFunc
        -> Ptr ()
        -- ^ /@fixture@/: the test fixture
        -> Ptr ()
        -- ^ /@userData@/: the data provided when registering the test
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_TestFixtureFunc`.
    foreign import ccall "wrapper"
        mk_TestFixtureFunc :: C_TestFixtureFunc -> IO (FunPtr C_TestFixtureFunc)

    -- | The type used for functions that operate on test fixtures.  This is
    -- used for the fixture setup and teardown functions as well as for the
    -- testcases themselves.
    --
    -- /@userData@/ is a pointer to the data that was given when registering
    -- the test case.
    --
    -- /@fixture@/ will be a pointer to the area of memory allocated by the
    -- test framework, of the size requested.  If the requested size was
    -- zero then /@fixture@/ will be equal to /@userData@/.
    --
    -- /Since: 2.28/
    type TestFixtureFunc =
        Ptr ()
        -- ^ /@fixture@/: the test fixture
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestFixtureFunc`@.
    noTestFixtureFunc :: Maybe TestFixtureFunc
    noTestFixtureFunc :: Maybe TestFixtureFunc
    noTestFixtureFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | The type used for functions that operate on test fixtures.  This is
    -- used for the fixture setup and teardown functions as well as for the
    -- testcases themselves.
    --
    -- /@userData@/ is a pointer to the data that was given when registering
    -- the test case.
    --
    -- /@fixture@/ will be a pointer to the area of memory allocated by the
    -- test framework, of the size requested.  If the requested size was
    -- zero then /@fixture@/ will be equal to /@userData@/.
    --
    -- /Since: 2.28/
    type TestFixtureFunc_WithClosures =
        Ptr ()
        -- ^ /@fixture@/: the test fixture
        -> Ptr ()
        -- ^ /@userData@/: the data provided when registering the test
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestFixtureFunc_WithClosures`@.
    noTestFixtureFunc_WithClosures :: Maybe TestFixtureFunc_WithClosures
    noTestFixtureFunc_WithClosures :: Maybe C_TestFixtureFunc
    noTestFixtureFunc_WithClosures = Maybe C_TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_TestFixtureFunc :: TestFixtureFunc -> TestFixtureFunc_WithClosures
    drop_closures_TestFixtureFunc :: TestFixtureFunc -> C_TestFixtureFunc
    drop_closures_TestFixtureFunc TestFixtureFunc
    _f Ptr ()
    fixture Ptr ()
    _ = TestFixtureFunc
    _f Ptr ()
    fixture

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TestFixtureFunc` into a `C_TestFixtureFunc`.
    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

    -- callback TestDataFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the data provided when registering the test"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type used for test case functions that take an extra pointer\nargument."
            , sinceVersion = Just "2.28"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_TestDataFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data provided when registering the test"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_TestDataFunc :: FunPtr C_TestDataFunc -> C_TestDataFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_TestDataFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_TestDataFunc
        -> Ptr ()
        -- ^ /@userData@/: the data provided when registering the test
        -> m ()
    dynamic_TestDataFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_TestDataFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    userData = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_TestDataFunc`.
    foreign import ccall "wrapper"
        mk_TestDataFunc :: C_TestDataFunc -> IO (FunPtr C_TestDataFunc)

    -- | The type used for test case functions that take an extra pointer
    -- argument.
    --
    -- /Since: 2.28/
    type TestDataFunc =
        IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestDataFunc`@.
    noTestDataFunc :: Maybe TestDataFunc
    noTestDataFunc :: Maybe C_VoidFunc
    noTestDataFunc = Maybe C_VoidFunc
    forall a. Maybe a
    Nothing

    -- | The type used for test case functions that take an extra pointer
    -- argument.
    --
    -- /Since: 2.28/
    type TestDataFunc_WithClosures =
        Ptr ()
        -- ^ /@userData@/: the data provided when registering the test
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `TestDataFunc_WithClosures`@.
    noTestDataFunc_WithClosures :: Maybe TestDataFunc_WithClosures
    noTestDataFunc_WithClosures :: Maybe TestFixtureFunc
    noTestDataFunc_WithClosures = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_TestDataFunc :: TestDataFunc -> TestDataFunc_WithClosures
    drop_closures_TestDataFunc :: C_VoidFunc -> TestFixtureFunc
    drop_closures_TestDataFunc C_VoidFunc
    _f Ptr ()
    _ = C_VoidFunc
    _f

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `TestDataFunc` into a `C_TestDataFunc`.
    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

    -- callback SpawnChildSetupFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to the function."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the setup function passed to g_spawn_async(),\ng_spawn_sync() and g_spawn_async_with_pipes(), which can, in very\nlimited ways, be used to affect the child's execution.\n\nOn POSIX platforms, the function is called in the child after GLib\nhas performed all the setup it plans to perform, but before calling\nexec(). Actions taken in this function will only affect the child,\nnot the parent.\n\nOn Windows, the function is called in the parent. Its usefulness on\nWindows is thus questionable. In many cases executing the child setup\nfunction in the parent can have ill effects, and you should be very\ncareful when porting software to Windows that uses child setup\nfunctions.\n\nHowever, even on POSIX, you are extremely limited in what you can\nsafely do from a #GSpawnChildSetupFunc, because any mutexes that were\nheld by other threads in the parent process at the time of the fork()\nwill still be locked in the child process, and they will never be\nunlocked (since the threads that held them don't exist in the child).\nPOSIX allows only async-signal-safe functions (see signal(7)) to be\ncalled in the child between fork() and exec(), which drastically limits\nthe usefulness of child setup functions.\n\nIn particular, it is not safe to call any function which may\ncall malloc(), which includes POSIX functions such as setenv().\nIf you need to set up the child environment differently from\nthe parent, you should use g_get_environ(), g_environ_setenv(),\nand g_environ_unsetenv(), and then pass the complete environment\nlist to the `g_spawn...` function."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SpawnChildSetupFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to the function."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SpawnChildSetupFunc :: FunPtr C_SpawnChildSetupFunc -> C_SpawnChildSetupFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SpawnChildSetupFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SpawnChildSetupFunc
        -> Ptr ()
        -- ^ /@data@/: user data passed to the function.
        -> m ()
    dynamic_SpawnChildSetupFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_SpawnChildSetupFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    data_ = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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 ()
    data_
        () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SpawnChildSetupFunc`.
    foreign import ccall "wrapper"
        mk_SpawnChildSetupFunc :: C_SpawnChildSetupFunc -> IO (FunPtr C_SpawnChildSetupFunc)

    -- | Specifies the type of the setup function passed to 'GI.GLib.Functions.spawnAsync',
    -- 'GI.GLib.Functions.spawnSync' and 'GI.GLib.Functions.spawnAsyncWithPipes', which can, in very
    -- limited ways, be used to affect the child\'s execution.
    --
    -- On POSIX platforms, the function is called in the child after GLib
    -- has performed all the setup it plans to perform, but before calling
    -- @/exec()/@. Actions taken in this function will only affect the child,
    -- not the parent.
    --
    -- On Windows, the function is called in the parent. Its usefulness on
    -- Windows is thus questionable. In many cases executing the child setup
    -- function in the parent can have ill effects, and you should be very
    -- careful when porting software to Windows that uses child setup
    -- functions.
    --
    -- However, even on POSIX, you are extremely limited in what you can
    -- safely do from a t'GI.GLib.Callbacks.SpawnChildSetupFunc', because any mutexes that were
    -- held by other threads in the parent process at the time of the @/fork()/@
    -- will still be locked in the child process, and they will never be
    -- unlocked (since the threads that held them don\'t exist in the child).
    -- POSIX allows only async-signal-safe functions (see signal(7)) to be
    -- called in the child between @/fork()/@ and @/exec()/@, which drastically limits
    -- the usefulness of child setup functions.
    --
    -- In particular, it is not safe to call any function which may
    -- call @/malloc()/@, which includes POSIX functions such as @/setenv()/@.
    -- If you need to set up the child environment differently from
    -- the parent, you should use 'GI.GLib.Functions.getEnviron', 'GI.GLib.Functions.environSetenv',
    -- and 'GI.GLib.Functions.environUnsetenv', and then pass the complete environment
    -- list to the @g_spawn...@ function.
    type SpawnChildSetupFunc =
        Ptr ()
        -- ^ /@data@/: user data passed to the function.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SpawnChildSetupFunc`@.
    noSpawnChildSetupFunc :: Maybe SpawnChildSetupFunc
    noSpawnChildSetupFunc :: Maybe TestFixtureFunc
    noSpawnChildSetupFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_SpawnChildSetupFunc :: MonadIO m => SpawnChildSetupFunc -> m (GClosure C_SpawnChildSetupFunc)
    genClosure_SpawnChildSetupFunc :: forall (m :: * -> *).
    MonadIO m =>
    TestFixtureFunc -> m (GClosure TestFixtureFunc)
    genClosure_SpawnChildSetupFunc TestFixtureFunc
    cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
    forall a. IO a -> m a
    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_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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SpawnChildSetupFunc` into a `C_SpawnChildSetupFunc`.
    wrap_SpawnChildSetupFunc ::
        Maybe (Ptr (FunPtr C_SpawnChildSetupFunc)) ->
        SpawnChildSetupFunc ->
        C_SpawnChildSetupFunc
    wrap_SpawnChildSetupFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
    -> TestFixtureFunc -> TestFixtureFunc
    wrap_SpawnChildSetupFunc 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

    -- callback SourceOnceFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "data passed to the function, set when the source was\n  created"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "A source function that is only called once before being removed from the main\ncontext automatically.\n\nSee: [func@GLib.idle_add_once], [func@GLib.timeout_add_once]"
            , sinceVersion = Just "2.74"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceOnceFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "data passed to the function, set when the source was\n  created"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceOnceFunc :: FunPtr C_SourceOnceFunc -> C_SourceOnceFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceOnceFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceOnceFunc
        -> Ptr ()
        -- ^ /@userData@/: data passed to the function, set when the source was
        --   created
        -> m ()
    dynamic_SourceOnceFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_SourceOnceFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    userData = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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_SourceOnceFunc FunPtr TestFixtureFunc
    __funPtr) Ptr ()
    userData
        () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceOnceFunc`.
    foreign import ccall "wrapper"
        mk_SourceOnceFunc :: C_SourceOnceFunc -> IO (FunPtr C_SourceOnceFunc)

    -- | A source function that is only called once before being removed from the main
    -- context automatically.
    --
    -- See: @/GLib.idle_add_once/@, @/GLib.timeout_add_once/@
    --
    -- /Since: 2.74/
    type SourceOnceFunc =
        IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceOnceFunc`@.
    noSourceOnceFunc :: Maybe SourceOnceFunc
    noSourceOnceFunc :: Maybe C_VoidFunc
    noSourceOnceFunc = Maybe C_VoidFunc
    forall a. Maybe a
    Nothing

    -- | A source function that is only called once before being removed from the main
    -- context automatically.
    --
    -- See: @/GLib.idle_add_once/@, @/GLib.timeout_add_once/@
    --
    -- /Since: 2.74/
    type SourceOnceFunc_WithClosures =
        Ptr ()
        -- ^ /@userData@/: data passed to the function, set when the source was
        --   created
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceOnceFunc_WithClosures`@.
    noSourceOnceFunc_WithClosures :: Maybe SourceOnceFunc_WithClosures
    noSourceOnceFunc_WithClosures :: Maybe TestFixtureFunc
    noSourceOnceFunc_WithClosures = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_SourceOnceFunc :: SourceOnceFunc -> SourceOnceFunc_WithClosures
    drop_closures_SourceOnceFunc :: C_VoidFunc -> TestFixtureFunc
    drop_closures_SourceOnceFunc C_VoidFunc
    _f Ptr ()
    _ = C_VoidFunc
    _f

    -- | Wrap the callback into a `GClosure`.
    genClosure_SourceOnceFunc :: MonadIO m => SourceOnceFunc -> m (GClosure C_SourceOnceFunc)
    genClosure_SourceOnceFunc :: forall (m :: * -> *).
    MonadIO m =>
    C_VoidFunc -> m (GClosure TestFixtureFunc)
    genClosure_SourceOnceFunc C_VoidFunc
    cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
    forall a. IO a -> m a
    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_SourceOnceFunc C_VoidFunc
    cb
        let cb'' :: TestFixtureFunc
    cb'' = Maybe (Ptr (FunPtr TestFixtureFunc))
    -> TestFixtureFunc -> TestFixtureFunc
    wrap_SourceOnceFunc Maybe (Ptr (FunPtr TestFixtureFunc))
    forall a. Maybe a
    Nothing TestFixtureFunc
    cb'
        TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
    mk_SourceOnceFunc TestFixtureFunc
    cb'' IO (FunPtr TestFixtureFunc)
    -> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
    -> IO (GClosure TestFixtureFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    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 a `SourceOnceFunc` into a `C_SourceOnceFunc`.
    wrap_SourceOnceFunc ::
        Maybe (Ptr (FunPtr C_SourceOnceFunc)) ->
        SourceOnceFunc_WithClosures ->
        C_SourceOnceFunc
    wrap_SourceOnceFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
    -> TestFixtureFunc -> TestFixtureFunc
    wrap_SourceOnceFunc 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

    -- callback SourceFuncsPrepareFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "%TRUE if the source is ready, %FALSE otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "source"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "Source" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "timeout_"
              , argType = TBasicType TInt
              , direction = DirectionOut
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the maximum timeout (in milliseconds) which should be passed to the poll call"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferEverything
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Checks the source for readiness.\n\nCalled before all the file descriptors are polled. If the\nsource can determine that it is ready here (without waiting for the\nresults of the poll call) it should return %TRUE. It can also return\na @timeout_ value which should be the maximum timeout (in milliseconds)\nwhich should be passed to the poll call. The actual timeout used will\nbe `-1` if all sources returned `-1`, or it will be the minimum of all\nthe @timeout_ values returned which were greater than or equal to `0`.\nIf the prepare function returns a timeout and the source also has a\nready time set, then the lower of the two will be used.\n\nSince 2.36 this may be `NULL`, in which case the effect is as if the\nfunction always returns `FALSE` with a timeout of `-1`."
            , sinceVersion = Just "2.82"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceFuncsPrepareFunc =
        Ptr GLib.Source.Source ->
        Ptr Int32 ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "source"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "Source" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "timeout_"
    --           , argType = TBasicType TInt
    --           , direction = DirectionOut
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the maximum timeout (in milliseconds) which should be passed to the poll call"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferEverything
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceFuncsPrepareFunc :: FunPtr C_SourceFuncsPrepareFunc -> C_SourceFuncsPrepareFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceFuncsPrepareFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceFuncsPrepareFunc
        -> GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> m ((Bool, Int32))
        -- ^ __Returns:__ 'P.True' if the source is ready, 'P.False' otherwise
    dynamic_SourceFuncsPrepareFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_SourceFuncsPrepareFunc -> Source -> m (Bool, Int32)
    dynamic_SourceFuncsPrepareFunc FunPtr C_SourceFuncsPrepareFunc
    __funPtr Source
    source = IO (Bool, Int32) -> m (Bool, Int32)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (Bool, Int32) -> m (Bool, Int32))
    -> IO (Bool, Int32) -> m (Bool, Int32)
    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
        Ptr Int32
    timeout_ <- IO (Ptr Int32)
    forall a. Storable a => IO (Ptr a)
    allocMem :: IO (Ptr Int32)
        CInt
    result <- (FunPtr C_SourceFuncsPrepareFunc -> C_SourceFuncsPrepareFunc
    __dynamic_C_SourceFuncsPrepareFunc FunPtr C_SourceFuncsPrepareFunc
    __funPtr) Ptr Source
    source' Ptr Int32
    timeout_
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        Int32
    timeout_' <- Ptr Int32 -> IO Int32
    forall a. Storable a => Ptr a -> IO a
    peek Ptr Int32
    timeout_
        Source -> C_VoidFunc
    forall a. ManagedPtrNewtype a => a -> C_VoidFunc
    touchManagedPtr Source
    source
        Ptr Int32 -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem Ptr Int32
    timeout_
        (Bool, Int32) -> IO (Bool, Int32)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Bool
    result', Int32
    timeout_')

    -- | Generate a function pointer callable from C code, from a `C_SourceFuncsPrepareFunc`.
    foreign import ccall "wrapper"
        mk_SourceFuncsPrepareFunc :: C_SourceFuncsPrepareFunc -> IO (FunPtr C_SourceFuncsPrepareFunc)

    -- | Checks the source for readiness.
    --
    -- Called before all the file descriptors are polled. If the
    -- source can determine that it is ready here (without waiting for the
    -- results of the poll call) it should return 'P.True'. It can also return
    -- a /@timeout_@/ value which should be the maximum timeout (in milliseconds)
    -- which should be passed to the poll call. The actual timeout used will
    -- be @-1@ if all sources returned @-1@, or it will be the minimum of all
    -- the /@timeout_@/ values returned which were greater than or equal to @0@.
    -- If the prepare function returns a timeout and the source also has a
    -- ready time set, then the lower of the two will be used.
    --
    -- Since 2.36 this may be @NULL@, in which case the effect is as if the
    -- function always returns @FALSE@ with a timeout of @-1@.
    --
    -- /Since: 2.82/
    type SourceFuncsPrepareFunc =
        GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> IO ((Bool, Int32))
        -- ^ __Returns:__ 'P.True' if the source is ready, 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceFuncsPrepareFunc`@.
    noSourceFuncsPrepareFunc :: Maybe SourceFuncsPrepareFunc
    noSourceFuncsPrepareFunc :: Maybe SourceFuncsPrepareFunc
    noSourceFuncsPrepareFunc = Maybe SourceFuncsPrepareFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_SourceFuncsPrepareFunc :: MonadIO m => SourceFuncsPrepareFunc -> m (GClosure C_SourceFuncsPrepareFunc)
    genClosure_SourceFuncsPrepareFunc :: forall (m :: * -> *).
    MonadIO m =>
    SourceFuncsPrepareFunc -> m (GClosure C_SourceFuncsPrepareFunc)
    genClosure_SourceFuncsPrepareFunc SourceFuncsPrepareFunc
    cb = IO (GClosure C_SourceFuncsPrepareFunc)
    -> m (GClosure C_SourceFuncsPrepareFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_SourceFuncsPrepareFunc)
     -> m (GClosure C_SourceFuncsPrepareFunc))
    -> IO (GClosure C_SourceFuncsPrepareFunc)
    -> m (GClosure C_SourceFuncsPrepareFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_SourceFuncsPrepareFunc
    cb' = Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc))
    -> SourceFuncsPrepareFunc -> C_SourceFuncsPrepareFunc
    wrap_SourceFuncsPrepareFunc Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc))
    forall a. Maybe a
    Nothing SourceFuncsPrepareFunc
    cb
        C_SourceFuncsPrepareFunc -> IO (FunPtr C_SourceFuncsPrepareFunc)
    mk_SourceFuncsPrepareFunc C_SourceFuncsPrepareFunc
    cb' IO (FunPtr C_SourceFuncsPrepareFunc)
    -> (FunPtr C_SourceFuncsPrepareFunc
        -> IO (GClosure C_SourceFuncsPrepareFunc))
    -> IO (GClosure C_SourceFuncsPrepareFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_SourceFuncsPrepareFunc
    -> IO (GClosure C_SourceFuncsPrepareFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `SourceFuncsPrepareFunc` into a `C_SourceFuncsPrepareFunc`.
    wrap_SourceFuncsPrepareFunc ::
        Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc)) ->
        SourceFuncsPrepareFunc ->
        C_SourceFuncsPrepareFunc
    wrap_SourceFuncsPrepareFunc :: Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc))
    -> SourceFuncsPrepareFunc -> C_SourceFuncsPrepareFunc
    wrap_SourceFuncsPrepareFunc Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc))
    gi'funptrptr SourceFuncsPrepareFunc
    gi'cb Ptr Source
    source Ptr 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, Int32
    outtimeout_) <- SourceFuncsPrepareFunc
    gi'cb  Source
    source'
            Ptr Int32 -> Int32 -> C_VoidFunc
    forall a. Storable a => Ptr a -> a -> C_VoidFunc
    poke Ptr Int32
    timeout_ Int32
    outtimeout_
            Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsPrepareFunc))
    gi'funptrptr
            let result' :: CInt
    result' = (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    P.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
    P.fromEnum) Bool
    result
            CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback SourceFuncsFinalizeFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "source"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "Source" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Finalizes the source.\n\nCalled when the source is finalized. At this point, the source\nwill have been destroyed, had its callback cleared, and have been removed\nfrom its [type@GLib.MainContext], but it will still have its final reference\ncount, so methods can be called on it from within this function."
            , sinceVersion = Just "2.82"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceFuncsFinalizeFunc =
        Ptr GLib.Source.Source ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "source"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "Source" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceFuncsFinalizeFunc :: FunPtr C_SourceFuncsFinalizeFunc -> C_SourceFuncsFinalizeFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceFuncsFinalizeFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceFuncsFinalizeFunc
        -> GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> m ()
    dynamic_SourceFuncsFinalizeFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_SourceFuncsFinalizeFunc -> Source -> m ()
    dynamic_SourceFuncsFinalizeFunc FunPtr C_SourceFuncsFinalizeFunc
    __funPtr Source
    source = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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_SourceFuncsFinalizeFunc -> C_SourceFuncsFinalizeFunc
    __dynamic_C_SourceFuncsFinalizeFunc FunPtr C_SourceFuncsFinalizeFunc
    __funPtr) Ptr Source
    source'
        Source -> C_VoidFunc
    forall a. ManagedPtrNewtype a => a -> C_VoidFunc
    touchManagedPtr Source
    source
        () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceFuncsFinalizeFunc`.
    foreign import ccall "wrapper"
        mk_SourceFuncsFinalizeFunc :: C_SourceFuncsFinalizeFunc -> IO (FunPtr C_SourceFuncsFinalizeFunc)

    -- | Finalizes the source.
    --
    -- Called when the source is finalized. At this point, the source
    -- will have been destroyed, had its callback cleared, and have been removed
    -- from its [type/@gLib@/.MainContext], but it will still have its final reference
    -- count, so methods can be called on it from within this function.
    --
    -- /Since: 2.82/
    type SourceFuncsFinalizeFunc =
        GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceFuncsFinalizeFunc`@.
    noSourceFuncsFinalizeFunc :: Maybe SourceFuncsFinalizeFunc
    noSourceFuncsFinalizeFunc :: Maybe (Source -> C_VoidFunc)
    noSourceFuncsFinalizeFunc = Maybe (Source -> C_VoidFunc)
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_SourceFuncsFinalizeFunc :: MonadIO m => SourceFuncsFinalizeFunc -> m (GClosure C_SourceFuncsFinalizeFunc)
    genClosure_SourceFuncsFinalizeFunc :: forall (m :: * -> *).
    MonadIO m =>
    (Source -> C_VoidFunc) -> m (GClosure C_SourceFuncsFinalizeFunc)
    genClosure_SourceFuncsFinalizeFunc Source -> C_VoidFunc
    cb = IO (GClosure C_SourceFuncsFinalizeFunc)
    -> m (GClosure C_SourceFuncsFinalizeFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_SourceFuncsFinalizeFunc)
     -> m (GClosure C_SourceFuncsFinalizeFunc))
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    -> m (GClosure C_SourceFuncsFinalizeFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_SourceFuncsFinalizeFunc
    cb' = Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    -> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFunc
    wrap_SourceFuncsFinalizeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    forall a. Maybe a
    Nothing Source -> C_VoidFunc
    cb
        C_SourceFuncsFinalizeFunc -> IO (FunPtr C_SourceFuncsFinalizeFunc)
    mk_SourceFuncsFinalizeFunc C_SourceFuncsFinalizeFunc
    cb' IO (FunPtr C_SourceFuncsFinalizeFunc)
    -> (FunPtr C_SourceFuncsFinalizeFunc
        -> IO (GClosure C_SourceFuncsFinalizeFunc))
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_SourceFuncsFinalizeFunc
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `SourceFuncsFinalizeFunc` into a `C_SourceFuncsFinalizeFunc`.
    wrap_SourceFuncsFinalizeFunc ::
        Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc)) ->
        SourceFuncsFinalizeFunc ->
        C_SourceFuncsFinalizeFunc
    wrap_SourceFuncsFinalizeFunc :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    -> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFunc
    wrap_SourceFuncsFinalizeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    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_SourceFuncsFinalizeFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    gi'funptrptr

    -- callback SourceFuncsCheckFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "%TRUE if ready to be dispatched, %FALSE otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "source"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "Source" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Checks if the source is ready to be dispatched.\n\nCalled after all the file descriptors are polled. The source\nshould return %TRUE if it is ready to be dispatched. Note that some\ntime may have passed since the previous prepare function was called,\nso the source should be checked again here.\n\nSince 2.36 this may be `NULL`, in which case the effect is\nas if the function always returns `FALSE`."
            , sinceVersion = Just "2.82"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceFuncsCheckFunc =
        Ptr GLib.Source.Source ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "source"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "Source" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The #GSource" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceFuncsCheckFunc :: FunPtr C_SourceFuncsCheckFunc -> C_SourceFuncsCheckFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceFuncsCheckFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceFuncsCheckFunc
        -> GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> m Bool
        -- ^ __Returns:__ 'P.True' if ready to be dispatched, 'P.False' otherwise
    dynamic_SourceFuncsCheckFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_SourceFuncsCheckFunc -> Source -> m Bool
    dynamic_SourceFuncsCheckFunc FunPtr C_SourceFuncsCheckFunc
    __funPtr Source
    source = IO Bool -> m Bool
    forall a. IO a -> m a
    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_SourceFuncsCheckFunc -> C_SourceFuncsCheckFunc
    __dynamic_C_SourceFuncsCheckFunc FunPtr C_SourceFuncsCheckFunc
    __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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_SourceFuncsCheckFunc`.
    foreign import ccall "wrapper"
        mk_SourceFuncsCheckFunc :: C_SourceFuncsCheckFunc -> IO (FunPtr C_SourceFuncsCheckFunc)

    -- | Checks if the source is ready to be dispatched.
    --
    -- Called after all the file descriptors are polled. The source
    -- should return 'P.True' if it is ready to be dispatched. Note that some
    -- time may have passed since the previous prepare function was called,
    -- so the source should be checked again here.
    --
    -- Since 2.36 this may be @NULL@, in which case the effect is
    -- as if the function always returns @FALSE@.
    --
    -- /Since: 2.82/
    type SourceFuncsCheckFunc =
        GLib.Source.Source
        -- ^ /@source@/: The t'GI.GLib.Structs.Source.Source'
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if ready to be dispatched, 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceFuncsCheckFunc`@.
    noSourceFuncsCheckFunc :: Maybe SourceFuncsCheckFunc
    noSourceFuncsCheckFunc :: Maybe SourceFuncsCheckFunc
    noSourceFuncsCheckFunc = Maybe SourceFuncsCheckFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_SourceFuncsCheckFunc :: MonadIO m => SourceFuncsCheckFunc -> m (GClosure C_SourceFuncsCheckFunc)
    genClosure_SourceFuncsCheckFunc :: forall (m :: * -> *).
    MonadIO m =>
    SourceFuncsCheckFunc -> m (GClosure C_SourceFuncsCheckFunc)
    genClosure_SourceFuncsCheckFunc SourceFuncsCheckFunc
    cb = IO (GClosure C_SourceFuncsCheckFunc)
    -> m (GClosure C_SourceFuncsCheckFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_SourceFuncsCheckFunc)
     -> m (GClosure C_SourceFuncsCheckFunc))
    -> IO (GClosure C_SourceFuncsCheckFunc)
    -> m (GClosure C_SourceFuncsCheckFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_SourceFuncsCheckFunc
    cb' = Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc))
    -> SourceFuncsCheckFunc -> C_SourceFuncsCheckFunc
    wrap_SourceFuncsCheckFunc Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc))
    forall a. Maybe a
    Nothing SourceFuncsCheckFunc
    cb
        C_SourceFuncsCheckFunc -> IO (FunPtr C_SourceFuncsCheckFunc)
    mk_SourceFuncsCheckFunc C_SourceFuncsCheckFunc
    cb' IO (FunPtr C_SourceFuncsCheckFunc)
    -> (FunPtr C_SourceFuncsCheckFunc
        -> IO (GClosure C_SourceFuncsCheckFunc))
    -> IO (GClosure C_SourceFuncsCheckFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_SourceFuncsCheckFunc
    -> IO (GClosure C_SourceFuncsCheckFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `SourceFuncsCheckFunc` into a `C_SourceFuncsCheckFunc`.
    wrap_SourceFuncsCheckFunc ::
        Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc)) ->
        SourceFuncsCheckFunc ->
        C_SourceFuncsCheckFunc
    wrap_SourceFuncsCheckFunc :: Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc))
    -> SourceFuncsCheckFunc -> C_SourceFuncsCheckFunc
    wrap_SourceFuncsCheckFunc Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc))
    gi'funptrptr SourceFuncsCheckFunc
    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 <- SourceFuncsCheckFunc
    gi'cb  Source
    source'
            Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsCheckFunc))
    gi'funptrptr
            let result' :: CInt
    result' = (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    P.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
    P.fromEnum) Bool
    result
            CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback SourceFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "%FALSE if the source should be removed.\n[const@GLib.SOURCE_CONTINUE] and [const@GLib.SOURCE_REMOVE] are more\nmemorable names for the return value."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "data passed to the function, set when the source was\n    created with one of the above functions"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to [func@GLib.timeout_add],\n[func@GLib.timeout_add_full], [func@GLib.idle_add], and\n[func@GLib.idle_add_full].\n\nWhen calling [method@GLib.Source.set_callback], you may need to cast a\nfunction of a different type to this type. Use [func@GLib.SOURCE_FUNC] to\navoid warnings about incompatible function types."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceFunc =
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "data passed to the function, set when the source was\n    created with one of the above functions"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceFunc :: FunPtr C_SourceFunc -> C_SourceFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceFunc
        -> Ptr ()
        -- ^ /@userData@/: data passed to the function, set when the source was
        --     created with one of the above functions
        -> m Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed.
        -- [const/@gLib@/.SOURCE_CONTINUE] and [const/@gLib@/.SOURCE_REMOVE] are more
        -- memorable names for the return value.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_SourceFunc`.
    foreign import ccall "wrapper"
        mk_SourceFunc :: C_SourceFunc -> IO (FunPtr C_SourceFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Functions.timeoutAdd',
    -- @/GLib.timeout_add_full/@, 'GI.GLib.Functions.idleAdd', and
    -- @/GLib.idle_add_full/@.
    --
    -- When calling 'GI.GLib.Structs.Source.sourceSetCallback', you may need to cast a
    -- function of a different type to this type. Use @/GLib.SOURCE_FUNC/@ to
    -- avoid warnings about incompatible function types.
    type SourceFunc =
        IO Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed.
        -- [const/@gLib@/.SOURCE_CONTINUE] and [const/@gLib@/.SOURCE_REMOVE] are more
        -- memorable names for the return value.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceFunc`@.
    noSourceFunc :: Maybe SourceFunc
    noSourceFunc :: Maybe (IO Bool)
    noSourceFunc = Maybe (IO Bool)
    forall a. Maybe a
    Nothing

    -- | Specifies the type of function passed to 'GI.GLib.Functions.timeoutAdd',
    -- @/GLib.timeout_add_full/@, 'GI.GLib.Functions.idleAdd', and
    -- @/GLib.idle_add_full/@.
    --
    -- When calling 'GI.GLib.Structs.Source.sourceSetCallback', you may need to cast a
    -- function of a different type to this type. Use @/GLib.SOURCE_FUNC/@ to
    -- avoid warnings about incompatible function types.
    type SourceFunc_WithClosures =
        Ptr ()
        -- ^ /@userData@/: data passed to the function, set when the source was
        --     created with one of the above functions
        -> IO Bool
        -- ^ __Returns:__ 'P.False' if the source should be removed.
        -- [const/@gLib@/.SOURCE_CONTINUE] and [const/@gLib@/.SOURCE_REMOVE] are more
        -- memorable names for the return value.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceFunc_WithClosures`@.
    noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures
    noSourceFunc_WithClosures :: Maybe SourceFunc_WithClosures
    noSourceFunc_WithClosures = Maybe SourceFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_SourceFunc :: SourceFunc -> SourceFunc_WithClosures
    drop_closures_SourceFunc :: IO Bool -> SourceFunc_WithClosures
    drop_closures_SourceFunc IO Bool
    _f Ptr ()
    _ = IO Bool
    _f

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SourceFunc` into a `C_SourceFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback SourceDummyMarshal
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args = []
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "This is just a placeholder for #GClosureMarshal,\nwhich cannot be used here for dependency reasons."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceDummyMarshal =
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_SourceDummyMarshal :: FunPtr C_SourceDummyMarshal -> C_SourceDummyMarshal

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceDummyMarshal`.
    foreign import ccall "wrapper"
        mk_SourceDummyMarshal :: C_SourceDummyMarshal -> IO (FunPtr C_SourceDummyMarshal)

    -- | This is just a placeholder for @/GClosureMarshal/@,
    -- which cannot be used here for dependency reasons.
    type SourceDummyMarshal =
        IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceDummyMarshal`@.
    noSourceDummyMarshal :: Maybe SourceDummyMarshal
    noSourceDummyMarshal :: Maybe C_VoidFunc
    noSourceDummyMarshal = Maybe C_VoidFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SourceDummyMarshal` into a `C_SourceDummyMarshal`.
    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

    -- callback SourceDisposeFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "source"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "Source" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "#GSource that is currently being disposed"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Dispose function for @source. See [method@GLib.Source.set_dispose_function]\nfor details."
            , sinceVersion = Just "2.64"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceDisposeFunc =
        Ptr GLib.Source.Source ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "source"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "Source" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "#GSource that is currently being disposed"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SourceDisposeFunc :: FunPtr C_SourceDisposeFunc -> C_SourceDisposeFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SourceDisposeFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SourceDisposeFunc
        -> GLib.Source.Source
        -- ^ /@source@/: t'GI.GLib.Structs.Source.Source' that is currently being disposed
        -> m ()
    dynamic_SourceDisposeFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_SourceFuncsFinalizeFunc -> Source -> m ()
    dynamic_SourceDisposeFunc FunPtr C_SourceFuncsFinalizeFunc
    __funPtr Source
    source = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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_SourceFuncsFinalizeFunc -> C_SourceFuncsFinalizeFunc
    __dynamic_C_SourceDisposeFunc FunPtr C_SourceFuncsFinalizeFunc
    __funPtr) Ptr Source
    source'
        Source -> C_VoidFunc
    forall a. ManagedPtrNewtype a => a -> C_VoidFunc
    touchManagedPtr Source
    source
        () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceDisposeFunc`.
    foreign import ccall "wrapper"
        mk_SourceDisposeFunc :: C_SourceDisposeFunc -> IO (FunPtr C_SourceDisposeFunc)

    -- | Dispose function for /@source@/. See t'GI.GLib.Structs.Source.Source'.@/set_dispose_function/@()
    -- for details.
    --
    -- /Since: 2.64/
    type SourceDisposeFunc =
        GLib.Source.Source
        -- ^ /@source@/: t'GI.GLib.Structs.Source.Source' that is currently being disposed
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceDisposeFunc`@.
    noSourceDisposeFunc :: Maybe SourceDisposeFunc
    noSourceDisposeFunc :: Maybe (Source -> C_VoidFunc)
    noSourceDisposeFunc = Maybe (Source -> C_VoidFunc)
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_SourceDisposeFunc :: MonadIO m => SourceDisposeFunc -> m (GClosure C_SourceDisposeFunc)
    genClosure_SourceDisposeFunc :: forall (m :: * -> *).
    MonadIO m =>
    (Source -> C_VoidFunc) -> m (GClosure C_SourceFuncsFinalizeFunc)
    genClosure_SourceDisposeFunc Source -> C_VoidFunc
    cb = IO (GClosure C_SourceFuncsFinalizeFunc)
    -> m (GClosure C_SourceFuncsFinalizeFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_SourceFuncsFinalizeFunc)
     -> m (GClosure C_SourceFuncsFinalizeFunc))
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    -> m (GClosure C_SourceFuncsFinalizeFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_SourceFuncsFinalizeFunc
    cb' = Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    -> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFunc
    wrap_SourceDisposeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    forall a. Maybe a
    Nothing Source -> C_VoidFunc
    cb
        C_SourceFuncsFinalizeFunc -> IO (FunPtr C_SourceFuncsFinalizeFunc)
    mk_SourceDisposeFunc C_SourceFuncsFinalizeFunc
    cb' IO (FunPtr C_SourceFuncsFinalizeFunc)
    -> (FunPtr C_SourceFuncsFinalizeFunc
        -> IO (GClosure C_SourceFuncsFinalizeFunc))
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_SourceFuncsFinalizeFunc
    -> IO (GClosure C_SourceFuncsFinalizeFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `SourceDisposeFunc` into a `C_SourceDisposeFunc`.
    wrap_SourceDisposeFunc ::
        Maybe (Ptr (FunPtr C_SourceDisposeFunc)) ->
        SourceDisposeFunc ->
        C_SourceDisposeFunc
    wrap_SourceDisposeFunc :: Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    -> (Source -> C_VoidFunc) -> C_SourceFuncsFinalizeFunc
    wrap_SourceDisposeFunc Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    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_SourceFuncsFinalizeFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_SourceFuncsFinalizeFunc))
    gi'funptrptr

    -- callback SourceCallbackFuncsUnrefFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "cb_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceCallbackFuncsUnrefFieldCallback =
        Ptr () ->
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_SourceCallbackFuncsUnrefFieldCallback :: FunPtr C_SourceCallbackFuncsUnrefFieldCallback -> C_SourceCallbackFuncsUnrefFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceCallbackFuncsUnrefFieldCallback`.
    foreign import ccall "wrapper"
        mk_SourceCallbackFuncsUnrefFieldCallback :: C_SourceCallbackFuncsUnrefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsUnrefFieldCallback)

    -- | /No description available in the introspection data./
    type SourceCallbackFuncsUnrefFieldCallback =
        Ptr ()
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceCallbackFuncsUnrefFieldCallback`@.
    noSourceCallbackFuncsUnrefFieldCallback :: Maybe SourceCallbackFuncsUnrefFieldCallback
    noSourceCallbackFuncsUnrefFieldCallback :: Maybe TestFixtureFunc
    noSourceCallbackFuncsUnrefFieldCallback = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SourceCallbackFuncsUnrefFieldCallback` into a `C_SourceCallbackFuncsUnrefFieldCallback`.
    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

    -- callback SourceCallbackFuncsRefFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "cb_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SourceCallbackFuncsRefFieldCallback =
        Ptr () ->
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_SourceCallbackFuncsRefFieldCallback :: FunPtr C_SourceCallbackFuncsRefFieldCallback -> C_SourceCallbackFuncsRefFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_SourceCallbackFuncsRefFieldCallback`.
    foreign import ccall "wrapper"
        mk_SourceCallbackFuncsRefFieldCallback :: C_SourceCallbackFuncsRefFieldCallback -> IO (FunPtr C_SourceCallbackFuncsRefFieldCallback)

    -- | /No description available in the introspection data./
    type SourceCallbackFuncsRefFieldCallback =
        Ptr ()
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SourceCallbackFuncsRefFieldCallback`@.
    noSourceCallbackFuncsRefFieldCallback :: Maybe SourceCallbackFuncsRefFieldCallback
    noSourceCallbackFuncsRefFieldCallback :: Maybe TestFixtureFunc
    noSourceCallbackFuncsRefFieldCallback = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SourceCallbackFuncsRefFieldCallback` into a `C_SourceCallbackFuncsRefFieldCallback`.
    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

    -- callback SequenceIterCompareFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "zero if the iterators are equal, a negative value if @a\n    comes before @b, and a positive value if @b comes before @a."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "a"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "SequenceIter" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GSequenceIter" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "b"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "SequenceIter" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GSequenceIter" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "A #GSequenceIterCompareFunc is a function used to compare iterators.\nIt must return zero if the iterators compare equal, a negative value\nif @a comes before @b, and a positive value if @b comes before @a."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_SequenceIterCompareFunc =
        Ptr GLib.SequenceIter.SequenceIter ->
        Ptr GLib.SequenceIter.SequenceIter ->
        Ptr () ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "a"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "SequenceIter" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSequenceIter" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "b"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "SequenceIter" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GSequenceIter" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_SequenceIterCompareFunc :: FunPtr C_SequenceIterCompareFunc -> C_SequenceIterCompareFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_SequenceIterCompareFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_SequenceIterCompareFunc
        -> GLib.SequenceIter.SequenceIter
        -- ^ /@a@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter'
        -> GLib.SequenceIter.SequenceIter
        -- ^ /@b@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter'
        -> Ptr ()
        -- ^ /@data@/: user data
        -> m Int32
        -- ^ __Returns:__ zero if the iterators are equal, a negative value if /@a@/
        --     comes before /@b@/, and a positive value if /@b@/ comes before /@a@/.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_SequenceIterCompareFunc`.
    foreign import ccall "wrapper"
        mk_SequenceIterCompareFunc :: C_SequenceIterCompareFunc -> IO (FunPtr C_SequenceIterCompareFunc)

    -- | A t'GI.GLib.Callbacks.SequenceIterCompareFunc' is a function used to compare iterators.
    -- It must return zero if the iterators compare equal, a negative value
    -- if /@a@/ comes before /@b@/, and a positive value if /@b@/ comes before /@a@/.
    type SequenceIterCompareFunc =
        GLib.SequenceIter.SequenceIter
        -- ^ /@a@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter'
        -> GLib.SequenceIter.SequenceIter
        -- ^ /@b@/: a t'GI.GLib.Structs.SequenceIter.SequenceIter'
        -> Ptr ()
        -- ^ /@data@/: user data
        -> IO Int32
        -- ^ __Returns:__ zero if the iterators are equal, a negative value if /@a@/
        --     comes before /@b@/, and a positive value if /@b@/ comes before /@a@/.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `SequenceIterCompareFunc`@.
    noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc
    noSequenceIterCompareFunc :: Maybe SequenceIterCompareFunc
    noSequenceIterCompareFunc = Maybe SequenceIterCompareFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `SequenceIterCompareFunc` into a `C_SequenceIterCompareFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback ScannerMsgFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "scanner"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "Scanner" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GScanner" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "message"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the message" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "error"
              , argType = TBasicType TBoolean
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "%TRUE if the message signals an error,\n    %FALSE if it signals a warning."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just "Specifies the type of the message handler function."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ScannerMsgFunc =
        Ptr GLib.Scanner.Scanner ->
        CString ->
        CInt ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "scanner"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "Scanner" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GScanner" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "message"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the message" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "error"
    --           , argType = TBasicType TBoolean
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "%TRUE if the message signals an error,\n    %FALSE if it signals a warning."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ScannerMsgFunc :: FunPtr C_ScannerMsgFunc -> C_ScannerMsgFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ScannerMsgFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ScannerMsgFunc
        -> GLib.Scanner.Scanner
        -- ^ /@scanner@/: a t'GI.GLib.Structs.Scanner.Scanner'
        -> T.Text
        -- ^ /@message@/: the message
        -> Bool
        -- ^ /@error@/: 'P.True' if the message signals an error,
        --     'P.False' if it signals a warning.
        -> 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 a. IO a -> m a
    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
    P.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
    P.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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ScannerMsgFunc`.
    foreign import ccall "wrapper"
        mk_ScannerMsgFunc :: C_ScannerMsgFunc -> IO (FunPtr C_ScannerMsgFunc)

    -- | Specifies the type of the message handler function.
    type ScannerMsgFunc =
        GLib.Scanner.Scanner
        -- ^ /@scanner@/: a t'GI.GLib.Structs.Scanner.Scanner'
        -> T.Text
        -- ^ /@message@/: the message
        -> Bool
        -- ^ /@error@/: 'P.True' if the message signals an error,
        --     'P.False' if it signals a warning.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ScannerMsgFunc`@.
    noScannerMsgFunc :: Maybe ScannerMsgFunc
    noScannerMsgFunc :: Maybe ScannerMsgFunc
    noScannerMsgFunc = Maybe ScannerMsgFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ScannerMsgFunc` into a `C_ScannerMsgFunc`.
    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

    -- callback RegexEvalCallback
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "%FALSE to continue the replacement process, %TRUE to stop it"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "match_info"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "MatchInfo" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the #GMatchInfo generated by the match.\n    Use g_match_info_get_regex() and g_match_info_get_string() if you\n    need the #GRegex or the matched string."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "result"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "String" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GString containing the new string"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_regex_replace_eval()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the function passed to g_regex_replace_eval().\nIt is called for each occurrence of the pattern in the string passed\nto g_regex_replace_eval(), and it should append the replacement to\n@result."
            , sinceVersion = Just "2.14"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_RegexEvalCallback =
        Ptr GLib.MatchInfo.MatchInfo ->
        Ptr GLib.String.String ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "match_info"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "MatchInfo" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the #GMatchInfo generated by the match.\n    Use g_match_info_get_regex() and g_match_info_get_string() if you\n    need the #GRegex or the matched string."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "result"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "String" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GString containing the new string"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_regex_replace_eval()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_RegexEvalCallback :: FunPtr C_RegexEvalCallback -> C_RegexEvalCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_RegexEvalCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_RegexEvalCallback
        -> GLib.MatchInfo.MatchInfo
        -- ^ /@matchInfo@/: the t'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match.
        --     Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you
        --     need the t'GI.GLib.Structs.Regex.Regex' or the matched string.
        -> GLib.String.String
        -- ^ /@result@/: a t'GI.GLib.Structs.String.String' containing the new string
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Structs.Regex.regexReplaceEval'
        -> m Bool
        -- ^ __Returns:__ 'P.False' to continue the replacement process, 'P.True' to stop it
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_RegexEvalCallback`.
    foreign import ccall "wrapper"
        mk_RegexEvalCallback :: C_RegexEvalCallback -> IO (FunPtr C_RegexEvalCallback)

    -- | Specifies the type of the function passed to 'GI.GLib.Structs.Regex.regexReplaceEval'.
    -- It is called for each occurrence of the pattern in the string passed
    -- to 'GI.GLib.Structs.Regex.regexReplaceEval', and it should append the replacement to
    -- /@result@/.
    --
    -- /Since: 2.14/
    type RegexEvalCallback =
        GLib.MatchInfo.MatchInfo
        -- ^ /@matchInfo@/: the t'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match.
        --     Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you
        --     need the t'GI.GLib.Structs.Regex.Regex' or the matched string.
        -> GLib.String.String
        -- ^ /@result@/: a t'GI.GLib.Structs.String.String' containing the new string
        -> IO Bool
        -- ^ __Returns:__ 'P.False' to continue the replacement process, 'P.True' to stop it

    -- | A convenience synonym for @`Nothing` :: `Maybe` `RegexEvalCallback`@.
    noRegexEvalCallback :: Maybe RegexEvalCallback
    noRegexEvalCallback :: Maybe RegexEvalCallback
    noRegexEvalCallback = Maybe RegexEvalCallback
    forall a. Maybe a
    Nothing

    -- | Specifies the type of the function passed to 'GI.GLib.Structs.Regex.regexReplaceEval'.
    -- It is called for each occurrence of the pattern in the string passed
    -- to 'GI.GLib.Structs.Regex.regexReplaceEval', and it should append the replacement to
    -- /@result@/.
    --
    -- /Since: 2.14/
    type RegexEvalCallback_WithClosures =
        GLib.MatchInfo.MatchInfo
        -- ^ /@matchInfo@/: the t'GI.GLib.Structs.MatchInfo.MatchInfo' generated by the match.
        --     Use 'GI.GLib.Structs.MatchInfo.matchInfoGetRegex' and 'GI.GLib.Structs.MatchInfo.matchInfoGetString' if you
        --     need the t'GI.GLib.Structs.Regex.Regex' or the matched string.
        -> GLib.String.String
        -- ^ /@result@/: a t'GI.GLib.Structs.String.String' containing the new string
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Structs.Regex.regexReplaceEval'
        -> IO Bool
        -- ^ __Returns:__ 'P.False' to continue the replacement process, 'P.True' to stop it

    -- | A convenience synonym for @`Nothing` :: `Maybe` `RegexEvalCallback_WithClosures`@.
    noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures
    noRegexEvalCallback_WithClosures :: Maybe RegexEvalCallback_WithClosures
    noRegexEvalCallback_WithClosures = Maybe RegexEvalCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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_

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `RegexEvalCallback` into a `C_RegexEvalCallback`.
    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
    P.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
    P.fromEnum) Bool
    result
                CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback PrintFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "string"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the message to output"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the print handler functions.\nThese are called with the complete formatted string to output."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_PrintFunc =
        CString ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "string"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the message to output"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_PrintFunc :: FunPtr C_PrintFunc -> C_PrintFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_PrintFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_PrintFunc
        -> T.Text
        -- ^ /@string@/: the message to output
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_PrintFunc`.
    foreign import ccall "wrapper"
        mk_PrintFunc :: C_PrintFunc -> IO (FunPtr C_PrintFunc)

    -- | Specifies the type of the print handler functions.
    -- These are called with the complete formatted string to output.
    type PrintFunc =
        T.Text
        -- ^ /@string@/: the message to output
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `PrintFunc`@.
    noPrintFunc :: Maybe PrintFunc
    noPrintFunc :: Maybe PrintFunc
    noPrintFunc = Maybe PrintFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `PrintFunc` into a `C_PrintFunc`.
    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

    -- callback PollFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "the number of #GPollFD elements which have events or errors\n    reported, or -1 if an error occurred."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "ufds"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "PollFD" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "an array of #GPollFD elements"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "nfsd"
              , argType = TBasicType TUInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the number of elements in @ufds"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "timeout_"
              , argType = TBasicType TInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the maximum time to wait for an event of the file descriptors.\n    A negative value indicates an infinite timeout."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_main_context_set_poll_func().\nThe semantics of the function should match those of the poll() system call."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_PollFunc =
        Ptr GLib.PollFD.PollFD ->
        Word32 ->
        Int32 ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "ufds"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "PollFD" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "an array of #GPollFD elements"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "nfsd"
    --           , argType = TBasicType TUInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the number of elements in @ufds"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "timeout_"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the maximum time to wait for an event of the file descriptors.\n    A negative value indicates an infinite timeout."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_PollFunc :: FunPtr C_PollFunc -> C_PollFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_PollFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_PollFunc
        -> GLib.PollFD.PollFD
        -- ^ /@ufds@/: an array of t'GI.GLib.Structs.PollFD.PollFD' elements
        -> Word32
        -- ^ /@nfsd@/: the number of elements in /@ufds@/
        -> Int32
        -- ^ /@timeout_@/: the maximum time to wait for an event of the file descriptors.
        --     A negative value indicates an infinite timeout.
        -> m Int32
        -- ^ __Returns:__ the number of t'GI.GLib.Structs.PollFD.PollFD' elements which have events or errors
        --     reported, or -1 if an error occurred.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_PollFunc`.
    foreign import ccall "wrapper"
        mk_PollFunc :: C_PollFunc -> IO (FunPtr C_PollFunc)

    -- | Specifies the type of function passed to @/g_main_context_set_poll_func()/@.
    -- The semantics of the function should match those of the @/poll()/@ system call.
    type PollFunc =
        GLib.PollFD.PollFD
        -- ^ /@ufds@/: an array of t'GI.GLib.Structs.PollFD.PollFD' elements
        -> Word32
        -- ^ /@nfsd@/: the number of elements in /@ufds@/
        -> Int32
        -- ^ /@timeout_@/: the maximum time to wait for an event of the file descriptors.
        --     A negative value indicates an infinite timeout.
        -> IO Int32
        -- ^ __Returns:__ the number of t'GI.GLib.Structs.PollFD.PollFD' elements which have events or errors
        --     reported, or -1 if an error occurred.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `PollFunc`@.
    noPollFunc :: Maybe PollFunc
    noPollFunc :: Maybe PollFunc
    noPollFunc = Maybe PollFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `PollFunc` into a `C_PollFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback OptionParseFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "%TRUE if the function completed successfully, %FALSE if an error\n occurred, in which case @error should be set with g_set_error()"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "OptionContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The active #GOptionContext"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "group"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "OptionGroup" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The group to which the function belongs"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of function that can be called before and after parsing."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_OptionParseFunc =
        Ptr GLib.OptionContext.OptionContext ->
        Ptr GLib.OptionGroup.OptionGroup ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "OptionContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The active #GOptionContext"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "group"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "OptionGroup" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The group to which the function belongs"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_OptionParseFunc :: FunPtr C_OptionParseFunc -> C_OptionParseFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_OptionParseFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_OptionParseFunc
        -> GLib.OptionContext.OptionContext
        -- ^ /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext'
        -> GLib.OptionGroup.OptionGroup
        -- ^ /@group@/: The group to which the function belongs
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         ) (do
            () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         )

    -- | Generate a function pointer callable from C code, from a `C_OptionParseFunc`.
    foreign import ccall "wrapper"
        mk_OptionParseFunc :: C_OptionParseFunc -> IO (FunPtr C_OptionParseFunc)

    -- | The type of function that can be called before and after parsing.
    type OptionParseFunc =
        GLib.OptionContext.OptionContext
        -- ^ /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext'
        -> GLib.OptionGroup.OptionGroup
        -- ^ /@group@/: The group to which the function belongs
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> IO ()
        -- ^ __Returns:__ 'P.True' if the function completed successfully, 'P.False' if an error
        --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `OptionParseFunc`@.
    noOptionParseFunc :: Maybe OptionParseFunc
    noOptionParseFunc :: Maybe OptionParseFunc
    noOptionParseFunc = Maybe OptionParseFunc
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback OptionErrorFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "OptionContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The active #GOptionContext"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "group"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "OptionGroup" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The group to which the function belongs"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of function to be used as callback when a parse error occurs."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_OptionErrorFunc =
        Ptr GLib.OptionContext.OptionContext ->
        Ptr GLib.OptionGroup.OptionGroup ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "OptionContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The active #GOptionContext"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "group"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "OptionGroup" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The group to which the function belongs"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_OptionErrorFunc :: FunPtr C_OptionErrorFunc -> C_OptionErrorFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_OptionErrorFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_OptionErrorFunc
        -> GLib.OptionContext.OptionContext
        -- ^ /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext'
        -> GLib.OptionGroup.OptionGroup
        -- ^ /@group@/: The group to which the function belongs
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         ) (do
            () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         )

    -- | Generate a function pointer callable from C code, from a `C_OptionErrorFunc`.
    foreign import ccall "wrapper"
        mk_OptionErrorFunc :: C_OptionErrorFunc -> IO (FunPtr C_OptionErrorFunc)

    -- | The type of function to be used as callback when a parse error occurs.
    type OptionErrorFunc =
        GLib.OptionContext.OptionContext
        -- ^ /@context@/: The active t'GI.GLib.Structs.OptionContext.OptionContext'
        -> GLib.OptionGroup.OptionGroup
        -- ^ /@group@/: The group to which the function belongs
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `OptionErrorFunc`@.
    noOptionErrorFunc :: Maybe OptionErrorFunc
    noOptionErrorFunc :: Maybe OptionParseFunc
    noOptionErrorFunc = Maybe OptionParseFunc
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback OptionArgFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "%TRUE if the option was successfully parsed, %FALSE if an error\n occurred, in which case @error should be set with g_set_error()"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "option_name"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "The name of the option being parsed. This will be either a\n single dash followed by a single letter (for a short name) or two dashes\n followed by a long option name."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "value"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "The value to be parsed."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK\noptions."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_OptionArgFunc =
        CString ->
        CString ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "option_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "The name of the option being parsed. This will be either a\n single dash followed by a single letter (for a short name) or two dashes\n followed by a long option name."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "value"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "The value to be parsed."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "User data added to the #GOptionGroup containing the option when it\n was created with g_option_group_new()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_OptionArgFunc :: FunPtr C_OptionArgFunc -> C_OptionArgFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_OptionArgFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_OptionArgFunc
        -> T.Text
        -- ^ /@optionName@/: The name of the option being parsed. This will be either a
        --  single dash followed by a single letter (for a short name) or two dashes
        --  followed by a long option name.
        -> T.Text
        -- ^ /@value@/: The value to be parsed.
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    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'
         )

    -- | Generate a function pointer callable from C code, from a `C_OptionArgFunc`.
    foreign import ccall "wrapper"
        mk_OptionArgFunc :: C_OptionArgFunc -> IO (FunPtr C_OptionArgFunc)

    -- | The type of function to be passed as callback for 'GI.GLib.Enums.OptionArgCallback'
    -- options.
    type OptionArgFunc =
        T.Text
        -- ^ /@optionName@/: The name of the option being parsed. This will be either a
        --  single dash followed by a single letter (for a short name) or two dashes
        --  followed by a long option name.
        -> T.Text
        -- ^ /@value@/: The value to be parsed.
        -> Ptr ()
        -- ^ /@data@/: User data added to the t'GI.GLib.Structs.OptionGroup.OptionGroup' containing the option when it
        --  was created with 'GI.GLib.Structs.OptionGroup.optionGroupNew'
        -> IO ()
        -- ^ __Returns:__ 'P.True' if the option was successfully parsed, 'P.False' if an error
        --  occurred, in which case /@error@/ should be set with @/g_set_error()/@ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `OptionArgFunc`@.
    noOptionArgFunc :: Maybe OptionArgFunc
    noOptionArgFunc :: Maybe OptionArgFunc
    noOptionArgFunc = Maybe OptionArgFunc
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback NodeTraverseFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE to stop the traversal."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "node"
              , argType = TInterface Name { namespace = "GLib" , name = "Node" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GNode." , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_node_traverse()."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_node_traverse(). The\nfunction is called with each of the nodes visited, together with the\nuser data passed to g_node_traverse(). If the function returns\n%TRUE, then the traversal is stopped."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_NodeTraverseFunc =
        Ptr GLib.Node.Node ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "node"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Node" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GNode." , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_node_traverse()."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_NodeTraverseFunc :: FunPtr C_NodeTraverseFunc -> C_NodeTraverseFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_NodeTraverseFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_NodeTraverseFunc
        -> GLib.Node.Node
        -- ^ /@node@/: a t'GI.GLib.Structs.Node.Node'.
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeTraverse'.
        -> m Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_NodeTraverseFunc`.
    foreign import ccall "wrapper"
        mk_NodeTraverseFunc :: C_NodeTraverseFunc -> IO (FunPtr C_NodeTraverseFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Structs.Node.nodeTraverse'. The
    -- function is called with each of the nodes visited, together with the
    -- user data passed to 'GI.GLib.Structs.Node.nodeTraverse'. If the function returns
    -- 'P.True', then the traversal is stopped.
    type NodeTraverseFunc =
        GLib.Node.Node
        -- ^ /@node@/: a t'GI.GLib.Structs.Node.Node'.
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeTraverse'.
        -> IO Bool
        -- ^ __Returns:__ 'P.True' to stop the traversal.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `NodeTraverseFunc`@.
    noNodeTraverseFunc :: Maybe NodeTraverseFunc
    noNodeTraverseFunc :: Maybe NodeTraverseFunc
    noNodeTraverseFunc = Maybe NodeTraverseFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `NodeTraverseFunc` into a `C_NodeTraverseFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback NodeForeachFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "node"
              , argType = TInterface Name { namespace = "GLib" , name = "Node" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GNode." , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "user data passed to g_node_children_foreach()."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_node_children_foreach().\nThe function is called with each child node, together with the user\ndata passed to g_node_children_foreach()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_NodeForeachFunc =
        Ptr GLib.Node.Node ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "node"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Node" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GNode." , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "user data passed to g_node_children_foreach()."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_NodeForeachFunc :: FunPtr C_NodeForeachFunc -> C_NodeForeachFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_NodeForeachFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_NodeForeachFunc
        -> GLib.Node.Node
        -- ^ /@node@/: a t'GI.GLib.Structs.Node.Node'.
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeChildrenForeach'.
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_NodeForeachFunc`.
    foreign import ccall "wrapper"
        mk_NodeForeachFunc :: C_NodeForeachFunc -> IO (FunPtr C_NodeForeachFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Structs.Node.nodeChildrenForeach'.
    -- The function is called with each child node, together with the user
    -- data passed to 'GI.GLib.Structs.Node.nodeChildrenForeach'.
    type NodeForeachFunc =
        GLib.Node.Node
        -- ^ /@node@/: a t'GI.GLib.Structs.Node.Node'.
        -> Ptr ()
        -- ^ /@data@/: user data passed to 'GI.GLib.Structs.Node.nodeChildrenForeach'.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `NodeForeachFunc`@.
    noNodeForeachFunc :: Maybe NodeForeachFunc
    noNodeForeachFunc :: Maybe NodeForeachFunc
    noNodeForeachFunc = Maybe NodeForeachFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `NodeForeachFunc` into a `C_NodeForeachFunc`.
    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

    -- callback MemVTableTryReallocFieldCallback
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "mem"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "n_bytes"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableTryReallocFieldCallback =
        Ptr () ->
        FCT.CSize ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "mem"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "n_bytes"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MemVTableTryReallocFieldCallback :: FunPtr C_MemVTableTryReallocFieldCallback -> C_MemVTableTryReallocFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MemVTableTryReallocFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MemVTableTryReallocFieldCallback
        -> Ptr ()
        -> FCT.CSize
        -> m (Ptr ())
    dynamic_MemVTableTryReallocFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MemVTableTryReallocFieldCallback
    -> Ptr () -> CSize -> m (Ptr ())
    dynamic_MemVTableTryReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
    __funPtr Ptr ()
    mem CSize
    nBytes = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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 CSize
    nBytes
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_MemVTableTryReallocFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableTryReallocFieldCallback :: C_MemVTableTryReallocFieldCallback -> IO (FunPtr C_MemVTableTryReallocFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableTryReallocFieldCallback =
        Ptr ()
        -> FCT.CSize
        -> IO (Ptr ())

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableTryReallocFieldCallback`@.
    noMemVTableTryReallocFieldCallback :: Maybe MemVTableTryReallocFieldCallback
    noMemVTableTryReallocFieldCallback :: Maybe C_MemVTableTryReallocFieldCallback
    noMemVTableTryReallocFieldCallback = Maybe C_MemVTableTryReallocFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableTryReallocFieldCallback` into a `C_MemVTableTryReallocFieldCallback`.
    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 CSize
    nBytes = do
        Ptr ()
    result <- C_MemVTableTryReallocFieldCallback
    gi'cb  Ptr ()
    mem CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback MemVTableTryMallocFieldCallback
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "n_bytes"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableTryMallocFieldCallback =
        FCT.CSize ->
        IO (Ptr ())

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

    foreign import ccall "dynamic" __dynamic_C_MemVTableTryMallocFieldCallback :: FunPtr C_MemVTableTryMallocFieldCallback -> C_MemVTableTryMallocFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MemVTableTryMallocFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MemVTableTryMallocFieldCallback
        -> FCT.CSize
        -> m (Ptr ())
    dynamic_MemVTableTryMallocFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MemVTableTryMallocFieldCallback -> CSize -> m (Ptr ())
    dynamic_MemVTableTryMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
    __funPtr CSize
    nBytes = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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) CSize
    nBytes
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_MemVTableTryMallocFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableTryMallocFieldCallback :: C_MemVTableTryMallocFieldCallback -> IO (FunPtr C_MemVTableTryMallocFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableTryMallocFieldCallback =
        FCT.CSize
        -> IO (Ptr ())

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableTryMallocFieldCallback`@.
    noMemVTableTryMallocFieldCallback :: Maybe MemVTableTryMallocFieldCallback
    noMemVTableTryMallocFieldCallback :: Maybe C_MemVTableTryMallocFieldCallback
    noMemVTableTryMallocFieldCallback = Maybe C_MemVTableTryMallocFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableTryMallocFieldCallback` into a `C_MemVTableTryMallocFieldCallback`.
    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 CSize
    nBytes = do
        Ptr ()
    result <- C_MemVTableTryMallocFieldCallback
    gi'cb  CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback MemVTableReallocFieldCallback
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "mem"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "n_bytes"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableReallocFieldCallback =
        Ptr () ->
        FCT.CSize ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "mem"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "n_bytes"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MemVTableReallocFieldCallback :: FunPtr C_MemVTableReallocFieldCallback -> C_MemVTableReallocFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MemVTableReallocFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MemVTableReallocFieldCallback
        -> Ptr ()
        -> FCT.CSize
        -> m (Ptr ())
    dynamic_MemVTableReallocFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MemVTableTryReallocFieldCallback
    -> Ptr () -> CSize -> m (Ptr ())
    dynamic_MemVTableReallocFieldCallback FunPtr C_MemVTableTryReallocFieldCallback
    __funPtr Ptr ()
    mem CSize
    nBytes = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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 CSize
    nBytes
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_MemVTableReallocFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableReallocFieldCallback :: C_MemVTableReallocFieldCallback -> IO (FunPtr C_MemVTableReallocFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableReallocFieldCallback =
        Ptr ()
        -> FCT.CSize
        -> IO (Ptr ())

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableReallocFieldCallback`@.
    noMemVTableReallocFieldCallback :: Maybe MemVTableReallocFieldCallback
    noMemVTableReallocFieldCallback :: Maybe C_MemVTableTryReallocFieldCallback
    noMemVTableReallocFieldCallback = Maybe C_MemVTableTryReallocFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableReallocFieldCallback` into a `C_MemVTableReallocFieldCallback`.
    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 CSize
    nBytes = do
        Ptr ()
    result <- C_MemVTableTryReallocFieldCallback
    gi'cb  Ptr ()
    mem CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback MemVTableMallocFieldCallback
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "n_bytes"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableMallocFieldCallback =
        FCT.CSize ->
        IO (Ptr ())

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

    foreign import ccall "dynamic" __dynamic_C_MemVTableMallocFieldCallback :: FunPtr C_MemVTableMallocFieldCallback -> C_MemVTableMallocFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MemVTableMallocFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MemVTableMallocFieldCallback
        -> FCT.CSize
        -> m (Ptr ())
    dynamic_MemVTableMallocFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MemVTableTryMallocFieldCallback -> CSize -> m (Ptr ())
    dynamic_MemVTableMallocFieldCallback FunPtr C_MemVTableTryMallocFieldCallback
    __funPtr CSize
    nBytes = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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) CSize
    nBytes
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_MemVTableMallocFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableMallocFieldCallback :: C_MemVTableMallocFieldCallback -> IO (FunPtr C_MemVTableMallocFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableMallocFieldCallback =
        FCT.CSize
        -> IO (Ptr ())

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableMallocFieldCallback`@.
    noMemVTableMallocFieldCallback :: Maybe MemVTableMallocFieldCallback
    noMemVTableMallocFieldCallback :: Maybe C_MemVTableTryMallocFieldCallback
    noMemVTableMallocFieldCallback = Maybe C_MemVTableTryMallocFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableMallocFieldCallback` into a `C_MemVTableMallocFieldCallback`.
    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 CSize
    nBytes = do
        Ptr ()
    result <- C_MemVTableTryMallocFieldCallback
    gi'cb  CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback MemVTableFreeFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "mem"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableFreeFieldCallback =
        Ptr () ->
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_MemVTableFreeFieldCallback :: FunPtr C_MemVTableFreeFieldCallback -> C_MemVTableFreeFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_MemVTableFreeFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableFreeFieldCallback :: C_MemVTableFreeFieldCallback -> IO (FunPtr C_MemVTableFreeFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableFreeFieldCallback =
        Ptr ()
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableFreeFieldCallback`@.
    noMemVTableFreeFieldCallback :: Maybe MemVTableFreeFieldCallback
    noMemVTableFreeFieldCallback :: Maybe TestFixtureFunc
    noMemVTableFreeFieldCallback = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableFreeFieldCallback` into a `C_MemVTableFreeFieldCallback`.
    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

    -- callback MemVTableCallocFieldCallback
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "n_blocks"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "n_block_bytes"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MemVTableCallocFieldCallback =
        FCT.CSize ->
        FCT.CSize ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "n_blocks"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "n_block_bytes"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MemVTableCallocFieldCallback :: FunPtr C_MemVTableCallocFieldCallback -> C_MemVTableCallocFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MemVTableCallocFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MemVTableCallocFieldCallback
        -> FCT.CSize
        -> FCT.CSize
        -> m (Ptr ())
    dynamic_MemVTableCallocFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MemVTableCallocFieldCallback
    -> CSize -> CSize -> m (Ptr ())
    dynamic_MemVTableCallocFieldCallback FunPtr C_MemVTableCallocFieldCallback
    __funPtr CSize
    nBlocks CSize
    nBlockBytes = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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) CSize
    nBlocks CSize
    nBlockBytes
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_MemVTableCallocFieldCallback`.
    foreign import ccall "wrapper"
        mk_MemVTableCallocFieldCallback :: C_MemVTableCallocFieldCallback -> IO (FunPtr C_MemVTableCallocFieldCallback)

    -- | /No description available in the introspection data./
    type MemVTableCallocFieldCallback =
        FCT.CSize
        -> FCT.CSize
        -> IO (Ptr ())

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MemVTableCallocFieldCallback`@.
    noMemVTableCallocFieldCallback :: Maybe MemVTableCallocFieldCallback
    noMemVTableCallocFieldCallback :: Maybe C_MemVTableCallocFieldCallback
    noMemVTableCallocFieldCallback = Maybe C_MemVTableCallocFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MemVTableCallocFieldCallback` into a `C_MemVTableCallocFieldCallback`.
    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 CSize
    nBlocks CSize
    nBlockBytes = do
        Ptr ()
    result <- C_MemVTableCallocFieldCallback
    gi'cb  CSize
    nBlocks CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback MarkupParserTextFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface
                    Name { namespace = "GLib" , name = "MarkupParseContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "text"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "text_len"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MarkupParserTextFieldCallback =
        Ptr GLib.MarkupParseContext.MarkupParseContext ->
        CString ->
        FCT.CSize ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "GLib" , name = "MarkupParseContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "text"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "text_len"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MarkupParserTextFieldCallback :: FunPtr C_MarkupParserTextFieldCallback -> C_MarkupParserTextFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MarkupParserTextFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MarkupParserTextFieldCallback
        -> GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> Ptr ()
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    dynamic_MarkupParserTextFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParseContext -> Text -> CSize -> Ptr () -> m ()
    dynamic_MarkupParserTextFieldCallback FunPtr C_MarkupParserTextFieldCallback
    __funPtr MarkupParseContext
    context Text
    text CSize
    textLen Ptr ()
    userData = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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' CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         ) (do
            CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    text'
         )

    -- | Generate a function pointer callable from C code, from a `C_MarkupParserTextFieldCallback`.
    foreign import ccall "wrapper"
        mk_MarkupParserTextFieldCallback :: C_MarkupParserTextFieldCallback -> IO (FunPtr C_MarkupParserTextFieldCallback)

    -- | /No description available in the introspection data./
    type MarkupParserTextFieldCallback =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserTextFieldCallback`@.
    noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback
    noMarkupParserTextFieldCallback :: Maybe MarkupParserTextFieldCallback
    noMarkupParserTextFieldCallback = Maybe MarkupParserTextFieldCallback
    forall a. Maybe a
    Nothing

    -- | /No description available in the introspection data./
    type MarkupParserTextFieldCallback_WithClosures =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> Ptr ()
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserTextFieldCallback_WithClosures`@.
    noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
    noMarkupParserTextFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
    noMarkupParserTextFieldCallback_WithClosures = Maybe MarkupParserTextFieldCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_MarkupParserTextFieldCallback :: MarkupParserTextFieldCallback -> MarkupParserTextFieldCallback_WithClosures
    drop_closures_MarkupParserTextFieldCallback :: MarkupParserTextFieldCallback
    -> MarkupParserTextFieldCallback_WithClosures
    drop_closures_MarkupParserTextFieldCallback MarkupParserTextFieldCallback
    _f MarkupParseContext
    context Text
    text CSize
    textLen Ptr ()
    _ = MarkupParserTextFieldCallback
    _f MarkupParseContext
    context Text
    text CSize
    textLen

    -- No Haskell->C wrapper generated since the function throws.

    -- callback MarkupParserStartElementFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface
                    Name { namespace = "GLib" , name = "MarkupParseContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "element_name"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "attribute_names"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "attribute_values"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MarkupParserStartElementFieldCallback =
        Ptr GLib.MarkupParseContext.MarkupParseContext ->
        CString ->
        CString ->
        CString ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "GLib" , name = "MarkupParseContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "element_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "attribute_names"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "attribute_values"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MarkupParserStartElementFieldCallback :: FunPtr C_MarkupParserStartElementFieldCallback -> C_MarkupParserStartElementFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MarkupParserStartElementFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MarkupParserStartElementFieldCallback
        -> GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> T.Text
        -> T.Text
        -> Ptr ()
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    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'
         )

    -- | Generate a function pointer callable from C code, from a `C_MarkupParserStartElementFieldCallback`.
    foreign import ccall "wrapper"
        mk_MarkupParserStartElementFieldCallback :: C_MarkupParserStartElementFieldCallback -> IO (FunPtr C_MarkupParserStartElementFieldCallback)

    -- | /No description available in the introspection data./
    type MarkupParserStartElementFieldCallback =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> T.Text
        -> T.Text
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserStartElementFieldCallback`@.
    noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback
    noMarkupParserStartElementFieldCallback :: Maybe MarkupParserStartElementFieldCallback
    noMarkupParserStartElementFieldCallback = Maybe MarkupParserStartElementFieldCallback
    forall a. Maybe a
    Nothing

    -- | /No description available in the introspection data./
    type MarkupParserStartElementFieldCallback_WithClosures =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> T.Text
        -> T.Text
        -> Ptr ()
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserStartElementFieldCallback_WithClosures`@.
    noMarkupParserStartElementFieldCallback_WithClosures :: Maybe MarkupParserStartElementFieldCallback_WithClosures
    noMarkupParserStartElementFieldCallback_WithClosures :: Maybe MarkupParserStartElementFieldCallback_WithClosures
    noMarkupParserStartElementFieldCallback_WithClosures = Maybe MarkupParserStartElementFieldCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- No Haskell->C wrapper generated since the function throws.

    -- callback MarkupParserPassthroughFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface
                    Name { namespace = "GLib" , name = "MarkupParseContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "passthrough_text"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "text_len"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MarkupParserPassthroughFieldCallback =
        Ptr GLib.MarkupParseContext.MarkupParseContext ->
        CString ->
        FCT.CSize ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "GLib" , name = "MarkupParseContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "passthrough_text"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "text_len"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MarkupParserPassthroughFieldCallback :: FunPtr C_MarkupParserPassthroughFieldCallback -> C_MarkupParserPassthroughFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MarkupParserPassthroughFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MarkupParserPassthroughFieldCallback
        -> GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> Ptr ()
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    dynamic_MarkupParserPassthroughFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_MarkupParserTextFieldCallback
    -> MarkupParseContext -> Text -> CSize -> Ptr () -> m ()
    dynamic_MarkupParserPassthroughFieldCallback FunPtr C_MarkupParserTextFieldCallback
    __funPtr MarkupParseContext
    context Text
    passthroughText CSize
    textLen Ptr ()
    userData = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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' CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         ) (do
            CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    passthroughText'
         )

    -- | Generate a function pointer callable from C code, from a `C_MarkupParserPassthroughFieldCallback`.
    foreign import ccall "wrapper"
        mk_MarkupParserPassthroughFieldCallback :: C_MarkupParserPassthroughFieldCallback -> IO (FunPtr C_MarkupParserPassthroughFieldCallback)

    -- | /No description available in the introspection data./
    type MarkupParserPassthroughFieldCallback =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserPassthroughFieldCallback`@.
    noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserPassthroughFieldCallback
    noMarkupParserPassthroughFieldCallback :: Maybe MarkupParserTextFieldCallback
    noMarkupParserPassthroughFieldCallback = Maybe MarkupParserTextFieldCallback
    forall a. Maybe a
    Nothing

    -- | /No description available in the introspection data./
    type MarkupParserPassthroughFieldCallback_WithClosures =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> FCT.CSize
        -> Ptr ()
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserPassthroughFieldCallback_WithClosures`@.
    noMarkupParserPassthroughFieldCallback_WithClosures :: Maybe MarkupParserPassthroughFieldCallback_WithClosures
    noMarkupParserPassthroughFieldCallback_WithClosures :: Maybe MarkupParserTextFieldCallback_WithClosures
    noMarkupParserPassthroughFieldCallback_WithClosures = Maybe MarkupParserTextFieldCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_MarkupParserPassthroughFieldCallback :: MarkupParserPassthroughFieldCallback -> MarkupParserPassthroughFieldCallback_WithClosures
    drop_closures_MarkupParserPassthroughFieldCallback :: MarkupParserTextFieldCallback
    -> MarkupParserTextFieldCallback_WithClosures
    drop_closures_MarkupParserPassthroughFieldCallback MarkupParserTextFieldCallback
    _f MarkupParseContext
    context Text
    passthroughText CSize
    textLen Ptr ()
    _ = MarkupParserTextFieldCallback
    _f MarkupParseContext
    context Text
    passthroughText CSize
    textLen

    -- No Haskell->C wrapper generated since the function throws.

    -- callback MarkupParserErrorFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface
                    Name { namespace = "GLib" , name = "MarkupParseContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "error"
              , argType = TError
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MarkupParserErrorFieldCallback =
        Ptr GLib.MarkupParseContext.MarkupParseContext ->
        Ptr GError ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "GLib" , name = "MarkupParseContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "error"
    --           , argType = TError
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MarkupParserErrorFieldCallback :: FunPtr C_MarkupParserErrorFieldCallback -> C_MarkupParserErrorFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_MarkupParserErrorFieldCallback`.
    foreign import ccall "wrapper"
        mk_MarkupParserErrorFieldCallback :: C_MarkupParserErrorFieldCallback -> IO (FunPtr C_MarkupParserErrorFieldCallback)

    -- | /No description available in the introspection data./
    type MarkupParserErrorFieldCallback =
        GLib.MarkupParseContext.MarkupParseContext
        -> GError
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserErrorFieldCallback`@.
    noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback
    noMarkupParserErrorFieldCallback :: Maybe MarkupParserErrorFieldCallback
    noMarkupParserErrorFieldCallback = Maybe MarkupParserErrorFieldCallback
    forall a. Maybe a
    Nothing

    -- | /No description available in the introspection data./
    type MarkupParserErrorFieldCallback_WithClosures =
        GLib.MarkupParseContext.MarkupParseContext
        -> GError
        -> Ptr ()
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserErrorFieldCallback_WithClosures`@.
    noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures
    noMarkupParserErrorFieldCallback_WithClosures :: Maybe MarkupParserErrorFieldCallback_WithClosures
    noMarkupParserErrorFieldCallback_WithClosures = Maybe MarkupParserErrorFieldCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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_

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `MarkupParserErrorFieldCallback` into a `C_MarkupParserErrorFieldCallback`.
    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

    -- callback MarkupParserEndElementFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "context"
              , argType =
                  TInterface
                    Name { namespace = "GLib" , name = "MarkupParseContext" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "element_name"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_MarkupParserEndElementFieldCallback =
        Ptr GLib.MarkupParseContext.MarkupParseContext ->
        CString ->
        Ptr () ->
        Ptr (Ptr GError) ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "context"
    --           , argType =
    --               TInterface
    --                 Name { namespace = "GLib" , name = "MarkupParseContext" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "element_name"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_MarkupParserEndElementFieldCallback :: FunPtr C_MarkupParserEndElementFieldCallback -> C_MarkupParserEndElementFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_MarkupParserEndElementFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_MarkupParserEndElementFieldCallback
        -> GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> Ptr ()
        -> m ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         ) (do
            CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    elementName'
         )

    -- | Generate a function pointer callable from C code, from a `C_MarkupParserEndElementFieldCallback`.
    foreign import ccall "wrapper"
        mk_MarkupParserEndElementFieldCallback :: C_MarkupParserEndElementFieldCallback -> IO (FunPtr C_MarkupParserEndElementFieldCallback)

    -- | /No description available in the introspection data./
    type MarkupParserEndElementFieldCallback =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserEndElementFieldCallback`@.
    noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback
    noMarkupParserEndElementFieldCallback :: Maybe MarkupParserEndElementFieldCallback
    noMarkupParserEndElementFieldCallback = Maybe MarkupParserEndElementFieldCallback
    forall a. Maybe a
    Nothing

    -- | /No description available in the introspection data./
    type MarkupParserEndElementFieldCallback_WithClosures =
        GLib.MarkupParseContext.MarkupParseContext
        -> T.Text
        -> Ptr ()
        -> IO ()
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `MarkupParserEndElementFieldCallback_WithClosures`@.
    noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures
    noMarkupParserEndElementFieldCallback_WithClosures :: Maybe MarkupParserEndElementFieldCallback_WithClosures
    noMarkupParserEndElementFieldCallback_WithClosures = Maybe MarkupParserEndElementFieldCallback_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- No Haskell->C wrapper generated since the function throws.

    -- callback LogWriterFunc
    {- Callable
      { returnType =
          Just
            (TInterface Name { namespace = "GLib" , name = "LogWriterOutput" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "%G_LOG_WRITER_HANDLED if the log entry was handled successfully;\n  %G_LOG_WRITER_UNHANDLED otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "log_level"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "log level of the message"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "fields"
              , argType =
                  TCArray
                    False
                    (-1)
                    2
                    (TInterface Name { namespace = "GLib" , name = "LogField" })
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "fields forming the message"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "n_fields"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "number of @fields" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_log_set_writer_func()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Writer function for log entries. A log entry is a collection of one or more\n#GLogFields, using the standard [field names from journal\nspecification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html).\nSee g_log_structured() for more information.\n\nWriter functions must ignore fields which they do not recognise, unless they\ncan write arbitrary binary output, as field values may be arbitrary binary.\n\n@log_level is guaranteed to be included in @fields as the `PRIORITY` field,\nbut is provided separately for convenience of deciding whether or where to\noutput the log entry.\n\nWriter functions should return %G_LOG_WRITER_HANDLED if they handled the log\nmessage successfully or if they deliberately ignored it. If there was an\nerror handling the message (for example, if the writer function is meant to\nsend messages to a remote logging server and there is a network error), it\nshould return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be\nchained and fall back to simpler handlers in case of failure."
            , sinceVersion = Just "2.50"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_LogWriterFunc =
        CInt ->
        Ptr GLib.LogField.LogField ->
        FCT.CSize ->
        Ptr () ->
        IO CUInt

    -- Args: [ Arg
    --           { argCName = "log_level"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "log level of the message"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "fields"
    --           , argType =
    --               TCArray
    --                 False
    --                 (-1)
    --                 2
    --                 (TInterface Name { namespace = "GLib" , name = "LogField" })
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "fields forming the message"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "n_fields"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "number of @fields" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_log_set_writer_func()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: [ Arg
    --              { argCName = "n_fields"
    --              , argType = TBasicType TSize
    --              , direction = DirectionIn
    --              , mayBeNull = False
    --              , argDoc =
    --                  Documentation
    --                    { rawDocText = Just "number of @fields" , sinceVersion = Nothing }
    --              , argScope = ScopeTypeInvalid
    --              , argClosure = -1
    --              , argDestroy = -1
    --              , argCallerAllocates = False
    --              , argCallbackUserData = False
    --              , transfer = TransferNothing
    --              }
    --          ]
    -- returnType: Just
    --               (TInterface Name { namespace = "GLib" , name = "LogWriterOutput" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_LogWriterFunc :: FunPtr C_LogWriterFunc -> C_LogWriterFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_LogWriterFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_LogWriterFunc
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: log level of the message
        -> [GLib.LogField.LogField]
        -- ^ /@fields@/: fields forming the message
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.logSetWriterFunc'
        -> m GLib.Enums.LogWriterOutput
        -- ^ __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully;
        --   'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise
    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 a. IO a -> m a
    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 :: CSize
    nFields = Int -> CSize
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CSize) -> Int -> CSize
    forall a b. (a -> b) -> a -> b
    $ [LogField] -> Int
    forall a. [a] -> 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)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [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'' CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return LogWriterOutput
    result'

    -- | Generate a function pointer callable from C code, from a `C_LogWriterFunc`.
    foreign import ccall "wrapper"
        mk_LogWriterFunc :: C_LogWriterFunc -> IO (FunPtr C_LogWriterFunc)

    -- | Writer function for log entries. A log entry is a collection of one or more
    -- @/GLogFields/@, using the standard <https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html field names from journal
    -- specification>.
    -- See @/g_log_structured()/@ for more information.
    --
    -- Writer functions must ignore fields which they do not recognise, unless they
    -- can write arbitrary binary output, as field values may be arbitrary binary.
    --
    -- /@logLevel@/ is guaranteed to be included in /@fields@/ as the @PRIORITY@ field,
    -- but is provided separately for convenience of deciding whether or where to
    -- output the log entry.
    --
    -- Writer functions should return 'GI.GLib.Enums.LogWriterOutputHandled' if they handled the log
    -- message successfully or if they deliberately ignored it. If there was an
    -- error handling the message (for example, if the writer function is meant to
    -- send messages to a remote logging server and there is a network error), it
    -- should return 'GI.GLib.Enums.LogWriterOutputUnhandled'. This allows writer functions to be
    -- chained and fall back to simpler handlers in case of failure.
    --
    -- /Since: 2.50/
    type LogWriterFunc =
        [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: log level of the message
        -> [GLib.LogField.LogField]
        -- ^ /@fields@/: fields forming the message
        -> IO GLib.Enums.LogWriterOutput
        -- ^ __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully;
        --   'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `LogWriterFunc`@.
    noLogWriterFunc :: Maybe LogWriterFunc
    noLogWriterFunc :: Maybe LogWriterFunc
    noLogWriterFunc = Maybe LogWriterFunc
    forall a. Maybe a
    Nothing

    -- | Writer function for log entries. A log entry is a collection of one or more
    -- @/GLogFields/@, using the standard <https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html field names from journal
    -- specification>.
    -- See @/g_log_structured()/@ for more information.
    --
    -- Writer functions must ignore fields which they do not recognise, unless they
    -- can write arbitrary binary output, as field values may be arbitrary binary.
    --
    -- /@logLevel@/ is guaranteed to be included in /@fields@/ as the @PRIORITY@ field,
    -- but is provided separately for convenience of deciding whether or where to
    -- output the log entry.
    --
    -- Writer functions should return 'GI.GLib.Enums.LogWriterOutputHandled' if they handled the log
    -- message successfully or if they deliberately ignored it. If there was an
    -- error handling the message (for example, if the writer function is meant to
    -- send messages to a remote logging server and there is a network error), it
    -- should return 'GI.GLib.Enums.LogWriterOutputUnhandled'. This allows writer functions to be
    -- chained and fall back to simpler handlers in case of failure.
    --
    -- /Since: 2.50/
    type LogWriterFunc_WithClosures =
        [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: log level of the message
        -> [GLib.LogField.LogField]
        -- ^ /@fields@/: fields forming the message
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.logSetWriterFunc'
        -> IO GLib.Enums.LogWriterOutput
        -- ^ __Returns:__ 'GI.GLib.Enums.LogWriterOutputHandled' if the log entry was handled successfully;
        --   'GI.GLib.Enums.LogWriterOutputUnhandled' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `LogWriterFunc_WithClosures`@.
    noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures
    noLogWriterFunc_WithClosures :: Maybe LogWriterFunc_WithClosures
    noLogWriterFunc_WithClosures = Maybe LogWriterFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `LogWriterFunc` into a `C_LogWriterFunc`.
    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 CSize
    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 -> CSize -> Ptr LogField -> IO [Ptr LogField]
    forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
    unpackBlockArrayWithLength Int
    24 CSize
    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)
    forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CUInt
    result'

    -- callback LogFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "log_domain"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the log domain of the message"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "log_level"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the log level of the message (including the\n  fatal and recursion flags)"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "message"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the message to process"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data, set in [func@GLib.log_set_handler]"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the prototype of log handler functions.\n\nThe default log handler, [func@GLib.log_default_handler], automatically appends a\nnew-line character to @message when printing it. It is advised that any\ncustom log handler functions behave similarly, so that logging calls in user\ncode do not need modifying to add a new-line character to the message if the\nlog handler is changed.\n\nThis is not used if structured logging is enabled; see\n[Using Structured Logging](logging.html#using-structured-logging)."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_LogFunc =
        CString ->
        CInt ->
        CString ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "log_domain"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the log domain of the message"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "log_level"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "LogLevelFlags" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the log level of the message (including the\n  fatal and recursion flags)"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "message"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the message to process"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data, set in [func@GLib.log_set_handler]"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_LogFunc :: FunPtr C_LogFunc -> C_LogFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_LogFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_LogFunc
        -> T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the
        --   fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> Ptr ()
        -- ^ /@userData@/: user data, set in 'GI.GLib.Functions.logSetHandler'
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_LogFunc`.
    foreign import ccall "wrapper"
        mk_LogFunc :: C_LogFunc -> IO (FunPtr C_LogFunc)

    -- | Specifies the prototype of log handler functions.
    --
    -- The default log handler, 'GI.GLib.Functions.logDefaultHandler', automatically appends a
    -- new-line character to /@message@/ when printing it. It is advised that any
    -- custom log handler functions behave similarly, so that logging calls in user
    -- code do not need modifying to add a new-line character to the message if the
    -- log handler is changed.
    --
    -- This is not used if structured logging is enabled; see
    -- <http://developer.gnome.org/glib/stable/logging.html#using-structured-logging Using Structured Logging>.
    type LogFunc =
        T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the
        --   fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `LogFunc`@.
    noLogFunc :: Maybe LogFunc
    noLogFunc :: Maybe LogFunc
    noLogFunc = Maybe LogFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the prototype of log handler functions.
    --
    -- The default log handler, 'GI.GLib.Functions.logDefaultHandler', automatically appends a
    -- new-line character to /@message@/ when printing it. It is advised that any
    -- custom log handler functions behave similarly, so that logging calls in user
    -- code do not need modifying to add a new-line character to the message if the
    -- log handler is changed.
    --
    -- This is not used if structured logging is enabled; see
    -- <http://developer.gnome.org/glib/stable/logging.html#using-structured-logging Using Structured Logging>.
    type LogFunc_WithClosures =
        T.Text
        -- ^ /@logDomain@/: the log domain of the message
        -> [GLib.Flags.LogLevelFlags]
        -- ^ /@logLevel@/: the log level of the message (including the
        --   fatal and recursion flags)
        -> T.Text
        -- ^ /@message@/: the message to process
        -> Ptr ()
        -- ^ /@userData@/: user data, set in 'GI.GLib.Functions.logSetHandler'
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `LogFunc_WithClosures`@.
    noLogFunc_WithClosures :: Maybe LogFunc_WithClosures
    noLogFunc_WithClosures :: Maybe LogFunc_WithClosures
    noLogFunc_WithClosures = Maybe LogFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `LogFunc` into a `C_LogFunc`.
    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

    -- callback IOFuncsIoWriteFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "buf"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "count"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "bytes_written"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoWriteFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        CString ->
        FCT.CSize ->
        FCT.CSize ->
        Ptr (Ptr GError) ->
        IO CUInt

    -- Args: [ Arg
    --           { argCName = "channel"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "buf"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "count"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "bytes_written"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoWriteFieldCallback :: FunPtr C_IOFuncsIoWriteFieldCallback -> C_IOFuncsIoWriteFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFuncsIoWriteFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFuncsIoWriteFieldCallback
        -> GLib.IOChannel.IOChannel
        -> T.Text
        -> FCT.CSize
        -> FCT.CSize
        -> m GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    dynamic_IOFuncsIoWriteFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_IOFuncsIoWriteFieldCallback
    -> IOChannel -> Text -> CSize -> CSize -> m IOStatus
    dynamic_IOFuncsIoWriteFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
    __funPtr IOChannel
    channel Text
    buf CSize
    count CSize
    bytesWritten = IO IOStatus -> m IOStatus
    forall a. IO a -> m a
    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' CSize
    count CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return IOStatus
    result'
         ) (do
            CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    buf'
         )

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoWriteFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoWriteFieldCallback :: C_IOFuncsIoWriteFieldCallback -> IO (FunPtr C_IOFuncsIoWriteFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoWriteFieldCallback =
        GLib.IOChannel.IOChannel
        -> T.Text
        -> FCT.CSize
        -> FCT.CSize
        -> IO GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoWriteFieldCallback`@.
    noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
    noIOFuncsIoWriteFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
    noIOFuncsIoWriteFieldCallback = Maybe IOFuncsIoWriteFieldCallback
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback IOFuncsIoSetFlagsFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "flags"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOFlags" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoSetFlagsFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        CUInt ->
        Ptr (Ptr GError) ->
        IO CUInt

    -- Args: [ Arg
    --           { argCName = "channel"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "flags"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOFlags" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoSetFlagsFieldCallback :: FunPtr C_IOFuncsIoSetFlagsFieldCallback -> C_IOFuncsIoSetFlagsFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFuncsIoSetFlagsFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFuncsIoSetFlagsFieldCallback
        -> GLib.IOChannel.IOChannel
        -> [GLib.Flags.IOFlags]
        -> m GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return IOStatus
    result'
         ) (do
            () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         )

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoSetFlagsFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoSetFlagsFieldCallback :: C_IOFuncsIoSetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoSetFlagsFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoSetFlagsFieldCallback =
        GLib.IOChannel.IOChannel
        -> [GLib.Flags.IOFlags]
        -> IO GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoSetFlagsFieldCallback`@.
    noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback
    noIOFuncsIoSetFlagsFieldCallback :: Maybe IOFuncsIoSetFlagsFieldCallback
    noIOFuncsIoSetFlagsFieldCallback = Maybe IOFuncsIoSetFlagsFieldCallback
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback IOFuncsIoSeekFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "offset"
              , argType = TBasicType TInt64
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "type"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "SeekType" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoSeekFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        Int64 ->
        CUInt ->
        Ptr (Ptr GError) ->
        IO CUInt

    -- Args: [ Arg
    --           { argCName = "channel"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "offset"
    --           , argType = TBasicType TInt64
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "type"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "SeekType" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoSeekFieldCallback :: FunPtr C_IOFuncsIoSeekFieldCallback -> C_IOFuncsIoSeekFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFuncsIoSeekFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFuncsIoSeekFieldCallback
        -> GLib.IOChannel.IOChannel
        -> Int64
        -> GLib.Enums.SeekType
        -> m GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return IOStatus
    result'
         ) (do
            () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         )

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoSeekFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoSeekFieldCallback :: C_IOFuncsIoSeekFieldCallback -> IO (FunPtr C_IOFuncsIoSeekFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoSeekFieldCallback =
        GLib.IOChannel.IOChannel
        -> Int64
        -> GLib.Enums.SeekType
        -> IO GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoSeekFieldCallback`@.
    noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback
    noIOFuncsIoSeekFieldCallback :: Maybe IOFuncsIoSeekFieldCallback
    noIOFuncsIoSeekFieldCallback = Maybe IOFuncsIoSeekFieldCallback
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback IOFuncsIoReadFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "buf"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "count"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "bytes_read"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoReadFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        CString ->
        FCT.CSize ->
        FCT.CSize ->
        Ptr (Ptr GError) ->
        IO CUInt

    -- Args: [ Arg
    --           { argCName = "channel"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "buf"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "count"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "bytes_read"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
    -- throws : True
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoReadFieldCallback :: FunPtr C_IOFuncsIoReadFieldCallback -> C_IOFuncsIoReadFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFuncsIoReadFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFuncsIoReadFieldCallback
        -> GLib.IOChannel.IOChannel
        -> T.Text
        -> FCT.CSize
        -> FCT.CSize
        -> m GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    dynamic_IOFuncsIoReadFieldCallback :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_IOFuncsIoWriteFieldCallback
    -> IOChannel -> Text -> CSize -> CSize -> m IOStatus
    dynamic_IOFuncsIoReadFieldCallback FunPtr C_IOFuncsIoWriteFieldCallback
    __funPtr IOChannel
    channel Text
    buf CSize
    count CSize
    bytesRead = IO IOStatus -> m IOStatus
    forall a. IO a -> m a
    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' CSize
    count CSize
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return IOStatus
    result'
         ) (do
            CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    buf'
         )

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoReadFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoReadFieldCallback :: C_IOFuncsIoReadFieldCallback -> IO (FunPtr C_IOFuncsIoReadFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoReadFieldCallback =
        GLib.IOChannel.IOChannel
        -> T.Text
        -> FCT.CSize
        -> FCT.CSize
        -> IO GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoReadFieldCallback`@.
    noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoReadFieldCallback
    noIOFuncsIoReadFieldCallback :: Maybe IOFuncsIoWriteFieldCallback
    noIOFuncsIoReadFieldCallback = Maybe IOFuncsIoWriteFieldCallback
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback IOFuncsIoGetFlagsFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOFlags" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoGetFlagsFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        IO CUInt

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

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoGetFlagsFieldCallback :: FunPtr C_IOFuncsIoGetFlagsFieldCallback -> C_IOFuncsIoGetFlagsFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return [IOFlags]
    result'

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoGetFlagsFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoGetFlagsFieldCallback :: C_IOFuncsIoGetFlagsFieldCallback -> IO (FunPtr C_IOFuncsIoGetFlagsFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoGetFlagsFieldCallback =
        GLib.IOChannel.IOChannel
        -> IO [GLib.Flags.IOFlags]

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoGetFlagsFieldCallback`@.
    noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback
    noIOFuncsIoGetFlagsFieldCallback :: Maybe IOFuncsIoGetFlagsFieldCallback
    noIOFuncsIoGetFlagsFieldCallback = Maybe IOFuncsIoGetFlagsFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `IOFuncsIoGetFlagsFieldCallback` into a `C_IOFuncsIoGetFlagsFieldCallback`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CUInt
    result'

    -- callback IOFuncsIoFreeFieldCallback
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoFreeFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoFreeFieldCallback :: FunPtr C_IOFuncsIoFreeFieldCallback -> C_IOFuncsIoFreeFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoFreeFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoFreeFieldCallback :: C_IOFuncsIoFreeFieldCallback -> IO (FunPtr C_IOFuncsIoFreeFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoFreeFieldCallback =
        GLib.IOChannel.IOChannel
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoFreeFieldCallback`@.
    noIOFuncsIoFreeFieldCallback :: Maybe IOFuncsIoFreeFieldCallback
    noIOFuncsIoFreeFieldCallback :: Maybe (IOChannel -> C_VoidFunc)
    noIOFuncsIoFreeFieldCallback = Maybe (IOChannel -> C_VoidFunc)
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `IOFuncsIoFreeFieldCallback` into a `C_IOFuncsIoFreeFieldCallback`.
    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

    -- callback IOFuncsIoCreateWatchFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "Source" })
      , returnMayBeNull = False
      , returnTransfer = TransferEverything
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "condition"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOCondition" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoCreateWatchFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        CUInt ->
        IO (Ptr GLib.Source.Source)

    -- Args: [ Arg
    --           { argCName = "channel"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "condition"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOCondition" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TInterface Name { namespace = "GLib" , name = "Source" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoCreateWatchFieldCallback :: FunPtr C_IOFuncsIoCreateWatchFieldCallback -> C_IOFuncsIoCreateWatchFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    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 a. IO a -> m a
    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_SourceFuncsFinalizeFunc
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Source
    result'

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoCreateWatchFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoCreateWatchFieldCallback :: C_IOFuncsIoCreateWatchFieldCallback -> IO (FunPtr C_IOFuncsIoCreateWatchFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoCreateWatchFieldCallback =
        GLib.IOChannel.IOChannel
        -> [GLib.Flags.IOCondition]
        -> IO GLib.Source.Source

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoCreateWatchFieldCallback`@.
    noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback
    noIOFuncsIoCreateWatchFieldCallback :: Maybe IOFuncsIoCreateWatchFieldCallback
    noIOFuncsIoCreateWatchFieldCallback = Maybe IOFuncsIoCreateWatchFieldCallback
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `IOFuncsIoCreateWatchFieldCallback` into a `C_IOFuncsIoCreateWatchFieldCallback`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr Source
    result'

    -- callback IOFuncsIoCloseFieldCallback
    {- Callable
      { returnType =
          Just (TInterface Name { namespace = "GLib" , name = "IOStatus" })
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "channel"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation { rawDocText = Nothing , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = True
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFuncsIoCloseFieldCallback =
        Ptr GLib.IOChannel.IOChannel ->
        Ptr (Ptr GError) ->
        IO CUInt

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

    foreign import ccall "dynamic" __dynamic_C_IOFuncsIoCloseFieldCallback :: FunPtr C_IOFuncsIoCloseFieldCallback -> C_IOFuncsIoCloseFieldCallback

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFuncsIoCloseFieldCallback ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFuncsIoCloseFieldCallback
        -> GLib.IOChannel.IOChannel
        -> m GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return IOStatus
    result'
         ) (do
            () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()
         )

    -- | Generate a function pointer callable from C code, from a `C_IOFuncsIoCloseFieldCallback`.
    foreign import ccall "wrapper"
        mk_IOFuncsIoCloseFieldCallback :: C_IOFuncsIoCloseFieldCallback -> IO (FunPtr C_IOFuncsIoCloseFieldCallback)

    -- | /No description available in the introspection data./
    type IOFuncsIoCloseFieldCallback =
        GLib.IOChannel.IOChannel
        -> IO GLib.Enums.IOStatus
        -- ^ /(Can throw 'Data.GI.Base.GError.GError')/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFuncsIoCloseFieldCallback`@.
    noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback
    noIOFuncsIoCloseFieldCallback :: Maybe IOFuncsIoCloseFieldCallback
    noIOFuncsIoCloseFieldCallback = Maybe IOFuncsIoCloseFieldCallback
    forall a. Maybe a
    Nothing

    -- No Haskell->C wrapper generated since the function throws.

    -- callback IOFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "the function should return %FALSE if the event source\n         should be removed"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "source"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOChannel" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the #GIOChannel event source"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "condition"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "IOCondition" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the condition which has been satisfied"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "user data set in g_io_add_watch() or g_io_add_watch_full()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_io_add_watch() or\ng_io_add_watch_full(), which is called when the requested condition\non a #GIOChannel is satisfied."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_IOFunc =
        Ptr GLib.IOChannel.IOChannel ->
        CUInt ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "source"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOChannel" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the #GIOChannel event source"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "condition"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "IOCondition" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the condition which has been satisfied"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "user data set in g_io_add_watch() or g_io_add_watch_full()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_IOFunc :: FunPtr C_IOFunc -> C_IOFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_IOFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_IOFunc
        -> GLib.IOChannel.IOChannel
        -- ^ /@source@/: the t'GI.GLib.Structs.IOChannel.IOChannel' event source
        -> [GLib.Flags.IOCondition]
        -- ^ /@condition@/: the condition which has been satisfied
        -> Ptr ()
        -- ^ /@data@/: user data set in @/g_io_add_watch()/@ or 'GI.GLib.Functions.ioAddWatch'
        -> m Bool
        -- ^ __Returns:__ the function should return 'P.False' if the event source
        --          should be removed
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_IOFunc`.
    foreign import ccall "wrapper"
        mk_IOFunc :: C_IOFunc -> IO (FunPtr C_IOFunc)

    -- | Specifies the type of function passed to @/g_io_add_watch()/@ or
    -- 'GI.GLib.Functions.ioAddWatch', which is called when the requested condition
    -- on a t'GI.GLib.Structs.IOChannel.IOChannel' is satisfied.
    type IOFunc =
        GLib.IOChannel.IOChannel
        -- ^ /@source@/: the t'GI.GLib.Structs.IOChannel.IOChannel' event source
        -> [GLib.Flags.IOCondition]
        -- ^ /@condition@/: the condition which has been satisfied
        -> Ptr ()
        -- ^ /@data@/: user data set in @/g_io_add_watch()/@ or 'GI.GLib.Functions.ioAddWatch'
        -> IO Bool
        -- ^ __Returns:__ the function should return 'P.False' if the event source
        --          should be removed

    -- | A convenience synonym for @`Nothing` :: `Maybe` `IOFunc`@.
    noIOFunc :: Maybe IOFunc
    noIOFunc :: Maybe IOFunc
    noIOFunc = Maybe IOFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `IOFunc` into a `C_IOFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
            CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback HookMarshaller
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "hook"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "marshal_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just "Defines the type of function used by g_hook_list_marshal()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookMarshaller =
        Ptr GLib.Hook.Hook ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "hook"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "marshal_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookMarshaller :: FunPtr C_HookMarshaller -> C_HookMarshaller

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookMarshaller ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookMarshaller
        -> GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@marshalData@/: user data
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_HookMarshaller`.
    foreign import ccall "wrapper"
        mk_HookMarshaller :: C_HookMarshaller -> IO (FunPtr C_HookMarshaller)

    -- | Defines the type of function used by 'GI.GLib.Structs.HookList.hookListMarshal'.
    type HookMarshaller =
        GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@marshalData@/: user data
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookMarshaller`@.
    noHookMarshaller :: Maybe HookMarshaller
    noHookMarshaller :: Maybe HookMarshaller
    noHookMarshaller = Maybe HookMarshaller
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookMarshaller` into a `C_HookMarshaller`.
    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

    -- callback HookFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the data field of the #GHook is passed to the hook function here"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Defines the type of a hook function that can be invoked\nby g_hook_list_invoke()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the data field of the #GHook is passed to the hook function here"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookFunc :: FunPtr C_HookFunc -> C_HookFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookFunc
        -> Ptr ()
        -- ^ /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here
        -> m ()
    dynamic_HookFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_HookFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    data_ = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_HookFunc`.
    foreign import ccall "wrapper"
        mk_HookFunc :: C_HookFunc -> IO (FunPtr C_HookFunc)

    -- | Defines the type of a hook function that can be invoked
    -- by 'GI.GLib.Structs.HookList.hookListInvoke'.
    type HookFunc =
        Ptr ()
        -- ^ /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookFunc`@.
    noHookFunc :: Maybe HookFunc
    noHookFunc :: Maybe TestFixtureFunc
    noHookFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookFunc` into a `C_HookFunc`.
    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

    -- callback HookFindFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE if the required #GHook has been found"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "hook"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_hook_find_func()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just "Defines the type of the function passed to g_hook_find()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookFindFunc =
        Ptr GLib.Hook.Hook ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "hook"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_hook_find_func()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookFindFunc :: FunPtr C_HookFindFunc -> C_HookFindFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookFindFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookFindFunc
        -> GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@data@/: user data passed to @/g_hook_find_func()/@
        -> m Bool
        -- ^ __Returns:__ 'P.True' if the required t'GI.GLib.Structs.Hook.Hook' has been found
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_HookFindFunc`.
    foreign import ccall "wrapper"
        mk_HookFindFunc :: C_HookFindFunc -> IO (FunPtr C_HookFindFunc)

    -- | Defines the type of the function passed to @/g_hook_find()/@.
    type HookFindFunc =
        GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@data@/: user data passed to @/g_hook_find_func()/@
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if the required t'GI.GLib.Structs.Hook.Hook' has been found

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookFindFunc`@.
    noHookFindFunc :: Maybe HookFindFunc
    noHookFindFunc :: Maybe HookFindFunc
    noHookFindFunc = Maybe HookFindFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookFindFunc` into a `C_HookFindFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback HookFinalizeFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "hook_list"
              , argType =
                  TInterface Name { namespace = "GLib" , name = "HookList" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GHookList" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "hook"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the hook in @hook_list that gets finalized"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Defines the type of function to be called when a hook in a\nlist of hooks gets finalized."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookFinalizeFunc =
        Ptr GLib.HookList.HookList ->
        Ptr GLib.Hook.Hook ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "hook_list"
    --           , argType =
    --               TInterface Name { namespace = "GLib" , name = "HookList" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GHookList" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "hook"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the hook in @hook_list that gets finalized"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookFinalizeFunc :: FunPtr C_HookFinalizeFunc -> C_HookFinalizeFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookFinalizeFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookFinalizeFunc
        -> GLib.HookList.HookList
        -- ^ /@hookList@/: a t'GI.GLib.Structs.HookList.HookList'
        -> GLib.Hook.Hook
        -- ^ /@hook@/: the hook in /@hookList@/ that gets finalized
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_HookFinalizeFunc`.
    foreign import ccall "wrapper"
        mk_HookFinalizeFunc :: C_HookFinalizeFunc -> IO (FunPtr C_HookFinalizeFunc)

    -- | Defines the type of function to be called when a hook in a
    -- list of hooks gets finalized.
    type HookFinalizeFunc =
        GLib.HookList.HookList
        -- ^ /@hookList@/: a t'GI.GLib.Structs.HookList.HookList'
        -> GLib.Hook.Hook
        -- ^ /@hook@/: the hook in /@hookList@/ that gets finalized
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookFinalizeFunc`@.
    noHookFinalizeFunc :: Maybe HookFinalizeFunc
    noHookFinalizeFunc :: Maybe HookFinalizeFunc
    noHookFinalizeFunc = Maybe HookFinalizeFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookFinalizeFunc` into a `C_HookFinalizeFunc`.
    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

    -- callback HookCompareFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just "a value <= 0 if @new_hook should be before @sibling"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "new_hook"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the #GHook being inserted"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "sibling"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the #GHook to compare with @new_hook"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Defines the type of function used to compare #GHook elements in\ng_hook_insert_sorted()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookCompareFunc =
        Ptr GLib.Hook.Hook ->
        Ptr GLib.Hook.Hook ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "new_hook"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the #GHook being inserted"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "sibling"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the #GHook to compare with @new_hook"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookCompareFunc :: FunPtr C_HookCompareFunc -> C_HookCompareFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookCompareFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookCompareFunc
        -> GLib.Hook.Hook
        -- ^ /@newHook@/: the t'GI.GLib.Structs.Hook.Hook' being inserted
        -> GLib.Hook.Hook
        -- ^ /@sibling@/: the t'GI.GLib.Structs.Hook.Hook' to compare with /@newHook@/
        -> m Int32
        -- ^ __Returns:__ a value \<= 0 if /@newHook@/ should be before /@sibling@/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_HookCompareFunc`.
    foreign import ccall "wrapper"
        mk_HookCompareFunc :: C_HookCompareFunc -> IO (FunPtr C_HookCompareFunc)

    -- | Defines the type of function used to compare t'GI.GLib.Structs.Hook.Hook' elements in
    -- 'GI.GLib.Functions.hookInsertSorted'.
    type HookCompareFunc =
        GLib.Hook.Hook
        -- ^ /@newHook@/: the t'GI.GLib.Structs.Hook.Hook' being inserted
        -> GLib.Hook.Hook
        -- ^ /@sibling@/: the t'GI.GLib.Structs.Hook.Hook' to compare with /@newHook@/
        -> IO Int32
        -- ^ __Returns:__ a value \<= 0 if /@newHook@/ should be before /@sibling@/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookCompareFunc`@.
    noHookCompareFunc :: Maybe HookCompareFunc
    noHookCompareFunc :: Maybe HookCompareFunc
    noHookCompareFunc = Maybe HookCompareFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookCompareFunc` into a `C_HookCompareFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback HookCheckMarshaller
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%FALSE if @hook should be destroyed"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "hook"
              , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "marshal_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Defines the type of function used by g_hook_list_marshal_check()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookCheckMarshaller =
        Ptr GLib.Hook.Hook ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "hook"
    --           , argType = TInterface Name { namespace = "GLib" , name = "Hook" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GHook" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "marshal_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookCheckMarshaller :: FunPtr C_HookCheckMarshaller -> C_HookCheckMarshaller

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookCheckMarshaller ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookCheckMarshaller
        -> GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@marshalData@/: user data
        -> m Bool
        -- ^ __Returns:__ 'P.False' if /@hook@/ should be destroyed
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_HookCheckMarshaller`.
    foreign import ccall "wrapper"
        mk_HookCheckMarshaller :: C_HookCheckMarshaller -> IO (FunPtr C_HookCheckMarshaller)

    -- | Defines the type of function used by 'GI.GLib.Structs.HookList.hookListMarshalCheck'.
    type HookCheckMarshaller =
        GLib.Hook.Hook
        -- ^ /@hook@/: a t'GI.GLib.Structs.Hook.Hook'
        -> Ptr ()
        -- ^ /@marshalData@/: user data
        -> IO Bool
        -- ^ __Returns:__ 'P.False' if /@hook@/ should be destroyed

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookCheckMarshaller`@.
    noHookCheckMarshaller :: Maybe HookCheckMarshaller
    noHookCheckMarshaller :: Maybe HookFindFunc
    noHookCheckMarshaller = Maybe HookFindFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookCheckMarshaller` into a `C_HookCheckMarshaller`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback HookCheckFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%FALSE if the #GHook should be destroyed"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the data field of the #GHook is passed to the hook function here"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Defines the type of a hook function that can be invoked\nby g_hook_list_invoke_check()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HookCheckFunc =
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the data field of the #GHook is passed to the hook function here"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HookCheckFunc :: FunPtr C_HookCheckFunc -> C_HookCheckFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HookCheckFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HookCheckFunc
        -> Ptr ()
        -- ^ /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here
        -> m Bool
        -- ^ __Returns:__ 'P.False' if the t'GI.GLib.Structs.Hook.Hook' should be destroyed
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_HookCheckFunc`.
    foreign import ccall "wrapper"
        mk_HookCheckFunc :: C_HookCheckFunc -> IO (FunPtr C_HookCheckFunc)

    -- | Defines the type of a hook function that can be invoked
    -- by 'GI.GLib.Structs.HookList.hookListInvokeCheck'.
    type HookCheckFunc =
        Ptr ()
        -- ^ /@data@/: the data field of the t'GI.GLib.Structs.Hook.Hook' is passed to the hook function here
        -> IO Bool
        -- ^ __Returns:__ 'P.False' if the t'GI.GLib.Structs.Hook.Hook' should be destroyed

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HookCheckFunc`@.
    noHookCheckFunc :: Maybe HookCheckFunc
    noHookCheckFunc :: Maybe SourceFunc_WithClosures
    noHookCheckFunc = Maybe SourceFunc_WithClosures
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HookCheckFunc` into a `C_HookCheckFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback HashFunc
    {- Callable
      { returnType = Just (TBasicType TUInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "the hash value corresponding to the key"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "key"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a key" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the hash function which is passed to\ng_hash_table_new() when a #GHashTable is created.\n\nThe function is passed a key and should return a #guint hash value.\nThe functions g_direct_hash(), g_int_hash() and g_str_hash() provide\nhash functions which can be used when the key is a #gpointer, #gint*,\nand #gchar* respectively.\n\ng_direct_hash() is also the appropriate hash function for keys\nof the form `GINT_TO_POINTER (n)` (or similar macros).\n\nA good hash functions should produce\nhash values that are evenly distributed over a fairly large range.\nThe modulus is taken with the hash table size (a prime number) to\nfind the 'bucket' to place each key into. The function should also\nbe very fast, since it is called for each key lookup.\n\nNote that the hash functions provided by GLib have these qualities,\nbut are not particularly robust against manufactured keys that\ncause hash collisions. Therefore, you should consider choosing\na more secure hash function when using a GHashTable with keys\nthat originate in untrusted data (such as HTTP requests).\nUsing g_str_hash() in that situation might make your application\nvulnerable to\n[Algorithmic Complexity Attacks](https://lwn.net/Articles/474912/).\n\nThe key to choosing a good hash is unpredictability.  Even\ncryptographic hashes are very easy to find collisions for when the\nremainder is taken modulo a somewhat predictable prime number.  There\nmust be an element of randomness that an attacker is unable to guess."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HashFunc =
        Ptr () ->
        IO Word32

    -- Args: [ Arg
    --           { argCName = "key"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a key" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HashFunc :: FunPtr C_HashFunc -> C_HashFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HashFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HashFunc
        -> Ptr ()
        -- ^ /@key@/: a key
        -> m Word32
        -- ^ __Returns:__ the hash value corresponding to the key
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Word32
    result

    -- | Generate a function pointer callable from C code, from a `C_HashFunc`.
    foreign import ccall "wrapper"
        mk_HashFunc :: C_HashFunc -> IO (FunPtr C_HashFunc)

    -- | Specifies the type of the hash function which is passed to
    -- @/g_hash_table_new()/@ when a t'GI.GLib.Structs.HashTable.HashTable' is created.
    --
    -- The function is passed a key and should return a @/guint/@ hash value.
    -- The functions 'GI.GLib.Functions.directHash', 'GI.GLib.Functions.intHash' and 'GI.GLib.Functions.strHash' provide
    -- hash functions which can be used when the key is a @/gpointer/@, @/gint/@*,
    -- and @/gchar/@* respectively.
    --
    -- 'GI.GLib.Functions.directHash' is also the appropriate hash function for keys
    -- of the form @GINT_TO_POINTER (n)@ (or similar macros).
    --
    -- A good hash functions should produce
    -- hash values that are evenly distributed over a fairly large range.
    -- The modulus is taken with the hash table size (a prime number) to
    -- find the \'bucket\' to place each key into. The function should also
    -- be very fast, since it is called for each key lookup.
    --
    -- Note that the hash functions provided by GLib have these qualities,
    -- but are not particularly robust against manufactured keys that
    -- cause hash collisions. Therefore, you should consider choosing
    -- a more secure hash function when using a GHashTable with keys
    -- that originate in untrusted data (such as HTTP requests).
    -- Using 'GI.GLib.Functions.strHash' in that situation might make your application
    -- vulnerable to
    -- <https://lwn.net/Articles/474912/ Algorithmic Complexity Attacks>.
    --
    -- The key to choosing a good hash is unpredictability.  Even
    -- cryptographic hashes are very easy to find collisions for when the
    -- remainder is taken modulo a somewhat predictable prime number.  There
    -- must be an element of randomness that an attacker is unable to guess.
    type HashFunc =
        Ptr ()
        -- ^ /@key@/: a key
        -> IO Word32
        -- ^ __Returns:__ the hash value corresponding to the key

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HashFunc`@.
    noHashFunc :: Maybe HashFunc
    noHashFunc :: Maybe C_HashFunc
    noHashFunc = Maybe C_HashFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HashFunc` into a `C_HashFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Word32
    result

    -- callback HRFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "true if the key/value pair should be selected, and\n  false otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "key"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a key" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "value"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the value associated with the key"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to the calling function"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the function passed to\n[func@GLib.HashTable.find], [func@GLib.HashTable.foreach_remove], and\n[func@GLib.HashTable.foreach_steal].\n\nThe function is called with each key/value pair, together with\nthe @user_data parameter passed to the calling function.\n\nThe function should return true if the key/value pair should be\nselected, meaning it has been found or it should be removed from the\n[struct@GLib.HashTable], depending on the calling function."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HRFunc =
        Ptr () ->
        Ptr () ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "key"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a key" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "value"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the value associated with the key"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to the calling function"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HRFunc :: FunPtr C_HRFunc -> C_HRFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HRFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HRFunc
        -> Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value associated with the key
        -> Ptr ()
        -- ^ /@userData@/: user data passed to the calling function
        -> m Bool
        -- ^ __Returns:__ true if the key\/value pair should be selected, and
        --   false otherwise
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_HRFunc`.
    foreign import ccall "wrapper"
        mk_HRFunc :: C_HRFunc -> IO (FunPtr C_HRFunc)

    -- | Specifies the type of the function passed to
    -- [func/@gLib@/.HashTable.find], [func/@gLib@/.HashTable.foreach_remove], and
    -- [func/@gLib@/.HashTable.foreach_steal].
    --
    -- The function is called with each key\/value pair, together with
    -- the /@userData@/ parameter passed to the calling function.
    --
    -- The function should return true if the key\/value pair should be
    -- selected, meaning it has been found or it should be removed from the
    -- [struct/@gLib@/.HashTable], depending on the calling function.
    type HRFunc =
        Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value associated with the key
        -> IO Bool
        -- ^ __Returns:__ true if the key\/value pair should be selected, and
        --   false otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HRFunc`@.
    noHRFunc :: Maybe HRFunc
    noHRFunc :: Maybe HRFunc
    noHRFunc = Maybe HRFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of the function passed to
    -- [func/@gLib@/.HashTable.find], [func/@gLib@/.HashTable.foreach_remove], and
    -- [func/@gLib@/.HashTable.foreach_steal].
    --
    -- The function is called with each key\/value pair, together with
    -- the /@userData@/ parameter passed to the calling function.
    --
    -- The function should return true if the key\/value pair should be
    -- selected, meaning it has been found or it should be removed from the
    -- [struct/@gLib@/.HashTable], depending on the calling function.
    type HRFunc_WithClosures =
        Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value associated with the key
        -> Ptr ()
        -- ^ /@userData@/: user data passed to the calling function
        -> IO Bool
        -- ^ __Returns:__ true if the key\/value pair should be selected, and
        --   false otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HRFunc_WithClosures`@.
    noHRFunc_WithClosures :: Maybe HRFunc_WithClosures
    noHRFunc_WithClosures :: Maybe TraverseFunc
    noHRFunc_WithClosures = Maybe TraverseFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HRFunc` into a `C_HRFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback HFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "key"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a key" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "value"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the value corresponding to the key"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_hash_table_foreach()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the function passed to g_hash_table_foreach().\nIt is called with each key/value pair, together with the @user_data\nparameter which is passed to g_hash_table_foreach()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_HFunc =
        Ptr () ->
        Ptr () ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "key"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a key" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "value"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the value corresponding to the key"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_hash_table_foreach()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_HFunc :: FunPtr C_HFunc -> C_HFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_HFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_HFunc
        -> Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value corresponding to the key
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.hashTableForeach'
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_HFunc`.
    foreign import ccall "wrapper"
        mk_HFunc :: C_HFunc -> IO (FunPtr C_HFunc)

    -- | Specifies the type of the function passed to 'GI.GLib.Functions.hashTableForeach'.
    -- It is called with each key\/value pair, together with the /@userData@/
    -- parameter which is passed to 'GI.GLib.Functions.hashTableForeach'.
    type HFunc =
        Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value corresponding to the key
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HFunc`@.
    noHFunc :: Maybe HFunc
    noHFunc :: Maybe C_TestFixtureFunc
    noHFunc = Maybe C_TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of the function passed to 'GI.GLib.Functions.hashTableForeach'.
    -- It is called with each key\/value pair, together with the /@userData@/
    -- parameter which is passed to 'GI.GLib.Functions.hashTableForeach'.
    type HFunc_WithClosures =
        Ptr ()
        -- ^ /@key@/: a key
        -> Ptr ()
        -- ^ /@value@/: the value corresponding to the key
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.hashTableForeach'
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `HFunc_WithClosures`@.
    noHFunc_WithClosures :: Maybe HFunc_WithClosures
    noHFunc_WithClosures :: Maybe C_HFunc
    noHFunc_WithClosures = Maybe C_HFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `HFunc` into a `C_HFunc`.
    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

    -- callback Func
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the element's data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "user data passed to g_list_foreach() or g_slist_foreach()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of functions passed to g_list_foreach() and\ng_slist_foreach()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_Func =
        Ptr () ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the element's data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "user data passed to g_list_foreach() or g_slist_foreach()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_Func :: FunPtr C_Func -> C_Func

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_Func ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_Func
        -> Ptr ()
        -- ^ /@data@/: the element\'s data
        -> Ptr ()
        -- ^ /@userData@/: user data passed to @/g_list_foreach()/@ or @/g_slist_foreach()/@
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_Func`.
    foreign import ccall "wrapper"
        mk_Func :: C_Func -> IO (FunPtr C_Func)

    -- | Specifies the type of functions passed to @/g_list_foreach()/@ and
    -- @/g_slist_foreach()/@.
    type Func =
        Ptr ()
        -- ^ /@data@/: the element\'s data
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `Func`@.
    noFunc :: Maybe Func
    noFunc :: Maybe TestFixtureFunc
    noFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of functions passed to @/g_list_foreach()/@ and
    -- @/g_slist_foreach()/@.
    type Func_WithClosures =
        Ptr ()
        -- ^ /@data@/: the element\'s data
        -> Ptr ()
        -- ^ /@userData@/: user data passed to @/g_list_foreach()/@ or @/g_slist_foreach()/@
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `Func_WithClosures`@.
    noFunc_WithClosures :: Maybe Func_WithClosures
    noFunc_WithClosures :: Maybe C_TestFixtureFunc
    noFunc_WithClosures = Maybe C_TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_Func :: Func -> Func_WithClosures
    drop_closures_Func :: TestFixtureFunc -> C_TestFixtureFunc
    drop_closures_Func TestFixtureFunc
    _f Ptr ()
    data_ Ptr ()
    _ = TestFixtureFunc
    _f Ptr ()
    data_

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `Func` into a `C_Func`.
    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

    -- callback FreeFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a data pointer" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Declares a type of function which takes an arbitrary\ndata pointer argument and has no return value. It is\nnot currently used in GLib or GTK."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_FreeFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a data pointer" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_FreeFunc :: FunPtr C_FreeFunc -> C_FreeFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_FreeFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_FreeFunc
        -> Ptr ()
        -- ^ /@data@/: a data pointer
        -> m ()
    dynamic_FreeFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_FreeFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    data_ = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_FreeFunc`.
    foreign import ccall "wrapper"
        mk_FreeFunc :: C_FreeFunc -> IO (FunPtr C_FreeFunc)

    -- | Declares a type of function which takes an arbitrary
    -- data pointer argument and has no return value. It is
    -- not currently used in GLib or GTK.
    type FreeFunc =
        Ptr ()
        -- ^ /@data@/: a data pointer
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `FreeFunc`@.
    noFreeFunc :: Maybe FreeFunc
    noFreeFunc :: Maybe TestFixtureFunc
    noFreeFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `FreeFunc` into a `C_FreeFunc`.
    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

    -- callback ErrorInitFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "error"
              , argType = TError
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "extended error" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function which is called just after an\nextended error instance is created and its fields filled. It should\nonly initialize the fields in the private data, which can be\nreceived with the generated `*_get_private()` function.\n\nNormally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it\nalready takes care of getting the private data from @error."
            , sinceVersion = Just "2.68"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ErrorInitFunc =
        Ptr GError ->
        IO ()

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

    foreign import ccall "dynamic" __dynamic_C_ErrorInitFunc :: FunPtr C_ErrorInitFunc -> C_ErrorInitFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ErrorInitFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ErrorInitFunc
        -> GError
        -- ^ /@error@/: extended error
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ErrorInitFunc`.
    foreign import ccall "wrapper"
        mk_ErrorInitFunc :: C_ErrorInitFunc -> IO (FunPtr C_ErrorInitFunc)

    -- | Specifies the type of function which is called just after an
    -- extended error instance is created and its fields filled. It should
    -- only initialize the fields in the private data, which can be
    -- received with the generated @*_get_private()@ function.
    --
    -- Normally, it is better to use @/G_DEFINE_EXTENDED_ERROR()/@, as it
    -- already takes care of getting the private data from /@error@/.
    --
    -- /Since: 2.68/
    type ErrorInitFunc =
        GError
        -- ^ /@error@/: extended error
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ErrorInitFunc`@.
    noErrorInitFunc :: Maybe ErrorInitFunc
    noErrorInitFunc :: Maybe (GError -> C_VoidFunc)
    noErrorInitFunc = Maybe (GError -> C_VoidFunc)
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ErrorInitFunc` into a `C_ErrorInitFunc`.
    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

    -- callback ErrorCopyFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "src_error"
              , argType = TError
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "source extended error"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "dest_error"
              , argType = TError
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "destination extended error"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function which is called when an extended\nerror instance is copied. It is passed the pointer to the\ndestination error and source error, and should copy only the fields\nof the private data from @src_error to @dest_error.\n\nNormally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it\nalready takes care of getting the private data from @src_error and\n@dest_error."
            , sinceVersion = Just "2.68"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ErrorCopyFunc =
        Ptr GError ->
        Ptr GError ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "src_error"
    --           , argType = TError
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "source extended error"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "dest_error"
    --           , argType = TError
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "destination extended error"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ErrorCopyFunc :: FunPtr C_ErrorCopyFunc -> C_ErrorCopyFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ErrorCopyFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ErrorCopyFunc
        -> GError
        -- ^ /@srcError@/: source extended error
        -> GError
        -- ^ /@destError@/: destination extended error
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ErrorCopyFunc`.
    foreign import ccall "wrapper"
        mk_ErrorCopyFunc :: C_ErrorCopyFunc -> IO (FunPtr C_ErrorCopyFunc)

    -- | Specifies the type of function which is called when an extended
    -- error instance is copied. It is passed the pointer to the
    -- destination error and source error, and should copy only the fields
    -- of the private data from /@srcError@/ to /@destError@/.
    --
    -- Normally, it is better to use @/G_DEFINE_EXTENDED_ERROR()/@, as it
    -- already takes care of getting the private data from /@srcError@/ and
    -- /@destError@/.
    --
    -- /Since: 2.68/
    type ErrorCopyFunc =
        GError
        -- ^ /@srcError@/: source extended error
        -> GError
        -- ^ /@destError@/: destination extended error
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ErrorCopyFunc`@.
    noErrorCopyFunc :: Maybe ErrorCopyFunc
    noErrorCopyFunc :: Maybe ErrorCopyFunc
    noErrorCopyFunc = Maybe ErrorCopyFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ErrorCopyFunc` into a `C_ErrorCopyFunc`.
    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

    -- callback ErrorClearFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "error"
              , argType = TError
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "extended error to clear"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function which is called when an extended\nerror instance is freed. It is passed the error pointer about to be\nfreed, and should free the error's private data fields.\n\nNormally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it\nalready takes care of getting the private data from @error."
            , sinceVersion = Just "2.68"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ErrorClearFunc =
        Ptr GError ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "error"
    --           , argType = TError
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "extended error to clear"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ErrorClearFunc :: FunPtr C_ErrorClearFunc -> C_ErrorClearFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ErrorClearFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ErrorClearFunc
        -> GError
        -- ^ /@error@/: extended error to clear
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ErrorClearFunc`.
    foreign import ccall "wrapper"
        mk_ErrorClearFunc :: C_ErrorClearFunc -> IO (FunPtr C_ErrorClearFunc)

    -- | Specifies the type of function which is called when an extended
    -- error instance is freed. It is passed the error pointer about to be
    -- freed, and should free the error\'s private data fields.
    --
    -- Normally, it is better to use @/G_DEFINE_EXTENDED_ERROR()/@, as it
    -- already takes care of getting the private data from /@error@/.
    --
    -- /Since: 2.68/
    type ErrorClearFunc =
        GError
        -- ^ /@error@/: extended error to clear
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ErrorClearFunc`@.
    noErrorClearFunc :: Maybe ErrorClearFunc
    noErrorClearFunc :: Maybe (GError -> C_VoidFunc)
    noErrorClearFunc = Maybe (GError -> C_VoidFunc)
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ErrorClearFunc` into a `C_ErrorClearFunc`.
    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

    -- callback EqualFuncFull
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE if @a = @b; %FALSE otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "a"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "b"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value to compare with"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data provided by the caller"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of a function used to test two values for\nequality. The function should return %TRUE if both values are equal\nand %FALSE otherwise.\n\nThis is a version of #GEqualFunc which provides a @user_data closure from\nthe caller."
            , sinceVersion = Just "2.74"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_EqualFuncFull =
        Ptr () ->
        Ptr () ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "a"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "b"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value to compare with"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data provided by the caller"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_EqualFuncFull :: FunPtr C_EqualFuncFull -> C_EqualFuncFull

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_EqualFuncFull ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_EqualFuncFull
        -> Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> Ptr ()
        -- ^ /@userData@/: user data provided by the caller
        -> m Bool
        -- ^ __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise
    dynamic_EqualFuncFull :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_TraverseFunc -> Ptr () -> Ptr () -> Ptr () -> m Bool
    dynamic_EqualFuncFull FunPtr C_TraverseFunc
    __funPtr Ptr ()
    a Ptr ()
    b Ptr ()
    userData = IO Bool -> m Bool
    forall a. IO a -> m a
    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_EqualFuncFull FunPtr C_TraverseFunc
    __funPtr) Ptr ()
    a Ptr ()
    b Ptr ()
    userData
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        Bool -> IO Bool
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_EqualFuncFull`.
    foreign import ccall "wrapper"
        mk_EqualFuncFull :: C_EqualFuncFull -> IO (FunPtr C_EqualFuncFull)

    -- | Specifies the type of a function used to test two values for
    -- equality. The function should return 'P.True' if both values are equal
    -- and 'P.False' otherwise.
    --
    -- This is a version of t'GI.GLib.Callbacks.EqualFunc' which provides a /@userData@/ closure from
    -- the caller.
    --
    -- /Since: 2.74/
    type EqualFuncFull =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `EqualFuncFull`@.
    noEqualFuncFull :: Maybe EqualFuncFull
    noEqualFuncFull :: Maybe HRFunc
    noEqualFuncFull = Maybe HRFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of a function used to test two values for
    -- equality. The function should return 'P.True' if both values are equal
    -- and 'P.False' otherwise.
    --
    -- This is a version of t'GI.GLib.Callbacks.EqualFunc' which provides a /@userData@/ closure from
    -- the caller.
    --
    -- /Since: 2.74/
    type EqualFuncFull_WithClosures =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> Ptr ()
        -- ^ /@userData@/: user data provided by the caller
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `EqualFuncFull_WithClosures`@.
    noEqualFuncFull_WithClosures :: Maybe EqualFuncFull_WithClosures
    noEqualFuncFull_WithClosures :: Maybe TraverseFunc
    noEqualFuncFull_WithClosures = Maybe TraverseFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    drop_closures_EqualFuncFull :: EqualFuncFull -> EqualFuncFull_WithClosures
    drop_closures_EqualFuncFull :: HRFunc -> TraverseFunc
    drop_closures_EqualFuncFull HRFunc
    _f Ptr ()
    a Ptr ()
    b Ptr ()
    _ = HRFunc
    _f Ptr ()
    a Ptr ()
    b

    -- | Wrap the callback into a `GClosure`.
    genClosure_EqualFuncFull :: MonadIO m => EqualFuncFull -> m (GClosure C_EqualFuncFull)
    genClosure_EqualFuncFull :: forall (m :: * -> *).
    MonadIO m =>
    HRFunc -> m (GClosure C_TraverseFunc)
    genClosure_EqualFuncFull HRFunc
    cb = IO (GClosure C_TraverseFunc) -> m (GClosure C_TraverseFunc)
    forall a. IO a -> m a
    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_EqualFuncFull HRFunc
    cb
        let cb'' :: C_TraverseFunc
    cb'' = Maybe (Ptr (FunPtr C_TraverseFunc))
    -> TraverseFunc -> C_TraverseFunc
    wrap_EqualFuncFull Maybe (Ptr (FunPtr C_TraverseFunc))
    forall a. Maybe a
    Nothing TraverseFunc
    cb'
        C_TraverseFunc -> IO (FunPtr C_TraverseFunc)
    mk_EqualFuncFull C_TraverseFunc
    cb'' IO (FunPtr C_TraverseFunc)
    -> (FunPtr C_TraverseFunc -> IO (GClosure C_TraverseFunc))
    -> IO (GClosure C_TraverseFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    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 a `EqualFuncFull` into a `C_EqualFuncFull`.
    wrap_EqualFuncFull ::
        Maybe (Ptr (FunPtr C_EqualFuncFull)) ->
        EqualFuncFull_WithClosures ->
        C_EqualFuncFull
    wrap_EqualFuncFull :: Maybe (Ptr (FunPtr C_TraverseFunc))
    -> TraverseFunc -> C_TraverseFunc
    wrap_EqualFuncFull Maybe (Ptr (FunPtr C_TraverseFunc))
    gi'funptrptr TraverseFunc
    gi'cb Ptr ()
    a Ptr ()
    b Ptr ()
    userData = do
        Bool
    result <- TraverseFunc
    gi'cb  Ptr ()
    a Ptr ()
    b 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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback EqualFunc
    {- Callable
      { returnType = Just (TBasicType TBoolean)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "%TRUE if @a = @b; %FALSE otherwise"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "a"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "b"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value to compare with"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of a function used to test two values for\nequality. The function should return %TRUE if both values are equal\nand %FALSE otherwise."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_EqualFunc =
        Ptr () ->
        Ptr () ->
        IO CInt

    -- Args: [ Arg
    --           { argCName = "a"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "b"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value to compare with"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_EqualFunc :: FunPtr C_EqualFunc -> C_EqualFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_EqualFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_EqualFunc
        -> Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> m Bool
        -- ^ __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    -- | Generate a function pointer callable from C code, from a `C_EqualFunc`.
    foreign import ccall "wrapper"
        mk_EqualFunc :: C_EqualFunc -> IO (FunPtr C_EqualFunc)

    -- | Specifies the type of a function used to test two values for
    -- equality. The function should return 'P.True' if both values are equal
    -- and 'P.False' otherwise.
    type EqualFunc =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> IO Bool
        -- ^ __Returns:__ 'P.True' if /@a@/ = /@b@/; 'P.False' otherwise

    -- | A convenience synonym for @`Nothing` :: `Maybe` `EqualFunc`@.
    noEqualFunc :: Maybe EqualFunc
    noEqualFunc :: Maybe HRFunc
    noEqualFunc = Maybe HRFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `EqualFunc` into a `C_EqualFunc`.
    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
    P.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
    P.fromEnum) Bool
    result
        CInt -> IO CInt
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CInt
    result'

    -- callback DuplicateFunc
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = True
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "a duplicate of data"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the data to duplicate"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "user data that was specified in\n            g_datalist_id_dup_data()"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "The type of functions that are used to 'duplicate' an object.\nWhat this means depends on the context, it could just be\nincrementing the reference count, if @data is a ref-counted\nobject."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_DuplicateFunc =
        Ptr () ->
        Ptr () ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data to duplicate"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "user data that was specified in\n            g_datalist_id_dup_data()"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_DuplicateFunc :: FunPtr C_DuplicateFunc -> C_DuplicateFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_DuplicateFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_DuplicateFunc
        -> Ptr ()
        -- ^ /@data@/: the data to duplicate
        -> Ptr ()
        -- ^ /@userData@/: user data that was specified in
        --             @/g_datalist_id_dup_data()/@
        -> m (Ptr ())
        -- ^ __Returns:__ a duplicate of data
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_DuplicateFunc`.
    foreign import ccall "wrapper"
        mk_DuplicateFunc :: C_DuplicateFunc -> IO (FunPtr C_DuplicateFunc)

    -- | The type of functions that are used to \'duplicate\' an object.
    -- What this means depends on the context, it could just be
    -- incrementing the reference count, if /@data@/ is a ref-counted
    -- object.
    type DuplicateFunc =
        Ptr ()
        -- ^ /@data@/: the data to duplicate
        -> IO (Ptr ())
        -- ^ __Returns:__ a duplicate of data

    -- | A convenience synonym for @`Nothing` :: `Maybe` `DuplicateFunc`@.
    noDuplicateFunc :: Maybe DuplicateFunc
    noDuplicateFunc :: Maybe C_ThreadFunc
    noDuplicateFunc = Maybe C_ThreadFunc
    forall a. Maybe a
    Nothing

    -- | The type of functions that are used to \'duplicate\' an object.
    -- What this means depends on the context, it could just be
    -- incrementing the reference count, if /@data@/ is a ref-counted
    -- object.
    type DuplicateFunc_WithClosures =
        Ptr ()
        -- ^ /@data@/: the data to duplicate
        -> Ptr ()
        -- ^ /@userData@/: user data that was specified in
        --             @/g_datalist_id_dup_data()/@
        -> IO (Ptr ())
        -- ^ __Returns:__ a duplicate of data

    -- | A convenience synonym for @`Nothing` :: `Maybe` `DuplicateFunc_WithClosures`@.
    noDuplicateFunc_WithClosures :: Maybe DuplicateFunc_WithClosures
    noDuplicateFunc_WithClosures :: Maybe C_DuplicateFunc
    noDuplicateFunc_WithClosures = Maybe C_DuplicateFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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_

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `DuplicateFunc` into a `C_DuplicateFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback DestroyNotify
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the data element." , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function which is called when a data element\nis destroyed. It is passed the pointer to the data element and\nshould free any memory and resources allocated for it."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_DestroyNotify =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data element." , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_DestroyNotify :: FunPtr C_DestroyNotify -> C_DestroyNotify

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_DestroyNotify ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_DestroyNotify
        -> Ptr ()
        -- ^ /@data@/: the data element.
        -> m ()
    dynamic_DestroyNotify :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_DestroyNotify FunPtr TestFixtureFunc
    __funPtr Ptr ()
    data_ = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_DestroyNotify`.
    foreign import ccall "wrapper"
        mk_DestroyNotify :: C_DestroyNotify -> IO (FunPtr C_DestroyNotify)

    -- | Specifies the type of function which is called when a data element
    -- is destroyed. It is passed the pointer to the data element and
    -- should free any memory and resources allocated for it.
    type DestroyNotify =
        Ptr ()
        -- ^ /@data@/: the data element.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `DestroyNotify`@.
    noDestroyNotify :: Maybe DestroyNotify
    noDestroyNotify :: Maybe TestFixtureFunc
    noDestroyNotify = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `DestroyNotify` into a `C_DestroyNotify`.
    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

    -- callback DataForeachFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "key_id"
              , argType = TBasicType TUInt32
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "the #GQuark id to identifying the data element."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the data element." , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data passed to g_dataset_foreach()."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to g_dataset_foreach(). It is\ncalled with each #GQuark id and associated data element, together\nwith the @user_data parameter supplied to g_dataset_foreach()."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_DataForeachFunc =
        Word32 ->
        Ptr () ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "key_id"
    --           , argType = TBasicType TUInt32
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "the #GQuark id to identifying the data element."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the data element." , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data passed to g_dataset_foreach()."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_DataForeachFunc :: FunPtr C_DataForeachFunc -> C_DataForeachFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_DataForeachFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_DataForeachFunc
        -> Word32
        -- ^ /@keyId@/: the @/GQuark/@ id to identifying the data element.
        -> Ptr ()
        -- ^ /@data@/: the data element.
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.datasetForeach'.
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_DataForeachFunc`.
    foreign import ccall "wrapper"
        mk_DataForeachFunc :: C_DataForeachFunc -> IO (FunPtr C_DataForeachFunc)

    -- | Specifies the type of function passed to 'GI.GLib.Functions.datasetForeach'. It is
    -- called with each @/GQuark/@ id and associated data element, together
    -- with the /@userData@/ parameter supplied to 'GI.GLib.Functions.datasetForeach'.
    type DataForeachFunc =
        Word32
        -- ^ /@keyId@/: the @/GQuark/@ id to identifying the data element.
        -> Ptr ()
        -- ^ /@data@/: the data element.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `DataForeachFunc`@.
    noDataForeachFunc :: Maybe DataForeachFunc
    noDataForeachFunc :: Maybe DataForeachFunc
    noDataForeachFunc = Maybe DataForeachFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of function passed to 'GI.GLib.Functions.datasetForeach'. It is
    -- called with each @/GQuark/@ id and associated data element, together
    -- with the /@userData@/ parameter supplied to 'GI.GLib.Functions.datasetForeach'.
    type DataForeachFunc_WithClosures =
        Word32
        -- ^ /@keyId@/: the @/GQuark/@ id to identifying the data element.
        -> Ptr ()
        -- ^ /@data@/: the data element.
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.datasetForeach'.
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `DataForeachFunc_WithClosures`@.
    noDataForeachFunc_WithClosures :: Maybe DataForeachFunc_WithClosures
    noDataForeachFunc_WithClosures :: Maybe C_DataForeachFunc
    noDataForeachFunc_WithClosures = Maybe C_DataForeachFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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_

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `DataForeachFunc` into a `C_DataForeachFunc`.
    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

    -- callback CopyFunc
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "A pointer to the copy"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "src"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "A pointer to the data which should be copied"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "Additional data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "A function of this signature is used to copy the node data\nwhen doing a deep-copy of a tree."
            , sinceVersion = Just "2.4"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CopyFunc =
        Ptr () ->
        Ptr () ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "src"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "A pointer to the data which should be copied"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "Additional data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CopyFunc :: FunPtr C_CopyFunc -> C_CopyFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CopyFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CopyFunc
        -> Ptr ()
        -- ^ /@src@/: A pointer to the data which should be copied
        -> Ptr ()
        -- ^ /@data@/: Additional data
        -> m (Ptr ())
        -- ^ __Returns:__ A pointer to the copy
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_CopyFunc`.
    foreign import ccall "wrapper"
        mk_CopyFunc :: C_CopyFunc -> IO (FunPtr C_CopyFunc)

    -- | A function of this signature is used to copy the node data
    -- when doing a deep-copy of a tree.
    --
    -- /Since: 2.4/
    type CopyFunc =
        Ptr ()
        -- ^ /@src@/: A pointer to the data which should be copied
        -> Ptr ()
        -- ^ /@data@/: Additional data
        -> IO (Ptr ())
        -- ^ __Returns:__ A pointer to the copy

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CopyFunc`@.
    noCopyFunc :: Maybe CopyFunc
    noCopyFunc :: Maybe C_DuplicateFunc
    noCopyFunc = Maybe C_DuplicateFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `CopyFunc` into a `C_CopyFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback CompletionStrncmpFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "an integer less than, equal to, or greater than zero if\n         the first @n bytes of @s1 is found, respectively, to be\n         less than, to match, or to be greater than the first @n\n         bytes of @s2."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "s1"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "string to compare with @s2."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "s2"
              , argType = TBasicType TUTF8
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "string to compare with @s1."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "n"
              , argType = TBasicType TSize
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "maximal number of bytes to compare."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated =
          Just
            DeprecationInfo
              { deprecatedSinceVersion = Just "2.26"
              , deprecationMessage = Just "Rarely used API"
              }
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the function passed to\ng_completion_set_compare(). This is used when you use strings as\n#GCompletion items."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CompletionStrncmpFunc =
        CString ->
        CString ->
        FCT.CSize ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "s1"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "string to compare with @s2."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "s2"
    --           , argType = TBasicType TUTF8
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "string to compare with @s1."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "n"
    --           , argType = TBasicType TSize
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "maximal number of bytes to compare."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CompletionStrncmpFunc :: FunPtr C_CompletionStrncmpFunc -> C_CompletionStrncmpFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CompletionStrncmpFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CompletionStrncmpFunc
        -> T.Text
        -- ^ /@s1@/: string to compare with /@s2@/.
        -> T.Text
        -- ^ /@s2@/: string to compare with /@s1@/.
        -> FCT.CSize
        -- ^ /@n@/: maximal number of bytes to compare.
        -> m Int32
        -- ^ __Returns:__ an integer less than, equal to, or greater than zero if
        --          the first /@n@/ bytes of /@s1@/ is found, respectively, to be
        --          less than, to match, or to be greater than the first /@n@/
        --          bytes of /@s2@/.
    dynamic_CompletionStrncmpFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_CompletionStrncmpFunc -> Text -> Text -> CSize -> m Int32
    dynamic_CompletionStrncmpFunc FunPtr C_CompletionStrncmpFunc
    __funPtr Text
    s1 Text
    s2 CSize
    n = IO Int32 -> m Int32
    forall a. IO a -> m a
    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
        CString
    s1' <- Text -> IO CString
    textToCString Text
    s1
        CString
    s2' <- Text -> IO CString
    textToCString Text
    s2
        Int32
    result <- (FunPtr C_CompletionStrncmpFunc -> C_CompletionStrncmpFunc
    __dynamic_C_CompletionStrncmpFunc FunPtr C_CompletionStrncmpFunc
    __funPtr) CString
    s1' CString
    s2' CSize
    n
        CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    s1'
        CString -> C_VoidFunc
    forall a. Ptr a -> C_VoidFunc
    freeMem CString
    s2'
        Int32 -> IO Int32
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_CompletionStrncmpFunc`.
    foreign import ccall "wrapper"
        mk_CompletionStrncmpFunc :: C_CompletionStrncmpFunc -> IO (FunPtr C_CompletionStrncmpFunc)

    {-# DEPRECATED CompletionStrncmpFunc ["(Since version 2.26)","Rarely used API"] #-}
    -- | Specifies the type of the function passed to
    -- @/g_completion_set_compare()/@. This is used when you use strings as
    -- t'GI.GLib.Structs.Completion.Completion' items.
    type CompletionStrncmpFunc =
        T.Text
        -- ^ /@s1@/: string to compare with /@s2@/.
        -> T.Text
        -- ^ /@s2@/: string to compare with /@s1@/.
        -> FCT.CSize
        -- ^ /@n@/: maximal number of bytes to compare.
        -> IO Int32
        -- ^ __Returns:__ an integer less than, equal to, or greater than zero if
        --          the first /@n@/ bytes of /@s1@/ is found, respectively, to be
        --          less than, to match, or to be greater than the first /@n@/
        --          bytes of /@s2@/.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CompletionStrncmpFunc`@.
    noCompletionStrncmpFunc :: Maybe CompletionStrncmpFunc
    noCompletionStrncmpFunc :: Maybe CompletionStrncmpFunc
    noCompletionStrncmpFunc = Maybe CompletionStrncmpFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_CompletionStrncmpFunc :: MonadIO m => CompletionStrncmpFunc -> m (GClosure C_CompletionStrncmpFunc)
    genClosure_CompletionStrncmpFunc :: forall (m :: * -> *).
    MonadIO m =>
    CompletionStrncmpFunc -> m (GClosure C_CompletionStrncmpFunc)
    genClosure_CompletionStrncmpFunc CompletionStrncmpFunc
    cb = IO (GClosure C_CompletionStrncmpFunc)
    -> m (GClosure C_CompletionStrncmpFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_CompletionStrncmpFunc)
     -> m (GClosure C_CompletionStrncmpFunc))
    -> IO (GClosure C_CompletionStrncmpFunc)
    -> m (GClosure C_CompletionStrncmpFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_CompletionStrncmpFunc
    cb' = Maybe (Ptr (FunPtr C_CompletionStrncmpFunc))
    -> CompletionStrncmpFunc -> C_CompletionStrncmpFunc
    wrap_CompletionStrncmpFunc Maybe (Ptr (FunPtr C_CompletionStrncmpFunc))
    forall a. Maybe a
    Nothing CompletionStrncmpFunc
    cb
        C_CompletionStrncmpFunc -> IO (FunPtr C_CompletionStrncmpFunc)
    mk_CompletionStrncmpFunc C_CompletionStrncmpFunc
    cb' IO (FunPtr C_CompletionStrncmpFunc)
    -> (FunPtr C_CompletionStrncmpFunc
        -> IO (GClosure C_CompletionStrncmpFunc))
    -> IO (GClosure C_CompletionStrncmpFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_CompletionStrncmpFunc
    -> IO (GClosure C_CompletionStrncmpFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `CompletionStrncmpFunc` into a `C_CompletionStrncmpFunc`.
    wrap_CompletionStrncmpFunc ::
        Maybe (Ptr (FunPtr C_CompletionStrncmpFunc)) ->
        CompletionStrncmpFunc ->
        C_CompletionStrncmpFunc
    wrap_CompletionStrncmpFunc :: Maybe (Ptr (FunPtr C_CompletionStrncmpFunc))
    -> CompletionStrncmpFunc -> C_CompletionStrncmpFunc
    wrap_CompletionStrncmpFunc Maybe (Ptr (FunPtr C_CompletionStrncmpFunc))
    gi'funptrptr CompletionStrncmpFunc
    gi'cb CString
    s1 CString
    s2 CSize
    n = do
        Text
    s1' <- HasCallStack => CString -> IO Text
    CString -> IO Text
    cstringToText CString
    s1
        Text
    s2' <- HasCallStack => CString -> IO Text
    CString -> IO Text
    cstringToText CString
    s2
        Int32
    result <- CompletionStrncmpFunc
    gi'cb  Text
    s1' Text
    s2' CSize
    n
        Maybe (Ptr (FunPtr C_CompletionStrncmpFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CompletionStrncmpFunc))
    gi'funptrptr
        Int32 -> IO Int32
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback CompletionFunc
    {- Callable
      { returnType = Just (TBasicType TUTF8)
      , returnMayBeNull = False
      , returnTransfer = TransferEverything
      , returnDocumentation =
          Documentation
            { rawDocText = Just "the string corresponding to the item."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "item"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the completion item."
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated =
          Just
            DeprecationInfo
              { deprecatedSinceVersion = Just "2.26"
              , deprecationMessage = Just "Rarely used API"
              }
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the function passed to g_completion_new(). It\nshould return the string corresponding to the given target item.\nThis is used when you use data structures as #GCompletion items."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CompletionFunc =
        Ptr () ->
        IO CString

    -- Args: [ Arg
    --           { argCName = "item"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the completion item."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TUTF8)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CompletionFunc :: FunPtr C_CompletionFunc -> C_CompletionFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CompletionFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CompletionFunc
        -> Ptr ()
        -- ^ /@item@/: the completion item.
        -> m T.Text
        -- ^ __Returns:__ the string corresponding to the item.
    dynamic_CompletionFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_CompletionFunc -> Ptr () -> m Text
    dynamic_CompletionFunc FunPtr C_CompletionFunc
    __funPtr Ptr ()
    item = IO Text -> m Text
    forall a. IO a -> m a
    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
    result <- (FunPtr C_CompletionFunc -> C_CompletionFunc
    __dynamic_C_CompletionFunc FunPtr C_CompletionFunc
    __funPtr) Ptr ()
    item
        Text -> CString -> C_VoidFunc
    forall a. HasCallStack => Text -> Ptr a -> C_VoidFunc
    checkUnexpectedReturnNULL Text
    "completionFunc" 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
    result
        Text -> IO Text
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Text
    result'

    -- | Generate a function pointer callable from C code, from a `C_CompletionFunc`.
    foreign import ccall "wrapper"
        mk_CompletionFunc :: C_CompletionFunc -> IO (FunPtr C_CompletionFunc)

    {-# DEPRECATED CompletionFunc ["(Since version 2.26)","Rarely used API"] #-}
    -- | Specifies the type of the function passed to @/g_completion_new()/@. It
    -- should return the string corresponding to the given target item.
    -- This is used when you use data structures as t'GI.GLib.Structs.Completion.Completion' items.
    type CompletionFunc =
        Ptr ()
        -- ^ /@item@/: the completion item.
        -> IO T.Text
        -- ^ __Returns:__ the string corresponding to the item.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CompletionFunc`@.
    noCompletionFunc :: Maybe CompletionFunc
    noCompletionFunc :: Maybe CompletionFunc
    noCompletionFunc = Maybe CompletionFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_CompletionFunc :: MonadIO m => CompletionFunc -> m (GClosure C_CompletionFunc)
    genClosure_CompletionFunc :: forall (m :: * -> *).
    MonadIO m =>
    CompletionFunc -> m (GClosure C_CompletionFunc)
    genClosure_CompletionFunc CompletionFunc
    cb = IO (GClosure C_CompletionFunc) -> m (GClosure C_CompletionFunc)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO (GClosure C_CompletionFunc) -> m (GClosure C_CompletionFunc))
    -> IO (GClosure C_CompletionFunc) -> m (GClosure C_CompletionFunc)
    forall a b. (a -> b) -> a -> b
    $ do
        let cb' :: C_CompletionFunc
    cb' = Maybe (Ptr (FunPtr C_CompletionFunc))
    -> CompletionFunc -> C_CompletionFunc
    wrap_CompletionFunc Maybe (Ptr (FunPtr C_CompletionFunc))
    forall a. Maybe a
    Nothing CompletionFunc
    cb
        C_CompletionFunc -> IO (FunPtr C_CompletionFunc)
    mk_CompletionFunc C_CompletionFunc
    cb' IO (FunPtr C_CompletionFunc)
    -> (FunPtr C_CompletionFunc -> IO (GClosure C_CompletionFunc))
    -> IO (GClosure C_CompletionFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= FunPtr C_CompletionFunc -> IO (GClosure C_CompletionFunc)
    forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
    B.GClosure.newGClosure

    -- | Wrap a `CompletionFunc` into a `C_CompletionFunc`.
    wrap_CompletionFunc ::
        Maybe (Ptr (FunPtr C_CompletionFunc)) ->
        CompletionFunc ->
        C_CompletionFunc
    wrap_CompletionFunc :: Maybe (Ptr (FunPtr C_CompletionFunc))
    -> CompletionFunc -> C_CompletionFunc
    wrap_CompletionFunc Maybe (Ptr (FunPtr C_CompletionFunc))
    gi'funptrptr CompletionFunc
    gi'cb Ptr ()
    item = do
        Text
    result <- CompletionFunc
    gi'cb  Ptr ()
    item
        Maybe (Ptr (FunPtr C_CompletionFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CompletionFunc))
    gi'funptrptr
        CString
    result' <- Text -> IO CString
    textToCString Text
    result
        CString -> IO CString
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return CString
    result'

    -- callback CompareFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "negative value if @a < @b; zero if @a = @b; positive\n         value if @a > @b"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "a"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "b"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value to compare with"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of a comparison function used to compare two\nvalues.  The function should return a negative integer if the first\nvalue comes before the second, 0 if they are equal, or a positive\ninteger if the first value comes after the second."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CompareFunc =
        Ptr () ->
        Ptr () ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "a"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "b"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value to compare with"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CompareFunc :: FunPtr C_CompareFunc -> C_CompareFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CompareFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CompareFunc
        -> Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> m Int32
        -- ^ __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive
        --          value if /@a@/ > /@b@/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_CompareFunc`.
    foreign import ccall "wrapper"
        mk_CompareFunc :: C_CompareFunc -> IO (FunPtr C_CompareFunc)

    -- | Specifies the type of a comparison function used to compare two
    -- values.  The function should return a negative integer if the first
    -- value comes before the second, 0 if they are equal, or a positive
    -- integer if the first value comes after the second.
    type CompareFunc =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> IO Int32
        -- ^ __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive
        --          value if /@a@/ > /@b@/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CompareFunc`@.
    noCompareFunc :: Maybe CompareFunc
    noCompareFunc :: Maybe C_CompareFunc
    noCompareFunc = Maybe C_CompareFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `CompareFunc` into a `C_CompareFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback CompareDataFunc
    {- Callable
      { returnType = Just (TBasicType TInt)
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText =
                Just
                  "negative value if @a < @b; zero if @a = @b; positive\n         value if @a > @b"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "a"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "b"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a value to compare with"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "user data" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of a comparison function used to compare two\nvalues.  The function should return a negative integer if the first\nvalue comes before the second, 0 if they are equal, or a positive\ninteger if the first value comes after the second."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CompareDataFunc =
        Ptr () ->
        Ptr () ->
        Ptr () ->
        IO Int32

    -- Args: [ Arg
    --           { argCName = "a"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "b"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a value to compare with"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "user data" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TInt)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CompareDataFunc :: FunPtr C_CompareDataFunc -> C_CompareDataFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CompareDataFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CompareDataFunc
        -> Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> Ptr ()
        -- ^ /@userData@/: user data
        -> m Int32
        -- ^ __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive
        --          value if /@a@/ > /@b@/
    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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- | Generate a function pointer callable from C code, from a `C_CompareDataFunc`.
    foreign import ccall "wrapper"
        mk_CompareDataFunc :: C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc)

    -- | Specifies the type of a comparison function used to compare two
    -- values.  The function should return a negative integer if the first
    -- value comes before the second, 0 if they are equal, or a positive
    -- integer if the first value comes after the second.
    type CompareDataFunc =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> IO Int32
        -- ^ __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive
        --          value if /@a@/ > /@b@/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CompareDataFunc`@.
    noCompareDataFunc :: Maybe CompareDataFunc
    noCompareDataFunc :: Maybe C_CompareFunc
    noCompareDataFunc = Maybe C_CompareFunc
    forall a. Maybe a
    Nothing

    -- | Specifies the type of a comparison function used to compare two
    -- values.  The function should return a negative integer if the first
    -- value comes before the second, 0 if they are equal, or a positive
    -- integer if the first value comes after the second.
    type CompareDataFunc_WithClosures =
        Ptr ()
        -- ^ /@a@/: a value
        -> Ptr ()
        -- ^ /@b@/: a value to compare with
        -> Ptr ()
        -- ^ /@userData@/: user data
        -> IO Int32
        -- ^ __Returns:__ negative value if /@a@/ \< /@b@/; zero if /@a@/ = /@b@/; positive
        --          value if /@a@/ > /@b@/

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CompareDataFunc_WithClosures`@.
    noCompareDataFunc_WithClosures :: Maybe CompareDataFunc_WithClosures
    noCompareDataFunc_WithClosures :: Maybe C_CompareDataFunc
    noCompareDataFunc_WithClosures = Maybe C_CompareDataFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `CompareDataFunc` into a `C_CompareDataFunc`.
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Int32
    result

    -- callback ClearHandleFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "handle_id"
              , argType = TBasicType TUInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the handle ID to clear"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of function passed to [func@GLib.clear_handle_id] The\nimplementation is expected to free the resource identified by @handle_id;\nfor instance, if @handle_id is a [struct@GLib.Source] ID,\n[func@GLib.Source.remove] can be used."
            , sinceVersion = Just "2.56"
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ClearHandleFunc =
        Word32 ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "handle_id"
    --           , argType = TBasicType TUInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the handle ID to clear"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ClearHandleFunc :: FunPtr C_ClearHandleFunc -> C_ClearHandleFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ClearHandleFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ClearHandleFunc
        -> Word32
        -- ^ /@handleId@/: the handle ID to clear
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ClearHandleFunc`.
    foreign import ccall "wrapper"
        mk_ClearHandleFunc :: C_ClearHandleFunc -> IO (FunPtr C_ClearHandleFunc)

    -- | Specifies the type of function passed to @/GLib.clear_handle_id/@ The
    -- implementation is expected to free the resource identified by /@handleId@/;
    -- for instance, if /@handleId@/ is a [struct/@gLib@/.Source] ID,
    -- [func/@gLib@/.Source.remove] can be used.
    --
    -- /Since: 2.56/
    type ClearHandleFunc =
        Word32
        -- ^ /@handleId@/: the handle ID to clear
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ClearHandleFunc`@.
    noClearHandleFunc :: Maybe ClearHandleFunc
    noClearHandleFunc :: Maybe C_ClearHandleFunc
    noClearHandleFunc = Maybe C_ClearHandleFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ClearHandleFunc` into a `C_ClearHandleFunc`.
    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

    -- callback ChildWatchFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "pid"
              , argType = TBasicType TInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText = Just "the process id of the child process"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "wait_status"
              , argType = TBasicType TInt
              , direction = DirectionIn
              , mayBeNull = False
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "Status information about the child process, encoded\n              in a platform-specific manner"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          , Arg
              { argCName = "user_data"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just "user data passed to [func@GLib.child_watch_add]"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = True
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated = Nothing
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Prototype of a #GChildWatchSource callback, called when a child\nprocess has exited.\n\nTo interpret @wait_status, see the documentation for\n[func@GLib.spawn_check_wait_status]. In particular,\non Unix platforms, note that it is usually not equal\nto the integer passed to `exit()` or returned from `main()`."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_ChildWatchFunc =
        Int32 ->
        Int32 ->
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "pid"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the process id of the child process"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "wait_status"
    --           , argType = TBasicType TInt
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "Status information about the child process, encoded\n              in a platform-specific manner"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "user_data"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just "user data passed to [func@GLib.child_watch_add]"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = True
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_ChildWatchFunc :: FunPtr C_ChildWatchFunc -> C_ChildWatchFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_ChildWatchFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_ChildWatchFunc
        -> Int32
        -- ^ /@pid@/: the process id of the child process
        -> Int32
        -- ^ /@waitStatus@/: Status information about the child process, encoded
        --               in a platform-specific manner
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.childWatchAdd'
        -> 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 a. IO a -> m a
    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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_ChildWatchFunc`.
    foreign import ccall "wrapper"
        mk_ChildWatchFunc :: C_ChildWatchFunc -> IO (FunPtr C_ChildWatchFunc)

    -- | Prototype of a @/GChildWatchSource/@ callback, called when a child
    -- process has exited.
    --
    -- To interpret /@waitStatus@/, see the documentation for
    -- 'GI.GLib.Functions.spawnCheckWaitStatus'. In particular,
    -- on Unix platforms, note that it is usually not equal
    -- to the integer passed to @exit()@ or returned from @main()@.
    type ChildWatchFunc =
        Int32
        -- ^ /@pid@/: the process id of the child process
        -> Int32
        -- ^ /@waitStatus@/: Status information about the child process, encoded
        --               in a platform-specific manner
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ChildWatchFunc`@.
    noChildWatchFunc :: Maybe ChildWatchFunc
    noChildWatchFunc :: Maybe ChildWatchFunc
    noChildWatchFunc = Maybe ChildWatchFunc
    forall a. Maybe a
    Nothing

    -- | Prototype of a @/GChildWatchSource/@ callback, called when a child
    -- process has exited.
    --
    -- To interpret /@waitStatus@/, see the documentation for
    -- 'GI.GLib.Functions.spawnCheckWaitStatus'. In particular,
    -- on Unix platforms, note that it is usually not equal
    -- to the integer passed to @exit()@ or returned from @main()@.
    type ChildWatchFunc_WithClosures =
        Int32
        -- ^ /@pid@/: the process id of the child process
        -> Int32
        -- ^ /@waitStatus@/: Status information about the child process, encoded
        --               in a platform-specific manner
        -> Ptr ()
        -- ^ /@userData@/: user data passed to 'GI.GLib.Functions.childWatchAdd'
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `ChildWatchFunc_WithClosures`@.
    noChildWatchFunc_WithClosures :: Maybe ChildWatchFunc_WithClosures
    noChildWatchFunc_WithClosures :: Maybe C_ChildWatchFunc
    noChildWatchFunc_WithClosures = Maybe C_ChildWatchFunc
    forall a. Maybe a
    Nothing

    -- | A simple wrapper that ignores the closure arguments.
    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

    -- | Wrap the callback into a `GClosure`.
    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 a. IO a -> m a
    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 a b. IO a -> (a -> IO b) -> IO b
    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 a `ChildWatchFunc` into a `C_ChildWatchFunc`.
    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

    -- callback CacheNewFunc
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = True
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "a new #GCache value corresponding to the key."
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "key"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "a #GCache key" , sinceVersion = Nothing }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated =
          Just
            DeprecationInfo
              { deprecatedSinceVersion = Just "2.32"
              , deprecationMessage = Just "Use a #GHashTable instead"
              }
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the @value_new_func function passed to\ng_cache_new(). It is passed a #GCache key and should create the\nvalue corresponding to the key."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CacheNewFunc =
        Ptr () ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "key"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a #GCache key" , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CacheNewFunc :: FunPtr C_CacheNewFunc -> C_CacheNewFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CacheNewFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CacheNewFunc
        -> Ptr ()
        -- ^ /@key@/: a t'GI.GLib.Structs.Cache.Cache' key
        -> m (Ptr ())
        -- ^ __Returns:__ a new t'GI.GLib.Structs.Cache.Cache' value corresponding to the key.
    dynamic_CacheNewFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_ThreadFunc -> Ptr () -> m (Ptr ())
    dynamic_CacheNewFunc FunPtr C_ThreadFunc
    __funPtr Ptr ()
    key = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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_CacheNewFunc FunPtr C_ThreadFunc
    __funPtr) Ptr ()
    key
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_CacheNewFunc`.
    foreign import ccall "wrapper"
        mk_CacheNewFunc :: C_CacheNewFunc -> IO (FunPtr C_CacheNewFunc)

    {-# DEPRECATED CacheNewFunc ["(Since version 2.32)","Use a t'GI.GLib.Structs.HashTable.HashTable' instead"] #-}
    -- | Specifies the type of the /@valueNewFunc@/ function passed to
    -- @/g_cache_new()/@. It is passed a t'GI.GLib.Structs.Cache.Cache' key and should create the
    -- value corresponding to the key.
    type CacheNewFunc =
        Ptr ()
        -- ^ /@key@/: a t'GI.GLib.Structs.Cache.Cache' key
        -> IO (Ptr ())
        -- ^ __Returns:__ a new t'GI.GLib.Structs.Cache.Cache' value corresponding to the key.

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CacheNewFunc`@.
    noCacheNewFunc :: Maybe CacheNewFunc
    noCacheNewFunc :: Maybe C_ThreadFunc
    noCacheNewFunc = Maybe C_ThreadFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_CacheNewFunc :: MonadIO m => CacheNewFunc -> m (GClosure C_CacheNewFunc)
    genClosure_CacheNewFunc :: forall (m :: * -> *).
    MonadIO m =>
    C_ThreadFunc -> m (GClosure C_ThreadFunc)
    genClosure_CacheNewFunc C_ThreadFunc
    cb = IO (GClosure C_ThreadFunc) -> m (GClosure C_ThreadFunc)
    forall a. IO a -> m a
    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_CacheNewFunc Maybe (Ptr (FunPtr C_ThreadFunc))
    forall a. Maybe a
    Nothing C_ThreadFunc
    cb
        C_ThreadFunc -> IO (FunPtr C_ThreadFunc)
    mk_CacheNewFunc C_ThreadFunc
    cb' IO (FunPtr C_ThreadFunc)
    -> (FunPtr C_ThreadFunc -> IO (GClosure C_ThreadFunc))
    -> IO (GClosure C_ThreadFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    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 a `CacheNewFunc` into a `C_CacheNewFunc`.
    wrap_CacheNewFunc ::
        Maybe (Ptr (FunPtr C_CacheNewFunc)) ->
        CacheNewFunc ->
        C_CacheNewFunc
    wrap_CacheNewFunc :: Maybe (Ptr (FunPtr C_ThreadFunc)) -> C_ThreadFunc -> C_ThreadFunc
    wrap_CacheNewFunc Maybe (Ptr (FunPtr C_ThreadFunc))
    gi'funptrptr C_ThreadFunc
    gi'cb Ptr ()
    key = do
        Ptr ()
    result <- C_ThreadFunc
    gi'cb  Ptr ()
    key
        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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback CacheDupFunc
    {- Callable
      { returnType = Just (TBasicType TPtr)
      , returnMayBeNull = True
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation
            { rawDocText = Just "a copy of the #GCache key"
            , sinceVersion = Nothing
            }
      , args =
          [ Arg
              { argCName = "value"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText =
                        Just
                          "the #GCache key to destroy (__not__ a\n        #GCache value as it seems)"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated =
          Just
            DeprecationInfo
              { deprecatedSinceVersion = Just "2.32"
              , deprecationMessage = Just "Use a #GHashTable instead"
              }
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the @key_dup_func function passed to\ng_cache_new(). The function is passed a key\n(__not__ a value as the prototype implies) and\nshould return a duplicate of the key."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CacheDupFunc =
        Ptr () ->
        IO (Ptr ())

    -- Args: [ Arg
    --           { argCName = "value"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText =
    --                     Just
    --                       "the #GCache key to destroy (__not__ a\n        #GCache value as it seems)"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TPtr)
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CacheDupFunc :: FunPtr C_CacheDupFunc -> C_CacheDupFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CacheDupFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CacheDupFunc
        -> Ptr ()
        -- ^ /@value@/: the t'GI.GLib.Structs.Cache.Cache' key to destroy (__not__ a
        --         t'GI.GLib.Structs.Cache.Cache' value as it seems)
        -> m (Ptr ())
        -- ^ __Returns:__ a copy of the t'GI.GLib.Structs.Cache.Cache' key
    dynamic_CacheDupFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr C_ThreadFunc -> Ptr () -> m (Ptr ())
    dynamic_CacheDupFunc FunPtr C_ThreadFunc
    __funPtr Ptr ()
    value = IO (Ptr ()) -> m (Ptr ())
    forall a. IO a -> m a
    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_CacheDupFunc FunPtr C_ThreadFunc
    __funPtr) Ptr ()
    value
        C_ThreadFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- | Generate a function pointer callable from C code, from a `C_CacheDupFunc`.
    foreign import ccall "wrapper"
        mk_CacheDupFunc :: C_CacheDupFunc -> IO (FunPtr C_CacheDupFunc)

    {-# DEPRECATED CacheDupFunc ["(Since version 2.32)","Use a t'GI.GLib.Structs.HashTable.HashTable' instead"] #-}
    -- | Specifies the type of the /@keyDupFunc@/ function passed to
    -- @/g_cache_new()/@. The function is passed a key
    -- (__not__ a value as the prototype implies) and
    -- should return a duplicate of the key.
    type CacheDupFunc =
        Ptr ()
        -- ^ /@value@/: the t'GI.GLib.Structs.Cache.Cache' key to destroy (__not__ a
        --         t'GI.GLib.Structs.Cache.Cache' value as it seems)
        -> IO (Ptr ())
        -- ^ __Returns:__ a copy of the t'GI.GLib.Structs.Cache.Cache' key

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CacheDupFunc`@.
    noCacheDupFunc :: Maybe CacheDupFunc
    noCacheDupFunc :: Maybe C_ThreadFunc
    noCacheDupFunc = Maybe C_ThreadFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_CacheDupFunc :: MonadIO m => CacheDupFunc -> m (GClosure C_CacheDupFunc)
    genClosure_CacheDupFunc :: forall (m :: * -> *).
    MonadIO m =>
    C_ThreadFunc -> m (GClosure C_ThreadFunc)
    genClosure_CacheDupFunc C_ThreadFunc
    cb = IO (GClosure C_ThreadFunc) -> m (GClosure C_ThreadFunc)
    forall a. IO a -> m a
    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_CacheDupFunc Maybe (Ptr (FunPtr C_ThreadFunc))
    forall a. Maybe a
    Nothing C_ThreadFunc
    cb
        C_ThreadFunc -> IO (FunPtr C_ThreadFunc)
    mk_CacheDupFunc C_ThreadFunc
    cb' IO (FunPtr C_ThreadFunc)
    -> (FunPtr C_ThreadFunc -> IO (GClosure C_ThreadFunc))
    -> IO (GClosure C_ThreadFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    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 a `CacheDupFunc` into a `C_CacheDupFunc`.
    wrap_CacheDupFunc ::
        Maybe (Ptr (FunPtr C_CacheDupFunc)) ->
        CacheDupFunc ->
        C_CacheDupFunc
    wrap_CacheDupFunc :: Maybe (Ptr (FunPtr C_ThreadFunc)) -> C_ThreadFunc -> C_ThreadFunc
    wrap_CacheDupFunc Maybe (Ptr (FunPtr C_ThreadFunc))
    gi'funptrptr C_ThreadFunc
    gi'cb Ptr ()
    value = do
        Ptr ()
    result <- C_ThreadFunc
    gi'cb  Ptr ()
    value
        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 a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Ptr ()
    result

    -- callback CacheDestroyFunc
    {- Callable
      { returnType = Nothing
      , returnMayBeNull = False
      , returnTransfer = TransferNothing
      , returnDocumentation =
          Documentation { rawDocText = Nothing , sinceVersion = Nothing }
      , args =
          [ Arg
              { argCName = "value"
              , argType = TBasicType TPtr
              , direction = DirectionIn
              , mayBeNull = True
              , argDoc =
                  Documentation
                    { rawDocText = Just "the #GCache value to destroy"
                    , sinceVersion = Nothing
                    }
              , argScope = ScopeTypeInvalid
              , argClosure = -1
              , argDestroy = -1
              , argCallerAllocates = False
              , argCallbackUserData = False
              , transfer = TransferNothing
              }
          ]
      , skipReturn = False
      , callableThrows = False
      , callableDeprecated =
          Just
            DeprecationInfo
              { deprecatedSinceVersion = Just "2.32"
              , deprecationMessage = Just "Use a #GHashTable instead"
              }
      , callableDocumentation =
          Documentation
            { rawDocText =
                Just
                  "Specifies the type of the @value_destroy_func and @key_destroy_func\nfunctions passed to g_cache_new(). The functions are passed a\npointer to the #GCache key or #GCache value and should free any\nmemory and other resources associated with it."
            , sinceVersion = Nothing
            }
      , callableResolvable = Nothing
      }
    -}
    -- | Type for the callback on the (unwrapped) C side.
    type C_CacheDestroyFunc =
        Ptr () ->
        IO ()

    -- Args: [ Arg
    --           { argCName = "value"
    --           , argType = TBasicType TPtr
    --           , direction = DirectionIn
    --           , mayBeNull = True
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "the #GCache value to destroy"
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "dynamic" __dynamic_C_CacheDestroyFunc :: FunPtr C_CacheDestroyFunc -> C_CacheDestroyFunc

    -- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
    dynamic_CacheDestroyFunc ::
        (B.CallStack.HasCallStack, MonadIO m) =>
        FunPtr C_CacheDestroyFunc
        -> Ptr ()
        -- ^ /@value@/: the t'GI.GLib.Structs.Cache.Cache' value to destroy
        -> m ()
    dynamic_CacheDestroyFunc :: forall (m :: * -> *).
    (HasCallStack, MonadIO m) =>
    FunPtr TestFixtureFunc -> Ptr () -> m ()
    dynamic_CacheDestroyFunc FunPtr TestFixtureFunc
    __funPtr Ptr ()
    value = C_VoidFunc -> m ()
    forall a. IO a -> m a
    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_CacheDestroyFunc FunPtr TestFixtureFunc
    __funPtr) Ptr ()
    value
        () -> C_VoidFunc
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Generate a function pointer callable from C code, from a `C_CacheDestroyFunc`.
    foreign import ccall "wrapper"
        mk_CacheDestroyFunc :: C_CacheDestroyFunc -> IO (FunPtr C_CacheDestroyFunc)

    {-# DEPRECATED CacheDestroyFunc ["(Since version 2.32)","Use a t'GI.GLib.Structs.HashTable.HashTable' instead"] #-}
    -- | Specifies the type of the /@valueDestroyFunc@/ and /@keyDestroyFunc@/
    -- functions passed to @/g_cache_new()/@. The functions are passed a
    -- pointer to the t'GI.GLib.Structs.Cache.Cache' key or t'GI.GLib.Structs.Cache.Cache' value and should free any
    -- memory and other resources associated with it.
    type CacheDestroyFunc =
        Ptr ()
        -- ^ /@value@/: the t'GI.GLib.Structs.Cache.Cache' value to destroy
        -> IO ()

    -- | A convenience synonym for @`Nothing` :: `Maybe` `CacheDestroyFunc`@.
    noCacheDestroyFunc :: Maybe CacheDestroyFunc
    noCacheDestroyFunc :: Maybe TestFixtureFunc
    noCacheDestroyFunc = Maybe TestFixtureFunc
    forall a. Maybe a
    Nothing

    -- | Wrap the callback into a `GClosure`.
    genClosure_CacheDestroyFunc :: MonadIO m => CacheDestroyFunc -> m (GClosure C_CacheDestroyFunc)
    genClosure_CacheDestroyFunc :: forall (m :: * -> *).
    MonadIO m =>
    TestFixtureFunc -> m (GClosure TestFixtureFunc)
    genClosure_CacheDestroyFunc TestFixtureFunc
    cb = IO (GClosure TestFixtureFunc) -> m (GClosure TestFixtureFunc)
    forall a. IO a -> m a
    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_CacheDestroyFunc Maybe (Ptr (FunPtr TestFixtureFunc))
    forall a. Maybe a
    Nothing TestFixtureFunc
    cb
        TestFixtureFunc -> IO (FunPtr TestFixtureFunc)
    mk_CacheDestroyFunc TestFixtureFunc
    cb' IO (FunPtr TestFixtureFunc)
    -> (FunPtr TestFixtureFunc -> IO (GClosure TestFixtureFunc))
    -> IO (GClosure TestFixtureFunc)
    forall a b. IO a -> (a -> IO b) -> IO b
    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 a `CacheDestroyFunc` into a `C_CacheDestroyFunc`.
    wrap_CacheDestroyFunc ::
        Maybe (Ptr (FunPtr C_CacheDestroyFunc)) ->
        CacheDestroyFunc ->
        C_CacheDestroyFunc
    wrap_CacheDestroyFunc :: Maybe (Ptr (FunPtr TestFixtureFunc))
    -> TestFixtureFunc -> TestFixtureFunc
    wrap_CacheDestroyFunc Maybe (Ptr (FunPtr TestFixtureFunc))
    gi'funptrptr TestFixtureFunc
    gi'cb Ptr ()
    value = do
        TestFixtureFunc
    gi'cb  Ptr ()
    value
        Maybe (Ptr (FunPtr TestFixtureFunc)) -> C_VoidFunc
    forall a. Maybe (Ptr (FunPtr a)) -> C_VoidFunc
    maybeReleaseFunPtr Maybe (Ptr (FunPtr TestFixtureFunc))
    gi'funptrptr