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

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Callbacks
    ( 

 -- * Signals
-- ** AccelGroupActivate #signal:AccelGroupActivate#

    AccelGroupActivate                      ,
    C_AccelGroupActivate                    ,
    dynamic_AccelGroupActivate              ,
    genClosure_AccelGroupActivate           ,
    mk_AccelGroupActivate                   ,
    noAccelGroupActivate                    ,
    wrap_AccelGroupActivate                 ,


-- ** AccelGroupFindFunc #signal:AccelGroupFindFunc#

    AccelGroupFindFunc                      ,
    AccelGroupFindFunc_WithClosures         ,
    C_AccelGroupFindFunc                    ,
    drop_closures_AccelGroupFindFunc        ,
    dynamic_AccelGroupFindFunc              ,
    genClosure_AccelGroupFindFunc           ,
    mk_AccelGroupFindFunc                   ,
    noAccelGroupFindFunc                    ,
    noAccelGroupFindFunc_WithClosures       ,
    wrap_AccelGroupFindFunc                 ,


-- ** AccelMapForeach #signal:AccelMapForeach#

    AccelMapForeach                         ,
    C_AccelMapForeach                       ,
    dynamic_AccelMapForeach                 ,
    genClosure_AccelMapForeach              ,
    mk_AccelMapForeach                      ,
    noAccelMapForeach                       ,
    wrap_AccelMapForeach                    ,


-- ** AssistantPageFunc #signal:AssistantPageFunc#

    AssistantPageFunc                       ,
    AssistantPageFunc_WithClosures          ,
    C_AssistantPageFunc                     ,
    drop_closures_AssistantPageFunc         ,
    dynamic_AssistantPageFunc               ,
    genClosure_AssistantPageFunc            ,
    mk_AssistantPageFunc                    ,
    noAssistantPageFunc                     ,
    noAssistantPageFunc_WithClosures        ,
    wrap_AssistantPageFunc                  ,


-- ** BuilderConnectFunc #signal:BuilderConnectFunc#

    BuilderConnectFunc                      ,
    BuilderConnectFunc_WithClosures         ,
    C_BuilderConnectFunc                    ,
    drop_closures_BuilderConnectFunc        ,
    dynamic_BuilderConnectFunc              ,
    genClosure_BuilderConnectFunc           ,
    mk_BuilderConnectFunc                   ,
    noBuilderConnectFunc                    ,
    noBuilderConnectFunc_WithClosures       ,
    wrap_BuilderConnectFunc                 ,


-- ** CalendarDetailFunc #signal:CalendarDetailFunc#

    C_CalendarDetailFunc                    ,
    CalendarDetailFunc                      ,
    CalendarDetailFunc_WithClosures         ,
    drop_closures_CalendarDetailFunc        ,
    dynamic_CalendarDetailFunc              ,
    genClosure_CalendarDetailFunc           ,
    mk_CalendarDetailFunc                   ,
    noCalendarDetailFunc                    ,
    noCalendarDetailFunc_WithClosures       ,
    wrap_CalendarDetailFunc                 ,


-- ** Callback #signal:Callback#

    C_Callback                              ,
    Callback                                ,
    Callback_WithClosures                   ,
    drop_closures_Callback                  ,
    dynamic_Callback                        ,
    genClosure_Callback                     ,
    mk_Callback                             ,
    noCallback                              ,
    noCallback_WithClosures                 ,
    wrap_Callback                           ,


-- ** CellAllocCallback #signal:CellAllocCallback#

    C_CellAllocCallback                     ,
    CellAllocCallback                       ,
    CellAllocCallback_WithClosures          ,
    drop_closures_CellAllocCallback         ,
    dynamic_CellAllocCallback               ,
    genClosure_CellAllocCallback            ,
    mk_CellAllocCallback                    ,
    noCellAllocCallback                     ,
    noCellAllocCallback_WithClosures        ,
    wrap_CellAllocCallback                  ,


-- ** CellCallback #signal:CellCallback#

    C_CellCallback                          ,
    CellCallback                            ,
    CellCallback_WithClosures               ,
    drop_closures_CellCallback              ,
    dynamic_CellCallback                    ,
    genClosure_CellCallback                 ,
    mk_CellCallback                         ,
    noCellCallback                          ,
    noCellCallback_WithClosures             ,
    wrap_CellCallback                       ,


-- ** CellLayoutDataFunc #signal:CellLayoutDataFunc#

    C_CellLayoutDataFunc                    ,
    CellLayoutDataFunc                      ,
    CellLayoutDataFunc_WithClosures         ,
    drop_closures_CellLayoutDataFunc        ,
    dynamic_CellLayoutDataFunc              ,
    genClosure_CellLayoutDataFunc           ,
    mk_CellLayoutDataFunc                   ,
    noCellLayoutDataFunc                    ,
    noCellLayoutDataFunc_WithClosures       ,
    wrap_CellLayoutDataFunc                 ,


-- ** ContainerClassAddFieldCallback #signal:ContainerClassAddFieldCallback#

    C_ContainerClassAddFieldCallback        ,
    ContainerClassAddFieldCallback          ,
    dynamic_ContainerClassAddFieldCallback  ,
    genClosure_ContainerClassAddFieldCallback,
    mk_ContainerClassAddFieldCallback       ,
    noContainerClassAddFieldCallback        ,
    wrap_ContainerClassAddFieldCallback     ,


-- ** ContainerClassChildTypeFieldCallback #signal:ContainerClassChildTypeFieldCallback#

    C_ContainerClassChildTypeFieldCallback  ,
    ContainerClassChildTypeFieldCallback    ,
    dynamic_ContainerClassChildTypeFieldCallback,
    genClosure_ContainerClassChildTypeFieldCallback,
    mk_ContainerClassChildTypeFieldCallback ,
    noContainerClassChildTypeFieldCallback  ,
    wrap_ContainerClassChildTypeFieldCallback,


-- ** ContainerClassForallFieldCallback #signal:ContainerClassForallFieldCallback#

    C_ContainerClassForallFieldCallback     ,
    ContainerClassForallFieldCallback       ,
    ContainerClassForallFieldCallback_WithClosures,
    drop_closures_ContainerClassForallFieldCallback,
    dynamic_ContainerClassForallFieldCallback,
    genClosure_ContainerClassForallFieldCallback,
    mk_ContainerClassForallFieldCallback    ,
    noContainerClassForallFieldCallback     ,
    noContainerClassForallFieldCallback_WithClosures,
    wrap_ContainerClassForallFieldCallback  ,


-- ** ContainerClassGetPathForChildFieldCallback #signal:ContainerClassGetPathForChildFieldCallback#

    C_ContainerClassGetPathForChildFieldCallback,
    ContainerClassGetPathForChildFieldCallback,
    dynamic_ContainerClassGetPathForChildFieldCallback,
    genClosure_ContainerClassGetPathForChildFieldCallback,
    mk_ContainerClassGetPathForChildFieldCallback,
    noContainerClassGetPathForChildFieldCallback,
    wrap_ContainerClassGetPathForChildFieldCallback,


-- ** ContainerClassRemoveFieldCallback #signal:ContainerClassRemoveFieldCallback#

    C_ContainerClassRemoveFieldCallback     ,
    ContainerClassRemoveFieldCallback       ,
    dynamic_ContainerClassRemoveFieldCallback,
    genClosure_ContainerClassRemoveFieldCallback,
    mk_ContainerClassRemoveFieldCallback    ,
    noContainerClassRemoveFieldCallback     ,
    wrap_ContainerClassRemoveFieldCallback  ,


-- ** ContainerClassSetFocusChildFieldCallback #signal:ContainerClassSetFocusChildFieldCallback#

    C_ContainerClassSetFocusChildFieldCallback,
    ContainerClassSetFocusChildFieldCallback,
    dynamic_ContainerClassSetFocusChildFieldCallback,
    genClosure_ContainerClassSetFocusChildFieldCallback,
    mk_ContainerClassSetFocusChildFieldCallback,
    noContainerClassSetFocusChildFieldCallback,
    wrap_ContainerClassSetFocusChildFieldCallback,


-- ** CustomAllocateFunc #signal:CustomAllocateFunc#

    C_CustomAllocateFunc                    ,
    CustomAllocateFunc                      ,
    dynamic_CustomAllocateFunc              ,
    genClosure_CustomAllocateFunc           ,
    mk_CustomAllocateFunc                   ,
    noCustomAllocateFunc                    ,
    wrap_CustomAllocateFunc                 ,


-- ** CustomMeasureFunc #signal:CustomMeasureFunc#

    C_CustomMeasureFunc                     ,
    CustomMeasureFunc                       ,
    dynamic_CustomMeasureFunc               ,
    genClosure_CustomMeasureFunc            ,
    mk_CustomMeasureFunc                    ,
    noCustomMeasureFunc                     ,
    wrap_CustomMeasureFunc                  ,


-- ** CustomRequestModeFunc #signal:CustomRequestModeFunc#

    C_CustomRequestModeFunc                 ,
    CustomRequestModeFunc                   ,
    dynamic_CustomRequestModeFunc           ,
    genClosure_CustomRequestModeFunc        ,
    mk_CustomRequestModeFunc                ,
    noCustomRequestModeFunc                 ,
    wrap_CustomRequestModeFunc              ,


-- ** DrawingAreaDrawFunc #signal:DrawingAreaDrawFunc#

    C_DrawingAreaDrawFunc                   ,
    DrawingAreaDrawFunc                     ,
    DrawingAreaDrawFunc_WithClosures        ,
    drop_closures_DrawingAreaDrawFunc       ,
    dynamic_DrawingAreaDrawFunc             ,
    genClosure_DrawingAreaDrawFunc          ,
    mk_DrawingAreaDrawFunc                  ,
    noDrawingAreaDrawFunc                   ,
    noDrawingAreaDrawFunc_WithClosures      ,
    wrap_DrawingAreaDrawFunc                ,


-- ** EntryCompletionMatchFunc #signal:EntryCompletionMatchFunc#

    C_EntryCompletionMatchFunc              ,
    EntryCompletionMatchFunc                ,
    EntryCompletionMatchFunc_WithClosures   ,
    drop_closures_EntryCompletionMatchFunc  ,
    dynamic_EntryCompletionMatchFunc        ,
    genClosure_EntryCompletionMatchFunc     ,
    mk_EntryCompletionMatchFunc             ,
    noEntryCompletionMatchFunc              ,
    noEntryCompletionMatchFunc_WithClosures ,
    wrap_EntryCompletionMatchFunc           ,


-- ** FileFilterFunc #signal:FileFilterFunc#

    C_FileFilterFunc                        ,
    FileFilterFunc                          ,
    FileFilterFunc_WithClosures             ,
    drop_closures_FileFilterFunc            ,
    dynamic_FileFilterFunc                  ,
    genClosure_FileFilterFunc               ,
    mk_FileFilterFunc                       ,
    noFileFilterFunc                        ,
    noFileFilterFunc_WithClosures           ,
    wrap_FileFilterFunc                     ,


-- ** FilterListModelFilterFunc #signal:FilterListModelFilterFunc#

    C_FilterListModelFilterFunc             ,
    FilterListModelFilterFunc               ,
    FilterListModelFilterFunc_WithClosures  ,
    drop_closures_FilterListModelFilterFunc ,
    dynamic_FilterListModelFilterFunc       ,
    genClosure_FilterListModelFilterFunc    ,
    mk_FilterListModelFilterFunc            ,
    noFilterListModelFilterFunc             ,
    noFilterListModelFilterFunc_WithClosures,
    wrap_FilterListModelFilterFunc          ,


-- ** FlowBoxCreateWidgetFunc #signal:FlowBoxCreateWidgetFunc#

    C_FlowBoxCreateWidgetFunc               ,
    FlowBoxCreateWidgetFunc                 ,
    FlowBoxCreateWidgetFunc_WithClosures    ,
    drop_closures_FlowBoxCreateWidgetFunc   ,
    dynamic_FlowBoxCreateWidgetFunc         ,
    genClosure_FlowBoxCreateWidgetFunc      ,
    mk_FlowBoxCreateWidgetFunc              ,
    noFlowBoxCreateWidgetFunc               ,
    noFlowBoxCreateWidgetFunc_WithClosures  ,
    wrap_FlowBoxCreateWidgetFunc            ,


-- ** FlowBoxFilterFunc #signal:FlowBoxFilterFunc#

    C_FlowBoxFilterFunc                     ,
    FlowBoxFilterFunc                       ,
    FlowBoxFilterFunc_WithClosures          ,
    drop_closures_FlowBoxFilterFunc         ,
    dynamic_FlowBoxFilterFunc               ,
    genClosure_FlowBoxFilterFunc            ,
    mk_FlowBoxFilterFunc                    ,
    noFlowBoxFilterFunc                     ,
    noFlowBoxFilterFunc_WithClosures        ,
    wrap_FlowBoxFilterFunc                  ,


-- ** FlowBoxForeachFunc #signal:FlowBoxForeachFunc#

    C_FlowBoxForeachFunc                    ,
    FlowBoxForeachFunc                      ,
    FlowBoxForeachFunc_WithClosures         ,
    drop_closures_FlowBoxForeachFunc        ,
    dynamic_FlowBoxForeachFunc              ,
    genClosure_FlowBoxForeachFunc           ,
    mk_FlowBoxForeachFunc                   ,
    noFlowBoxForeachFunc                    ,
    noFlowBoxForeachFunc_WithClosures       ,
    wrap_FlowBoxForeachFunc                 ,


-- ** FlowBoxSortFunc #signal:FlowBoxSortFunc#

    C_FlowBoxSortFunc                       ,
    FlowBoxSortFunc                         ,
    FlowBoxSortFunc_WithClosures            ,
    drop_closures_FlowBoxSortFunc           ,
    dynamic_FlowBoxSortFunc                 ,
    genClosure_FlowBoxSortFunc              ,
    mk_FlowBoxSortFunc                      ,
    noFlowBoxSortFunc                       ,
    noFlowBoxSortFunc_WithClosures          ,
    wrap_FlowBoxSortFunc                    ,


-- ** FontFilterFunc #signal:FontFilterFunc#

    C_FontFilterFunc                        ,
    FontFilterFunc                          ,
    FontFilterFunc_WithClosures             ,
    drop_closures_FontFilterFunc            ,
    dynamic_FontFilterFunc                  ,
    genClosure_FontFilterFunc               ,
    mk_FontFilterFunc                       ,
    noFontFilterFunc                        ,
    noFontFilterFunc_WithClosures           ,
    wrap_FontFilterFunc                     ,


-- ** IconViewForeachFunc #signal:IconViewForeachFunc#

    C_IconViewForeachFunc                   ,
    IconViewForeachFunc                     ,
    IconViewForeachFunc_WithClosures        ,
    drop_closures_IconViewForeachFunc       ,
    dynamic_IconViewForeachFunc             ,
    genClosure_IconViewForeachFunc          ,
    mk_IconViewForeachFunc                  ,
    noIconViewForeachFunc                   ,
    noIconViewForeachFunc_WithClosures      ,
    wrap_IconViewForeachFunc                ,


-- ** ListBoxCreateWidgetFunc #signal:ListBoxCreateWidgetFunc#

    C_ListBoxCreateWidgetFunc               ,
    ListBoxCreateWidgetFunc                 ,
    ListBoxCreateWidgetFunc_WithClosures    ,
    drop_closures_ListBoxCreateWidgetFunc   ,
    dynamic_ListBoxCreateWidgetFunc         ,
    genClosure_ListBoxCreateWidgetFunc      ,
    mk_ListBoxCreateWidgetFunc              ,
    noListBoxCreateWidgetFunc               ,
    noListBoxCreateWidgetFunc_WithClosures  ,
    wrap_ListBoxCreateWidgetFunc            ,


-- ** ListBoxFilterFunc #signal:ListBoxFilterFunc#

    C_ListBoxFilterFunc                     ,
    ListBoxFilterFunc                       ,
    ListBoxFilterFunc_WithClosures          ,
    drop_closures_ListBoxFilterFunc         ,
    dynamic_ListBoxFilterFunc               ,
    genClosure_ListBoxFilterFunc            ,
    mk_ListBoxFilterFunc                    ,
    noListBoxFilterFunc                     ,
    noListBoxFilterFunc_WithClosures        ,
    wrap_ListBoxFilterFunc                  ,


-- ** ListBoxForeachFunc #signal:ListBoxForeachFunc#

    C_ListBoxForeachFunc                    ,
    ListBoxForeachFunc                      ,
    ListBoxForeachFunc_WithClosures         ,
    drop_closures_ListBoxForeachFunc        ,
    dynamic_ListBoxForeachFunc              ,
    genClosure_ListBoxForeachFunc           ,
    mk_ListBoxForeachFunc                   ,
    noListBoxForeachFunc                    ,
    noListBoxForeachFunc_WithClosures       ,
    wrap_ListBoxForeachFunc                 ,


-- ** ListBoxSortFunc #signal:ListBoxSortFunc#

    C_ListBoxSortFunc                       ,
    ListBoxSortFunc                         ,
    ListBoxSortFunc_WithClosures            ,
    drop_closures_ListBoxSortFunc           ,
    dynamic_ListBoxSortFunc                 ,
    genClosure_ListBoxSortFunc              ,
    mk_ListBoxSortFunc                      ,
    noListBoxSortFunc                       ,
    noListBoxSortFunc_WithClosures          ,
    wrap_ListBoxSortFunc                    ,


-- ** ListBoxUpdateHeaderFunc #signal:ListBoxUpdateHeaderFunc#

    C_ListBoxUpdateHeaderFunc               ,
    ListBoxUpdateHeaderFunc                 ,
    ListBoxUpdateHeaderFunc_WithClosures    ,
    drop_closures_ListBoxUpdateHeaderFunc   ,
    dynamic_ListBoxUpdateHeaderFunc         ,
    genClosure_ListBoxUpdateHeaderFunc      ,
    mk_ListBoxUpdateHeaderFunc              ,
    noListBoxUpdateHeaderFunc               ,
    noListBoxUpdateHeaderFunc_WithClosures  ,
    wrap_ListBoxUpdateHeaderFunc            ,


-- ** MapListModelMapFunc #signal:MapListModelMapFunc#

    C_MapListModelMapFunc                   ,
    MapListModelMapFunc                     ,
    MapListModelMapFunc_WithClosures        ,
    drop_closures_MapListModelMapFunc       ,
    dynamic_MapListModelMapFunc             ,
    genClosure_MapListModelMapFunc          ,
    mk_MapListModelMapFunc                  ,
    noMapListModelMapFunc                   ,
    noMapListModelMapFunc_WithClosures      ,
    wrap_MapListModelMapFunc                ,


-- ** MenuDetachFunc #signal:MenuDetachFunc#

    C_MenuDetachFunc                        ,
    MenuDetachFunc                          ,
    dynamic_MenuDetachFunc                  ,
    genClosure_MenuDetachFunc               ,
    mk_MenuDetachFunc                       ,
    noMenuDetachFunc                        ,
    wrap_MenuDetachFunc                     ,


-- ** PageSetupDoneFunc #signal:PageSetupDoneFunc#

    C_PageSetupDoneFunc                     ,
    PageSetupDoneFunc                       ,
    PageSetupDoneFunc_WithClosures          ,
    drop_closures_PageSetupDoneFunc         ,
    dynamic_PageSetupDoneFunc               ,
    genClosure_PageSetupDoneFunc            ,
    mk_PageSetupDoneFunc                    ,
    noPageSetupDoneFunc                     ,
    noPageSetupDoneFunc_WithClosures        ,
    wrap_PageSetupDoneFunc                  ,


-- ** PrintSettingsFunc #signal:PrintSettingsFunc#

    C_PrintSettingsFunc                     ,
    PrintSettingsFunc                       ,
    PrintSettingsFunc_WithClosures          ,
    drop_closures_PrintSettingsFunc         ,
    dynamic_PrintSettingsFunc               ,
    genClosure_PrintSettingsFunc            ,
    mk_PrintSettingsFunc                    ,
    noPrintSettingsFunc                     ,
    noPrintSettingsFunc_WithClosures        ,
    wrap_PrintSettingsFunc                  ,


-- ** RcPropertyParser #signal:RcPropertyParser#

    C_RcPropertyParser                      ,
    RcPropertyParser                        ,
    dynamic_RcPropertyParser                ,
    genClosure_RcPropertyParser             ,
    mk_RcPropertyParser                     ,
    noRcPropertyParser                      ,
    wrap_RcPropertyParser                   ,


-- ** TextCharPredicate #signal:TextCharPredicate#

    C_TextCharPredicate                     ,
    TextCharPredicate                       ,
    TextCharPredicate_WithClosures          ,
    drop_closures_TextCharPredicate         ,
    dynamic_TextCharPredicate               ,
    genClosure_TextCharPredicate            ,
    mk_TextCharPredicate                    ,
    noTextCharPredicate                     ,
    noTextCharPredicate_WithClosures        ,
    wrap_TextCharPredicate                  ,


-- ** TextTagTableForeach #signal:TextTagTableForeach#

    C_TextTagTableForeach                   ,
    TextTagTableForeach                     ,
    TextTagTableForeach_WithClosures        ,
    drop_closures_TextTagTableForeach       ,
    dynamic_TextTagTableForeach             ,
    genClosure_TextTagTableForeach          ,
    mk_TextTagTableForeach                  ,
    noTextTagTableForeach                   ,
    noTextTagTableForeach_WithClosures      ,
    wrap_TextTagTableForeach                ,


-- ** TickCallback #signal:TickCallback#

    C_TickCallback                          ,
    TickCallback                            ,
    TickCallback_WithClosures               ,
    drop_closures_TickCallback              ,
    dynamic_TickCallback                    ,
    genClosure_TickCallback                 ,
    mk_TickCallback                         ,
    noTickCallback                          ,
    noTickCallback_WithClosures             ,
    wrap_TickCallback                       ,


-- ** TreeCellDataFunc #signal:TreeCellDataFunc#

    C_TreeCellDataFunc                      ,
    TreeCellDataFunc                        ,
    TreeCellDataFunc_WithClosures           ,
    drop_closures_TreeCellDataFunc          ,
    dynamic_TreeCellDataFunc                ,
    genClosure_TreeCellDataFunc             ,
    mk_TreeCellDataFunc                     ,
    noTreeCellDataFunc                      ,
    noTreeCellDataFunc_WithClosures         ,
    wrap_TreeCellDataFunc                   ,


-- ** TreeIterCompareFunc #signal:TreeIterCompareFunc#

    C_TreeIterCompareFunc                   ,
    TreeIterCompareFunc                     ,
    TreeIterCompareFunc_WithClosures        ,
    drop_closures_TreeIterCompareFunc       ,
    dynamic_TreeIterCompareFunc             ,
    genClosure_TreeIterCompareFunc          ,
    mk_TreeIterCompareFunc                  ,
    noTreeIterCompareFunc                   ,
    noTreeIterCompareFunc_WithClosures      ,
    wrap_TreeIterCompareFunc                ,


-- ** TreeModelFilterModifyFunc #signal:TreeModelFilterModifyFunc#

    C_TreeModelFilterModifyFunc             ,
    TreeModelFilterModifyFunc               ,
    TreeModelFilterModifyFunc_WithClosures  ,
    drop_closures_TreeModelFilterModifyFunc ,
    dynamic_TreeModelFilterModifyFunc       ,
    genClosure_TreeModelFilterModifyFunc    ,
    mk_TreeModelFilterModifyFunc            ,
    noTreeModelFilterModifyFunc             ,
    noTreeModelFilterModifyFunc_WithClosures,
    wrap_TreeModelFilterModifyFunc          ,


-- ** TreeModelFilterVisibleFunc #signal:TreeModelFilterVisibleFunc#

    C_TreeModelFilterVisibleFunc            ,
    TreeModelFilterVisibleFunc              ,
    TreeModelFilterVisibleFunc_WithClosures ,
    drop_closures_TreeModelFilterVisibleFunc,
    dynamic_TreeModelFilterVisibleFunc      ,
    genClosure_TreeModelFilterVisibleFunc   ,
    mk_TreeModelFilterVisibleFunc           ,
    noTreeModelFilterVisibleFunc            ,
    noTreeModelFilterVisibleFunc_WithClosures,
    wrap_TreeModelFilterVisibleFunc         ,


-- ** TreeModelForeachFunc #signal:TreeModelForeachFunc#

    C_TreeModelForeachFunc                  ,
    TreeModelForeachFunc                    ,
    TreeModelForeachFunc_WithClosures       ,
    drop_closures_TreeModelForeachFunc      ,
    dynamic_TreeModelForeachFunc            ,
    genClosure_TreeModelForeachFunc         ,
    mk_TreeModelForeachFunc                 ,
    noTreeModelForeachFunc                  ,
    noTreeModelForeachFunc_WithClosures     ,
    wrap_TreeModelForeachFunc               ,


-- ** TreeSelectionForeachFunc #signal:TreeSelectionForeachFunc#

    C_TreeSelectionForeachFunc              ,
    TreeSelectionForeachFunc                ,
    TreeSelectionForeachFunc_WithClosures   ,
    drop_closures_TreeSelectionForeachFunc  ,
    dynamic_TreeSelectionForeachFunc        ,
    genClosure_TreeSelectionForeachFunc     ,
    mk_TreeSelectionForeachFunc             ,
    noTreeSelectionForeachFunc              ,
    noTreeSelectionForeachFunc_WithClosures ,
    wrap_TreeSelectionForeachFunc           ,


-- ** TreeSelectionFunc #signal:TreeSelectionFunc#

    C_TreeSelectionFunc                     ,
    TreeSelectionFunc                       ,
    TreeSelectionFunc_WithClosures          ,
    drop_closures_TreeSelectionFunc         ,
    dynamic_TreeSelectionFunc               ,
    genClosure_TreeSelectionFunc            ,
    mk_TreeSelectionFunc                    ,
    noTreeSelectionFunc                     ,
    noTreeSelectionFunc_WithClosures        ,
    wrap_TreeSelectionFunc                  ,


-- ** TreeViewColumnDropFunc #signal:TreeViewColumnDropFunc#

    C_TreeViewColumnDropFunc                ,
    TreeViewColumnDropFunc                  ,
    TreeViewColumnDropFunc_WithClosures     ,
    drop_closures_TreeViewColumnDropFunc    ,
    dynamic_TreeViewColumnDropFunc          ,
    genClosure_TreeViewColumnDropFunc       ,
    mk_TreeViewColumnDropFunc               ,
    noTreeViewColumnDropFunc                ,
    noTreeViewColumnDropFunc_WithClosures   ,
    wrap_TreeViewColumnDropFunc             ,


-- ** TreeViewMappingFunc #signal:TreeViewMappingFunc#

    C_TreeViewMappingFunc                   ,
    TreeViewMappingFunc                     ,
    TreeViewMappingFunc_WithClosures        ,
    drop_closures_TreeViewMappingFunc       ,
    dynamic_TreeViewMappingFunc             ,
    genClosure_TreeViewMappingFunc          ,
    mk_TreeViewMappingFunc                  ,
    noTreeViewMappingFunc                   ,
    noTreeViewMappingFunc_WithClosures      ,
    wrap_TreeViewMappingFunc                ,


-- ** TreeViewRowSeparatorFunc #signal:TreeViewRowSeparatorFunc#

    C_TreeViewRowSeparatorFunc              ,
    TreeViewRowSeparatorFunc                ,
    TreeViewRowSeparatorFunc_WithClosures   ,
    drop_closures_TreeViewRowSeparatorFunc  ,
    dynamic_TreeViewRowSeparatorFunc        ,
    genClosure_TreeViewRowSeparatorFunc     ,
    mk_TreeViewRowSeparatorFunc             ,
    noTreeViewRowSeparatorFunc              ,
    noTreeViewRowSeparatorFunc_WithClosures ,
    wrap_TreeViewRowSeparatorFunc           ,


-- ** TreeViewSearchEqualFunc #signal:TreeViewSearchEqualFunc#

    C_TreeViewSearchEqualFunc               ,
    TreeViewSearchEqualFunc                 ,
    TreeViewSearchEqualFunc_WithClosures    ,
    drop_closures_TreeViewSearchEqualFunc   ,
    dynamic_TreeViewSearchEqualFunc         ,
    genClosure_TreeViewSearchEqualFunc      ,
    mk_TreeViewSearchEqualFunc              ,
    noTreeViewSearchEqualFunc               ,
    noTreeViewSearchEqualFunc_WithClosures  ,
    wrap_TreeViewSearchEqualFunc            ,


-- ** TreeViewSearchPositionFunc #signal:TreeViewSearchPositionFunc#

    C_TreeViewSearchPositionFunc            ,
    TreeViewSearchPositionFunc              ,
    TreeViewSearchPositionFunc_WithClosures ,
    drop_closures_TreeViewSearchPositionFunc,
    dynamic_TreeViewSearchPositionFunc      ,
    genClosure_TreeViewSearchPositionFunc   ,
    mk_TreeViewSearchPositionFunc           ,
    noTreeViewSearchPositionFunc            ,
    noTreeViewSearchPositionFunc_WithClosures,
    wrap_TreeViewSearchPositionFunc         ,


-- ** WidgetClassCanActivateAccelFieldCallback #signal:WidgetClassCanActivateAccelFieldCallback#

    C_WidgetClassCanActivateAccelFieldCallback,
    WidgetClassCanActivateAccelFieldCallback,
    dynamic_WidgetClassCanActivateAccelFieldCallback,
    genClosure_WidgetClassCanActivateAccelFieldCallback,
    mk_WidgetClassCanActivateAccelFieldCallback,
    noWidgetClassCanActivateAccelFieldCallback,
    wrap_WidgetClassCanActivateAccelFieldCallback,


-- ** WidgetClassComputeExpandFieldCallback #signal:WidgetClassComputeExpandFieldCallback#

    C_WidgetClassComputeExpandFieldCallback ,
    WidgetClassComputeExpandFieldCallback   ,
    dynamic_WidgetClassComputeExpandFieldCallback,
    genClosure_WidgetClassComputeExpandFieldCallback,
    mk_WidgetClassComputeExpandFieldCallback,
    noWidgetClassComputeExpandFieldCallback ,
    wrap_WidgetClassComputeExpandFieldCallback,


-- ** WidgetClassContainsFieldCallback #signal:WidgetClassContainsFieldCallback#

    C_WidgetClassContainsFieldCallback      ,
    WidgetClassContainsFieldCallback        ,
    dynamic_WidgetClassContainsFieldCallback,
    genClosure_WidgetClassContainsFieldCallback,
    mk_WidgetClassContainsFieldCallback     ,
    noWidgetClassContainsFieldCallback      ,
    wrap_WidgetClassContainsFieldCallback   ,


-- ** WidgetClassDestroyFieldCallback #signal:WidgetClassDestroyFieldCallback#

    C_WidgetClassDestroyFieldCallback       ,
    WidgetClassDestroyFieldCallback         ,
    dynamic_WidgetClassDestroyFieldCallback ,
    genClosure_WidgetClassDestroyFieldCallback,
    mk_WidgetClassDestroyFieldCallback      ,
    noWidgetClassDestroyFieldCallback       ,
    wrap_WidgetClassDestroyFieldCallback    ,


-- ** WidgetClassDirectionChangedFieldCallback #signal:WidgetClassDirectionChangedFieldCallback#

    C_WidgetClassDirectionChangedFieldCallback,
    WidgetClassDirectionChangedFieldCallback,
    dynamic_WidgetClassDirectionChangedFieldCallback,
    genClosure_WidgetClassDirectionChangedFieldCallback,
    mk_WidgetClassDirectionChangedFieldCallback,
    noWidgetClassDirectionChangedFieldCallback,
    wrap_WidgetClassDirectionChangedFieldCallback,


-- ** WidgetClassDragBeginFieldCallback #signal:WidgetClassDragBeginFieldCallback#

    C_WidgetClassDragBeginFieldCallback     ,
    WidgetClassDragBeginFieldCallback       ,
    dynamic_WidgetClassDragBeginFieldCallback,
    genClosure_WidgetClassDragBeginFieldCallback,
    mk_WidgetClassDragBeginFieldCallback    ,
    noWidgetClassDragBeginFieldCallback     ,
    wrap_WidgetClassDragBeginFieldCallback  ,


-- ** WidgetClassDragDataDeleteFieldCallback #signal:WidgetClassDragDataDeleteFieldCallback#

    C_WidgetClassDragDataDeleteFieldCallback,
    WidgetClassDragDataDeleteFieldCallback  ,
    dynamic_WidgetClassDragDataDeleteFieldCallback,
    genClosure_WidgetClassDragDataDeleteFieldCallback,
    mk_WidgetClassDragDataDeleteFieldCallback,
    noWidgetClassDragDataDeleteFieldCallback,
    wrap_WidgetClassDragDataDeleteFieldCallback,


-- ** WidgetClassDragDataGetFieldCallback #signal:WidgetClassDragDataGetFieldCallback#

    C_WidgetClassDragDataGetFieldCallback   ,
    WidgetClassDragDataGetFieldCallback     ,
    dynamic_WidgetClassDragDataGetFieldCallback,
    genClosure_WidgetClassDragDataGetFieldCallback,
    mk_WidgetClassDragDataGetFieldCallback  ,
    noWidgetClassDragDataGetFieldCallback   ,
    wrap_WidgetClassDragDataGetFieldCallback,


-- ** WidgetClassDragDataReceivedFieldCallback #signal:WidgetClassDragDataReceivedFieldCallback#

    C_WidgetClassDragDataReceivedFieldCallback,
    WidgetClassDragDataReceivedFieldCallback,
    dynamic_WidgetClassDragDataReceivedFieldCallback,
    genClosure_WidgetClassDragDataReceivedFieldCallback,
    mk_WidgetClassDragDataReceivedFieldCallback,
    noWidgetClassDragDataReceivedFieldCallback,
    wrap_WidgetClassDragDataReceivedFieldCallback,


-- ** WidgetClassDragDropFieldCallback #signal:WidgetClassDragDropFieldCallback#

    C_WidgetClassDragDropFieldCallback      ,
    WidgetClassDragDropFieldCallback        ,
    dynamic_WidgetClassDragDropFieldCallback,
    genClosure_WidgetClassDragDropFieldCallback,
    mk_WidgetClassDragDropFieldCallback     ,
    noWidgetClassDragDropFieldCallback      ,
    wrap_WidgetClassDragDropFieldCallback   ,


-- ** WidgetClassDragEndFieldCallback #signal:WidgetClassDragEndFieldCallback#

    C_WidgetClassDragEndFieldCallback       ,
    WidgetClassDragEndFieldCallback         ,
    dynamic_WidgetClassDragEndFieldCallback ,
    genClosure_WidgetClassDragEndFieldCallback,
    mk_WidgetClassDragEndFieldCallback      ,
    noWidgetClassDragEndFieldCallback       ,
    wrap_WidgetClassDragEndFieldCallback    ,


-- ** WidgetClassDragFailedFieldCallback #signal:WidgetClassDragFailedFieldCallback#

    C_WidgetClassDragFailedFieldCallback    ,
    WidgetClassDragFailedFieldCallback      ,
    dynamic_WidgetClassDragFailedFieldCallback,
    genClosure_WidgetClassDragFailedFieldCallback,
    mk_WidgetClassDragFailedFieldCallback   ,
    noWidgetClassDragFailedFieldCallback    ,
    wrap_WidgetClassDragFailedFieldCallback ,


-- ** WidgetClassDragLeaveFieldCallback #signal:WidgetClassDragLeaveFieldCallback#

    C_WidgetClassDragLeaveFieldCallback     ,
    WidgetClassDragLeaveFieldCallback       ,
    dynamic_WidgetClassDragLeaveFieldCallback,
    genClosure_WidgetClassDragLeaveFieldCallback,
    mk_WidgetClassDragLeaveFieldCallback    ,
    noWidgetClassDragLeaveFieldCallback     ,
    wrap_WidgetClassDragLeaveFieldCallback  ,


-- ** WidgetClassDragMotionFieldCallback #signal:WidgetClassDragMotionFieldCallback#

    C_WidgetClassDragMotionFieldCallback    ,
    WidgetClassDragMotionFieldCallback      ,
    dynamic_WidgetClassDragMotionFieldCallback,
    genClosure_WidgetClassDragMotionFieldCallback,
    mk_WidgetClassDragMotionFieldCallback   ,
    noWidgetClassDragMotionFieldCallback    ,
    wrap_WidgetClassDragMotionFieldCallback ,


-- ** WidgetClassFocusFieldCallback #signal:WidgetClassFocusFieldCallback#

    C_WidgetClassFocusFieldCallback         ,
    WidgetClassFocusFieldCallback           ,
    dynamic_WidgetClassFocusFieldCallback   ,
    genClosure_WidgetClassFocusFieldCallback,
    mk_WidgetClassFocusFieldCallback        ,
    noWidgetClassFocusFieldCallback         ,
    wrap_WidgetClassFocusFieldCallback      ,


-- ** WidgetClassGetAccessibleFieldCallback #signal:WidgetClassGetAccessibleFieldCallback#

    C_WidgetClassGetAccessibleFieldCallback ,
    WidgetClassGetAccessibleFieldCallback   ,
    dynamic_WidgetClassGetAccessibleFieldCallback,
    genClosure_WidgetClassGetAccessibleFieldCallback,
    mk_WidgetClassGetAccessibleFieldCallback,
    noWidgetClassGetAccessibleFieldCallback ,
    wrap_WidgetClassGetAccessibleFieldCallback,


-- ** WidgetClassGetRequestModeFieldCallback #signal:WidgetClassGetRequestModeFieldCallback#

    C_WidgetClassGetRequestModeFieldCallback,
    WidgetClassGetRequestModeFieldCallback  ,
    dynamic_WidgetClassGetRequestModeFieldCallback,
    genClosure_WidgetClassGetRequestModeFieldCallback,
    mk_WidgetClassGetRequestModeFieldCallback,
    noWidgetClassGetRequestModeFieldCallback,
    wrap_WidgetClassGetRequestModeFieldCallback,


-- ** WidgetClassGrabFocusFieldCallback #signal:WidgetClassGrabFocusFieldCallback#

    C_WidgetClassGrabFocusFieldCallback     ,
    WidgetClassGrabFocusFieldCallback       ,
    dynamic_WidgetClassGrabFocusFieldCallback,
    genClosure_WidgetClassGrabFocusFieldCallback,
    mk_WidgetClassGrabFocusFieldCallback    ,
    noWidgetClassGrabFocusFieldCallback     ,
    wrap_WidgetClassGrabFocusFieldCallback  ,


-- ** WidgetClassGrabNotifyFieldCallback #signal:WidgetClassGrabNotifyFieldCallback#

    C_WidgetClassGrabNotifyFieldCallback    ,
    WidgetClassGrabNotifyFieldCallback      ,
    dynamic_WidgetClassGrabNotifyFieldCallback,
    genClosure_WidgetClassGrabNotifyFieldCallback,
    mk_WidgetClassGrabNotifyFieldCallback   ,
    noWidgetClassGrabNotifyFieldCallback    ,
    wrap_WidgetClassGrabNotifyFieldCallback ,


-- ** WidgetClassHideFieldCallback #signal:WidgetClassHideFieldCallback#

    C_WidgetClassHideFieldCallback          ,
    WidgetClassHideFieldCallback            ,
    dynamic_WidgetClassHideFieldCallback    ,
    genClosure_WidgetClassHideFieldCallback ,
    mk_WidgetClassHideFieldCallback         ,
    noWidgetClassHideFieldCallback          ,
    wrap_WidgetClassHideFieldCallback       ,


-- ** WidgetClassKeynavFailedFieldCallback #signal:WidgetClassKeynavFailedFieldCallback#

    C_WidgetClassKeynavFailedFieldCallback  ,
    WidgetClassKeynavFailedFieldCallback    ,
    dynamic_WidgetClassKeynavFailedFieldCallback,
    genClosure_WidgetClassKeynavFailedFieldCallback,
    mk_WidgetClassKeynavFailedFieldCallback ,
    noWidgetClassKeynavFailedFieldCallback  ,
    wrap_WidgetClassKeynavFailedFieldCallback,


-- ** WidgetClassMapFieldCallback #signal:WidgetClassMapFieldCallback#

    C_WidgetClassMapFieldCallback           ,
    WidgetClassMapFieldCallback             ,
    dynamic_WidgetClassMapFieldCallback     ,
    genClosure_WidgetClassMapFieldCallback  ,
    mk_WidgetClassMapFieldCallback          ,
    noWidgetClassMapFieldCallback           ,
    wrap_WidgetClassMapFieldCallback        ,


-- ** WidgetClassMeasureFieldCallback #signal:WidgetClassMeasureFieldCallback#

    C_WidgetClassMeasureFieldCallback       ,
    WidgetClassMeasureFieldCallback         ,
    dynamic_WidgetClassMeasureFieldCallback ,
    genClosure_WidgetClassMeasureFieldCallback,
    mk_WidgetClassMeasureFieldCallback      ,
    noWidgetClassMeasureFieldCallback       ,
    wrap_WidgetClassMeasureFieldCallback    ,


-- ** WidgetClassMnemonicActivateFieldCallback #signal:WidgetClassMnemonicActivateFieldCallback#

    C_WidgetClassMnemonicActivateFieldCallback,
    WidgetClassMnemonicActivateFieldCallback,
    dynamic_WidgetClassMnemonicActivateFieldCallback,
    genClosure_WidgetClassMnemonicActivateFieldCallback,
    mk_WidgetClassMnemonicActivateFieldCallback,
    noWidgetClassMnemonicActivateFieldCallback,
    wrap_WidgetClassMnemonicActivateFieldCallback,


-- ** WidgetClassMoveFocusFieldCallback #signal:WidgetClassMoveFocusFieldCallback#

    C_WidgetClassMoveFocusFieldCallback     ,
    WidgetClassMoveFocusFieldCallback       ,
    dynamic_WidgetClassMoveFocusFieldCallback,
    genClosure_WidgetClassMoveFocusFieldCallback,
    mk_WidgetClassMoveFocusFieldCallback    ,
    noWidgetClassMoveFocusFieldCallback     ,
    wrap_WidgetClassMoveFocusFieldCallback  ,


-- ** WidgetClassPopupMenuFieldCallback #signal:WidgetClassPopupMenuFieldCallback#

    C_WidgetClassPopupMenuFieldCallback     ,
    WidgetClassPopupMenuFieldCallback       ,
    dynamic_WidgetClassPopupMenuFieldCallback,
    genClosure_WidgetClassPopupMenuFieldCallback,
    mk_WidgetClassPopupMenuFieldCallback    ,
    noWidgetClassPopupMenuFieldCallback     ,
    wrap_WidgetClassPopupMenuFieldCallback  ,


-- ** WidgetClassQueryTooltipFieldCallback #signal:WidgetClassQueryTooltipFieldCallback#

    C_WidgetClassQueryTooltipFieldCallback  ,
    WidgetClassQueryTooltipFieldCallback    ,
    dynamic_WidgetClassQueryTooltipFieldCallback,
    genClosure_WidgetClassQueryTooltipFieldCallback,
    mk_WidgetClassQueryTooltipFieldCallback ,
    noWidgetClassQueryTooltipFieldCallback  ,
    wrap_WidgetClassQueryTooltipFieldCallback,


-- ** WidgetClassRealizeFieldCallback #signal:WidgetClassRealizeFieldCallback#

    C_WidgetClassRealizeFieldCallback       ,
    WidgetClassRealizeFieldCallback         ,
    dynamic_WidgetClassRealizeFieldCallback ,
    genClosure_WidgetClassRealizeFieldCallback,
    mk_WidgetClassRealizeFieldCallback      ,
    noWidgetClassRealizeFieldCallback       ,
    wrap_WidgetClassRealizeFieldCallback    ,


-- ** WidgetClassRootFieldCallback #signal:WidgetClassRootFieldCallback#

    C_WidgetClassRootFieldCallback          ,
    WidgetClassRootFieldCallback            ,
    dynamic_WidgetClassRootFieldCallback    ,
    genClosure_WidgetClassRootFieldCallback ,
    mk_WidgetClassRootFieldCallback         ,
    noWidgetClassRootFieldCallback          ,
    wrap_WidgetClassRootFieldCallback       ,


-- ** WidgetClassShowFieldCallback #signal:WidgetClassShowFieldCallback#

    C_WidgetClassShowFieldCallback          ,
    WidgetClassShowFieldCallback            ,
    dynamic_WidgetClassShowFieldCallback    ,
    genClosure_WidgetClassShowFieldCallback ,
    mk_WidgetClassShowFieldCallback         ,
    noWidgetClassShowFieldCallback          ,
    wrap_WidgetClassShowFieldCallback       ,


-- ** WidgetClassSizeAllocateFieldCallback #signal:WidgetClassSizeAllocateFieldCallback#

    C_WidgetClassSizeAllocateFieldCallback  ,
    WidgetClassSizeAllocateFieldCallback    ,
    dynamic_WidgetClassSizeAllocateFieldCallback,
    genClosure_WidgetClassSizeAllocateFieldCallback,
    mk_WidgetClassSizeAllocateFieldCallback ,
    noWidgetClassSizeAllocateFieldCallback  ,
    wrap_WidgetClassSizeAllocateFieldCallback,


-- ** WidgetClassSnapshotFieldCallback #signal:WidgetClassSnapshotFieldCallback#

    C_WidgetClassSnapshotFieldCallback      ,
    WidgetClassSnapshotFieldCallback        ,
    dynamic_WidgetClassSnapshotFieldCallback,
    genClosure_WidgetClassSnapshotFieldCallback,
    mk_WidgetClassSnapshotFieldCallback     ,
    noWidgetClassSnapshotFieldCallback      ,
    wrap_WidgetClassSnapshotFieldCallback   ,


-- ** WidgetClassStateFlagsChangedFieldCallback #signal:WidgetClassStateFlagsChangedFieldCallback#

    C_WidgetClassStateFlagsChangedFieldCallback,
    WidgetClassStateFlagsChangedFieldCallback,
    dynamic_WidgetClassStateFlagsChangedFieldCallback,
    genClosure_WidgetClassStateFlagsChangedFieldCallback,
    mk_WidgetClassStateFlagsChangedFieldCallback,
    noWidgetClassStateFlagsChangedFieldCallback,
    wrap_WidgetClassStateFlagsChangedFieldCallback,


-- ** WidgetClassStyleUpdatedFieldCallback #signal:WidgetClassStyleUpdatedFieldCallback#

    C_WidgetClassStyleUpdatedFieldCallback  ,
    WidgetClassStyleUpdatedFieldCallback    ,
    dynamic_WidgetClassStyleUpdatedFieldCallback,
    genClosure_WidgetClassStyleUpdatedFieldCallback,
    mk_WidgetClassStyleUpdatedFieldCallback ,
    noWidgetClassStyleUpdatedFieldCallback  ,
    wrap_WidgetClassStyleUpdatedFieldCallback,


-- ** WidgetClassUnmapFieldCallback #signal:WidgetClassUnmapFieldCallback#

    C_WidgetClassUnmapFieldCallback         ,
    WidgetClassUnmapFieldCallback           ,
    dynamic_WidgetClassUnmapFieldCallback   ,
    genClosure_WidgetClassUnmapFieldCallback,
    mk_WidgetClassUnmapFieldCallback        ,
    noWidgetClassUnmapFieldCallback         ,
    wrap_WidgetClassUnmapFieldCallback      ,


-- ** WidgetClassUnrealizeFieldCallback #signal:WidgetClassUnrealizeFieldCallback#

    C_WidgetClassUnrealizeFieldCallback     ,
    WidgetClassUnrealizeFieldCallback       ,
    dynamic_WidgetClassUnrealizeFieldCallback,
    genClosure_WidgetClassUnrealizeFieldCallback,
    mk_WidgetClassUnrealizeFieldCallback    ,
    noWidgetClassUnrealizeFieldCallback     ,
    wrap_WidgetClassUnrealizeFieldCallback  ,


-- ** WidgetClassUnrootFieldCallback #signal:WidgetClassUnrootFieldCallback#

    C_WidgetClassUnrootFieldCallback        ,
    WidgetClassUnrootFieldCallback          ,
    dynamic_WidgetClassUnrootFieldCallback  ,
    genClosure_WidgetClassUnrootFieldCallback,
    mk_WidgetClassUnrootFieldCallback       ,
    noWidgetClassUnrootFieldCallback        ,
    wrap_WidgetClassUnrootFieldCallback     ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GObject.Flags as GObject.Flags
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Objects.Drag as Gdk.Drag
import qualified GI.Gdk.Objects.Drop as Gdk.Drop
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.CellLayout as Gtk.CellLayout
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.TreeModel as Gtk.TreeModel
import {-# SOURCE #-} qualified GI.Gtk.Objects.AccelGroup as Gtk.AccelGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Builder as Gtk.Builder
import {-# SOURCE #-} qualified GI.Gtk.Objects.Calendar as Gtk.Calendar
import {-# SOURCE #-} qualified GI.Gtk.Objects.CellRenderer as Gtk.CellRenderer
import {-# SOURCE #-} qualified GI.Gtk.Objects.Container as Gtk.Container
import {-# SOURCE #-} qualified GI.Gtk.Objects.DrawingArea as Gtk.DrawingArea
import {-# SOURCE #-} qualified GI.Gtk.Objects.EntryCompletion as Gtk.EntryCompletion
import {-# SOURCE #-} qualified GI.Gtk.Objects.FlowBox as Gtk.FlowBox
import {-# SOURCE #-} qualified GI.Gtk.Objects.FlowBoxChild as Gtk.FlowBoxChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.IconView as Gtk.IconView
import {-# SOURCE #-} qualified GI.Gtk.Objects.ListBox as Gtk.ListBox
import {-# SOURCE #-} qualified GI.Gtk.Objects.ListBoxRow as Gtk.ListBoxRow
import {-# SOURCE #-} qualified GI.Gtk.Objects.Menu as Gtk.Menu
import {-# SOURCE #-} qualified GI.Gtk.Objects.PageSetup as Gtk.PageSetup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.TreeSelection as Gtk.TreeSelection
import {-# SOURCE #-} qualified GI.Gtk.Objects.TreeView as Gtk.TreeView
import {-# SOURCE #-} qualified GI.Gtk.Objects.TreeViewColumn as Gtk.TreeViewColumn
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.AccelKey as Gtk.AccelKey
import {-# SOURCE #-} qualified GI.Gtk.Structs.FileFilterInfo as Gtk.FileFilterInfo
import {-# SOURCE #-} qualified GI.Gtk.Structs.SelectionData as Gtk.SelectionData
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreePath as Gtk.TreePath
import {-# SOURCE #-} qualified GI.Gtk.Structs.WidgetPath as Gtk.WidgetPath
import qualified GI.Pango.Objects.FontFace as Pango.FontFace
import qualified GI.Pango.Objects.FontFamily as Pango.FontFamily

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

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassUnrootFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> C_WidgetClassUnrootFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassUnrootFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassUnrootFieldCallback
    -> a
    -> m ()
dynamic_WidgetClassUnrootFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassUnrootFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassUnrootFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassUnrootFieldCallback =
    Gtk.Widget.Widget
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassUnrootFieldCallback`@.
noWidgetClassUnrootFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassUnrootFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassUnrootFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassUnrootFieldCallback :: MonadIO m => WidgetClassUnrootFieldCallback -> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassUnrootFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassUnrootFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnrootFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassUnrootFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassUnrootFieldCallback` into a `C_WidgetClassUnrootFieldCallback`.
wrap_WidgetClassUnrootFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) ->
    WidgetClassUnrootFieldCallback ->
    C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnrootFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnrootFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassUnrealizeFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassUnrealizeFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassUnrealizeFieldCallback :: FunPtr C_WidgetClassUnrealizeFieldCallback -> C_WidgetClassUnrealizeFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassUnrealizeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassUnrealizeFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassUnrealizeFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassUnrealizeFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassUnrealizeFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassUnrealizeFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassUnrealizeFieldCallback`@.
noWidgetClassUnrealizeFieldCallback :: Maybe WidgetClassUnrealizeFieldCallback
noWidgetClassUnrealizeFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassUnrealizeFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassUnrealizeFieldCallback :: MonadIO m => WidgetClassUnrealizeFieldCallback -> m (GClosure C_WidgetClassUnrealizeFieldCallback)
genClosure_WidgetClassUnrealizeFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassUnrealizeFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnrealizeFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassUnrealizeFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassUnrealizeFieldCallback` into a `C_WidgetClassUnrealizeFieldCallback`.
wrap_WidgetClassUnrealizeFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassUnrealizeFieldCallback)) ->
    WidgetClassUnrealizeFieldCallback ->
    C_WidgetClassUnrealizeFieldCallback
wrap_WidgetClassUnrealizeFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnrealizeFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassUnmapFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassUnmapFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassUnmapFieldCallback :: FunPtr C_WidgetClassUnmapFieldCallback -> C_WidgetClassUnmapFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassUnmapFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassUnmapFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassUnmapFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassUnmapFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassUnmapFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassUnmapFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassUnmapFieldCallback`@.
noWidgetClassUnmapFieldCallback :: Maybe WidgetClassUnmapFieldCallback
noWidgetClassUnmapFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassUnmapFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassUnmapFieldCallback :: MonadIO m => WidgetClassUnmapFieldCallback -> m (GClosure C_WidgetClassUnmapFieldCallback)
genClosure_WidgetClassUnmapFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassUnmapFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnmapFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassUnmapFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassUnmapFieldCallback` into a `C_WidgetClassUnmapFieldCallback`.
wrap_WidgetClassUnmapFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassUnmapFieldCallback)) ->
    WidgetClassUnmapFieldCallback ->
    C_WidgetClassUnmapFieldCallback
wrap_WidgetClassUnmapFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassUnmapFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


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

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassStyleUpdatedFieldCallback :: FunPtr C_WidgetClassStyleUpdatedFieldCallback -> C_WidgetClassStyleUpdatedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassStyleUpdatedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassStyleUpdatedFieldCallback
    -> a
    -> m ()
dynamic_WidgetClassStyleUpdatedFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassStyleUpdatedFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassStyleUpdatedFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassStyleUpdatedFieldCallback =
    Gtk.Widget.Widget
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassStyleUpdatedFieldCallback`@.
noWidgetClassStyleUpdatedFieldCallback :: Maybe WidgetClassStyleUpdatedFieldCallback
noWidgetClassStyleUpdatedFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassStyleUpdatedFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassStyleUpdatedFieldCallback :: MonadIO m => WidgetClassStyleUpdatedFieldCallback -> m (GClosure C_WidgetClassStyleUpdatedFieldCallback)
genClosure_WidgetClassStyleUpdatedFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassStyleUpdatedFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassStyleUpdatedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassStyleUpdatedFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassStyleUpdatedFieldCallback` into a `C_WidgetClassStyleUpdatedFieldCallback`.
wrap_WidgetClassStyleUpdatedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassStyleUpdatedFieldCallback)) ->
    WidgetClassStyleUpdatedFieldCallback ->
    C_WidgetClassStyleUpdatedFieldCallback
wrap_WidgetClassStyleUpdatedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassStyleUpdatedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassStateFlagsChangedFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "previous_state_flags", argType = TInterface (Name {namespace = "Gtk", name = "StateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassStateFlagsChangedFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    IO ()

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassStateFlagsChangedFieldCallback :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback -> C_WidgetClassStateFlagsChangedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassStateFlagsChangedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassStateFlagsChangedFieldCallback
    -> a
    -> [Gtk.Flags.StateFlags]
    -> m ()
dynamic_WidgetClassStateFlagsChangedFieldCallback :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> a -> [StateFlags] -> m ()
dynamic_WidgetClassStateFlagsChangedFieldCallback __funPtr :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr widget :: a
widget previousStateFlags :: [StateFlags]
previousStateFlags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let previousStateFlags' :: CUInt
previousStateFlags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
previousStateFlags
    (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
__dynamic_C_WidgetClassStateFlagsChangedFieldCallback FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr) Ptr Widget
widget' CUInt
previousStateFlags'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassStateFlagsChangedFieldCallback =
    Gtk.Widget.Widget
    -> [Gtk.Flags.StateFlags]
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassStateFlagsChangedFieldCallback`@.
noWidgetClassStateFlagsChangedFieldCallback :: Maybe WidgetClassStateFlagsChangedFieldCallback
noWidgetClassStateFlagsChangedFieldCallback :: Maybe WidgetClassStateFlagsChangedFieldCallback
noWidgetClassStateFlagsChangedFieldCallback = Maybe WidgetClassStateFlagsChangedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassStateFlagsChangedFieldCallback :: MonadIO m => WidgetClassStateFlagsChangedFieldCallback -> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
genClosure_WidgetClassStateFlagsChangedFieldCallback :: WidgetClassStateFlagsChangedFieldCallback
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
genClosure_WidgetClassStateFlagsChangedFieldCallback cb :: WidgetClassStateFlagsChangedFieldCallback
cb = IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
 -> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassStateFlagsChangedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassStateFlagsChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassStateFlagsChangedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
forall a. Maybe a
Nothing WidgetClassStateFlagsChangedFieldCallback
cb
    C_WidgetClassStateFlagsChangedFieldCallback
-> IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
mk_WidgetClassStateFlagsChangedFieldCallback C_WidgetClassStateFlagsChangedFieldCallback
cb' IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
-> (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
    -> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassStateFlagsChangedFieldCallback` into a `C_WidgetClassStateFlagsChangedFieldCallback`.
wrap_WidgetClassStateFlagsChangedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)) ->
    WidgetClassStateFlagsChangedFieldCallback ->
    C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassStateFlagsChangedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassStateFlagsChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassStateFlagsChangedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr _cb :: WidgetClassStateFlagsChangedFieldCallback
_cb widget :: Ptr Widget
widget previousStateFlags :: CUInt
previousStateFlags = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let previousStateFlags' :: [StateFlags]
previousStateFlags' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
previousStateFlags
    WidgetClassStateFlagsChangedFieldCallback
_cb  Widget
widget' [StateFlags]
previousStateFlags'
    Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr


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

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassSnapshotFieldCallback :: FunPtr C_WidgetClassSnapshotFieldCallback -> C_WidgetClassSnapshotFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassSnapshotFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gtk.Snapshot.IsSnapshot b) =>
    FunPtr C_WidgetClassSnapshotFieldCallback
    -> a
    -> b
    -> m ()
dynamic_WidgetClassSnapshotFieldCallback :: FunPtr C_WidgetClassSnapshotFieldCallback -> a -> b -> m ()
dynamic_WidgetClassSnapshotFieldCallback __funPtr :: FunPtr C_WidgetClassSnapshotFieldCallback
__funPtr widget :: a
widget snapshot :: b
snapshot = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Snapshot
snapshot' <- b -> IO (Ptr Snapshot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
snapshot
    (FunPtr C_WidgetClassSnapshotFieldCallback
-> C_WidgetClassSnapshotFieldCallback
__dynamic_C_WidgetClassSnapshotFieldCallback FunPtr C_WidgetClassSnapshotFieldCallback
__funPtr) Ptr Widget
widget' Ptr Snapshot
snapshot'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
snapshot
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassSnapshotFieldCallback =
    Gtk.Widget.Widget
    -> Gtk.Snapshot.Snapshot
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassSnapshotFieldCallback`@.
noWidgetClassSnapshotFieldCallback :: Maybe WidgetClassSnapshotFieldCallback
noWidgetClassSnapshotFieldCallback :: Maybe WidgetClassSnapshotFieldCallback
noWidgetClassSnapshotFieldCallback = Maybe WidgetClassSnapshotFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassSnapshotFieldCallback :: MonadIO m => WidgetClassSnapshotFieldCallback -> m (GClosure C_WidgetClassSnapshotFieldCallback)
genClosure_WidgetClassSnapshotFieldCallback :: WidgetClassSnapshotFieldCallback
-> m (GClosure C_WidgetClassSnapshotFieldCallback)
genClosure_WidgetClassSnapshotFieldCallback cb :: WidgetClassSnapshotFieldCallback
cb = IO (GClosure C_WidgetClassSnapshotFieldCallback)
-> m (GClosure C_WidgetClassSnapshotFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassSnapshotFieldCallback)
 -> m (GClosure C_WidgetClassSnapshotFieldCallback))
-> IO (GClosure C_WidgetClassSnapshotFieldCallback)
-> m (GClosure C_WidgetClassSnapshotFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassSnapshotFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback))
-> WidgetClassSnapshotFieldCallback
-> C_WidgetClassSnapshotFieldCallback
wrap_WidgetClassSnapshotFieldCallback Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback))
forall a. Maybe a
Nothing WidgetClassSnapshotFieldCallback
cb
    C_WidgetClassSnapshotFieldCallback
-> IO (FunPtr C_WidgetClassSnapshotFieldCallback)
mk_WidgetClassSnapshotFieldCallback C_WidgetClassSnapshotFieldCallback
cb' IO (FunPtr C_WidgetClassSnapshotFieldCallback)
-> (FunPtr C_WidgetClassSnapshotFieldCallback
    -> IO (GClosure C_WidgetClassSnapshotFieldCallback))
-> IO (GClosure C_WidgetClassSnapshotFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassSnapshotFieldCallback
-> IO (GClosure C_WidgetClassSnapshotFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassSnapshotFieldCallback` into a `C_WidgetClassSnapshotFieldCallback`.
wrap_WidgetClassSnapshotFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback)) ->
    WidgetClassSnapshotFieldCallback ->
    C_WidgetClassSnapshotFieldCallback
wrap_WidgetClassSnapshotFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback))
-> WidgetClassSnapshotFieldCallback
-> C_WidgetClassSnapshotFieldCallback
wrap_WidgetClassSnapshotFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback))
funptrptr _cb :: WidgetClassSnapshotFieldCallback
_cb widget :: Ptr Widget
widget snapshot :: Ptr Snapshot
snapshot = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Snapshot
snapshot' <- ((ManagedPtr Snapshot -> Snapshot) -> Ptr Snapshot -> IO Snapshot
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Snapshot -> Snapshot
Gtk.Snapshot.Snapshot) Ptr Snapshot
snapshot
    WidgetClassSnapshotFieldCallback
_cb  Widget
widget' Snapshot
snapshot'
    Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassSnapshotFieldCallback))
funptrptr


-- callback WidgetClassSizeAllocateFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "baseline", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassSizeAllocateFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Int32 ->
    Int32 ->
    Int32 ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassSizeAllocateFieldCallback :: FunPtr C_WidgetClassSizeAllocateFieldCallback -> C_WidgetClassSizeAllocateFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassSizeAllocateFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassSizeAllocateFieldCallback
    -> a
    -> Int32
    -> Int32
    -> Int32
    -> m ()
dynamic_WidgetClassSizeAllocateFieldCallback :: FunPtr C_WidgetClassSizeAllocateFieldCallback
-> a -> Int32 -> Int32 -> Int32 -> m ()
dynamic_WidgetClassSizeAllocateFieldCallback __funPtr :: FunPtr C_WidgetClassSizeAllocateFieldCallback
__funPtr widget :: a
widget width :: Int32
width height :: Int32
height baseline :: Int32
baseline = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
__dynamic_C_WidgetClassSizeAllocateFieldCallback FunPtr C_WidgetClassSizeAllocateFieldCallback
__funPtr) Ptr Widget
widget' Int32
width Int32
height Int32
baseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassSizeAllocateFieldCallback =
    Gtk.Widget.Widget
    -> Int32
    -> Int32
    -> Int32
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassSizeAllocateFieldCallback`@.
noWidgetClassSizeAllocateFieldCallback :: Maybe WidgetClassSizeAllocateFieldCallback
noWidgetClassSizeAllocateFieldCallback :: Maybe WidgetClassSizeAllocateFieldCallback
noWidgetClassSizeAllocateFieldCallback = Maybe WidgetClassSizeAllocateFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassSizeAllocateFieldCallback :: MonadIO m => WidgetClassSizeAllocateFieldCallback -> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
genClosure_WidgetClassSizeAllocateFieldCallback :: WidgetClassSizeAllocateFieldCallback
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
genClosure_WidgetClassSizeAllocateFieldCallback cb :: WidgetClassSizeAllocateFieldCallback
cb = IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
 -> m (GClosure C_WidgetClassSizeAllocateFieldCallback))
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassSizeAllocateFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
wrap_WidgetClassSizeAllocateFieldCallback Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
forall a. Maybe a
Nothing WidgetClassSizeAllocateFieldCallback
cb
    C_WidgetClassSizeAllocateFieldCallback
-> IO (FunPtr C_WidgetClassSizeAllocateFieldCallback)
mk_WidgetClassSizeAllocateFieldCallback C_WidgetClassSizeAllocateFieldCallback
cb' IO (FunPtr C_WidgetClassSizeAllocateFieldCallback)
-> (FunPtr C_WidgetClassSizeAllocateFieldCallback
    -> IO (GClosure C_WidgetClassSizeAllocateFieldCallback))
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassSizeAllocateFieldCallback
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassSizeAllocateFieldCallback` into a `C_WidgetClassSizeAllocateFieldCallback`.
wrap_WidgetClassSizeAllocateFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback)) ->
    WidgetClassSizeAllocateFieldCallback ->
    C_WidgetClassSizeAllocateFieldCallback
wrap_WidgetClassSizeAllocateFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
wrap_WidgetClassSizeAllocateFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
funptrptr _cb :: WidgetClassSizeAllocateFieldCallback
_cb widget :: Ptr Widget
widget width :: Int32
width height :: Int32
height baseline :: Int32
baseline = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassSizeAllocateFieldCallback
_cb  Widget
widget' Int32
width Int32
height Int32
baseline
    Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
funptrptr


-- callback WidgetClassShowFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassShowFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassShowFieldCallback :: FunPtr C_WidgetClassShowFieldCallback -> C_WidgetClassShowFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassShowFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassShowFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassShowFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassShowFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassShowFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassShowFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassShowFieldCallback`@.
noWidgetClassShowFieldCallback :: Maybe WidgetClassShowFieldCallback
noWidgetClassShowFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassShowFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassShowFieldCallback :: MonadIO m => WidgetClassShowFieldCallback -> m (GClosure C_WidgetClassShowFieldCallback)
genClosure_WidgetClassShowFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassShowFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassShowFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassShowFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassShowFieldCallback` into a `C_WidgetClassShowFieldCallback`.
wrap_WidgetClassShowFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassShowFieldCallback)) ->
    WidgetClassShowFieldCallback ->
    C_WidgetClassShowFieldCallback
wrap_WidgetClassShowFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassShowFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


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

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassRootFieldCallback :: FunPtr C_WidgetClassRootFieldCallback -> C_WidgetClassRootFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassRootFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassRootFieldCallback
    -> a
    -> m ()
dynamic_WidgetClassRootFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassRootFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassRootFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassRootFieldCallback =
    Gtk.Widget.Widget
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassRootFieldCallback`@.
noWidgetClassRootFieldCallback :: Maybe WidgetClassRootFieldCallback
noWidgetClassRootFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassRootFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassRootFieldCallback :: MonadIO m => WidgetClassRootFieldCallback -> m (GClosure C_WidgetClassRootFieldCallback)
genClosure_WidgetClassRootFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassRootFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassRootFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassRootFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassRootFieldCallback` into a `C_WidgetClassRootFieldCallback`.
wrap_WidgetClassRootFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassRootFieldCallback)) ->
    WidgetClassRootFieldCallback ->
    C_WidgetClassRootFieldCallback
wrap_WidgetClassRootFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassRootFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassRealizeFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassRealizeFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassRealizeFieldCallback :: FunPtr C_WidgetClassRealizeFieldCallback -> C_WidgetClassRealizeFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassRealizeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassRealizeFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassRealizeFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassRealizeFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassRealizeFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassRealizeFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassRealizeFieldCallback`@.
noWidgetClassRealizeFieldCallback :: Maybe WidgetClassRealizeFieldCallback
noWidgetClassRealizeFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassRealizeFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassRealizeFieldCallback :: MonadIO m => WidgetClassRealizeFieldCallback -> m (GClosure C_WidgetClassRealizeFieldCallback)
genClosure_WidgetClassRealizeFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassRealizeFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassRealizeFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassRealizeFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassRealizeFieldCallback` into a `C_WidgetClassRealizeFieldCallback`.
wrap_WidgetClassRealizeFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassRealizeFieldCallback)) ->
    WidgetClassRealizeFieldCallback ->
    C_WidgetClassRealizeFieldCallback
wrap_WidgetClassRealizeFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassRealizeFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassQueryTooltipFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "keyboard_tooltip", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tooltip", argType = TInterface (Name {namespace = "Gtk", name = "Tooltip"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassQueryTooltipFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Gtk.Tooltip.Tooltip ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyboard_tooltip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tooltip"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Tooltip" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassQueryTooltipFieldCallback :: FunPtr C_WidgetClassQueryTooltipFieldCallback -> C_WidgetClassQueryTooltipFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassQueryTooltipFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gtk.Tooltip.IsTooltip b) =>
    FunPtr C_WidgetClassQueryTooltipFieldCallback
    -> a
    -> Int32
    -> Int32
    -> Bool
    -> b
    -> m Bool
dynamic_WidgetClassQueryTooltipFieldCallback :: FunPtr C_WidgetClassQueryTooltipFieldCallback
-> a -> Int32 -> Int32 -> Bool -> b -> m Bool
dynamic_WidgetClassQueryTooltipFieldCallback __funPtr :: FunPtr C_WidgetClassQueryTooltipFieldCallback
__funPtr widget :: a
widget x :: Int32
x y :: Int32
y keyboardTooltip :: Bool
keyboardTooltip tooltip :: b
tooltip = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let keyboardTooltip' :: CInt
keyboardTooltip' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
keyboardTooltip
    Ptr Tooltip
tooltip' <- b -> IO (Ptr Tooltip)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tooltip
    CInt
result <- (FunPtr C_WidgetClassQueryTooltipFieldCallback
-> C_WidgetClassQueryTooltipFieldCallback
__dynamic_C_WidgetClassQueryTooltipFieldCallback FunPtr C_WidgetClassQueryTooltipFieldCallback
__funPtr) Ptr Widget
widget' Int32
x Int32
y CInt
keyboardTooltip' Ptr Tooltip
tooltip'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tooltip
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassQueryTooltipFieldCallback =
    Gtk.Widget.Widget
    -> Int32
    -> Int32
    -> Bool
    -> Gtk.Tooltip.Tooltip
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassQueryTooltipFieldCallback`@.
noWidgetClassQueryTooltipFieldCallback :: Maybe WidgetClassQueryTooltipFieldCallback
noWidgetClassQueryTooltipFieldCallback :: Maybe WidgetClassQueryTooltipFieldCallback
noWidgetClassQueryTooltipFieldCallback = Maybe WidgetClassQueryTooltipFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassQueryTooltipFieldCallback :: MonadIO m => WidgetClassQueryTooltipFieldCallback -> m (GClosure C_WidgetClassQueryTooltipFieldCallback)
genClosure_WidgetClassQueryTooltipFieldCallback :: WidgetClassQueryTooltipFieldCallback
-> m (GClosure C_WidgetClassQueryTooltipFieldCallback)
genClosure_WidgetClassQueryTooltipFieldCallback cb :: WidgetClassQueryTooltipFieldCallback
cb = IO (GClosure C_WidgetClassQueryTooltipFieldCallback)
-> m (GClosure C_WidgetClassQueryTooltipFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassQueryTooltipFieldCallback)
 -> m (GClosure C_WidgetClassQueryTooltipFieldCallback))
-> IO (GClosure C_WidgetClassQueryTooltipFieldCallback)
-> m (GClosure C_WidgetClassQueryTooltipFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassQueryTooltipFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
-> WidgetClassQueryTooltipFieldCallback
-> C_WidgetClassQueryTooltipFieldCallback
wrap_WidgetClassQueryTooltipFieldCallback Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
forall a. Maybe a
Nothing WidgetClassQueryTooltipFieldCallback
cb
    C_WidgetClassQueryTooltipFieldCallback
-> IO (FunPtr C_WidgetClassQueryTooltipFieldCallback)
mk_WidgetClassQueryTooltipFieldCallback C_WidgetClassQueryTooltipFieldCallback
cb' IO (FunPtr C_WidgetClassQueryTooltipFieldCallback)
-> (FunPtr C_WidgetClassQueryTooltipFieldCallback
    -> IO (GClosure C_WidgetClassQueryTooltipFieldCallback))
-> IO (GClosure C_WidgetClassQueryTooltipFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassQueryTooltipFieldCallback
-> IO (GClosure C_WidgetClassQueryTooltipFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassQueryTooltipFieldCallback` into a `C_WidgetClassQueryTooltipFieldCallback`.
wrap_WidgetClassQueryTooltipFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback)) ->
    WidgetClassQueryTooltipFieldCallback ->
    C_WidgetClassQueryTooltipFieldCallback
wrap_WidgetClassQueryTooltipFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
-> WidgetClassQueryTooltipFieldCallback
-> C_WidgetClassQueryTooltipFieldCallback
wrap_WidgetClassQueryTooltipFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
funptrptr _cb :: WidgetClassQueryTooltipFieldCallback
_cb widget :: Ptr Widget
widget x :: Int32
x y :: Int32
y keyboardTooltip :: CInt
keyboardTooltip tooltip :: Ptr Tooltip
tooltip = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let keyboardTooltip' :: Bool
keyboardTooltip' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
keyboardTooltip
    Tooltip
tooltip' <- ((ManagedPtr Tooltip -> Tooltip) -> Ptr Tooltip -> IO Tooltip
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Tooltip -> Tooltip
Gtk.Tooltip.Tooltip) Ptr Tooltip
tooltip
    Bool
result <- WidgetClassQueryTooltipFieldCallback
_cb  Widget
widget' Int32
x Int32
y Bool
keyboardTooltip' Tooltip
tooltip'
    Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassQueryTooltipFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassPopupMenuFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassPopupMenuFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO CInt

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassPopupMenuFieldCallback :: FunPtr C_WidgetClassPopupMenuFieldCallback -> C_WidgetClassPopupMenuFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassPopupMenuFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassPopupMenuFieldCallback
    -> a
    -> m Bool
dynamic_WidgetClassPopupMenuFieldCallback :: FunPtr C_WidgetClassPopupMenuFieldCallback -> a -> m Bool
dynamic_WidgetClassPopupMenuFieldCallback __funPtr :: FunPtr C_WidgetClassPopupMenuFieldCallback
__funPtr widget :: a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- (FunPtr C_WidgetClassPopupMenuFieldCallback
-> C_WidgetClassPopupMenuFieldCallback
__dynamic_C_WidgetClassPopupMenuFieldCallback FunPtr C_WidgetClassPopupMenuFieldCallback
__funPtr) Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassPopupMenuFieldCallback =
    Gtk.Widget.Widget
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassPopupMenuFieldCallback`@.
noWidgetClassPopupMenuFieldCallback :: Maybe WidgetClassPopupMenuFieldCallback
noWidgetClassPopupMenuFieldCallback :: Maybe WidgetClassPopupMenuFieldCallback
noWidgetClassPopupMenuFieldCallback = Maybe WidgetClassPopupMenuFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassPopupMenuFieldCallback :: MonadIO m => WidgetClassPopupMenuFieldCallback -> m (GClosure C_WidgetClassPopupMenuFieldCallback)
genClosure_WidgetClassPopupMenuFieldCallback :: WidgetClassPopupMenuFieldCallback
-> m (GClosure C_WidgetClassPopupMenuFieldCallback)
genClosure_WidgetClassPopupMenuFieldCallback cb :: WidgetClassPopupMenuFieldCallback
cb = IO (GClosure C_WidgetClassPopupMenuFieldCallback)
-> m (GClosure C_WidgetClassPopupMenuFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassPopupMenuFieldCallback)
 -> m (GClosure C_WidgetClassPopupMenuFieldCallback))
-> IO (GClosure C_WidgetClassPopupMenuFieldCallback)
-> m (GClosure C_WidgetClassPopupMenuFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassPopupMenuFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback))
-> WidgetClassPopupMenuFieldCallback
-> C_WidgetClassPopupMenuFieldCallback
wrap_WidgetClassPopupMenuFieldCallback Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback))
forall a. Maybe a
Nothing WidgetClassPopupMenuFieldCallback
cb
    C_WidgetClassPopupMenuFieldCallback
-> IO (FunPtr C_WidgetClassPopupMenuFieldCallback)
mk_WidgetClassPopupMenuFieldCallback C_WidgetClassPopupMenuFieldCallback
cb' IO (FunPtr C_WidgetClassPopupMenuFieldCallback)
-> (FunPtr C_WidgetClassPopupMenuFieldCallback
    -> IO (GClosure C_WidgetClassPopupMenuFieldCallback))
-> IO (GClosure C_WidgetClassPopupMenuFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassPopupMenuFieldCallback
-> IO (GClosure C_WidgetClassPopupMenuFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassPopupMenuFieldCallback` into a `C_WidgetClassPopupMenuFieldCallback`.
wrap_WidgetClassPopupMenuFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback)) ->
    WidgetClassPopupMenuFieldCallback ->
    C_WidgetClassPopupMenuFieldCallback
wrap_WidgetClassPopupMenuFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback))
-> WidgetClassPopupMenuFieldCallback
-> C_WidgetClassPopupMenuFieldCallback
wrap_WidgetClassPopupMenuFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback))
funptrptr _cb :: WidgetClassPopupMenuFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Bool
result <- WidgetClassPopupMenuFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassPopupMenuFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


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

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassMoveFocusFieldCallback :: FunPtr C_WidgetClassMoveFocusFieldCallback -> C_WidgetClassMoveFocusFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassMoveFocusFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassMoveFocusFieldCallback
    -> a
    -> Gtk.Enums.DirectionType
    -> m ()
dynamic_WidgetClassMoveFocusFieldCallback :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> a -> DirectionType -> m ()
dynamic_WidgetClassMoveFocusFieldCallback __funPtr :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr widget :: a
widget direction :: DirectionType
direction = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionType -> Int) -> DirectionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionType -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionType
direction
    (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
__dynamic_C_WidgetClassMoveFocusFieldCallback FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr) Ptr Widget
widget' CUInt
direction'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassMoveFocusFieldCallback =
    Gtk.Widget.Widget
    -> Gtk.Enums.DirectionType
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassMoveFocusFieldCallback`@.
noWidgetClassMoveFocusFieldCallback :: Maybe WidgetClassMoveFocusFieldCallback
noWidgetClassMoveFocusFieldCallback :: Maybe WidgetClassMoveFocusFieldCallback
noWidgetClassMoveFocusFieldCallback = Maybe WidgetClassMoveFocusFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassMoveFocusFieldCallback :: MonadIO m => WidgetClassMoveFocusFieldCallback -> m (GClosure C_WidgetClassMoveFocusFieldCallback)
genClosure_WidgetClassMoveFocusFieldCallback :: WidgetClassMoveFocusFieldCallback
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
genClosure_WidgetClassMoveFocusFieldCallback cb :: WidgetClassMoveFocusFieldCallback
cb = IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
 -> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassStateFlagsChangedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassMoveFocusFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassMoveFocusFieldCallback Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
forall a. Maybe a
Nothing WidgetClassMoveFocusFieldCallback
cb
    C_WidgetClassStateFlagsChangedFieldCallback
-> IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
mk_WidgetClassMoveFocusFieldCallback C_WidgetClassStateFlagsChangedFieldCallback
cb' IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
-> (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
    -> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassMoveFocusFieldCallback` into a `C_WidgetClassMoveFocusFieldCallback`.
wrap_WidgetClassMoveFocusFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassMoveFocusFieldCallback)) ->
    WidgetClassMoveFocusFieldCallback ->
    C_WidgetClassMoveFocusFieldCallback
wrap_WidgetClassMoveFocusFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassMoveFocusFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassMoveFocusFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr _cb :: WidgetClassMoveFocusFieldCallback
_cb widget :: Ptr Widget
widget direction :: CUInt
direction = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let direction' :: DirectionType
direction' = (Int -> DirectionType
forall a. Enum a => Int -> a
toEnum (Int -> DirectionType) -> (CUInt -> Int) -> CUInt -> DirectionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    WidgetClassMoveFocusFieldCallback
_cb  Widget
widget' DirectionType
direction'
    Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr


-- callback WidgetClassMnemonicActivateFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the signal has been handled", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "group_cycling", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if there are other widgets with the same mnemonic", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassMnemonicActivateFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CInt ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group_cycling"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if there are other widgets with the same mnemonic"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassMnemonicActivateFieldCallback :: FunPtr C_WidgetClassMnemonicActivateFieldCallback -> C_WidgetClassMnemonicActivateFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassMnemonicActivateFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassMnemonicActivateFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@groupCycling@/: 'P.True' if there are other widgets with the same mnemonic
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the signal has been handled
dynamic_WidgetClassMnemonicActivateFieldCallback :: FunPtr C_WidgetClassMnemonicActivateFieldCallback
-> a -> Bool -> m Bool
dynamic_WidgetClassMnemonicActivateFieldCallback __funPtr :: FunPtr C_WidgetClassMnemonicActivateFieldCallback
__funPtr widget :: a
widget groupCycling :: Bool
groupCycling = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let groupCycling' :: CInt
groupCycling' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
groupCycling
    CInt
result <- (FunPtr C_WidgetClassMnemonicActivateFieldCallback
-> C_WidgetClassMnemonicActivateFieldCallback
__dynamic_C_WidgetClassMnemonicActivateFieldCallback FunPtr C_WidgetClassMnemonicActivateFieldCallback
__funPtr) Ptr Widget
widget' CInt
groupCycling'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassMnemonicActivateFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@groupCycling@/: 'P.True' if there are other widgets with the same mnemonic
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the signal has been handled

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassMnemonicActivateFieldCallback`@.
noWidgetClassMnemonicActivateFieldCallback :: Maybe WidgetClassMnemonicActivateFieldCallback
noWidgetClassMnemonicActivateFieldCallback :: Maybe WidgetClassMnemonicActivateFieldCallback
noWidgetClassMnemonicActivateFieldCallback = Maybe WidgetClassMnemonicActivateFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassMnemonicActivateFieldCallback :: MonadIO m => WidgetClassMnemonicActivateFieldCallback -> m (GClosure C_WidgetClassMnemonicActivateFieldCallback)
genClosure_WidgetClassMnemonicActivateFieldCallback :: WidgetClassMnemonicActivateFieldCallback
-> m (GClosure C_WidgetClassMnemonicActivateFieldCallback)
genClosure_WidgetClassMnemonicActivateFieldCallback cb :: WidgetClassMnemonicActivateFieldCallback
cb = IO (GClosure C_WidgetClassMnemonicActivateFieldCallback)
-> m (GClosure C_WidgetClassMnemonicActivateFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassMnemonicActivateFieldCallback)
 -> m (GClosure C_WidgetClassMnemonicActivateFieldCallback))
-> IO (GClosure C_WidgetClassMnemonicActivateFieldCallback)
-> m (GClosure C_WidgetClassMnemonicActivateFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassMnemonicActivateFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
-> WidgetClassMnemonicActivateFieldCallback
-> C_WidgetClassMnemonicActivateFieldCallback
wrap_WidgetClassMnemonicActivateFieldCallback Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
forall a. Maybe a
Nothing WidgetClassMnemonicActivateFieldCallback
cb
    C_WidgetClassMnemonicActivateFieldCallback
-> IO (FunPtr C_WidgetClassMnemonicActivateFieldCallback)
mk_WidgetClassMnemonicActivateFieldCallback C_WidgetClassMnemonicActivateFieldCallback
cb' IO (FunPtr C_WidgetClassMnemonicActivateFieldCallback)
-> (FunPtr C_WidgetClassMnemonicActivateFieldCallback
    -> IO (GClosure C_WidgetClassMnemonicActivateFieldCallback))
-> IO (GClosure C_WidgetClassMnemonicActivateFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassMnemonicActivateFieldCallback
-> IO (GClosure C_WidgetClassMnemonicActivateFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassMnemonicActivateFieldCallback` into a `C_WidgetClassMnemonicActivateFieldCallback`.
wrap_WidgetClassMnemonicActivateFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback)) ->
    WidgetClassMnemonicActivateFieldCallback ->
    C_WidgetClassMnemonicActivateFieldCallback
wrap_WidgetClassMnemonicActivateFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
-> WidgetClassMnemonicActivateFieldCallback
-> C_WidgetClassMnemonicActivateFieldCallback
wrap_WidgetClassMnemonicActivateFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
funptrptr _cb :: WidgetClassMnemonicActivateFieldCallback
_cb widget :: Ptr Widget
widget groupCycling :: CInt
groupCycling = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let groupCycling' :: Bool
groupCycling' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
groupCycling
    Bool
result <- WidgetClassMnemonicActivateFieldCallback
_cb  Widget
widget' Bool
groupCycling'
    Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassMnemonicActivateFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassMeasureFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkWidget instance", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "orientation", argType = TInterface (Name {namespace = "Gtk", name = "Orientation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the orientation to measure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "for_size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Size for the opposite of @orientation, i.e.\n  if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is\n  the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL\n  case is analogous. This way, both height-for-width and width-for-height\n  requests can be implemented. If no size is known, -1 can be passed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "minimum_baseline", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the baseline\n  position for the minimum size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_baseline", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the baseline\n  position for the natural size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassMeasureFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the orientation to measure"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "for_size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Size for the opposite of @orientation, i.e.\n  if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is\n  the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL\n  case is analogous. This way, both height-for-width and width-for-height\n  requests can be implemented. If no size is known, -1 can be passed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the minimum size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the natural size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "minimum_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the minimum size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the natural size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassMeasureFieldCallback :: FunPtr C_WidgetClassMeasureFieldCallback -> C_WidgetClassMeasureFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassMeasureFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassMeasureFieldCallback
    -> a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget' instance
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the orientation to measure
    -> Int32
    -- ^ /@forSize@/: Size for the opposite of /@orientation@/, i.e.
    --   if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal', this is
    --   the height the widget should be measured with. The 'GI.Gtk.Enums.OrientationVertical'
    --   case is analogous. This way, both height-for-width and width-for-height
    --   requests can be implemented. If no size is known, -1 can be passed.
    -> m ((Int32, Int32, Int32, Int32))
dynamic_WidgetClassMeasureFieldCallback :: FunPtr C_WidgetClassMeasureFieldCallback
-> a -> Orientation -> Int32 -> m (Int32, Int32, Int32, Int32)
dynamic_WidgetClassMeasureFieldCallback __funPtr :: FunPtr C_WidgetClassMeasureFieldCallback
__funPtr widget :: a
widget orientation :: Orientation
orientation forSize :: Int32
forSize = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Orientation -> Int) -> Orientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Orientation -> Int
forall a. Enum a => a -> Int
fromEnum) Orientation
orientation
    Ptr Int32
minimum <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
natural <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
minimumBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    (FunPtr C_WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
__dynamic_C_WidgetClassMeasureFieldCallback FunPtr C_WidgetClassMeasureFieldCallback
__funPtr) Ptr Widget
widget' CUInt
orientation' Int32
forSize Ptr Int32
minimum Ptr Int32
natural Ptr Int32
minimumBaseline Ptr Int32
naturalBaseline
    Int32
minimum' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimum
    Int32
natural' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
natural
    Int32
minimumBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumBaseline
    Int32
naturalBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalBaseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimum
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
natural
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumBaseline
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalBaseline
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimum', Int32
natural', Int32
minimumBaseline', Int32
naturalBaseline')

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

-- | /No description available in the introspection data./
type WidgetClassMeasureFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget' instance
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the orientation to measure
    -> Int32
    -- ^ /@forSize@/: Size for the opposite of /@orientation@/, i.e.
    --   if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal', this is
    --   the height the widget should be measured with. The 'GI.Gtk.Enums.OrientationVertical'
    --   case is analogous. This way, both height-for-width and width-for-height
    --   requests can be implemented. If no size is known, -1 can be passed.
    -> IO ((Int32, Int32, Int32, Int32))

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassMeasureFieldCallback`@.
noWidgetClassMeasureFieldCallback :: Maybe WidgetClassMeasureFieldCallback
noWidgetClassMeasureFieldCallback :: Maybe WidgetClassMeasureFieldCallback
noWidgetClassMeasureFieldCallback = Maybe WidgetClassMeasureFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassMeasureFieldCallback :: MonadIO m => WidgetClassMeasureFieldCallback -> m (GClosure C_WidgetClassMeasureFieldCallback)
genClosure_WidgetClassMeasureFieldCallback :: WidgetClassMeasureFieldCallback
-> m (GClosure C_WidgetClassMeasureFieldCallback)
genClosure_WidgetClassMeasureFieldCallback cb :: WidgetClassMeasureFieldCallback
cb = IO (GClosure C_WidgetClassMeasureFieldCallback)
-> m (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassMeasureFieldCallback)
 -> m (GClosure C_WidgetClassMeasureFieldCallback))
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
-> m (GClosure C_WidgetClassMeasureFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassMeasureFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
-> WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
wrap_WidgetClassMeasureFieldCallback Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
forall a. Maybe a
Nothing WidgetClassMeasureFieldCallback
cb
    C_WidgetClassMeasureFieldCallback
-> IO (FunPtr C_WidgetClassMeasureFieldCallback)
mk_WidgetClassMeasureFieldCallback C_WidgetClassMeasureFieldCallback
cb' IO (FunPtr C_WidgetClassMeasureFieldCallback)
-> (FunPtr C_WidgetClassMeasureFieldCallback
    -> IO (GClosure C_WidgetClassMeasureFieldCallback))
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassMeasureFieldCallback
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassMeasureFieldCallback` into a `C_WidgetClassMeasureFieldCallback`.
wrap_WidgetClassMeasureFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback)) ->
    WidgetClassMeasureFieldCallback ->
    C_WidgetClassMeasureFieldCallback
wrap_WidgetClassMeasureFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
-> WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
wrap_WidgetClassMeasureFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
funptrptr _cb :: WidgetClassMeasureFieldCallback
_cb widget :: Ptr Widget
widget orientation :: CUInt
orientation forSize :: Int32
forSize minimum :: Ptr Int32
minimum natural :: Ptr Int32
natural minimumBaseline :: Ptr Int32
minimumBaseline naturalBaseline :: Ptr Int32
naturalBaseline = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let orientation' :: Orientation
orientation' = (Int -> Orientation
forall a. Enum a => Int -> a
toEnum (Int -> Orientation) -> (CUInt -> Int) -> CUInt -> Orientation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
orientation
    (outminimum :: Int32
outminimum, outnatural :: Int32
outnatural, outminimumBaseline :: Int32
outminimumBaseline, outnaturalBaseline :: Int32
outnaturalBaseline) <- WidgetClassMeasureFieldCallback
_cb  Widget
widget' Orientation
orientation' Int32
forSize
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
minimum Int32
outminimum
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
natural Int32
outnatural
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
minimumBaseline Int32
outminimumBaseline
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
naturalBaseline Int32
outnaturalBaseline
    Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
funptrptr


-- callback WidgetClassMapFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassMapFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassMapFieldCallback :: FunPtr C_WidgetClassMapFieldCallback -> C_WidgetClassMapFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassMapFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassMapFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassMapFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassMapFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassMapFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassMapFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassMapFieldCallback`@.
noWidgetClassMapFieldCallback :: Maybe WidgetClassMapFieldCallback
noWidgetClassMapFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassMapFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassMapFieldCallback :: MonadIO m => WidgetClassMapFieldCallback -> m (GClosure C_WidgetClassMapFieldCallback)
genClosure_WidgetClassMapFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassMapFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassMapFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassMapFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassMapFieldCallback` into a `C_WidgetClassMapFieldCallback`.
wrap_WidgetClassMapFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassMapFieldCallback)) ->
    WidgetClassMapFieldCallback ->
    C_WidgetClassMapFieldCallback
wrap_WidgetClassMapFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassMapFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassKeynavFailedFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if stopping keyboard navigation is fine, %FALSE\n              if the emitting widget should try to handle the keyboard\n              navigation attempt in its parent container(s).", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "direction", argType = TInterface (Name {namespace = "Gtk", name = "DirectionType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "direction of focus movement", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassKeynavFailedFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DirectionType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "direction of focus movement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassKeynavFailedFieldCallback :: FunPtr C_WidgetClassKeynavFailedFieldCallback -> C_WidgetClassKeynavFailedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassKeynavFailedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassKeynavFailedFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> m Bool
    -- ^ __Returns:__ 'P.True' if stopping keyboard navigation is fine, 'P.False'
    --               if the emitting widget should try to handle the keyboard
    --               navigation attempt in its parent container(s).
dynamic_WidgetClassKeynavFailedFieldCallback :: FunPtr C_WidgetClassKeynavFailedFieldCallback
-> a -> DirectionType -> m Bool
dynamic_WidgetClassKeynavFailedFieldCallback __funPtr :: FunPtr C_WidgetClassKeynavFailedFieldCallback
__funPtr widget :: a
widget direction :: DirectionType
direction = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionType -> Int) -> DirectionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionType -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionType
direction
    CInt
result <- (FunPtr C_WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
__dynamic_C_WidgetClassKeynavFailedFieldCallback FunPtr C_WidgetClassKeynavFailedFieldCallback
__funPtr) Ptr Widget
widget' CUInt
direction'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassKeynavFailedFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if stopping keyboard navigation is fine, 'P.False'
    --               if the emitting widget should try to handle the keyboard
    --               navigation attempt in its parent container(s).

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassKeynavFailedFieldCallback`@.
noWidgetClassKeynavFailedFieldCallback :: Maybe WidgetClassKeynavFailedFieldCallback
noWidgetClassKeynavFailedFieldCallback :: Maybe WidgetClassKeynavFailedFieldCallback
noWidgetClassKeynavFailedFieldCallback = Maybe WidgetClassKeynavFailedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassKeynavFailedFieldCallback :: MonadIO m => WidgetClassKeynavFailedFieldCallback -> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
genClosure_WidgetClassKeynavFailedFieldCallback :: WidgetClassKeynavFailedFieldCallback
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
genClosure_WidgetClassKeynavFailedFieldCallback cb :: WidgetClassKeynavFailedFieldCallback
cb = IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
 -> m (GClosure C_WidgetClassKeynavFailedFieldCallback))
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassKeynavFailedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
wrap_WidgetClassKeynavFailedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
forall a. Maybe a
Nothing WidgetClassKeynavFailedFieldCallback
cb
    C_WidgetClassKeynavFailedFieldCallback
-> IO (FunPtr C_WidgetClassKeynavFailedFieldCallback)
mk_WidgetClassKeynavFailedFieldCallback C_WidgetClassKeynavFailedFieldCallback
cb' IO (FunPtr C_WidgetClassKeynavFailedFieldCallback)
-> (FunPtr C_WidgetClassKeynavFailedFieldCallback
    -> IO (GClosure C_WidgetClassKeynavFailedFieldCallback))
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassKeynavFailedFieldCallback
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassKeynavFailedFieldCallback` into a `C_WidgetClassKeynavFailedFieldCallback`.
wrap_WidgetClassKeynavFailedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback)) ->
    WidgetClassKeynavFailedFieldCallback ->
    C_WidgetClassKeynavFailedFieldCallback
wrap_WidgetClassKeynavFailedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
wrap_WidgetClassKeynavFailedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
funptrptr _cb :: WidgetClassKeynavFailedFieldCallback
_cb widget :: Ptr Widget
widget direction :: CUInt
direction = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let direction' :: DirectionType
direction' = (Int -> DirectionType
forall a. Enum a => Int -> a
toEnum (Int -> DirectionType) -> (CUInt -> Int) -> CUInt -> DirectionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    Bool
result <- WidgetClassKeynavFailedFieldCallback
_cb  Widget
widget' DirectionType
direction'
    Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassHideFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassHideFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassHideFieldCallback :: FunPtr C_WidgetClassHideFieldCallback -> C_WidgetClassHideFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassHideFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassHideFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassHideFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassHideFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassHideFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassHideFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassHideFieldCallback`@.
noWidgetClassHideFieldCallback :: Maybe WidgetClassHideFieldCallback
noWidgetClassHideFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassHideFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassHideFieldCallback :: MonadIO m => WidgetClassHideFieldCallback -> m (GClosure C_WidgetClassHideFieldCallback)
genClosure_WidgetClassHideFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassHideFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassHideFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassHideFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassHideFieldCallback` into a `C_WidgetClassHideFieldCallback`.
wrap_WidgetClassHideFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassHideFieldCallback)) ->
    WidgetClassHideFieldCallback ->
    C_WidgetClassHideFieldCallback
wrap_WidgetClassHideFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassHideFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassGrabNotifyFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "was_grabbed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassGrabNotifyFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CInt ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "was_grabbed"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassGrabNotifyFieldCallback :: FunPtr C_WidgetClassGrabNotifyFieldCallback -> C_WidgetClassGrabNotifyFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassGrabNotifyFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassGrabNotifyFieldCallback
    -> a
    -> Bool
    -> m ()
dynamic_WidgetClassGrabNotifyFieldCallback :: FunPtr C_WidgetClassGrabNotifyFieldCallback -> a -> Bool -> m ()
dynamic_WidgetClassGrabNotifyFieldCallback __funPtr :: FunPtr C_WidgetClassGrabNotifyFieldCallback
__funPtr widget :: a
widget wasGrabbed :: Bool
wasGrabbed = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let wasGrabbed' :: CInt
wasGrabbed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
wasGrabbed
    (FunPtr C_WidgetClassGrabNotifyFieldCallback
-> C_WidgetClassGrabNotifyFieldCallback
__dynamic_C_WidgetClassGrabNotifyFieldCallback FunPtr C_WidgetClassGrabNotifyFieldCallback
__funPtr) Ptr Widget
widget' CInt
wasGrabbed'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassGrabNotifyFieldCallback =
    Gtk.Widget.Widget
    -> Bool
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassGrabNotifyFieldCallback`@.
noWidgetClassGrabNotifyFieldCallback :: Maybe WidgetClassGrabNotifyFieldCallback
noWidgetClassGrabNotifyFieldCallback :: Maybe WidgetClassGrabNotifyFieldCallback
noWidgetClassGrabNotifyFieldCallback = Maybe WidgetClassGrabNotifyFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassGrabNotifyFieldCallback :: MonadIO m => WidgetClassGrabNotifyFieldCallback -> m (GClosure C_WidgetClassGrabNotifyFieldCallback)
genClosure_WidgetClassGrabNotifyFieldCallback :: WidgetClassGrabNotifyFieldCallback
-> m (GClosure C_WidgetClassGrabNotifyFieldCallback)
genClosure_WidgetClassGrabNotifyFieldCallback cb :: WidgetClassGrabNotifyFieldCallback
cb = IO (GClosure C_WidgetClassGrabNotifyFieldCallback)
-> m (GClosure C_WidgetClassGrabNotifyFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassGrabNotifyFieldCallback)
 -> m (GClosure C_WidgetClassGrabNotifyFieldCallback))
-> IO (GClosure C_WidgetClassGrabNotifyFieldCallback)
-> m (GClosure C_WidgetClassGrabNotifyFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassGrabNotifyFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback))
-> WidgetClassGrabNotifyFieldCallback
-> C_WidgetClassGrabNotifyFieldCallback
wrap_WidgetClassGrabNotifyFieldCallback Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback))
forall a. Maybe a
Nothing WidgetClassGrabNotifyFieldCallback
cb
    C_WidgetClassGrabNotifyFieldCallback
-> IO (FunPtr C_WidgetClassGrabNotifyFieldCallback)
mk_WidgetClassGrabNotifyFieldCallback C_WidgetClassGrabNotifyFieldCallback
cb' IO (FunPtr C_WidgetClassGrabNotifyFieldCallback)
-> (FunPtr C_WidgetClassGrabNotifyFieldCallback
    -> IO (GClosure C_WidgetClassGrabNotifyFieldCallback))
-> IO (GClosure C_WidgetClassGrabNotifyFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassGrabNotifyFieldCallback
-> IO (GClosure C_WidgetClassGrabNotifyFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassGrabNotifyFieldCallback` into a `C_WidgetClassGrabNotifyFieldCallback`.
wrap_WidgetClassGrabNotifyFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback)) ->
    WidgetClassGrabNotifyFieldCallback ->
    C_WidgetClassGrabNotifyFieldCallback
wrap_WidgetClassGrabNotifyFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback))
-> WidgetClassGrabNotifyFieldCallback
-> C_WidgetClassGrabNotifyFieldCallback
wrap_WidgetClassGrabNotifyFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback))
funptrptr _cb :: WidgetClassGrabNotifyFieldCallback
_cb widget :: Ptr Widget
widget wasGrabbed :: CInt
wasGrabbed = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let wasGrabbed' :: Bool
wasGrabbed' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
wasGrabbed
    WidgetClassGrabNotifyFieldCallback
_cb  Widget
widget' Bool
wasGrabbed'
    Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassGrabNotifyFieldCallback))
funptrptr


-- callback WidgetClassGrabFocusFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassGrabFocusFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassGrabFocusFieldCallback :: FunPtr C_WidgetClassGrabFocusFieldCallback -> C_WidgetClassGrabFocusFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassGrabFocusFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassGrabFocusFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassGrabFocusFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassGrabFocusFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassGrabFocusFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassGrabFocusFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassGrabFocusFieldCallback`@.
noWidgetClassGrabFocusFieldCallback :: Maybe WidgetClassGrabFocusFieldCallback
noWidgetClassGrabFocusFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassGrabFocusFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassGrabFocusFieldCallback :: MonadIO m => WidgetClassGrabFocusFieldCallback -> m (GClosure C_WidgetClassGrabFocusFieldCallback)
genClosure_WidgetClassGrabFocusFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassGrabFocusFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassGrabFocusFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassGrabFocusFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassGrabFocusFieldCallback` into a `C_WidgetClassGrabFocusFieldCallback`.
wrap_WidgetClassGrabFocusFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassGrabFocusFieldCallback)) ->
    WidgetClassGrabFocusFieldCallback ->
    C_WidgetClassGrabFocusFieldCallback
wrap_WidgetClassGrabFocusFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassGrabFocusFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassGetRequestModeFieldCallback
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Gtk", name = "SizeRequestMode"})), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "The #GtkSizeRequestMode preferred by @widget.", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget instance", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassGetRequestModeFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO CUInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "SizeRequestMode" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassGetRequestModeFieldCallback :: FunPtr C_WidgetClassGetRequestModeFieldCallback -> C_WidgetClassGetRequestModeFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassGetRequestModeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassGetRequestModeFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> m Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ The t'GI.Gtk.Enums.SizeRequestMode' preferred by /@widget@/.
dynamic_WidgetClassGetRequestModeFieldCallback :: FunPtr C_WidgetClassGetRequestModeFieldCallback
-> a -> m SizeRequestMode
dynamic_WidgetClassGetRequestModeFieldCallback __funPtr :: FunPtr C_WidgetClassGetRequestModeFieldCallback
__funPtr widget :: a
widget = IO SizeRequestMode -> m SizeRequestMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeRequestMode -> m SizeRequestMode)
-> IO SizeRequestMode -> m SizeRequestMode
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- (FunPtr C_WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
__dynamic_C_WidgetClassGetRequestModeFieldCallback FunPtr C_WidgetClassGetRequestModeFieldCallback
__funPtr) Ptr Widget
widget'
    let result' :: SizeRequestMode
result' = (Int -> SizeRequestMode
forall a. Enum a => Int -> a
toEnum (Int -> SizeRequestMode)
-> (CUInt -> Int) -> CUInt -> SizeRequestMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    SizeRequestMode -> IO SizeRequestMode
forall (m :: * -> *) a. Monad m => a -> m a
return SizeRequestMode
result'

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

-- | /No description available in the introspection data./
type WidgetClassGetRequestModeFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> IO Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ The t'GI.Gtk.Enums.SizeRequestMode' preferred by /@widget@/.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassGetRequestModeFieldCallback`@.
noWidgetClassGetRequestModeFieldCallback :: Maybe WidgetClassGetRequestModeFieldCallback
noWidgetClassGetRequestModeFieldCallback :: Maybe WidgetClassGetRequestModeFieldCallback
noWidgetClassGetRequestModeFieldCallback = Maybe WidgetClassGetRequestModeFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassGetRequestModeFieldCallback :: MonadIO m => WidgetClassGetRequestModeFieldCallback -> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
genClosure_WidgetClassGetRequestModeFieldCallback :: WidgetClassGetRequestModeFieldCallback
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
genClosure_WidgetClassGetRequestModeFieldCallback cb :: WidgetClassGetRequestModeFieldCallback
cb = IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
 -> m (GClosure C_WidgetClassGetRequestModeFieldCallback))
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassGetRequestModeFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
wrap_WidgetClassGetRequestModeFieldCallback Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
forall a. Maybe a
Nothing WidgetClassGetRequestModeFieldCallback
cb
    C_WidgetClassGetRequestModeFieldCallback
-> IO (FunPtr C_WidgetClassGetRequestModeFieldCallback)
mk_WidgetClassGetRequestModeFieldCallback C_WidgetClassGetRequestModeFieldCallback
cb' IO (FunPtr C_WidgetClassGetRequestModeFieldCallback)
-> (FunPtr C_WidgetClassGetRequestModeFieldCallback
    -> IO (GClosure C_WidgetClassGetRequestModeFieldCallback))
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassGetRequestModeFieldCallback
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassGetRequestModeFieldCallback` into a `C_WidgetClassGetRequestModeFieldCallback`.
wrap_WidgetClassGetRequestModeFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback)) ->
    WidgetClassGetRequestModeFieldCallback ->
    C_WidgetClassGetRequestModeFieldCallback
wrap_WidgetClassGetRequestModeFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
wrap_WidgetClassGetRequestModeFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
funptrptr _cb :: WidgetClassGetRequestModeFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    SizeRequestMode
result <- WidgetClassGetRequestModeFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
funptrptr
    let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SizeRequestMode -> Int) -> SizeRequestMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SizeRequestMode -> Int
forall a. Enum a => a -> Int
fromEnum) SizeRequestMode
result
    CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'


-- callback WidgetClassGetAccessibleFieldCallback
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Atk", name = "Object"})), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "the #AtkObject associated with @widget", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassGetAccessibleFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO (Ptr Atk.Object.Object)

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassGetAccessibleFieldCallback :: FunPtr C_WidgetClassGetAccessibleFieldCallback -> C_WidgetClassGetAccessibleFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassGetAccessibleFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassGetAccessibleFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Atk.Object.Object
    -- ^ __Returns:__ the t'GI.Atk.Objects.Object.Object' associated with /@widget@/
dynamic_WidgetClassGetAccessibleFieldCallback :: FunPtr C_WidgetClassGetAccessibleFieldCallback -> a -> m Object
dynamic_WidgetClassGetAccessibleFieldCallback __funPtr :: FunPtr C_WidgetClassGetAccessibleFieldCallback
__funPtr widget :: a
widget = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Object
result <- (FunPtr C_WidgetClassGetAccessibleFieldCallback
-> C_WidgetClassGetAccessibleFieldCallback
__dynamic_C_WidgetClassGetAccessibleFieldCallback FunPtr C_WidgetClassGetAccessibleFieldCallback
__funPtr) Ptr Widget
widget'
    Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetClassGetAccessibleFieldCallback" Ptr Object
result
    Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Atk.Object.Object) Ptr Object
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'

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

-- | /No description available in the introspection data./
type WidgetClassGetAccessibleFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO Atk.Object.Object
    -- ^ __Returns:__ the t'GI.Atk.Objects.Object.Object' associated with /@widget@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassGetAccessibleFieldCallback`@.
noWidgetClassGetAccessibleFieldCallback :: Maybe WidgetClassGetAccessibleFieldCallback
noWidgetClassGetAccessibleFieldCallback :: Maybe WidgetClassGetAccessibleFieldCallback
noWidgetClassGetAccessibleFieldCallback = Maybe WidgetClassGetAccessibleFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassGetAccessibleFieldCallback :: MonadIO m => WidgetClassGetAccessibleFieldCallback -> m (GClosure C_WidgetClassGetAccessibleFieldCallback)
genClosure_WidgetClassGetAccessibleFieldCallback :: WidgetClassGetAccessibleFieldCallback
-> m (GClosure C_WidgetClassGetAccessibleFieldCallback)
genClosure_WidgetClassGetAccessibleFieldCallback cb :: WidgetClassGetAccessibleFieldCallback
cb = IO (GClosure C_WidgetClassGetAccessibleFieldCallback)
-> m (GClosure C_WidgetClassGetAccessibleFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassGetAccessibleFieldCallback)
 -> m (GClosure C_WidgetClassGetAccessibleFieldCallback))
-> IO (GClosure C_WidgetClassGetAccessibleFieldCallback)
-> m (GClosure C_WidgetClassGetAccessibleFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassGetAccessibleFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
-> WidgetClassGetAccessibleFieldCallback
-> C_WidgetClassGetAccessibleFieldCallback
wrap_WidgetClassGetAccessibleFieldCallback Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
forall a. Maybe a
Nothing WidgetClassGetAccessibleFieldCallback
cb
    C_WidgetClassGetAccessibleFieldCallback
-> IO (FunPtr C_WidgetClassGetAccessibleFieldCallback)
mk_WidgetClassGetAccessibleFieldCallback C_WidgetClassGetAccessibleFieldCallback
cb' IO (FunPtr C_WidgetClassGetAccessibleFieldCallback)
-> (FunPtr C_WidgetClassGetAccessibleFieldCallback
    -> IO (GClosure C_WidgetClassGetAccessibleFieldCallback))
-> IO (GClosure C_WidgetClassGetAccessibleFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassGetAccessibleFieldCallback
-> IO (GClosure C_WidgetClassGetAccessibleFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassGetAccessibleFieldCallback` into a `C_WidgetClassGetAccessibleFieldCallback`.
wrap_WidgetClassGetAccessibleFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback)) ->
    WidgetClassGetAccessibleFieldCallback ->
    C_WidgetClassGetAccessibleFieldCallback
wrap_WidgetClassGetAccessibleFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
-> WidgetClassGetAccessibleFieldCallback
-> C_WidgetClassGetAccessibleFieldCallback
wrap_WidgetClassGetAccessibleFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
funptrptr _cb :: WidgetClassGetAccessibleFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Object
result <- WidgetClassGetAccessibleFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassGetAccessibleFieldCallback))
funptrptr
    Ptr Object
result' <- Object -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr Object
result
    Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
result'


-- callback WidgetClassFocusFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "direction", argType = TInterface (Name {namespace = "Gtk", name = "DirectionType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassFocusFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    IO CInt

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassFocusFieldCallback :: FunPtr C_WidgetClassFocusFieldCallback -> C_WidgetClassFocusFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassFocusFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassFocusFieldCallback
    -> a
    -> Gtk.Enums.DirectionType
    -> m Bool
dynamic_WidgetClassFocusFieldCallback :: FunPtr C_WidgetClassKeynavFailedFieldCallback
-> a -> DirectionType -> m Bool
dynamic_WidgetClassFocusFieldCallback __funPtr :: FunPtr C_WidgetClassKeynavFailedFieldCallback
__funPtr widget :: a
widget direction :: DirectionType
direction = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionType -> Int) -> DirectionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionType -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionType
direction
    CInt
result <- (FunPtr C_WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
__dynamic_C_WidgetClassFocusFieldCallback FunPtr C_WidgetClassKeynavFailedFieldCallback
__funPtr) Ptr Widget
widget' CUInt
direction'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassFocusFieldCallback =
    Gtk.Widget.Widget
    -> Gtk.Enums.DirectionType
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassFocusFieldCallback`@.
noWidgetClassFocusFieldCallback :: Maybe WidgetClassFocusFieldCallback
noWidgetClassFocusFieldCallback :: Maybe WidgetClassKeynavFailedFieldCallback
noWidgetClassFocusFieldCallback = Maybe WidgetClassKeynavFailedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassFocusFieldCallback :: MonadIO m => WidgetClassFocusFieldCallback -> m (GClosure C_WidgetClassFocusFieldCallback)
genClosure_WidgetClassFocusFieldCallback :: WidgetClassKeynavFailedFieldCallback
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
genClosure_WidgetClassFocusFieldCallback cb :: WidgetClassKeynavFailedFieldCallback
cb = IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
 -> m (GClosure C_WidgetClassKeynavFailedFieldCallback))
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
-> m (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassKeynavFailedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
wrap_WidgetClassFocusFieldCallback Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
forall a. Maybe a
Nothing WidgetClassKeynavFailedFieldCallback
cb
    C_WidgetClassKeynavFailedFieldCallback
-> IO (FunPtr C_WidgetClassKeynavFailedFieldCallback)
mk_WidgetClassFocusFieldCallback C_WidgetClassKeynavFailedFieldCallback
cb' IO (FunPtr C_WidgetClassKeynavFailedFieldCallback)
-> (FunPtr C_WidgetClassKeynavFailedFieldCallback
    -> IO (GClosure C_WidgetClassKeynavFailedFieldCallback))
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassKeynavFailedFieldCallback
-> IO (GClosure C_WidgetClassKeynavFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassFocusFieldCallback` into a `C_WidgetClassFocusFieldCallback`.
wrap_WidgetClassFocusFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassFocusFieldCallback)) ->
    WidgetClassFocusFieldCallback ->
    C_WidgetClassFocusFieldCallback
wrap_WidgetClassFocusFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> WidgetClassKeynavFailedFieldCallback
-> C_WidgetClassKeynavFailedFieldCallback
wrap_WidgetClassFocusFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
funptrptr _cb :: WidgetClassKeynavFailedFieldCallback
_cb widget :: Ptr Widget
widget direction :: CUInt
direction = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let direction' :: DirectionType
direction' = (Int -> DirectionType
forall a. Enum a => Int -> a
toEnum (Int -> DirectionType) -> (CUInt -> Int) -> CUInt -> DirectionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    Bool
result <- WidgetClassKeynavFailedFieldCallback
_cb  Widget
widget' DirectionType
direction'
    Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassKeynavFailedFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassDragMotionFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drop", argType = TInterface (Name {namespace = "Gdk", name = "Drop"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragMotionFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drop.Drop ->
    Int32 ->
    Int32 ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragMotionFieldCallback :: FunPtr C_WidgetClassDragMotionFieldCallback -> C_WidgetClassDragMotionFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragMotionFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drop.IsDrop b) =>
    FunPtr C_WidgetClassDragMotionFieldCallback
    -> a
    -> b
    -> Int32
    -> Int32
    -> m Bool
dynamic_WidgetClassDragMotionFieldCallback :: FunPtr C_WidgetClassDragMotionFieldCallback
-> a -> b -> Int32 -> Int32 -> m Bool
dynamic_WidgetClassDragMotionFieldCallback __funPtr :: FunPtr C_WidgetClassDragMotionFieldCallback
__funPtr widget :: a
widget drop :: b
drop x :: Int32
x y :: Int32
y = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    CInt
result <- (FunPtr C_WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
__dynamic_C_WidgetClassDragMotionFieldCallback FunPtr C_WidgetClassDragMotionFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drop
drop' Int32
x Int32
y
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassDragMotionFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drop.Drop
    -> Int32
    -> Int32
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragMotionFieldCallback`@.
noWidgetClassDragMotionFieldCallback :: Maybe WidgetClassDragMotionFieldCallback
noWidgetClassDragMotionFieldCallback :: Maybe WidgetClassDragMotionFieldCallback
noWidgetClassDragMotionFieldCallback = Maybe WidgetClassDragMotionFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragMotionFieldCallback :: MonadIO m => WidgetClassDragMotionFieldCallback -> m (GClosure C_WidgetClassDragMotionFieldCallback)
genClosure_WidgetClassDragMotionFieldCallback :: WidgetClassDragMotionFieldCallback
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
genClosure_WidgetClassDragMotionFieldCallback cb :: WidgetClassDragMotionFieldCallback
cb = IO (GClosure C_WidgetClassDragMotionFieldCallback)
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragMotionFieldCallback)
 -> m (GClosure C_WidgetClassDragMotionFieldCallback))
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragMotionFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
-> WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
wrap_WidgetClassDragMotionFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragMotionFieldCallback
cb
    C_WidgetClassDragMotionFieldCallback
-> IO (FunPtr C_WidgetClassDragMotionFieldCallback)
mk_WidgetClassDragMotionFieldCallback C_WidgetClassDragMotionFieldCallback
cb' IO (FunPtr C_WidgetClassDragMotionFieldCallback)
-> (FunPtr C_WidgetClassDragMotionFieldCallback
    -> IO (GClosure C_WidgetClassDragMotionFieldCallback))
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragMotionFieldCallback
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragMotionFieldCallback` into a `C_WidgetClassDragMotionFieldCallback`.
wrap_WidgetClassDragMotionFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback)) ->
    WidgetClassDragMotionFieldCallback ->
    C_WidgetClassDragMotionFieldCallback
wrap_WidgetClassDragMotionFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
-> WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
wrap_WidgetClassDragMotionFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
funptrptr _cb :: WidgetClassDragMotionFieldCallback
_cb widget :: Ptr Widget
widget drop :: Ptr Drop
drop x :: Int32
x y :: Int32
y = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    Bool
result <- WidgetClassDragMotionFieldCallback
_cb  Widget
widget' Drop
drop' Int32
x Int32
y
    Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassDragLeaveFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drop", argType = TInterface (Name {namespace = "Gdk", name = "Drop"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragLeaveFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drop.Drop ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragLeaveFieldCallback :: FunPtr C_WidgetClassDragLeaveFieldCallback -> C_WidgetClassDragLeaveFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragLeaveFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drop.IsDrop b) =>
    FunPtr C_WidgetClassDragLeaveFieldCallback
    -> a
    -> b
    -> m ()
dynamic_WidgetClassDragLeaveFieldCallback :: FunPtr C_WidgetClassDragLeaveFieldCallback -> a -> b -> m ()
dynamic_WidgetClassDragLeaveFieldCallback __funPtr :: FunPtr C_WidgetClassDragLeaveFieldCallback
__funPtr widget :: a
widget drop :: b
drop = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    (FunPtr C_WidgetClassDragLeaveFieldCallback
-> C_WidgetClassDragLeaveFieldCallback
__dynamic_C_WidgetClassDragLeaveFieldCallback FunPtr C_WidgetClassDragLeaveFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drop
drop'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragLeaveFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drop.Drop
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragLeaveFieldCallback`@.
noWidgetClassDragLeaveFieldCallback :: Maybe WidgetClassDragLeaveFieldCallback
noWidgetClassDragLeaveFieldCallback :: Maybe WidgetClassDragLeaveFieldCallback
noWidgetClassDragLeaveFieldCallback = Maybe WidgetClassDragLeaveFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragLeaveFieldCallback :: MonadIO m => WidgetClassDragLeaveFieldCallback -> m (GClosure C_WidgetClassDragLeaveFieldCallback)
genClosure_WidgetClassDragLeaveFieldCallback :: WidgetClassDragLeaveFieldCallback
-> m (GClosure C_WidgetClassDragLeaveFieldCallback)
genClosure_WidgetClassDragLeaveFieldCallback cb :: WidgetClassDragLeaveFieldCallback
cb = IO (GClosure C_WidgetClassDragLeaveFieldCallback)
-> m (GClosure C_WidgetClassDragLeaveFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragLeaveFieldCallback)
 -> m (GClosure C_WidgetClassDragLeaveFieldCallback))
-> IO (GClosure C_WidgetClassDragLeaveFieldCallback)
-> m (GClosure C_WidgetClassDragLeaveFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragLeaveFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback))
-> WidgetClassDragLeaveFieldCallback
-> C_WidgetClassDragLeaveFieldCallback
wrap_WidgetClassDragLeaveFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragLeaveFieldCallback
cb
    C_WidgetClassDragLeaveFieldCallback
-> IO (FunPtr C_WidgetClassDragLeaveFieldCallback)
mk_WidgetClassDragLeaveFieldCallback C_WidgetClassDragLeaveFieldCallback
cb' IO (FunPtr C_WidgetClassDragLeaveFieldCallback)
-> (FunPtr C_WidgetClassDragLeaveFieldCallback
    -> IO (GClosure C_WidgetClassDragLeaveFieldCallback))
-> IO (GClosure C_WidgetClassDragLeaveFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragLeaveFieldCallback
-> IO (GClosure C_WidgetClassDragLeaveFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragLeaveFieldCallback` into a `C_WidgetClassDragLeaveFieldCallback`.
wrap_WidgetClassDragLeaveFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback)) ->
    WidgetClassDragLeaveFieldCallback ->
    C_WidgetClassDragLeaveFieldCallback
wrap_WidgetClassDragLeaveFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback))
-> WidgetClassDragLeaveFieldCallback
-> C_WidgetClassDragLeaveFieldCallback
wrap_WidgetClassDragLeaveFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback))
funptrptr _cb :: WidgetClassDragLeaveFieldCallback
_cb widget :: Ptr Widget
widget drop :: Ptr Drop
drop = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    WidgetClassDragLeaveFieldCallback
_cb  Widget
widget' Drop
drop'
    Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragLeaveFieldCallback))
funptrptr


-- callback WidgetClassDragFailedFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drag", argType = TInterface (Name {namespace = "Gdk", name = "Drag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gtk", name = "DragResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragFailedFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drag.Drag ->
    CUInt ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drag"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DragResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragFailedFieldCallback :: FunPtr C_WidgetClassDragFailedFieldCallback -> C_WidgetClassDragFailedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragFailedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drag.IsDrag b) =>
    FunPtr C_WidgetClassDragFailedFieldCallback
    -> a
    -> b
    -> Gtk.Enums.DragResult
    -> m Bool
dynamic_WidgetClassDragFailedFieldCallback :: FunPtr C_WidgetClassDragFailedFieldCallback
-> a -> b -> DragResult -> m Bool
dynamic_WidgetClassDragFailedFieldCallback __funPtr :: FunPtr C_WidgetClassDragFailedFieldCallback
__funPtr widget :: a
widget drag :: b
drag result_ :: DragResult
result_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drag
drag' <- b -> IO (Ptr Drag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drag
    let result_' :: CUInt
result_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DragResult -> Int) -> DragResult -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DragResult -> Int
forall a. Enum a => a -> Int
fromEnum) DragResult
result_
    CInt
result <- (FunPtr C_WidgetClassDragFailedFieldCallback
-> C_WidgetClassDragFailedFieldCallback
__dynamic_C_WidgetClassDragFailedFieldCallback FunPtr C_WidgetClassDragFailedFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drag
drag' CUInt
result_'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drag
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassDragFailedFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drag.Drag
    -> Gtk.Enums.DragResult
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragFailedFieldCallback`@.
noWidgetClassDragFailedFieldCallback :: Maybe WidgetClassDragFailedFieldCallback
noWidgetClassDragFailedFieldCallback :: Maybe WidgetClassDragFailedFieldCallback
noWidgetClassDragFailedFieldCallback = Maybe WidgetClassDragFailedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragFailedFieldCallback :: MonadIO m => WidgetClassDragFailedFieldCallback -> m (GClosure C_WidgetClassDragFailedFieldCallback)
genClosure_WidgetClassDragFailedFieldCallback :: WidgetClassDragFailedFieldCallback
-> m (GClosure C_WidgetClassDragFailedFieldCallback)
genClosure_WidgetClassDragFailedFieldCallback cb :: WidgetClassDragFailedFieldCallback
cb = IO (GClosure C_WidgetClassDragFailedFieldCallback)
-> m (GClosure C_WidgetClassDragFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragFailedFieldCallback)
 -> m (GClosure C_WidgetClassDragFailedFieldCallback))
-> IO (GClosure C_WidgetClassDragFailedFieldCallback)
-> m (GClosure C_WidgetClassDragFailedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragFailedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback))
-> WidgetClassDragFailedFieldCallback
-> C_WidgetClassDragFailedFieldCallback
wrap_WidgetClassDragFailedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragFailedFieldCallback
cb
    C_WidgetClassDragFailedFieldCallback
-> IO (FunPtr C_WidgetClassDragFailedFieldCallback)
mk_WidgetClassDragFailedFieldCallback C_WidgetClassDragFailedFieldCallback
cb' IO (FunPtr C_WidgetClassDragFailedFieldCallback)
-> (FunPtr C_WidgetClassDragFailedFieldCallback
    -> IO (GClosure C_WidgetClassDragFailedFieldCallback))
-> IO (GClosure C_WidgetClassDragFailedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragFailedFieldCallback
-> IO (GClosure C_WidgetClassDragFailedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragFailedFieldCallback` into a `C_WidgetClassDragFailedFieldCallback`.
wrap_WidgetClassDragFailedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback)) ->
    WidgetClassDragFailedFieldCallback ->
    C_WidgetClassDragFailedFieldCallback
wrap_WidgetClassDragFailedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback))
-> WidgetClassDragFailedFieldCallback
-> C_WidgetClassDragFailedFieldCallback
wrap_WidgetClassDragFailedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback))
funptrptr _cb :: WidgetClassDragFailedFieldCallback
_cb widget :: Ptr Widget
widget drag :: Ptr Drag
drag result_ :: CUInt
result_ = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drag
drag' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
drag
    let result_' :: DragResult
result_' = (Int -> DragResult
forall a. Enum a => Int -> a
toEnum (Int -> DragResult) -> (CUInt -> Int) -> CUInt -> DragResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result_
    Bool
result <- WidgetClassDragFailedFieldCallback
_cb  Widget
widget' Drag
drag' DragResult
result_'
    Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragFailedFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassDragEndFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drag", argType = TInterface (Name {namespace = "Gdk", name = "Drag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragEndFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drag.Drag ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drag"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragEndFieldCallback :: FunPtr C_WidgetClassDragEndFieldCallback -> C_WidgetClassDragEndFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragEndFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drag.IsDrag b) =>
    FunPtr C_WidgetClassDragEndFieldCallback
    -> a
    -> b
    -> m ()
dynamic_WidgetClassDragEndFieldCallback :: FunPtr C_WidgetClassDragEndFieldCallback -> a -> b -> m ()
dynamic_WidgetClassDragEndFieldCallback __funPtr :: FunPtr C_WidgetClassDragEndFieldCallback
__funPtr widget :: a
widget drag :: b
drag = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drag
drag' <- b -> IO (Ptr Drag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drag
    (FunPtr C_WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
__dynamic_C_WidgetClassDragEndFieldCallback FunPtr C_WidgetClassDragEndFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drag
drag'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drag
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragEndFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drag.Drag
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragEndFieldCallback`@.
noWidgetClassDragEndFieldCallback :: Maybe WidgetClassDragEndFieldCallback
noWidgetClassDragEndFieldCallback :: Maybe WidgetClassDragEndFieldCallback
noWidgetClassDragEndFieldCallback = Maybe WidgetClassDragEndFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragEndFieldCallback :: MonadIO m => WidgetClassDragEndFieldCallback -> m (GClosure C_WidgetClassDragEndFieldCallback)
genClosure_WidgetClassDragEndFieldCallback :: WidgetClassDragEndFieldCallback
-> m (GClosure C_WidgetClassDragEndFieldCallback)
genClosure_WidgetClassDragEndFieldCallback cb :: WidgetClassDragEndFieldCallback
cb = IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragEndFieldCallback)
 -> m (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragEndFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragEndFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragEndFieldCallback
cb
    C_WidgetClassDragEndFieldCallback
-> IO (FunPtr C_WidgetClassDragEndFieldCallback)
mk_WidgetClassDragEndFieldCallback C_WidgetClassDragEndFieldCallback
cb' IO (FunPtr C_WidgetClassDragEndFieldCallback)
-> (FunPtr C_WidgetClassDragEndFieldCallback
    -> IO (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragEndFieldCallback
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragEndFieldCallback` into a `C_WidgetClassDragEndFieldCallback`.
wrap_WidgetClassDragEndFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback)) ->
    WidgetClassDragEndFieldCallback ->
    C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragEndFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragEndFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr _cb :: WidgetClassDragEndFieldCallback
_cb widget :: Ptr Widget
widget drag :: Ptr Drag
drag = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drag
drag' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
drag
    WidgetClassDragEndFieldCallback
_cb  Widget
widget' Drag
drag'
    Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr


-- callback WidgetClassDragDropFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drop", argType = TInterface (Name {namespace = "Gdk", name = "Drop"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragDropFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drop.Drop ->
    Int32 ->
    Int32 ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragDropFieldCallback :: FunPtr C_WidgetClassDragDropFieldCallback -> C_WidgetClassDragDropFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragDropFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drop.IsDrop b) =>
    FunPtr C_WidgetClassDragDropFieldCallback
    -> a
    -> b
    -> Int32
    -> Int32
    -> m Bool
dynamic_WidgetClassDragDropFieldCallback :: FunPtr C_WidgetClassDragMotionFieldCallback
-> a -> b -> Int32 -> Int32 -> m Bool
dynamic_WidgetClassDragDropFieldCallback __funPtr :: FunPtr C_WidgetClassDragMotionFieldCallback
__funPtr widget :: a
widget drop :: b
drop x :: Int32
x y :: Int32
y = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    CInt
result <- (FunPtr C_WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
__dynamic_C_WidgetClassDragDropFieldCallback FunPtr C_WidgetClassDragMotionFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drop
drop' Int32
x Int32
y
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassDragDropFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drop.Drop
    -> Int32
    -> Int32
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragDropFieldCallback`@.
noWidgetClassDragDropFieldCallback :: Maybe WidgetClassDragDropFieldCallback
noWidgetClassDragDropFieldCallback :: Maybe WidgetClassDragMotionFieldCallback
noWidgetClassDragDropFieldCallback = Maybe WidgetClassDragMotionFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragDropFieldCallback :: MonadIO m => WidgetClassDragDropFieldCallback -> m (GClosure C_WidgetClassDragDropFieldCallback)
genClosure_WidgetClassDragDropFieldCallback :: WidgetClassDragMotionFieldCallback
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
genClosure_WidgetClassDragDropFieldCallback cb :: WidgetClassDragMotionFieldCallback
cb = IO (GClosure C_WidgetClassDragMotionFieldCallback)
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragMotionFieldCallback)
 -> m (GClosure C_WidgetClassDragMotionFieldCallback))
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
-> m (GClosure C_WidgetClassDragMotionFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragMotionFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
-> WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
wrap_WidgetClassDragDropFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragMotionFieldCallback
cb
    C_WidgetClassDragMotionFieldCallback
-> IO (FunPtr C_WidgetClassDragMotionFieldCallback)
mk_WidgetClassDragDropFieldCallback C_WidgetClassDragMotionFieldCallback
cb' IO (FunPtr C_WidgetClassDragMotionFieldCallback)
-> (FunPtr C_WidgetClassDragMotionFieldCallback
    -> IO (GClosure C_WidgetClassDragMotionFieldCallback))
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragMotionFieldCallback
-> IO (GClosure C_WidgetClassDragMotionFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragDropFieldCallback` into a `C_WidgetClassDragDropFieldCallback`.
wrap_WidgetClassDragDropFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragDropFieldCallback)) ->
    WidgetClassDragDropFieldCallback ->
    C_WidgetClassDragDropFieldCallback
wrap_WidgetClassDragDropFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
-> WidgetClassDragMotionFieldCallback
-> C_WidgetClassDragMotionFieldCallback
wrap_WidgetClassDragDropFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
funptrptr _cb :: WidgetClassDragMotionFieldCallback
_cb widget :: Ptr Widget
widget drop :: Ptr Drop
drop x :: Int32
x y :: Int32
y = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    Bool
result <- WidgetClassDragMotionFieldCallback
_cb  Widget
widget' Drop
drop' Int32
x Int32
y
    Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragMotionFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassDragDataReceivedFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drop", argType = TInterface (Name {namespace = "Gdk", name = "Drop"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "selection_data", argType = TInterface (Name {namespace = "Gtk", name = "SelectionData"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragDataReceivedFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drop.Drop ->
    Ptr Gtk.SelectionData.SelectionData ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "selection_data"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "SelectionData" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragDataReceivedFieldCallback :: FunPtr C_WidgetClassDragDataReceivedFieldCallback -> C_WidgetClassDragDataReceivedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragDataReceivedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drop.IsDrop b) =>
    FunPtr C_WidgetClassDragDataReceivedFieldCallback
    -> a
    -> b
    -> Gtk.SelectionData.SelectionData
    -> m ()
dynamic_WidgetClassDragDataReceivedFieldCallback :: FunPtr C_WidgetClassDragDataReceivedFieldCallback
-> a -> b -> SelectionData -> m ()
dynamic_WidgetClassDragDataReceivedFieldCallback __funPtr :: FunPtr C_WidgetClassDragDataReceivedFieldCallback
__funPtr widget :: a
widget drop :: b
drop selectionData :: SelectionData
selectionData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    Ptr SelectionData
selectionData' <- SelectionData -> IO (Ptr SelectionData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SelectionData
selectionData
    (FunPtr C_WidgetClassDragDataReceivedFieldCallback
-> C_WidgetClassDragDataReceivedFieldCallback
__dynamic_C_WidgetClassDragDataReceivedFieldCallback FunPtr C_WidgetClassDragDataReceivedFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drop
drop' Ptr SelectionData
selectionData'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    SelectionData -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SelectionData
selectionData
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragDataReceivedFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drop.Drop
    -> Gtk.SelectionData.SelectionData
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragDataReceivedFieldCallback`@.
noWidgetClassDragDataReceivedFieldCallback :: Maybe WidgetClassDragDataReceivedFieldCallback
noWidgetClassDragDataReceivedFieldCallback :: Maybe WidgetClassDragDataReceivedFieldCallback
noWidgetClassDragDataReceivedFieldCallback = Maybe WidgetClassDragDataReceivedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragDataReceivedFieldCallback :: MonadIO m => WidgetClassDragDataReceivedFieldCallback -> m (GClosure C_WidgetClassDragDataReceivedFieldCallback)
genClosure_WidgetClassDragDataReceivedFieldCallback :: WidgetClassDragDataReceivedFieldCallback
-> m (GClosure C_WidgetClassDragDataReceivedFieldCallback)
genClosure_WidgetClassDragDataReceivedFieldCallback cb :: WidgetClassDragDataReceivedFieldCallback
cb = IO (GClosure C_WidgetClassDragDataReceivedFieldCallback)
-> m (GClosure C_WidgetClassDragDataReceivedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragDataReceivedFieldCallback)
 -> m (GClosure C_WidgetClassDragDataReceivedFieldCallback))
-> IO (GClosure C_WidgetClassDragDataReceivedFieldCallback)
-> m (GClosure C_WidgetClassDragDataReceivedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragDataReceivedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
-> WidgetClassDragDataReceivedFieldCallback
-> C_WidgetClassDragDataReceivedFieldCallback
wrap_WidgetClassDragDataReceivedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragDataReceivedFieldCallback
cb
    C_WidgetClassDragDataReceivedFieldCallback
-> IO (FunPtr C_WidgetClassDragDataReceivedFieldCallback)
mk_WidgetClassDragDataReceivedFieldCallback C_WidgetClassDragDataReceivedFieldCallback
cb' IO (FunPtr C_WidgetClassDragDataReceivedFieldCallback)
-> (FunPtr C_WidgetClassDragDataReceivedFieldCallback
    -> IO (GClosure C_WidgetClassDragDataReceivedFieldCallback))
-> IO (GClosure C_WidgetClassDragDataReceivedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragDataReceivedFieldCallback
-> IO (GClosure C_WidgetClassDragDataReceivedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragDataReceivedFieldCallback` into a `C_WidgetClassDragDataReceivedFieldCallback`.
wrap_WidgetClassDragDataReceivedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback)) ->
    WidgetClassDragDataReceivedFieldCallback ->
    C_WidgetClassDragDataReceivedFieldCallback
wrap_WidgetClassDragDataReceivedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
-> WidgetClassDragDataReceivedFieldCallback
-> C_WidgetClassDragDataReceivedFieldCallback
wrap_WidgetClassDragDataReceivedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
funptrptr _cb :: WidgetClassDragDataReceivedFieldCallback
_cb widget :: Ptr Widget
widget drop :: Ptr Drop
drop selectionData :: Ptr SelectionData
selectionData = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    (ManagedPtr SelectionData -> SelectionData)
-> Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr SelectionData -> SelectionData
Gtk.SelectionData.SelectionData Ptr SelectionData
selectionData ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \selectionData' :: SelectionData
selectionData' -> do
        WidgetClassDragDataReceivedFieldCallback
_cb  Widget
widget' Drop
drop' SelectionData
selectionData'
        Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragDataReceivedFieldCallback))
funptrptr


-- callback WidgetClassDragDataGetFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drag", argType = TInterface (Name {namespace = "Gdk", name = "Drag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "selection_data", argType = TInterface (Name {namespace = "Gtk", name = "SelectionData"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragDataGetFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drag.Drag ->
    Ptr Gtk.SelectionData.SelectionData ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drag"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "selection_data"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "SelectionData" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragDataGetFieldCallback :: FunPtr C_WidgetClassDragDataGetFieldCallback -> C_WidgetClassDragDataGetFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragDataGetFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drag.IsDrag b) =>
    FunPtr C_WidgetClassDragDataGetFieldCallback
    -> a
    -> b
    -> Gtk.SelectionData.SelectionData
    -> m ()
dynamic_WidgetClassDragDataGetFieldCallback :: FunPtr C_WidgetClassDragDataGetFieldCallback
-> a -> b -> SelectionData -> m ()
dynamic_WidgetClassDragDataGetFieldCallback __funPtr :: FunPtr C_WidgetClassDragDataGetFieldCallback
__funPtr widget :: a
widget drag :: b
drag selectionData :: SelectionData
selectionData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drag
drag' <- b -> IO (Ptr Drag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drag
    Ptr SelectionData
selectionData' <- SelectionData -> IO (Ptr SelectionData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr SelectionData
selectionData
    (FunPtr C_WidgetClassDragDataGetFieldCallback
-> C_WidgetClassDragDataGetFieldCallback
__dynamic_C_WidgetClassDragDataGetFieldCallback FunPtr C_WidgetClassDragDataGetFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drag
drag' Ptr SelectionData
selectionData'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drag
    SelectionData -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr SelectionData
selectionData
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragDataGetFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drag.Drag
    -> Gtk.SelectionData.SelectionData
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragDataGetFieldCallback`@.
noWidgetClassDragDataGetFieldCallback :: Maybe WidgetClassDragDataGetFieldCallback
noWidgetClassDragDataGetFieldCallback :: Maybe WidgetClassDragDataGetFieldCallback
noWidgetClassDragDataGetFieldCallback = Maybe WidgetClassDragDataGetFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragDataGetFieldCallback :: MonadIO m => WidgetClassDragDataGetFieldCallback -> m (GClosure C_WidgetClassDragDataGetFieldCallback)
genClosure_WidgetClassDragDataGetFieldCallback :: WidgetClassDragDataGetFieldCallback
-> m (GClosure C_WidgetClassDragDataGetFieldCallback)
genClosure_WidgetClassDragDataGetFieldCallback cb :: WidgetClassDragDataGetFieldCallback
cb = IO (GClosure C_WidgetClassDragDataGetFieldCallback)
-> m (GClosure C_WidgetClassDragDataGetFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragDataGetFieldCallback)
 -> m (GClosure C_WidgetClassDragDataGetFieldCallback))
-> IO (GClosure C_WidgetClassDragDataGetFieldCallback)
-> m (GClosure C_WidgetClassDragDataGetFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragDataGetFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback))
-> WidgetClassDragDataGetFieldCallback
-> C_WidgetClassDragDataGetFieldCallback
wrap_WidgetClassDragDataGetFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragDataGetFieldCallback
cb
    C_WidgetClassDragDataGetFieldCallback
-> IO (FunPtr C_WidgetClassDragDataGetFieldCallback)
mk_WidgetClassDragDataGetFieldCallback C_WidgetClassDragDataGetFieldCallback
cb' IO (FunPtr C_WidgetClassDragDataGetFieldCallback)
-> (FunPtr C_WidgetClassDragDataGetFieldCallback
    -> IO (GClosure C_WidgetClassDragDataGetFieldCallback))
-> IO (GClosure C_WidgetClassDragDataGetFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragDataGetFieldCallback
-> IO (GClosure C_WidgetClassDragDataGetFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragDataGetFieldCallback` into a `C_WidgetClassDragDataGetFieldCallback`.
wrap_WidgetClassDragDataGetFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback)) ->
    WidgetClassDragDataGetFieldCallback ->
    C_WidgetClassDragDataGetFieldCallback
wrap_WidgetClassDragDataGetFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback))
-> WidgetClassDragDataGetFieldCallback
-> C_WidgetClassDragDataGetFieldCallback
wrap_WidgetClassDragDataGetFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback))
funptrptr _cb :: WidgetClassDragDataGetFieldCallback
_cb widget :: Ptr Widget
widget drag :: Ptr Drag
drag selectionData :: Ptr SelectionData
selectionData = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drag
drag' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
drag
    (ManagedPtr SelectionData -> SelectionData)
-> Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr SelectionData -> SelectionData
Gtk.SelectionData.SelectionData Ptr SelectionData
selectionData ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \selectionData' :: SelectionData
selectionData' -> do
        WidgetClassDragDataGetFieldCallback
_cb  Widget
widget' Drag
drag' SelectionData
selectionData'
        Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragDataGetFieldCallback))
funptrptr


-- callback WidgetClassDragDataDeleteFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drag", argType = TInterface (Name {namespace = "Gdk", name = "Drag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragDataDeleteFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drag.Drag ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drag"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragDataDeleteFieldCallback :: FunPtr C_WidgetClassDragDataDeleteFieldCallback -> C_WidgetClassDragDataDeleteFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragDataDeleteFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drag.IsDrag b) =>
    FunPtr C_WidgetClassDragDataDeleteFieldCallback
    -> a
    -> b
    -> m ()
dynamic_WidgetClassDragDataDeleteFieldCallback :: FunPtr C_WidgetClassDragEndFieldCallback -> a -> b -> m ()
dynamic_WidgetClassDragDataDeleteFieldCallback __funPtr :: FunPtr C_WidgetClassDragEndFieldCallback
__funPtr widget :: a
widget drag :: b
drag = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drag
drag' <- b -> IO (Ptr Drag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drag
    (FunPtr C_WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
__dynamic_C_WidgetClassDragDataDeleteFieldCallback FunPtr C_WidgetClassDragEndFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drag
drag'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drag
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragDataDeleteFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drag.Drag
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragDataDeleteFieldCallback`@.
noWidgetClassDragDataDeleteFieldCallback :: Maybe WidgetClassDragDataDeleteFieldCallback
noWidgetClassDragDataDeleteFieldCallback :: Maybe WidgetClassDragEndFieldCallback
noWidgetClassDragDataDeleteFieldCallback = Maybe WidgetClassDragEndFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragDataDeleteFieldCallback :: MonadIO m => WidgetClassDragDataDeleteFieldCallback -> m (GClosure C_WidgetClassDragDataDeleteFieldCallback)
genClosure_WidgetClassDragDataDeleteFieldCallback :: WidgetClassDragEndFieldCallback
-> m (GClosure C_WidgetClassDragEndFieldCallback)
genClosure_WidgetClassDragDataDeleteFieldCallback cb :: WidgetClassDragEndFieldCallback
cb = IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragEndFieldCallback)
 -> m (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragEndFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragDataDeleteFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragEndFieldCallback
cb
    C_WidgetClassDragEndFieldCallback
-> IO (FunPtr C_WidgetClassDragEndFieldCallback)
mk_WidgetClassDragDataDeleteFieldCallback C_WidgetClassDragEndFieldCallback
cb' IO (FunPtr C_WidgetClassDragEndFieldCallback)
-> (FunPtr C_WidgetClassDragEndFieldCallback
    -> IO (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragEndFieldCallback
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragDataDeleteFieldCallback` into a `C_WidgetClassDragDataDeleteFieldCallback`.
wrap_WidgetClassDragDataDeleteFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragDataDeleteFieldCallback)) ->
    WidgetClassDragDataDeleteFieldCallback ->
    C_WidgetClassDragDataDeleteFieldCallback
wrap_WidgetClassDragDataDeleteFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragDataDeleteFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr _cb :: WidgetClassDragEndFieldCallback
_cb widget :: Ptr Widget
widget drag :: Ptr Drag
drag = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drag
drag' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
drag
    WidgetClassDragEndFieldCallback
_cb  Widget
widget' Drag
drag'
    Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr


-- callback WidgetClassDragBeginFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drag", argType = TInterface (Name {namespace = "Gdk", name = "Drag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDragBeginFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.Drag.Drag ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drag"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDragBeginFieldCallback :: FunPtr C_WidgetClassDragBeginFieldCallback -> C_WidgetClassDragBeginFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDragBeginFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.Drag.IsDrag b) =>
    FunPtr C_WidgetClassDragBeginFieldCallback
    -> a
    -> b
    -> m ()
dynamic_WidgetClassDragBeginFieldCallback :: FunPtr C_WidgetClassDragEndFieldCallback -> a -> b -> m ()
dynamic_WidgetClassDragBeginFieldCallback __funPtr :: FunPtr C_WidgetClassDragEndFieldCallback
__funPtr widget :: a
widget drag :: b
drag = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drag
drag' <- b -> IO (Ptr Drag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drag
    (FunPtr C_WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
__dynamic_C_WidgetClassDragBeginFieldCallback FunPtr C_WidgetClassDragEndFieldCallback
__funPtr) Ptr Widget
widget' Ptr Drag
drag'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drag
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDragBeginFieldCallback =
    Gtk.Widget.Widget
    -> Gdk.Drag.Drag
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDragBeginFieldCallback`@.
noWidgetClassDragBeginFieldCallback :: Maybe WidgetClassDragBeginFieldCallback
noWidgetClassDragBeginFieldCallback :: Maybe WidgetClassDragEndFieldCallback
noWidgetClassDragBeginFieldCallback = Maybe WidgetClassDragEndFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDragBeginFieldCallback :: MonadIO m => WidgetClassDragBeginFieldCallback -> m (GClosure C_WidgetClassDragBeginFieldCallback)
genClosure_WidgetClassDragBeginFieldCallback :: WidgetClassDragEndFieldCallback
-> m (GClosure C_WidgetClassDragEndFieldCallback)
genClosure_WidgetClassDragBeginFieldCallback cb :: WidgetClassDragEndFieldCallback
cb = IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassDragEndFieldCallback)
 -> m (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
-> m (GClosure C_WidgetClassDragEndFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassDragEndFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragBeginFieldCallback Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
forall a. Maybe a
Nothing WidgetClassDragEndFieldCallback
cb
    C_WidgetClassDragEndFieldCallback
-> IO (FunPtr C_WidgetClassDragEndFieldCallback)
mk_WidgetClassDragBeginFieldCallback C_WidgetClassDragEndFieldCallback
cb' IO (FunPtr C_WidgetClassDragEndFieldCallback)
-> (FunPtr C_WidgetClassDragEndFieldCallback
    -> IO (GClosure C_WidgetClassDragEndFieldCallback))
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassDragEndFieldCallback
-> IO (GClosure C_WidgetClassDragEndFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDragBeginFieldCallback` into a `C_WidgetClassDragBeginFieldCallback`.
wrap_WidgetClassDragBeginFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDragBeginFieldCallback)) ->
    WidgetClassDragBeginFieldCallback ->
    C_WidgetClassDragBeginFieldCallback
wrap_WidgetClassDragBeginFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
-> WidgetClassDragEndFieldCallback
-> C_WidgetClassDragEndFieldCallback
wrap_WidgetClassDragBeginFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr _cb :: WidgetClassDragEndFieldCallback
_cb widget :: Ptr Widget
widget drag :: Ptr Drag
drag = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Drag
drag' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
drag
    WidgetClassDragEndFieldCallback
_cb  Widget
widget' Drag
drag'
    Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassDragEndFieldCallback))
funptrptr


-- callback WidgetClassDirectionChangedFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "previous_direction", argType = TInterface (Name {namespace = "Gtk", name = "TextDirection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDirectionChangedFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    IO ()

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

foreign import ccall "dynamic" __dynamic_C_WidgetClassDirectionChangedFieldCallback :: FunPtr C_WidgetClassDirectionChangedFieldCallback -> C_WidgetClassDirectionChangedFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDirectionChangedFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassDirectionChangedFieldCallback
    -> a
    -> Gtk.Enums.TextDirection
    -> m ()
dynamic_WidgetClassDirectionChangedFieldCallback :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> a -> TextDirection -> m ()
dynamic_WidgetClassDirectionChangedFieldCallback __funPtr :: FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr widget :: a
widget previousDirection :: TextDirection
previousDirection = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let previousDirection' :: CUInt
previousDirection' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TextDirection -> Int) -> TextDirection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TextDirection -> Int
forall a. Enum a => a -> Int
fromEnum) TextDirection
previousDirection
    (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
__dynamic_C_WidgetClassDirectionChangedFieldCallback FunPtr C_WidgetClassStateFlagsChangedFieldCallback
__funPtr) Ptr Widget
widget' CUInt
previousDirection'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDirectionChangedFieldCallback =
    Gtk.Widget.Widget
    -> Gtk.Enums.TextDirection
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDirectionChangedFieldCallback`@.
noWidgetClassDirectionChangedFieldCallback :: Maybe WidgetClassDirectionChangedFieldCallback
noWidgetClassDirectionChangedFieldCallback :: Maybe WidgetClassDirectionChangedFieldCallback
noWidgetClassDirectionChangedFieldCallback = Maybe WidgetClassDirectionChangedFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDirectionChangedFieldCallback :: MonadIO m => WidgetClassDirectionChangedFieldCallback -> m (GClosure C_WidgetClassDirectionChangedFieldCallback)
genClosure_WidgetClassDirectionChangedFieldCallback :: WidgetClassDirectionChangedFieldCallback
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
genClosure_WidgetClassDirectionChangedFieldCallback cb :: WidgetClassDirectionChangedFieldCallback
cb = IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
 -> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
-> m (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassStateFlagsChangedFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassDirectionChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassDirectionChangedFieldCallback Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
forall a. Maybe a
Nothing WidgetClassDirectionChangedFieldCallback
cb
    C_WidgetClassStateFlagsChangedFieldCallback
-> IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
mk_WidgetClassDirectionChangedFieldCallback C_WidgetClassStateFlagsChangedFieldCallback
cb' IO (FunPtr C_WidgetClassStateFlagsChangedFieldCallback)
-> (FunPtr C_WidgetClassStateFlagsChangedFieldCallback
    -> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback))
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassStateFlagsChangedFieldCallback
-> IO (GClosure C_WidgetClassStateFlagsChangedFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDirectionChangedFieldCallback` into a `C_WidgetClassDirectionChangedFieldCallback`.
wrap_WidgetClassDirectionChangedFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDirectionChangedFieldCallback)) ->
    WidgetClassDirectionChangedFieldCallback ->
    C_WidgetClassDirectionChangedFieldCallback
wrap_WidgetClassDirectionChangedFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> WidgetClassDirectionChangedFieldCallback
-> C_WidgetClassStateFlagsChangedFieldCallback
wrap_WidgetClassDirectionChangedFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr _cb :: WidgetClassDirectionChangedFieldCallback
_cb widget :: Ptr Widget
widget previousDirection :: CUInt
previousDirection = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let previousDirection' :: TextDirection
previousDirection' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
previousDirection
    WidgetClassDirectionChangedFieldCallback
_cb  Widget
widget' TextDirection
previousDirection'
    Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassStateFlagsChangedFieldCallback))
funptrptr


-- callback WidgetClassDestroyFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassDestroyFieldCallback =
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassDestroyFieldCallback :: FunPtr C_WidgetClassDestroyFieldCallback -> C_WidgetClassDestroyFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassDestroyFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassDestroyFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
dynamic_WidgetClassDestroyFieldCallback :: FunPtr C_WidgetClassUnrootFieldCallback -> a -> m ()
dynamic_WidgetClassDestroyFieldCallback __funPtr :: FunPtr C_WidgetClassUnrootFieldCallback
__funPtr widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
__dynamic_C_WidgetClassDestroyFieldCallback FunPtr C_WidgetClassUnrootFieldCallback
__funPtr) Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassDestroyFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassDestroyFieldCallback`@.
noWidgetClassDestroyFieldCallback :: Maybe WidgetClassDestroyFieldCallback
noWidgetClassDestroyFieldCallback :: Maybe WidgetClassUnrootFieldCallback
noWidgetClassDestroyFieldCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassDestroyFieldCallback :: MonadIO m => WidgetClassDestroyFieldCallback -> m (GClosure C_WidgetClassDestroyFieldCallback)
genClosure_WidgetClassDestroyFieldCallback :: WidgetClassUnrootFieldCallback
-> m (GClosure C_WidgetClassUnrootFieldCallback)
genClosure_WidgetClassDestroyFieldCallback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassUnrootFieldCallback)
 -> m (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
-> m (GClosure C_WidgetClassUnrootFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassUnrootFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassDestroyFieldCallback Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
forall a. Maybe a
Nothing WidgetClassUnrootFieldCallback
cb
    C_WidgetClassUnrootFieldCallback
-> IO (FunPtr C_WidgetClassUnrootFieldCallback)
mk_WidgetClassDestroyFieldCallback C_WidgetClassUnrootFieldCallback
cb' IO (FunPtr C_WidgetClassUnrootFieldCallback)
-> (FunPtr C_WidgetClassUnrootFieldCallback
    -> IO (GClosure C_WidgetClassUnrootFieldCallback))
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassUnrootFieldCallback
-> IO (GClosure C_WidgetClassUnrootFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassDestroyFieldCallback` into a `C_WidgetClassDestroyFieldCallback`.
wrap_WidgetClassDestroyFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassDestroyFieldCallback)) ->
    WidgetClassDestroyFieldCallback ->
    C_WidgetClassDestroyFieldCallback
wrap_WidgetClassDestroyFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
-> WidgetClassUnrootFieldCallback
-> C_WidgetClassUnrootFieldCallback
wrap_WidgetClassDestroyFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr _cb :: WidgetClassUnrootFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassUnrootFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassUnrootFieldCallback))
funptrptr


-- callback WidgetClassContainsFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if @widget contains (@x, @y).", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget to query", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "X coordinate to test, relative to @widget's origin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Y coordinate to test, relative to @widget's origin", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassContainsFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CDouble ->
    CDouble ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassContainsFieldCallback :: FunPtr C_WidgetClassContainsFieldCallback -> C_WidgetClassContainsFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassContainsFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassContainsFieldCallback
    -> a
    -- ^ /@widget@/: the widget to query
    -> Double
    -- ^ /@x@/: X coordinate to test, relative to /@widget@/\'s origin
    -> Double
    -- ^ /@y@/: Y coordinate to test, relative to /@widget@/\'s origin
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ contains (/@x@/, /@y@/).
dynamic_WidgetClassContainsFieldCallback :: FunPtr C_WidgetClassContainsFieldCallback
-> a -> Double -> Double -> m Bool
dynamic_WidgetClassContainsFieldCallback __funPtr :: FunPtr C_WidgetClassContainsFieldCallback
__funPtr widget :: a
widget x :: Double
x y :: Double
y = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    CInt
result <- (FunPtr C_WidgetClassContainsFieldCallback
-> C_WidgetClassContainsFieldCallback
__dynamic_C_WidgetClassContainsFieldCallback FunPtr C_WidgetClassContainsFieldCallback
__funPtr) Ptr Widget
widget' CDouble
x' CDouble
y'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassContainsFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to query
    -> Double
    -- ^ /@x@/: X coordinate to test, relative to /@widget@/\'s origin
    -> Double
    -- ^ /@y@/: Y coordinate to test, relative to /@widget@/\'s origin
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ contains (/@x@/, /@y@/).

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassContainsFieldCallback`@.
noWidgetClassContainsFieldCallback :: Maybe WidgetClassContainsFieldCallback
noWidgetClassContainsFieldCallback :: Maybe WidgetClassContainsFieldCallback
noWidgetClassContainsFieldCallback = Maybe WidgetClassContainsFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassContainsFieldCallback :: MonadIO m => WidgetClassContainsFieldCallback -> m (GClosure C_WidgetClassContainsFieldCallback)
genClosure_WidgetClassContainsFieldCallback :: WidgetClassContainsFieldCallback
-> m (GClosure C_WidgetClassContainsFieldCallback)
genClosure_WidgetClassContainsFieldCallback cb :: WidgetClassContainsFieldCallback
cb = IO (GClosure C_WidgetClassContainsFieldCallback)
-> m (GClosure C_WidgetClassContainsFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassContainsFieldCallback)
 -> m (GClosure C_WidgetClassContainsFieldCallback))
-> IO (GClosure C_WidgetClassContainsFieldCallback)
-> m (GClosure C_WidgetClassContainsFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassContainsFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback))
-> WidgetClassContainsFieldCallback
-> C_WidgetClassContainsFieldCallback
wrap_WidgetClassContainsFieldCallback Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback))
forall a. Maybe a
Nothing WidgetClassContainsFieldCallback
cb
    C_WidgetClassContainsFieldCallback
-> IO (FunPtr C_WidgetClassContainsFieldCallback)
mk_WidgetClassContainsFieldCallback C_WidgetClassContainsFieldCallback
cb' IO (FunPtr C_WidgetClassContainsFieldCallback)
-> (FunPtr C_WidgetClassContainsFieldCallback
    -> IO (GClosure C_WidgetClassContainsFieldCallback))
-> IO (GClosure C_WidgetClassContainsFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassContainsFieldCallback
-> IO (GClosure C_WidgetClassContainsFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassContainsFieldCallback` into a `C_WidgetClassContainsFieldCallback`.
wrap_WidgetClassContainsFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback)) ->
    WidgetClassContainsFieldCallback ->
    C_WidgetClassContainsFieldCallback
wrap_WidgetClassContainsFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback))
-> WidgetClassContainsFieldCallback
-> C_WidgetClassContainsFieldCallback
wrap_WidgetClassContainsFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback))
funptrptr _cb :: WidgetClassContainsFieldCallback
_cb widget :: Ptr Widget
widget x :: CDouble
x y :: CDouble
y = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
    let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
    Bool
result <- WidgetClassContainsFieldCallback
_cb  Widget
widget' Double
x' Double
y'
    Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassContainsFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback WidgetClassComputeExpandFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hexpand_p", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "vexpand_p", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassComputeExpandFieldCallback =
    Ptr Gtk.Widget.Widget ->
    CInt ->
    CInt ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "hexpand_p"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "vexpand_p"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassComputeExpandFieldCallback :: FunPtr C_WidgetClassComputeExpandFieldCallback -> C_WidgetClassComputeExpandFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassComputeExpandFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassComputeExpandFieldCallback
    -> a
    -> Bool
    -> Bool
    -> m ()
dynamic_WidgetClassComputeExpandFieldCallback :: FunPtr C_WidgetClassComputeExpandFieldCallback
-> a -> Bool -> Bool -> m ()
dynamic_WidgetClassComputeExpandFieldCallback __funPtr :: FunPtr C_WidgetClassComputeExpandFieldCallback
__funPtr widget :: a
widget hexpandP :: Bool
hexpandP vexpandP :: Bool
vexpandP = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let hexpandP' :: CInt
hexpandP' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
hexpandP
    let vexpandP' :: CInt
vexpandP' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
vexpandP
    (FunPtr C_WidgetClassComputeExpandFieldCallback
-> C_WidgetClassComputeExpandFieldCallback
__dynamic_C_WidgetClassComputeExpandFieldCallback FunPtr C_WidgetClassComputeExpandFieldCallback
__funPtr) Ptr Widget
widget' CInt
hexpandP' CInt
vexpandP'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type WidgetClassComputeExpandFieldCallback =
    Gtk.Widget.Widget
    -> Bool
    -> Bool
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassComputeExpandFieldCallback`@.
noWidgetClassComputeExpandFieldCallback :: Maybe WidgetClassComputeExpandFieldCallback
noWidgetClassComputeExpandFieldCallback :: Maybe WidgetClassComputeExpandFieldCallback
noWidgetClassComputeExpandFieldCallback = Maybe WidgetClassComputeExpandFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassComputeExpandFieldCallback :: MonadIO m => WidgetClassComputeExpandFieldCallback -> m (GClosure C_WidgetClassComputeExpandFieldCallback)
genClosure_WidgetClassComputeExpandFieldCallback :: WidgetClassComputeExpandFieldCallback
-> m (GClosure C_WidgetClassComputeExpandFieldCallback)
genClosure_WidgetClassComputeExpandFieldCallback cb :: WidgetClassComputeExpandFieldCallback
cb = IO (GClosure C_WidgetClassComputeExpandFieldCallback)
-> m (GClosure C_WidgetClassComputeExpandFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassComputeExpandFieldCallback)
 -> m (GClosure C_WidgetClassComputeExpandFieldCallback))
-> IO (GClosure C_WidgetClassComputeExpandFieldCallback)
-> m (GClosure C_WidgetClassComputeExpandFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassComputeExpandFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
-> WidgetClassComputeExpandFieldCallback
-> C_WidgetClassComputeExpandFieldCallback
wrap_WidgetClassComputeExpandFieldCallback Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
forall a. Maybe a
Nothing WidgetClassComputeExpandFieldCallback
cb
    C_WidgetClassComputeExpandFieldCallback
-> IO (FunPtr C_WidgetClassComputeExpandFieldCallback)
mk_WidgetClassComputeExpandFieldCallback C_WidgetClassComputeExpandFieldCallback
cb' IO (FunPtr C_WidgetClassComputeExpandFieldCallback)
-> (FunPtr C_WidgetClassComputeExpandFieldCallback
    -> IO (GClosure C_WidgetClassComputeExpandFieldCallback))
-> IO (GClosure C_WidgetClassComputeExpandFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassComputeExpandFieldCallback
-> IO (GClosure C_WidgetClassComputeExpandFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassComputeExpandFieldCallback` into a `C_WidgetClassComputeExpandFieldCallback`.
wrap_WidgetClassComputeExpandFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback)) ->
    WidgetClassComputeExpandFieldCallback ->
    C_WidgetClassComputeExpandFieldCallback
wrap_WidgetClassComputeExpandFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
-> WidgetClassComputeExpandFieldCallback
-> C_WidgetClassComputeExpandFieldCallback
wrap_WidgetClassComputeExpandFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
funptrptr _cb :: WidgetClassComputeExpandFieldCallback
_cb widget :: Ptr Widget
widget hexpandP :: CInt
hexpandP vexpandP :: CInt
vexpandP = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let hexpandP' :: Bool
hexpandP' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
hexpandP
    let vexpandP' :: Bool
vexpandP' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
vexpandP
    WidgetClassComputeExpandFieldCallback
_cb  Widget
widget' Bool
hexpandP' Bool
vexpandP'
    Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassComputeExpandFieldCallback))
funptrptr


-- callback WidgetClassCanActivateAccelFieldCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the accelerator can be activated.", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkWidget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "signal_id", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ID of a signal installed on @widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_WidgetClassCanActivateAccelFieldCallback =
    Ptr Gtk.Widget.Widget ->
    Word32 ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signal_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the ID of a signal installed on @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_WidgetClassCanActivateAccelFieldCallback :: FunPtr C_WidgetClassCanActivateAccelFieldCallback -> C_WidgetClassCanActivateAccelFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_WidgetClassCanActivateAccelFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_WidgetClassCanActivateAccelFieldCallback
    -> a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Word32
    -- ^ /@signalId@/: the ID of a signal installed on /@widget@/
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the accelerator can be activated.
dynamic_WidgetClassCanActivateAccelFieldCallback :: FunPtr C_WidgetClassCanActivateAccelFieldCallback
-> a -> Word32 -> m Bool
dynamic_WidgetClassCanActivateAccelFieldCallback __funPtr :: FunPtr C_WidgetClassCanActivateAccelFieldCallback
__funPtr widget :: a
widget signalId :: Word32
signalId = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- (FunPtr C_WidgetClassCanActivateAccelFieldCallback
-> C_WidgetClassCanActivateAccelFieldCallback
__dynamic_C_WidgetClassCanActivateAccelFieldCallback FunPtr C_WidgetClassCanActivateAccelFieldCallback
__funPtr) Ptr Widget
widget' Word32
signalId
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type WidgetClassCanActivateAccelFieldCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Word32
    -- ^ /@signalId@/: the ID of a signal installed on /@widget@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the accelerator can be activated.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetClassCanActivateAccelFieldCallback`@.
noWidgetClassCanActivateAccelFieldCallback :: Maybe WidgetClassCanActivateAccelFieldCallback
noWidgetClassCanActivateAccelFieldCallback :: Maybe WidgetClassCanActivateAccelFieldCallback
noWidgetClassCanActivateAccelFieldCallback = Maybe WidgetClassCanActivateAccelFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetClassCanActivateAccelFieldCallback :: MonadIO m => WidgetClassCanActivateAccelFieldCallback -> m (GClosure C_WidgetClassCanActivateAccelFieldCallback)
genClosure_WidgetClassCanActivateAccelFieldCallback :: WidgetClassCanActivateAccelFieldCallback
-> m (GClosure C_WidgetClassCanActivateAccelFieldCallback)
genClosure_WidgetClassCanActivateAccelFieldCallback cb :: WidgetClassCanActivateAccelFieldCallback
cb = IO (GClosure C_WidgetClassCanActivateAccelFieldCallback)
-> m (GClosure C_WidgetClassCanActivateAccelFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassCanActivateAccelFieldCallback)
 -> m (GClosure C_WidgetClassCanActivateAccelFieldCallback))
-> IO (GClosure C_WidgetClassCanActivateAccelFieldCallback)
-> m (GClosure C_WidgetClassCanActivateAccelFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassCanActivateAccelFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
-> WidgetClassCanActivateAccelFieldCallback
-> C_WidgetClassCanActivateAccelFieldCallback
wrap_WidgetClassCanActivateAccelFieldCallback Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
forall a. Maybe a
Nothing WidgetClassCanActivateAccelFieldCallback
cb
    C_WidgetClassCanActivateAccelFieldCallback
-> IO (FunPtr C_WidgetClassCanActivateAccelFieldCallback)
mk_WidgetClassCanActivateAccelFieldCallback C_WidgetClassCanActivateAccelFieldCallback
cb' IO (FunPtr C_WidgetClassCanActivateAccelFieldCallback)
-> (FunPtr C_WidgetClassCanActivateAccelFieldCallback
    -> IO (GClosure C_WidgetClassCanActivateAccelFieldCallback))
-> IO (GClosure C_WidgetClassCanActivateAccelFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassCanActivateAccelFieldCallback
-> IO (GClosure C_WidgetClassCanActivateAccelFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetClassCanActivateAccelFieldCallback` into a `C_WidgetClassCanActivateAccelFieldCallback`.
wrap_WidgetClassCanActivateAccelFieldCallback ::
    Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback)) ->
    WidgetClassCanActivateAccelFieldCallback ->
    C_WidgetClassCanActivateAccelFieldCallback
wrap_WidgetClassCanActivateAccelFieldCallback :: Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
-> WidgetClassCanActivateAccelFieldCallback
-> C_WidgetClassCanActivateAccelFieldCallback
wrap_WidgetClassCanActivateAccelFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
funptrptr _cb :: WidgetClassCanActivateAccelFieldCallback
_cb widget :: Ptr Widget
widget signalId :: Word32
signalId = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Bool
result <- WidgetClassCanActivateAccelFieldCallback
_cb  Widget
widget' Word32
signalId
    Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassCanActivateAccelFieldCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeViewSearchPositionFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "tree_view", argType = TInterface (Name {namespace = "Gtk", name = "TreeView"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "search_dialog", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeViewSearchPositionFunc =
    Ptr Gtk.TreeView.TreeView ->
    Ptr Gtk.Widget.Widget ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "tree_view"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "search_dialog"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeViewSearchPositionFunc :: FunPtr C_TreeViewSearchPositionFunc -> C_TreeViewSearchPositionFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeViewSearchPositionFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeView.IsTreeView a, Gtk.Widget.IsWidget b) =>
    FunPtr C_TreeViewSearchPositionFunc
    -> a
    -> b
    -> Ptr ()
    -> m ()
dynamic_TreeViewSearchPositionFunc :: FunPtr C_TreeViewSearchPositionFunc -> a -> b -> Ptr () -> m ()
dynamic_TreeViewSearchPositionFunc __funPtr :: FunPtr C_TreeViewSearchPositionFunc
__funPtr treeView :: a
treeView searchDialog :: b
searchDialog userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeView
treeView' <- a -> IO (Ptr TreeView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeView
    Ptr Widget
searchDialog' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
searchDialog
    (FunPtr C_TreeViewSearchPositionFunc -> C_TreeViewSearchPositionFunc
__dynamic_C_TreeViewSearchPositionFunc FunPtr C_TreeViewSearchPositionFunc
__funPtr) Ptr TreeView
treeView' Ptr Widget
searchDialog' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
searchDialog
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type TreeViewSearchPositionFunc =
    Gtk.TreeView.TreeView
    -> Gtk.Widget.Widget
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewSearchPositionFunc`@.
noTreeViewSearchPositionFunc :: Maybe TreeViewSearchPositionFunc
noTreeViewSearchPositionFunc :: Maybe TreeViewSearchPositionFunc
noTreeViewSearchPositionFunc = Maybe TreeViewSearchPositionFunc
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type TreeViewSearchPositionFunc_WithClosures =
    Gtk.TreeView.TreeView
    -> Gtk.Widget.Widget
    -> Ptr ()
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewSearchPositionFunc_WithClosures`@.
noTreeViewSearchPositionFunc_WithClosures :: Maybe TreeViewSearchPositionFunc_WithClosures
noTreeViewSearchPositionFunc_WithClosures :: Maybe TreeViewSearchPositionFunc_WithClosures
noTreeViewSearchPositionFunc_WithClosures = Maybe TreeViewSearchPositionFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeViewSearchPositionFunc :: TreeViewSearchPositionFunc -> TreeViewSearchPositionFunc_WithClosures
drop_closures_TreeViewSearchPositionFunc :: TreeViewSearchPositionFunc
-> TreeViewSearchPositionFunc_WithClosures
drop_closures_TreeViewSearchPositionFunc _f :: TreeViewSearchPositionFunc
_f treeView :: TreeView
treeView searchDialog :: Widget
searchDialog _ = TreeViewSearchPositionFunc
_f TreeView
treeView Widget
searchDialog

-- | Wrap the callback into a `GClosure`.
genClosure_TreeViewSearchPositionFunc :: MonadIO m => TreeViewSearchPositionFunc -> m (GClosure C_TreeViewSearchPositionFunc)
genClosure_TreeViewSearchPositionFunc :: TreeViewSearchPositionFunc
-> m (GClosure C_TreeViewSearchPositionFunc)
genClosure_TreeViewSearchPositionFunc cb :: TreeViewSearchPositionFunc
cb = IO (GClosure C_TreeViewSearchPositionFunc)
-> m (GClosure C_TreeViewSearchPositionFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewSearchPositionFunc)
 -> m (GClosure C_TreeViewSearchPositionFunc))
-> IO (GClosure C_TreeViewSearchPositionFunc)
-> m (GClosure C_TreeViewSearchPositionFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewSearchPositionFunc_WithClosures
cb' = TreeViewSearchPositionFunc
-> TreeViewSearchPositionFunc_WithClosures
drop_closures_TreeViewSearchPositionFunc TreeViewSearchPositionFunc
cb
    let cb'' :: C_TreeViewSearchPositionFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc))
-> TreeViewSearchPositionFunc_WithClosures
-> C_TreeViewSearchPositionFunc
wrap_TreeViewSearchPositionFunc Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc))
forall a. Maybe a
Nothing TreeViewSearchPositionFunc_WithClosures
cb'
    C_TreeViewSearchPositionFunc
-> IO (FunPtr C_TreeViewSearchPositionFunc)
mk_TreeViewSearchPositionFunc C_TreeViewSearchPositionFunc
cb'' IO (FunPtr C_TreeViewSearchPositionFunc)
-> (FunPtr C_TreeViewSearchPositionFunc
    -> IO (GClosure C_TreeViewSearchPositionFunc))
-> IO (GClosure C_TreeViewSearchPositionFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewSearchPositionFunc
-> IO (GClosure C_TreeViewSearchPositionFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeViewSearchPositionFunc` into a `C_TreeViewSearchPositionFunc`.
wrap_TreeViewSearchPositionFunc ::
    Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc)) ->
    TreeViewSearchPositionFunc_WithClosures ->
    C_TreeViewSearchPositionFunc
wrap_TreeViewSearchPositionFunc :: Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc))
-> TreeViewSearchPositionFunc_WithClosures
-> C_TreeViewSearchPositionFunc
wrap_TreeViewSearchPositionFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc))
funptrptr _cb :: TreeViewSearchPositionFunc_WithClosures
_cb treeView :: Ptr TreeView
treeView searchDialog :: Ptr Widget
searchDialog userData :: Ptr ()
userData = do
    TreeView
treeView' <- ((ManagedPtr TreeView -> TreeView) -> Ptr TreeView -> IO TreeView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeView -> TreeView
Gtk.TreeView.TreeView) Ptr TreeView
treeView
    Widget
searchDialog' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
searchDialog
    TreeViewSearchPositionFunc_WithClosures
_cb  TreeView
treeView' Widget
searchDialog' Ptr ()
userData
    Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewSearchPositionFunc))
funptrptr


-- callback TreeViewSearchEqualFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%FALSE if the row matches, %TRUE otherwise.", sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModel being searched", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "column", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the search column set by gtk_tree_view_set_search_column()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the key string to compare with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter pointing the row of @model that should be compared\n with @key.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "search_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data from gtk_tree_view_set_search_equal_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used for checking whether a row in @model matches\na search key string entered by the user. Note the return value\nis reversed from what you would normally expect, though it\nhas some similarity to strcmp() returning 0 for equal strings.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeViewSearchEqualFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Int32 ->
    CString ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkTreeModel being searched"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "column"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the search column set by gtk_tree_view_set_search_column()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the key string to compare with"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkTreeIter pointing the row of @model that should be compared\n with @key."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "search_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data from gtk_tree_view_set_search_equal_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeViewSearchEqualFunc :: FunPtr C_TreeViewSearchEqualFunc -> C_TreeViewSearchEqualFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeViewSearchEqualFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeViewSearchEqualFunc
    -> a
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being searched
    -> Int32
    -- ^ /@column@/: the search column set by 'GI.Gtk.Objects.TreeView.treeViewSetSearchColumn'
    -> T.Text
    -- ^ /@key@/: the key string to compare with
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing the row of /@model@/ that should be compared
    --  with /@key@/.
    -> Ptr ()
    -- ^ /@searchData@/: user data from 'GI.Gtk.Objects.TreeView.treeViewSetSearchEqualFunc'
    -> m Bool
    -- ^ __Returns:__ 'P.False' if the row matches, 'P.True' otherwise.
dynamic_TreeViewSearchEqualFunc :: FunPtr C_TreeViewSearchEqualFunc
-> a -> Int32 -> Text -> TreeIter -> Ptr () -> m Bool
dynamic_TreeViewSearchEqualFunc __funPtr :: FunPtr C_TreeViewSearchEqualFunc
__funPtr model :: a
model column :: Int32
column key :: Text
key iter :: TreeIter
iter searchData :: Ptr ()
searchData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    CString
key' <- Text -> IO CString
textToCString Text
key
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    CInt
result <- (FunPtr C_TreeViewSearchEqualFunc -> C_TreeViewSearchEqualFunc
__dynamic_C_TreeViewSearchEqualFunc FunPtr C_TreeViewSearchEqualFunc
__funPtr) Ptr TreeModel
model' Int32
column CString
key' Ptr TreeIter
iter' Ptr ()
searchData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | A function used for checking whether a row in /@model@/ matches
-- a search key string entered by the user. Note the return value
-- is reversed from what you would normally expect, though it
-- has some similarity to @/strcmp()/@ returning 0 for equal strings.
type TreeViewSearchEqualFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being searched
    -> Int32
    -- ^ /@column@/: the search column set by 'GI.Gtk.Objects.TreeView.treeViewSetSearchColumn'
    -> T.Text
    -- ^ /@key@/: the key string to compare with
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing the row of /@model@/ that should be compared
    --  with /@key@/.
    -> IO Bool
    -- ^ __Returns:__ 'P.False' if the row matches, 'P.True' otherwise.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewSearchEqualFunc`@.
noTreeViewSearchEqualFunc :: Maybe TreeViewSearchEqualFunc
noTreeViewSearchEqualFunc :: Maybe TreeViewSearchEqualFunc
noTreeViewSearchEqualFunc = Maybe TreeViewSearchEqualFunc
forall a. Maybe a
Nothing

-- | A function used for checking whether a row in /@model@/ matches
-- a search key string entered by the user. Note the return value
-- is reversed from what you would normally expect, though it
-- has some similarity to @/strcmp()/@ returning 0 for equal strings.
type TreeViewSearchEqualFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being searched
    -> Int32
    -- ^ /@column@/: the search column set by 'GI.Gtk.Objects.TreeView.treeViewSetSearchColumn'
    -> T.Text
    -- ^ /@key@/: the key string to compare with
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing the row of /@model@/ that should be compared
    --  with /@key@/.
    -> Ptr ()
    -- ^ /@searchData@/: user data from 'GI.Gtk.Objects.TreeView.treeViewSetSearchEqualFunc'
    -> IO Bool
    -- ^ __Returns:__ 'P.False' if the row matches, 'P.True' otherwise.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewSearchEqualFunc_WithClosures`@.
noTreeViewSearchEqualFunc_WithClosures :: Maybe TreeViewSearchEqualFunc_WithClosures
noTreeViewSearchEqualFunc_WithClosures :: Maybe TreeViewSearchEqualFunc_WithClosures
noTreeViewSearchEqualFunc_WithClosures = Maybe TreeViewSearchEqualFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeViewSearchEqualFunc :: TreeViewSearchEqualFunc -> TreeViewSearchEqualFunc_WithClosures
drop_closures_TreeViewSearchEqualFunc :: TreeViewSearchEqualFunc -> TreeViewSearchEqualFunc_WithClosures
drop_closures_TreeViewSearchEqualFunc _f :: TreeViewSearchEqualFunc
_f model :: TreeModel
model column :: Int32
column key :: Text
key iter :: TreeIter
iter _ = TreeViewSearchEqualFunc
_f TreeModel
model Int32
column Text
key TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeViewSearchEqualFunc :: MonadIO m => TreeViewSearchEqualFunc -> m (GClosure C_TreeViewSearchEqualFunc)
genClosure_TreeViewSearchEqualFunc :: TreeViewSearchEqualFunc -> m (GClosure C_TreeViewSearchEqualFunc)
genClosure_TreeViewSearchEqualFunc cb :: TreeViewSearchEqualFunc
cb = IO (GClosure C_TreeViewSearchEqualFunc)
-> m (GClosure C_TreeViewSearchEqualFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewSearchEqualFunc)
 -> m (GClosure C_TreeViewSearchEqualFunc))
-> IO (GClosure C_TreeViewSearchEqualFunc)
-> m (GClosure C_TreeViewSearchEqualFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewSearchEqualFunc_WithClosures
cb' = TreeViewSearchEqualFunc -> TreeViewSearchEqualFunc_WithClosures
drop_closures_TreeViewSearchEqualFunc TreeViewSearchEqualFunc
cb
    let cb'' :: C_TreeViewSearchEqualFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc))
-> TreeViewSearchEqualFunc_WithClosures
-> C_TreeViewSearchEqualFunc
wrap_TreeViewSearchEqualFunc Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc))
forall a. Maybe a
Nothing TreeViewSearchEqualFunc_WithClosures
cb'
    C_TreeViewSearchEqualFunc -> IO (FunPtr C_TreeViewSearchEqualFunc)
mk_TreeViewSearchEqualFunc C_TreeViewSearchEqualFunc
cb'' IO (FunPtr C_TreeViewSearchEqualFunc)
-> (FunPtr C_TreeViewSearchEqualFunc
    -> IO (GClosure C_TreeViewSearchEqualFunc))
-> IO (GClosure C_TreeViewSearchEqualFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewSearchEqualFunc
-> IO (GClosure C_TreeViewSearchEqualFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeViewSearchEqualFunc` into a `C_TreeViewSearchEqualFunc`.
wrap_TreeViewSearchEqualFunc ::
    Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc)) ->
    TreeViewSearchEqualFunc_WithClosures ->
    C_TreeViewSearchEqualFunc
wrap_TreeViewSearchEqualFunc :: Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc))
-> TreeViewSearchEqualFunc_WithClosures
-> C_TreeViewSearchEqualFunc
wrap_TreeViewSearchEqualFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc))
funptrptr _cb :: TreeViewSearchEqualFunc_WithClosures
_cb model :: Ptr TreeModel
model column :: Int32
column key :: CString
key iter :: Ptr TreeIter
iter searchData :: Ptr ()
searchData = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    Text
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO CInt) -> IO CInt)
-> (TreeIter -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        Bool
result <- TreeViewSearchEqualFunc_WithClosures
_cb  TreeModel
model' Int32
column Text
key' TreeIter
iter' Ptr ()
searchData
        Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewSearchEqualFunc))
funptrptr
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeViewRowSeparatorFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the row is a separator", sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModel", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter pointing at a row in @model", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Function type for determining whether the row pointed to by @iter should\nbe rendered as a separator. A common way to implement this is to have a\nboolean column in the model, whose values the #GtkTreeViewRowSeparatorFunc\nreturns.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeViewRowSeparatorFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkTreeModel" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkTreeIter pointing at a row in @model"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeViewRowSeparatorFunc :: FunPtr C_TreeViewRowSeparatorFunc -> C_TreeViewRowSeparatorFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeViewRowSeparatorFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeViewRowSeparatorFunc
    -> a
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing at a row in /@model@/
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the row is a separator
dynamic_TreeViewRowSeparatorFunc :: FunPtr C_TreeViewRowSeparatorFunc
-> a -> TreeIter -> Ptr () -> m Bool
dynamic_TreeViewRowSeparatorFunc __funPtr :: FunPtr C_TreeViewRowSeparatorFunc
__funPtr model :: a
model iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    CInt
result <- (FunPtr C_TreeViewRowSeparatorFunc -> C_TreeViewRowSeparatorFunc
__dynamic_C_TreeViewRowSeparatorFunc FunPtr C_TreeViewRowSeparatorFunc
__funPtr) Ptr TreeModel
model' Ptr TreeIter
iter' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | Function type for determining whether the row pointed to by /@iter@/ should
-- be rendered as a separator. A common way to implement this is to have a
-- boolean column in the model, whose values the t'GI.Gtk.Callbacks.TreeViewRowSeparatorFunc'
-- returns.
type TreeViewRowSeparatorFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing at a row in /@model@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row is a separator

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewRowSeparatorFunc`@.
noTreeViewRowSeparatorFunc :: Maybe TreeViewRowSeparatorFunc
noTreeViewRowSeparatorFunc :: Maybe TreeViewRowSeparatorFunc
noTreeViewRowSeparatorFunc = Maybe TreeViewRowSeparatorFunc
forall a. Maybe a
Nothing

-- | Function type for determining whether the row pointed to by /@iter@/ should
-- be rendered as a separator. A common way to implement this is to have a
-- boolean column in the model, whose values the t'GI.Gtk.Callbacks.TreeViewRowSeparatorFunc'
-- returns.
type TreeViewRowSeparatorFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing at a row in /@model@/
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row is a separator

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewRowSeparatorFunc_WithClosures`@.
noTreeViewRowSeparatorFunc_WithClosures :: Maybe TreeViewRowSeparatorFunc_WithClosures
noTreeViewRowSeparatorFunc_WithClosures :: Maybe TreeViewRowSeparatorFunc_WithClosures
noTreeViewRowSeparatorFunc_WithClosures = Maybe TreeViewRowSeparatorFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeViewRowSeparatorFunc :: TreeViewRowSeparatorFunc -> TreeViewRowSeparatorFunc_WithClosures
drop_closures_TreeViewRowSeparatorFunc :: TreeViewRowSeparatorFunc -> TreeViewRowSeparatorFunc_WithClosures
drop_closures_TreeViewRowSeparatorFunc _f :: TreeViewRowSeparatorFunc
_f model :: TreeModel
model iter :: TreeIter
iter _ = TreeViewRowSeparatorFunc
_f TreeModel
model TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeViewRowSeparatorFunc :: MonadIO m => TreeViewRowSeparatorFunc -> m (GClosure C_TreeViewRowSeparatorFunc)
genClosure_TreeViewRowSeparatorFunc :: TreeViewRowSeparatorFunc -> m (GClosure C_TreeViewRowSeparatorFunc)
genClosure_TreeViewRowSeparatorFunc cb :: TreeViewRowSeparatorFunc
cb = IO (GClosure C_TreeViewRowSeparatorFunc)
-> m (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewRowSeparatorFunc)
 -> m (GClosure C_TreeViewRowSeparatorFunc))
-> IO (GClosure C_TreeViewRowSeparatorFunc)
-> m (GClosure C_TreeViewRowSeparatorFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewRowSeparatorFunc_WithClosures
cb' = TreeViewRowSeparatorFunc -> TreeViewRowSeparatorFunc_WithClosures
drop_closures_TreeViewRowSeparatorFunc TreeViewRowSeparatorFunc
cb
    let cb'' :: C_TreeViewRowSeparatorFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
-> TreeViewRowSeparatorFunc_WithClosures
-> C_TreeViewRowSeparatorFunc
wrap_TreeViewRowSeparatorFunc Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
forall a. Maybe a
Nothing TreeViewRowSeparatorFunc_WithClosures
cb'
    C_TreeViewRowSeparatorFunc
-> IO (FunPtr C_TreeViewRowSeparatorFunc)
mk_TreeViewRowSeparatorFunc C_TreeViewRowSeparatorFunc
cb'' IO (FunPtr C_TreeViewRowSeparatorFunc)
-> (FunPtr C_TreeViewRowSeparatorFunc
    -> IO (GClosure C_TreeViewRowSeparatorFunc))
-> IO (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewRowSeparatorFunc
-> IO (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeViewRowSeparatorFunc` into a `C_TreeViewRowSeparatorFunc`.
wrap_TreeViewRowSeparatorFunc ::
    Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc)) ->
    TreeViewRowSeparatorFunc_WithClosures ->
    C_TreeViewRowSeparatorFunc
wrap_TreeViewRowSeparatorFunc :: Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
-> TreeViewRowSeparatorFunc_WithClosures
-> C_TreeViewRowSeparatorFunc
wrap_TreeViewRowSeparatorFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
funptrptr _cb :: TreeViewRowSeparatorFunc_WithClosures
_cb model :: Ptr TreeModel
model iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO CInt) -> IO CInt)
-> (TreeIter -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        Bool
result <- TreeViewRowSeparatorFunc_WithClosures
_cb  TreeModel
model' TreeIter
iter' Ptr ()
data_
        Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
funptrptr
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeViewMappingFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "tree_view", argType = TInterface (Name {namespace = "Gtk", name = "TreeView"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeView", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gtk", name = "TreePath"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The path that\8217s expanded", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Function used for gtk_tree_view_map_expanded_rows().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeViewMappingFunc =
    Ptr Gtk.TreeView.TreeView ->
    Ptr Gtk.TreePath.TreePath ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "tree_view"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreePath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The path that\8217s expanded"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeViewMappingFunc :: FunPtr C_TreeViewMappingFunc -> C_TreeViewMappingFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeViewMappingFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeView.IsTreeView a) =>
    FunPtr C_TreeViewMappingFunc
    -> a
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The path that’s expanded
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_TreeViewMappingFunc :: FunPtr C_TreeViewMappingFunc -> a -> TreePath -> Ptr () -> m ()
dynamic_TreeViewMappingFunc __funPtr :: FunPtr C_TreeViewMappingFunc
__funPtr treeView :: a
treeView path :: TreePath
path userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeView
treeView' <- a -> IO (Ptr TreeView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeView
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    (FunPtr C_TreeViewMappingFunc -> C_TreeViewMappingFunc
__dynamic_C_TreeViewMappingFunc FunPtr C_TreeViewMappingFunc
__funPtr) Ptr TreeView
treeView' Ptr TreePath
path' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeView
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | Function used for 'GI.Gtk.Objects.TreeView.treeViewMapExpandedRows'.
type TreeViewMappingFunc =
    Gtk.TreeView.TreeView
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The path that’s expanded
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewMappingFunc`@.
noTreeViewMappingFunc :: Maybe TreeViewMappingFunc
noTreeViewMappingFunc :: Maybe TreeViewMappingFunc
noTreeViewMappingFunc = Maybe TreeViewMappingFunc
forall a. Maybe a
Nothing

-- | Function used for 'GI.Gtk.Objects.TreeView.treeViewMapExpandedRows'.
type TreeViewMappingFunc_WithClosures =
    Gtk.TreeView.TreeView
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The path that’s expanded
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewMappingFunc_WithClosures`@.
noTreeViewMappingFunc_WithClosures :: Maybe TreeViewMappingFunc_WithClosures
noTreeViewMappingFunc_WithClosures :: Maybe TreeViewMappingFunc_WithClosures
noTreeViewMappingFunc_WithClosures = Maybe TreeViewMappingFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeViewMappingFunc :: TreeViewMappingFunc -> TreeViewMappingFunc_WithClosures
drop_closures_TreeViewMappingFunc :: TreeViewMappingFunc -> TreeViewMappingFunc_WithClosures
drop_closures_TreeViewMappingFunc _f :: TreeViewMappingFunc
_f treeView :: TreeView
treeView path :: TreePath
path _ = TreeViewMappingFunc
_f TreeView
treeView TreePath
path

-- | Wrap the callback into a `GClosure`.
genClosure_TreeViewMappingFunc :: MonadIO m => TreeViewMappingFunc -> m (GClosure C_TreeViewMappingFunc)
genClosure_TreeViewMappingFunc :: TreeViewMappingFunc -> m (GClosure C_TreeViewMappingFunc)
genClosure_TreeViewMappingFunc cb :: TreeViewMappingFunc
cb = IO (GClosure C_TreeViewMappingFunc)
-> m (GClosure C_TreeViewMappingFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewMappingFunc)
 -> m (GClosure C_TreeViewMappingFunc))
-> IO (GClosure C_TreeViewMappingFunc)
-> m (GClosure C_TreeViewMappingFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewMappingFunc_WithClosures
cb' = TreeViewMappingFunc -> TreeViewMappingFunc_WithClosures
drop_closures_TreeViewMappingFunc TreeViewMappingFunc
cb
    let cb'' :: C_TreeViewMappingFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewMappingFunc))
-> TreeViewMappingFunc_WithClosures -> C_TreeViewMappingFunc
wrap_TreeViewMappingFunc Maybe (Ptr (FunPtr C_TreeViewMappingFunc))
forall a. Maybe a
Nothing TreeViewMappingFunc_WithClosures
cb'
    C_TreeViewMappingFunc -> IO (FunPtr C_TreeViewMappingFunc)
mk_TreeViewMappingFunc C_TreeViewMappingFunc
cb'' IO (FunPtr C_TreeViewMappingFunc)
-> (FunPtr C_TreeViewMappingFunc
    -> IO (GClosure C_TreeViewMappingFunc))
-> IO (GClosure C_TreeViewMappingFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewMappingFunc -> IO (GClosure C_TreeViewMappingFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeViewMappingFunc` into a `C_TreeViewMappingFunc`.
wrap_TreeViewMappingFunc ::
    Maybe (Ptr (FunPtr C_TreeViewMappingFunc)) ->
    TreeViewMappingFunc_WithClosures ->
    C_TreeViewMappingFunc
wrap_TreeViewMappingFunc :: Maybe (Ptr (FunPtr C_TreeViewMappingFunc))
-> TreeViewMappingFunc_WithClosures -> C_TreeViewMappingFunc
wrap_TreeViewMappingFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewMappingFunc))
funptrptr _cb :: TreeViewMappingFunc_WithClosures
_cb treeView :: Ptr TreeView
treeView path :: Ptr TreePath
path userData :: Ptr ()
userData = do
    TreeView
treeView' <- ((ManagedPtr TreeView -> TreeView) -> Ptr TreeView -> IO TreeView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeView -> TreeView
Gtk.TreeView.TreeView) Ptr TreeView
treeView
    (ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
        TreeViewMappingFunc_WithClosures
_cb  TreeView
treeView' TreePath
path' Ptr ()
userData
        Maybe (Ptr (FunPtr C_TreeViewMappingFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewMappingFunc))
funptrptr


-- callback TreeViewColumnDropFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE, if @column can be dropped in this spot", sinceVersion = Nothing}, args = [Arg {argCName = "tree_view", argType = TInterface (Name {namespace = "Gtk", name = "TreeView"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeView", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "column", argType = TInterface (Name {namespace = "Gtk", name = "TreeViewColumn"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreeViewColumn being dragged", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prev_column", argType = TInterface (Name {namespace = "Gtk", name = "TreeViewColumn"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeViewColumn on one side of @column", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "next_column", argType = TInterface (Name {namespace = "Gtk", name = "TreeViewColumn"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeViewColumn on the other side of @column", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Function type for determining whether @column can be dropped in a\nparticular spot (as determined by @prev_column and @next_column).  In\nleft to right locales, @prev_column is on the left of the potential drop\nspot, and @next_column is on the right.  In right to left mode, this is\nreversed.  This function should return %TRUE if the spot is a valid drop\nspot.  Please note that returning %TRUE does not actually indicate that\nthe column drop was made, but is meant only to indicate a possible drop\nspot to the user.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeViewColumnDropFunc =
    Ptr Gtk.TreeView.TreeView ->
    Ptr Gtk.TreeViewColumn.TreeViewColumn ->
    Ptr Gtk.TreeViewColumn.TreeViewColumn ->
    Ptr Gtk.TreeViewColumn.TreeViewColumn ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "tree_view"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "column"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeViewColumn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreeViewColumn being dragged"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "prev_column"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeViewColumn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeViewColumn on one side of @column"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "next_column"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeViewColumn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A #GtkTreeViewColumn on the other side of @column"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeViewColumnDropFunc :: FunPtr C_TreeViewColumnDropFunc -> C_TreeViewColumnDropFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeViewColumnDropFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeView.IsTreeView a, Gtk.TreeViewColumn.IsTreeViewColumn b, Gtk.TreeViewColumn.IsTreeViewColumn c, Gtk.TreeViewColumn.IsTreeViewColumn d) =>
    FunPtr C_TreeViewColumnDropFunc
    -> a
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> b
    -- ^ /@column@/: The t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' being dragged
    -> c
    -- ^ /@prevColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on one side of /@column@/
    -> d
    -- ^ /@nextColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on the other side of /@column@/
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True', if /@column@/ can be dropped in this spot
dynamic_TreeViewColumnDropFunc :: FunPtr C_TreeViewColumnDropFunc
-> a -> b -> c -> d -> Ptr () -> m Bool
dynamic_TreeViewColumnDropFunc __funPtr :: FunPtr C_TreeViewColumnDropFunc
__funPtr treeView :: a
treeView column :: b
column prevColumn :: c
prevColumn nextColumn :: d
nextColumn data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeView
treeView' <- a -> IO (Ptr TreeView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeView
    Ptr TreeViewColumn
column' <- b -> IO (Ptr TreeViewColumn)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
column
    Ptr TreeViewColumn
prevColumn' <- c -> IO (Ptr TreeViewColumn)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
prevColumn
    Ptr TreeViewColumn
nextColumn' <- d -> IO (Ptr TreeViewColumn)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr d
nextColumn
    CInt
result <- (FunPtr C_TreeViewColumnDropFunc -> C_TreeViewColumnDropFunc
__dynamic_C_TreeViewColumnDropFunc FunPtr C_TreeViewColumnDropFunc
__funPtr) Ptr TreeView
treeView' Ptr TreeViewColumn
column' Ptr TreeViewColumn
prevColumn' Ptr TreeViewColumn
nextColumn' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeView
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
column
    c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
prevColumn
    d -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr d
nextColumn
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | Function type for determining whether /@column@/ can be dropped in a
-- particular spot (as determined by /@prevColumn@/ and /@nextColumn@/).  In
-- left to right locales, /@prevColumn@/ is on the left of the potential drop
-- spot, and /@nextColumn@/ is on the right.  In right to left mode, this is
-- reversed.  This function should return 'P.True' if the spot is a valid drop
-- spot.  Please note that returning 'P.True' does not actually indicate that
-- the column drop was made, but is meant only to indicate a possible drop
-- spot to the user.
type TreeViewColumnDropFunc =
    Gtk.TreeView.TreeView
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@column@/: The t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' being dragged
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@prevColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on one side of /@column@/
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@nextColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on the other side of /@column@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True', if /@column@/ can be dropped in this spot

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewColumnDropFunc`@.
noTreeViewColumnDropFunc :: Maybe TreeViewColumnDropFunc
noTreeViewColumnDropFunc :: Maybe TreeViewColumnDropFunc
noTreeViewColumnDropFunc = Maybe TreeViewColumnDropFunc
forall a. Maybe a
Nothing

-- | Function type for determining whether /@column@/ can be dropped in a
-- particular spot (as determined by /@prevColumn@/ and /@nextColumn@/).  In
-- left to right locales, /@prevColumn@/ is on the left of the potential drop
-- spot, and /@nextColumn@/ is on the right.  In right to left mode, this is
-- reversed.  This function should return 'P.True' if the spot is a valid drop
-- spot.  Please note that returning 'P.True' does not actually indicate that
-- the column drop was made, but is meant only to indicate a possible drop
-- spot to the user.
type TreeViewColumnDropFunc_WithClosures =
    Gtk.TreeView.TreeView
    -- ^ /@treeView@/: A t'GI.Gtk.Objects.TreeView.TreeView'
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@column@/: The t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' being dragged
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@prevColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on one side of /@column@/
    -> Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@nextColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn' on the other side of /@column@/
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True', if /@column@/ can be dropped in this spot

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeViewColumnDropFunc_WithClosures`@.
noTreeViewColumnDropFunc_WithClosures :: Maybe TreeViewColumnDropFunc_WithClosures
noTreeViewColumnDropFunc_WithClosures :: Maybe TreeViewColumnDropFunc_WithClosures
noTreeViewColumnDropFunc_WithClosures = Maybe TreeViewColumnDropFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeViewColumnDropFunc :: TreeViewColumnDropFunc -> TreeViewColumnDropFunc_WithClosures
drop_closures_TreeViewColumnDropFunc :: TreeViewColumnDropFunc -> TreeViewColumnDropFunc_WithClosures
drop_closures_TreeViewColumnDropFunc _f :: TreeViewColumnDropFunc
_f treeView :: TreeView
treeView column :: TreeViewColumn
column prevColumn :: TreeViewColumn
prevColumn nextColumn :: TreeViewColumn
nextColumn _ = TreeViewColumnDropFunc
_f TreeView
treeView TreeViewColumn
column TreeViewColumn
prevColumn TreeViewColumn
nextColumn

-- | Wrap the callback into a `GClosure`.
genClosure_TreeViewColumnDropFunc :: MonadIO m => TreeViewColumnDropFunc -> m (GClosure C_TreeViewColumnDropFunc)
genClosure_TreeViewColumnDropFunc :: TreeViewColumnDropFunc -> m (GClosure C_TreeViewColumnDropFunc)
genClosure_TreeViewColumnDropFunc cb :: TreeViewColumnDropFunc
cb = IO (GClosure C_TreeViewColumnDropFunc)
-> m (GClosure C_TreeViewColumnDropFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewColumnDropFunc)
 -> m (GClosure C_TreeViewColumnDropFunc))
-> IO (GClosure C_TreeViewColumnDropFunc)
-> m (GClosure C_TreeViewColumnDropFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewColumnDropFunc_WithClosures
cb' = TreeViewColumnDropFunc -> TreeViewColumnDropFunc_WithClosures
drop_closures_TreeViewColumnDropFunc TreeViewColumnDropFunc
cb
    let cb'' :: C_TreeViewColumnDropFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc))
-> TreeViewColumnDropFunc_WithClosures -> C_TreeViewColumnDropFunc
wrap_TreeViewColumnDropFunc Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc))
forall a. Maybe a
Nothing TreeViewColumnDropFunc_WithClosures
cb'
    C_TreeViewColumnDropFunc -> IO (FunPtr C_TreeViewColumnDropFunc)
mk_TreeViewColumnDropFunc C_TreeViewColumnDropFunc
cb'' IO (FunPtr C_TreeViewColumnDropFunc)
-> (FunPtr C_TreeViewColumnDropFunc
    -> IO (GClosure C_TreeViewColumnDropFunc))
-> IO (GClosure C_TreeViewColumnDropFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewColumnDropFunc
-> IO (GClosure C_TreeViewColumnDropFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeViewColumnDropFunc` into a `C_TreeViewColumnDropFunc`.
wrap_TreeViewColumnDropFunc ::
    Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc)) ->
    TreeViewColumnDropFunc_WithClosures ->
    C_TreeViewColumnDropFunc
wrap_TreeViewColumnDropFunc :: Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc))
-> TreeViewColumnDropFunc_WithClosures -> C_TreeViewColumnDropFunc
wrap_TreeViewColumnDropFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc))
funptrptr _cb :: TreeViewColumnDropFunc_WithClosures
_cb treeView :: Ptr TreeView
treeView column :: Ptr TreeViewColumn
column prevColumn :: Ptr TreeViewColumn
prevColumn nextColumn :: Ptr TreeViewColumn
nextColumn data_ :: Ptr ()
data_ = do
    TreeView
treeView' <- ((ManagedPtr TreeView -> TreeView) -> Ptr TreeView -> IO TreeView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeView -> TreeView
Gtk.TreeView.TreeView) Ptr TreeView
treeView
    TreeViewColumn
column' <- ((ManagedPtr TreeViewColumn -> TreeViewColumn)
-> Ptr TreeViewColumn -> IO TreeViewColumn
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeViewColumn -> TreeViewColumn
Gtk.TreeViewColumn.TreeViewColumn) Ptr TreeViewColumn
column
    TreeViewColumn
prevColumn' <- ((ManagedPtr TreeViewColumn -> TreeViewColumn)
-> Ptr TreeViewColumn -> IO TreeViewColumn
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeViewColumn -> TreeViewColumn
Gtk.TreeViewColumn.TreeViewColumn) Ptr TreeViewColumn
prevColumn
    TreeViewColumn
nextColumn' <- ((ManagedPtr TreeViewColumn -> TreeViewColumn)
-> Ptr TreeViewColumn -> IO TreeViewColumn
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeViewColumn -> TreeViewColumn
Gtk.TreeViewColumn.TreeViewColumn) Ptr TreeViewColumn
nextColumn
    Bool
result <- TreeViewColumnDropFunc_WithClosures
_cb  TreeView
treeView' TreeViewColumn
column' TreeViewColumn
prevColumn' TreeViewColumn
nextColumn' Ptr ()
data_
    Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewColumnDropFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeSelectionFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE, if the selection state of the row can be toggled", sinceVersion = Nothing}, args = [Arg {argCName = "selection", argType = TInterface (Name {namespace = "Gtk", name = "TreeSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeModel being viewed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gtk", name = "TreePath"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreePath of the row in question", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path_currently_selected", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE, if the path is currently selected", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_tree_selection_set_select_function() to filter\nwhether or not a row may be selected.  It is called whenever a row's\nstate might change.  A return value of %TRUE indicates to @selection\nthat it is okay to change the selection.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeSelectionFunc =
    Ptr Gtk.TreeSelection.TreeSelection ->
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreePath.TreePath ->
    CInt ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "selection"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeSelection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeSelection"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeModel being viewed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreePath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreePath of the row in question"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path_currently_selected"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE, if the path is currently selected"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeSelectionFunc :: FunPtr C_TreeSelectionFunc -> C_TreeSelectionFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeSelectionFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeSelection.IsTreeSelection a, Gtk.TreeModel.IsTreeModel b) =>
    FunPtr C_TreeSelectionFunc
    -> a
    -- ^ /@selection@/: A t'GI.Gtk.Objects.TreeSelection.TreeSelection'
    -> b
    -- ^ /@model@/: A t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of the row in question
    -> Bool
    -- ^ /@pathCurrentlySelected@/: 'P.True', if the path is currently selected
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True', if the selection state of the row can be toggled
dynamic_TreeSelectionFunc :: FunPtr C_TreeSelectionFunc
-> a -> b -> TreePath -> Bool -> Ptr () -> m Bool
dynamic_TreeSelectionFunc __funPtr :: FunPtr C_TreeSelectionFunc
__funPtr selection :: a
selection model :: b
model path :: TreePath
path pathCurrentlySelected :: Bool
pathCurrentlySelected data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeSelection
selection' <- a -> IO (Ptr TreeSelection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
selection
    Ptr TreeModel
model' <- b -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
model
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    let pathCurrentlySelected' :: CInt
pathCurrentlySelected' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
pathCurrentlySelected
    CInt
result <- (FunPtr C_TreeSelectionFunc -> C_TreeSelectionFunc
__dynamic_C_TreeSelectionFunc FunPtr C_TreeSelectionFunc
__funPtr) Ptr TreeSelection
selection' Ptr TreeModel
model' Ptr TreePath
path' CInt
pathCurrentlySelected' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
selection
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
model
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | A function used by 'GI.Gtk.Objects.TreeSelection.treeSelectionSetSelectFunction' to filter
-- whether or not a row may be selected.  It is called whenever a row\'s
-- state might change.  A return value of 'P.True' indicates to /@selection@/
-- that it is okay to change the selection.
type TreeSelectionFunc =
    Gtk.TreeSelection.TreeSelection
    -- ^ /@selection@/: A t'GI.Gtk.Objects.TreeSelection.TreeSelection'
    -> Gtk.TreeModel.TreeModel
    -- ^ /@model@/: A t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of the row in question
    -> Bool
    -- ^ /@pathCurrentlySelected@/: 'P.True', if the path is currently selected
    -> IO Bool
    -- ^ __Returns:__ 'P.True', if the selection state of the row can be toggled

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeSelectionFunc`@.
noTreeSelectionFunc :: Maybe TreeSelectionFunc
noTreeSelectionFunc :: Maybe TreeSelectionFunc
noTreeSelectionFunc = Maybe TreeSelectionFunc
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.TreeSelection.treeSelectionSetSelectFunction' to filter
-- whether or not a row may be selected.  It is called whenever a row\'s
-- state might change.  A return value of 'P.True' indicates to /@selection@/
-- that it is okay to change the selection.
type TreeSelectionFunc_WithClosures =
    Gtk.TreeSelection.TreeSelection
    -- ^ /@selection@/: A t'GI.Gtk.Objects.TreeSelection.TreeSelection'
    -> Gtk.TreeModel.TreeModel
    -- ^ /@model@/: A t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of the row in question
    -> Bool
    -- ^ /@pathCurrentlySelected@/: 'P.True', if the path is currently selected
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True', if the selection state of the row can be toggled

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeSelectionFunc_WithClosures`@.
noTreeSelectionFunc_WithClosures :: Maybe TreeSelectionFunc_WithClosures
noTreeSelectionFunc_WithClosures :: Maybe TreeSelectionFunc_WithClosures
noTreeSelectionFunc_WithClosures = Maybe TreeSelectionFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeSelectionFunc :: TreeSelectionFunc -> TreeSelectionFunc_WithClosures
drop_closures_TreeSelectionFunc :: TreeSelectionFunc -> TreeSelectionFunc_WithClosures
drop_closures_TreeSelectionFunc _f :: TreeSelectionFunc
_f selection :: TreeSelection
selection model :: TreeModel
model path :: TreePath
path pathCurrentlySelected :: Bool
pathCurrentlySelected _ = TreeSelectionFunc
_f TreeSelection
selection TreeModel
model TreePath
path Bool
pathCurrentlySelected

-- | Wrap the callback into a `GClosure`.
genClosure_TreeSelectionFunc :: MonadIO m => TreeSelectionFunc -> m (GClosure C_TreeSelectionFunc)
genClosure_TreeSelectionFunc :: TreeSelectionFunc -> m (GClosure C_TreeSelectionFunc)
genClosure_TreeSelectionFunc cb :: TreeSelectionFunc
cb = IO (GClosure C_TreeSelectionFunc)
-> m (GClosure C_TreeSelectionFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeSelectionFunc)
 -> m (GClosure C_TreeSelectionFunc))
-> IO (GClosure C_TreeSelectionFunc)
-> m (GClosure C_TreeSelectionFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeSelectionFunc_WithClosures
cb' = TreeSelectionFunc -> TreeSelectionFunc_WithClosures
drop_closures_TreeSelectionFunc TreeSelectionFunc
cb
    let cb'' :: C_TreeSelectionFunc
cb'' = Maybe (Ptr (FunPtr C_TreeSelectionFunc))
-> TreeSelectionFunc_WithClosures -> C_TreeSelectionFunc
wrap_TreeSelectionFunc Maybe (Ptr (FunPtr C_TreeSelectionFunc))
forall a. Maybe a
Nothing TreeSelectionFunc_WithClosures
cb'
    C_TreeSelectionFunc -> IO (FunPtr C_TreeSelectionFunc)
mk_TreeSelectionFunc C_TreeSelectionFunc
cb'' IO (FunPtr C_TreeSelectionFunc)
-> (FunPtr C_TreeSelectionFunc
    -> IO (GClosure C_TreeSelectionFunc))
-> IO (GClosure C_TreeSelectionFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeSelectionFunc -> IO (GClosure C_TreeSelectionFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeSelectionFunc` into a `C_TreeSelectionFunc`.
wrap_TreeSelectionFunc ::
    Maybe (Ptr (FunPtr C_TreeSelectionFunc)) ->
    TreeSelectionFunc_WithClosures ->
    C_TreeSelectionFunc
wrap_TreeSelectionFunc :: Maybe (Ptr (FunPtr C_TreeSelectionFunc))
-> TreeSelectionFunc_WithClosures -> C_TreeSelectionFunc
wrap_TreeSelectionFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeSelectionFunc))
funptrptr _cb :: TreeSelectionFunc_WithClosures
_cb selection :: Ptr TreeSelection
selection model :: Ptr TreeModel
model path :: Ptr TreePath
path pathCurrentlySelected :: CInt
pathCurrentlySelected data_ :: Ptr ()
data_ = do
    TreeSelection
selection' <- ((ManagedPtr TreeSelection -> TreeSelection)
-> Ptr TreeSelection -> IO TreeSelection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeSelection -> TreeSelection
Gtk.TreeSelection.TreeSelection) Ptr TreeSelection
selection
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO CInt) -> IO CInt)
-> (TreePath -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
        let pathCurrentlySelected' :: Bool
pathCurrentlySelected' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
pathCurrentlySelected
        Bool
result <- TreeSelectionFunc_WithClosures
_cb  TreeSelection
selection' TreeModel
model' TreePath
path' Bool
pathCurrentlySelected' Ptr ()
data_
        Maybe (Ptr (FunPtr C_TreeSelectionFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeSelectionFunc))
funptrptr
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeSelectionForeachFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreeModel being viewed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gtk", name = "TreePath"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreePath of a selected row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeIter pointing to a selected row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_tree_selection_selected_foreach() to map all\nselected rows.  It will be called on every selected row in the view.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeSelectionForeachFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreePath.TreePath ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreeModel being viewed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreePath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreePath of a selected row"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeIter pointing to a selected row"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeSelectionForeachFunc :: FunPtr C_TreeSelectionForeachFunc -> C_TreeSelectionForeachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeSelectionForeachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeSelectionForeachFunc
    -> a
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to a selected row
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m ()
dynamic_TreeSelectionForeachFunc :: FunPtr C_TreeSelectionForeachFunc
-> a -> TreePath -> TreeIter -> Ptr () -> m ()
dynamic_TreeSelectionForeachFunc __funPtr :: FunPtr C_TreeSelectionForeachFunc
__funPtr model :: a
model path :: TreePath
path iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    (FunPtr C_TreeSelectionForeachFunc -> C_TreeSelectionForeachFunc
__dynamic_C_TreeSelectionForeachFunc FunPtr C_TreeSelectionForeachFunc
__funPtr) Ptr TreeModel
model' Ptr TreePath
path' Ptr TreeIter
iter' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function used by 'GI.Gtk.Objects.TreeSelection.treeSelectionSelectedForeach' to map all
-- selected rows.  It will be called on every selected row in the view.
type TreeSelectionForeachFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to a selected row
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeSelectionForeachFunc`@.
noTreeSelectionForeachFunc :: Maybe TreeSelectionForeachFunc
noTreeSelectionForeachFunc :: Maybe TreeSelectionForeachFunc
noTreeSelectionForeachFunc = Maybe TreeSelectionForeachFunc
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.TreeSelection.treeSelectionSelectedForeach' to map all
-- selected rows.  It will be called on every selected row in the view.
type TreeSelectionForeachFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being viewed
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to a selected row
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeSelectionForeachFunc_WithClosures`@.
noTreeSelectionForeachFunc_WithClosures :: Maybe TreeSelectionForeachFunc_WithClosures
noTreeSelectionForeachFunc_WithClosures :: Maybe TreeSelectionForeachFunc_WithClosures
noTreeSelectionForeachFunc_WithClosures = Maybe TreeSelectionForeachFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeSelectionForeachFunc :: TreeSelectionForeachFunc -> TreeSelectionForeachFunc_WithClosures
drop_closures_TreeSelectionForeachFunc :: TreeSelectionForeachFunc -> TreeSelectionForeachFunc_WithClosures
drop_closures_TreeSelectionForeachFunc _f :: TreeSelectionForeachFunc
_f model :: TreeModel
model path :: TreePath
path iter :: TreeIter
iter _ = TreeSelectionForeachFunc
_f TreeModel
model TreePath
path TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeSelectionForeachFunc :: MonadIO m => TreeSelectionForeachFunc -> m (GClosure C_TreeSelectionForeachFunc)
genClosure_TreeSelectionForeachFunc :: TreeSelectionForeachFunc -> m (GClosure C_TreeSelectionForeachFunc)
genClosure_TreeSelectionForeachFunc cb :: TreeSelectionForeachFunc
cb = IO (GClosure C_TreeSelectionForeachFunc)
-> m (GClosure C_TreeSelectionForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeSelectionForeachFunc)
 -> m (GClosure C_TreeSelectionForeachFunc))
-> IO (GClosure C_TreeSelectionForeachFunc)
-> m (GClosure C_TreeSelectionForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeSelectionForeachFunc_WithClosures
cb' = TreeSelectionForeachFunc -> TreeSelectionForeachFunc_WithClosures
drop_closures_TreeSelectionForeachFunc TreeSelectionForeachFunc
cb
    let cb'' :: C_TreeSelectionForeachFunc
cb'' = Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc))
-> TreeSelectionForeachFunc_WithClosures
-> C_TreeSelectionForeachFunc
wrap_TreeSelectionForeachFunc Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc))
forall a. Maybe a
Nothing TreeSelectionForeachFunc_WithClosures
cb'
    C_TreeSelectionForeachFunc
-> IO (FunPtr C_TreeSelectionForeachFunc)
mk_TreeSelectionForeachFunc C_TreeSelectionForeachFunc
cb'' IO (FunPtr C_TreeSelectionForeachFunc)
-> (FunPtr C_TreeSelectionForeachFunc
    -> IO (GClosure C_TreeSelectionForeachFunc))
-> IO (GClosure C_TreeSelectionForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeSelectionForeachFunc
-> IO (GClosure C_TreeSelectionForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeSelectionForeachFunc` into a `C_TreeSelectionForeachFunc`.
wrap_TreeSelectionForeachFunc ::
    Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc)) ->
    TreeSelectionForeachFunc_WithClosures ->
    C_TreeSelectionForeachFunc
wrap_TreeSelectionForeachFunc :: Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc))
-> TreeSelectionForeachFunc_WithClosures
-> C_TreeSelectionForeachFunc
wrap_TreeSelectionForeachFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc))
funptrptr _cb :: TreeSelectionForeachFunc_WithClosures
_cb model :: Ptr TreeModel
model path :: Ptr TreePath
path iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
        (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
            TreeSelectionForeachFunc_WithClosures
_cb  TreeModel
model' TreePath
path' TreeIter
iter' Ptr ()
data_
            Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeSelectionForeachFunc))
funptrptr


-- callback TreeModelForeachFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE to stop iterating, %FALSE to continue", sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModel being iterated", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gtk", name = "TreePath"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the current #GtkTreePath", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the current #GtkTreeIter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "The user data passed to gtk_tree_model_foreach()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Type of the callback passed to gtk_tree_model_foreach() to\niterate over the rows in a tree model.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeModelForeachFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreePath.TreePath ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkTreeModel being iterated"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreePath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the current #GtkTreePath"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the current #GtkTreeIter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The user data passed to gtk_tree_model_foreach()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeModelForeachFunc :: FunPtr C_TreeModelForeachFunc -> C_TreeModelForeachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeModelForeachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeModelForeachFunc
    -> a
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being iterated
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: the current t'GI.Gtk.Structs.TreePath.TreePath'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: the current t'GI.Gtk.Structs.TreeIter.TreeIter'
    -> Ptr ()
    -- ^ /@data@/: The user data passed to 'GI.Gtk.Interfaces.TreeModel.treeModelForeach'
    -> m Bool
    -- ^ __Returns:__ 'P.True' to stop iterating, 'P.False' to continue
dynamic_TreeModelForeachFunc :: FunPtr C_TreeModelForeachFunc
-> a -> TreePath -> TreeIter -> Ptr () -> m Bool
dynamic_TreeModelForeachFunc __funPtr :: FunPtr C_TreeModelForeachFunc
__funPtr model :: a
model path :: TreePath
path iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    CInt
result <- (FunPtr C_TreeModelForeachFunc -> C_TreeModelForeachFunc
__dynamic_C_TreeModelForeachFunc FunPtr C_TreeModelForeachFunc
__funPtr) Ptr TreeModel
model' Ptr TreePath
path' Ptr TreeIter
iter' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | Type of the callback passed to 'GI.Gtk.Interfaces.TreeModel.treeModelForeach' to
-- iterate over the rows in a tree model.
type TreeModelForeachFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being iterated
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: the current t'GI.Gtk.Structs.TreePath.TreePath'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: the current t'GI.Gtk.Structs.TreeIter.TreeIter'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating, 'P.False' to continue

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelForeachFunc`@.
noTreeModelForeachFunc :: Maybe TreeModelForeachFunc
noTreeModelForeachFunc :: Maybe TreeModelForeachFunc
noTreeModelForeachFunc = Maybe TreeModelForeachFunc
forall a. Maybe a
Nothing

-- | Type of the callback passed to 'GI.Gtk.Interfaces.TreeModel.treeModelForeach' to
-- iterate over the rows in a tree model.
type TreeModelForeachFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Interfaces.TreeModel.TreeModel' being iterated
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: the current t'GI.Gtk.Structs.TreePath.TreePath'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: the current t'GI.Gtk.Structs.TreeIter.TreeIter'
    -> Ptr ()
    -- ^ /@data@/: The user data passed to 'GI.Gtk.Interfaces.TreeModel.treeModelForeach'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating, 'P.False' to continue

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelForeachFunc_WithClosures`@.
noTreeModelForeachFunc_WithClosures :: Maybe TreeModelForeachFunc_WithClosures
noTreeModelForeachFunc_WithClosures :: Maybe TreeModelForeachFunc_WithClosures
noTreeModelForeachFunc_WithClosures = Maybe TreeModelForeachFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeModelForeachFunc :: TreeModelForeachFunc -> TreeModelForeachFunc_WithClosures
drop_closures_TreeModelForeachFunc :: TreeModelForeachFunc -> TreeModelForeachFunc_WithClosures
drop_closures_TreeModelForeachFunc _f :: TreeModelForeachFunc
_f model :: TreeModel
model path :: TreePath
path iter :: TreeIter
iter _ = TreeModelForeachFunc
_f TreeModel
model TreePath
path TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeModelForeachFunc :: MonadIO m => TreeModelForeachFunc -> m (GClosure C_TreeModelForeachFunc)
genClosure_TreeModelForeachFunc :: TreeModelForeachFunc -> m (GClosure C_TreeModelForeachFunc)
genClosure_TreeModelForeachFunc cb :: TreeModelForeachFunc
cb = IO (GClosure C_TreeModelForeachFunc)
-> m (GClosure C_TreeModelForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelForeachFunc)
 -> m (GClosure C_TreeModelForeachFunc))
-> IO (GClosure C_TreeModelForeachFunc)
-> m (GClosure C_TreeModelForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeModelForeachFunc_WithClosures
cb' = TreeModelForeachFunc -> TreeModelForeachFunc_WithClosures
drop_closures_TreeModelForeachFunc TreeModelForeachFunc
cb
    let cb'' :: C_TreeModelForeachFunc
cb'' = Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
-> TreeModelForeachFunc_WithClosures -> C_TreeModelForeachFunc
wrap_TreeModelForeachFunc Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
forall a. Maybe a
Nothing TreeModelForeachFunc_WithClosures
cb'
    C_TreeModelForeachFunc -> IO (FunPtr C_TreeModelForeachFunc)
mk_TreeModelForeachFunc C_TreeModelForeachFunc
cb'' IO (FunPtr C_TreeModelForeachFunc)
-> (FunPtr C_TreeModelForeachFunc
    -> IO (GClosure C_TreeModelForeachFunc))
-> IO (GClosure C_TreeModelForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelForeachFunc
-> IO (GClosure C_TreeModelForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeModelForeachFunc` into a `C_TreeModelForeachFunc`.
wrap_TreeModelForeachFunc ::
    Maybe (Ptr (FunPtr C_TreeModelForeachFunc)) ->
    TreeModelForeachFunc_WithClosures ->
    C_TreeModelForeachFunc
wrap_TreeModelForeachFunc :: Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
-> TreeModelForeachFunc_WithClosures -> C_TreeModelForeachFunc
wrap_TreeModelForeachFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
funptrptr _cb :: TreeModelForeachFunc_WithClosures
_cb model :: Ptr TreeModel
model path :: Ptr TreePath
path iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO CInt) -> IO CInt)
-> (TreePath -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
        (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO CInt) -> IO CInt)
-> (TreeIter -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
            Bool
result <- TreeModelForeachFunc_WithClosures
_cb  TreeModel
model' TreePath
path' TreeIter
iter' Ptr ()
data_
            Maybe (Ptr (FunPtr C_TreeModelForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
funptrptr
            let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
            CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeModelFilterVisibleFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "Whether the row indicated by @iter is visible.", sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the child model of the #GtkTreeModelFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter pointing to the row in @model whose visibility\n  is determined", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data given to gtk_tree_model_filter_set_visible_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function which decides whether the row indicated by @iter is visible.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeModelFilterVisibleFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the child model of the #GtkTreeModelFilter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkTreeIter pointing to the row in @model whose visibility\n  is determined"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data given to gtk_tree_model_filter_set_visible_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeModelFilterVisibleFunc :: FunPtr C_TreeModelFilterVisibleFunc -> C_TreeModelFilterVisibleFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeModelFilterVisibleFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeModelFilterVisibleFunc
    -> a
    -- ^ /@model@/: the child model of the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row in /@model@/ whose visibility
    --   is determined
    -> Ptr ()
    -- ^ /@data@/: user data given to 'GI.Gtk.Objects.TreeModelFilter.treeModelFilterSetVisibleFunc'
    -> m Bool
    -- ^ __Returns:__ Whether the row indicated by /@iter@/ is visible.
dynamic_TreeModelFilterVisibleFunc :: FunPtr C_TreeViewRowSeparatorFunc
-> a -> TreeIter -> Ptr () -> m Bool
dynamic_TreeModelFilterVisibleFunc __funPtr :: FunPtr C_TreeViewRowSeparatorFunc
__funPtr model :: a
model iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    CInt
result <- (FunPtr C_TreeViewRowSeparatorFunc -> C_TreeViewRowSeparatorFunc
__dynamic_C_TreeModelFilterVisibleFunc FunPtr C_TreeViewRowSeparatorFunc
__funPtr) Ptr TreeModel
model' Ptr TreeIter
iter' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | A function which decides whether the row indicated by /@iter@/ is visible.
type TreeModelFilterVisibleFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the child model of the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row in /@model@/ whose visibility
    --   is determined
    -> IO Bool
    -- ^ __Returns:__ Whether the row indicated by /@iter@/ is visible.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelFilterVisibleFunc`@.
noTreeModelFilterVisibleFunc :: Maybe TreeModelFilterVisibleFunc
noTreeModelFilterVisibleFunc :: Maybe TreeViewRowSeparatorFunc
noTreeModelFilterVisibleFunc = Maybe TreeViewRowSeparatorFunc
forall a. Maybe a
Nothing

-- | A function which decides whether the row indicated by /@iter@/ is visible.
type TreeModelFilterVisibleFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the child model of the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row in /@model@/ whose visibility
    --   is determined
    -> Ptr ()
    -- ^ /@data@/: user data given to 'GI.Gtk.Objects.TreeModelFilter.treeModelFilterSetVisibleFunc'
    -> IO Bool
    -- ^ __Returns:__ Whether the row indicated by /@iter@/ is visible.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelFilterVisibleFunc_WithClosures`@.
noTreeModelFilterVisibleFunc_WithClosures :: Maybe TreeModelFilterVisibleFunc_WithClosures
noTreeModelFilterVisibleFunc_WithClosures :: Maybe TreeViewRowSeparatorFunc_WithClosures
noTreeModelFilterVisibleFunc_WithClosures = Maybe TreeViewRowSeparatorFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeModelFilterVisibleFunc :: TreeModelFilterVisibleFunc -> TreeModelFilterVisibleFunc_WithClosures
drop_closures_TreeModelFilterVisibleFunc :: TreeViewRowSeparatorFunc -> TreeViewRowSeparatorFunc_WithClosures
drop_closures_TreeModelFilterVisibleFunc _f :: TreeViewRowSeparatorFunc
_f model :: TreeModel
model iter :: TreeIter
iter _ = TreeViewRowSeparatorFunc
_f TreeModel
model TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeModelFilterVisibleFunc :: MonadIO m => TreeModelFilterVisibleFunc -> m (GClosure C_TreeModelFilterVisibleFunc)
genClosure_TreeModelFilterVisibleFunc :: TreeViewRowSeparatorFunc -> m (GClosure C_TreeViewRowSeparatorFunc)
genClosure_TreeModelFilterVisibleFunc cb :: TreeViewRowSeparatorFunc
cb = IO (GClosure C_TreeViewRowSeparatorFunc)
-> m (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeViewRowSeparatorFunc)
 -> m (GClosure C_TreeViewRowSeparatorFunc))
-> IO (GClosure C_TreeViewRowSeparatorFunc)
-> m (GClosure C_TreeViewRowSeparatorFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeViewRowSeparatorFunc_WithClosures
cb' = TreeViewRowSeparatorFunc -> TreeViewRowSeparatorFunc_WithClosures
drop_closures_TreeModelFilterVisibleFunc TreeViewRowSeparatorFunc
cb
    let cb'' :: C_TreeViewRowSeparatorFunc
cb'' = Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
-> TreeViewRowSeparatorFunc_WithClosures
-> C_TreeViewRowSeparatorFunc
wrap_TreeModelFilterVisibleFunc Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
forall a. Maybe a
Nothing TreeViewRowSeparatorFunc_WithClosures
cb'
    C_TreeViewRowSeparatorFunc
-> IO (FunPtr C_TreeViewRowSeparatorFunc)
mk_TreeModelFilterVisibleFunc C_TreeViewRowSeparatorFunc
cb'' IO (FunPtr C_TreeViewRowSeparatorFunc)
-> (FunPtr C_TreeViewRowSeparatorFunc
    -> IO (GClosure C_TreeViewRowSeparatorFunc))
-> IO (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeViewRowSeparatorFunc
-> IO (GClosure C_TreeViewRowSeparatorFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeModelFilterVisibleFunc` into a `C_TreeModelFilterVisibleFunc`.
wrap_TreeModelFilterVisibleFunc ::
    Maybe (Ptr (FunPtr C_TreeModelFilterVisibleFunc)) ->
    TreeModelFilterVisibleFunc_WithClosures ->
    C_TreeModelFilterVisibleFunc
wrap_TreeModelFilterVisibleFunc :: Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
-> TreeViewRowSeparatorFunc_WithClosures
-> C_TreeViewRowSeparatorFunc
wrap_TreeModelFilterVisibleFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
funptrptr _cb :: TreeViewRowSeparatorFunc_WithClosures
_cb model :: Ptr TreeModel
model iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO CInt) -> IO CInt)
-> (TreeIter -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        Bool
result <- TreeViewRowSeparatorFunc_WithClosures
_cb  TreeModel
model' TreeIter
iter' Ptr ()
data_
        Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeViewRowSeparatorFunc))
funptrptr
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TreeModelFilterModifyFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModelFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter pointing to the row whose display values are determined", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GValue which is already initialized for\n with the correct type for the column @column.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "column", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the column whose display value is determined", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data given to gtk_tree_model_filter_set_modify_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function which calculates display values from raw values in the model.\nIt must fill @value with the display value for the column @column in the\nrow indicated by @iter.\n\nSince this function is called for each data access, it\8217s not a\nparticularly efficient operation.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeModelFilterModifyFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr GValue ->
    Int32 ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkTreeModelFilter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkTreeIter pointing to the row whose display values are determined"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Value" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "A #GValue which is already initialized for\n with the correct type for the column @column."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "column"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the column whose display value is determined"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data given to gtk_tree_model_filter_set_modify_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeModelFilterModifyFunc :: FunPtr C_TreeModelFilterModifyFunc -> C_TreeModelFilterModifyFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeModelFilterModifyFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeModelFilterModifyFunc
    -> a
    -- ^ /@model@/: the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row whose display values are determined
    -> GValue
    -- ^ /@value@/: A t'GI.GObject.Structs.Value.Value' which is already initialized for
    --  with the correct type for the column /@column@/.
    -> Int32
    -- ^ /@column@/: the column whose display value is determined
    -> Ptr ()
    -- ^ /@data@/: user data given to 'GI.Gtk.Objects.TreeModelFilter.treeModelFilterSetModifyFunc'
    -> m ()
dynamic_TreeModelFilterModifyFunc :: FunPtr C_TreeModelFilterModifyFunc
-> a -> TreeIter -> GValue -> Int32 -> Ptr () -> m ()
dynamic_TreeModelFilterModifyFunc __funPtr :: FunPtr C_TreeModelFilterModifyFunc
__funPtr model :: a
model iter :: TreeIter
iter value :: GValue
value column :: Int32
column data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    (FunPtr C_TreeModelFilterModifyFunc -> C_TreeModelFilterModifyFunc
__dynamic_C_TreeModelFilterModifyFunc FunPtr C_TreeModelFilterModifyFunc
__funPtr) Ptr TreeModel
model' Ptr TreeIter
iter' Ptr GValue
value' Int32
column Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function which calculates display values from raw values in the model.
-- It must fill /@value@/ with the display value for the column /@column@/ in the
-- row indicated by /@iter@/.
-- 
-- Since this function is called for each data access, it’s not a
-- particularly efficient operation.
type TreeModelFilterModifyFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row whose display values are determined
    -> GValue
    -- ^ /@value@/: A t'GI.GObject.Structs.Value.Value' which is already initialized for
    --  with the correct type for the column /@column@/.
    -> Int32
    -- ^ /@column@/: the column whose display value is determined
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelFilterModifyFunc`@.
noTreeModelFilterModifyFunc :: Maybe TreeModelFilterModifyFunc
noTreeModelFilterModifyFunc :: Maybe TreeModelFilterModifyFunc
noTreeModelFilterModifyFunc = Maybe TreeModelFilterModifyFunc
forall a. Maybe a
Nothing

-- | A function which calculates display values from raw values in the model.
-- It must fill /@value@/ with the display value for the column /@column@/ in the
-- row indicated by /@iter@/.
-- 
-- Since this function is called for each data access, it’s not a
-- particularly efficient operation.
type TreeModelFilterModifyFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: the t'GI.Gtk.Objects.TreeModelFilter.TreeModelFilter'
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' pointing to the row whose display values are determined
    -> GValue
    -- ^ /@value@/: A t'GI.GObject.Structs.Value.Value' which is already initialized for
    --  with the correct type for the column /@column@/.
    -> Int32
    -- ^ /@column@/: the column whose display value is determined
    -> Ptr ()
    -- ^ /@data@/: user data given to 'GI.Gtk.Objects.TreeModelFilter.treeModelFilterSetModifyFunc'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeModelFilterModifyFunc_WithClosures`@.
noTreeModelFilterModifyFunc_WithClosures :: Maybe TreeModelFilterModifyFunc_WithClosures
noTreeModelFilterModifyFunc_WithClosures :: Maybe TreeModelFilterModifyFunc_WithClosures
noTreeModelFilterModifyFunc_WithClosures = Maybe TreeModelFilterModifyFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeModelFilterModifyFunc :: TreeModelFilterModifyFunc -> TreeModelFilterModifyFunc_WithClosures
drop_closures_TreeModelFilterModifyFunc :: TreeModelFilterModifyFunc -> TreeModelFilterModifyFunc_WithClosures
drop_closures_TreeModelFilterModifyFunc _f :: TreeModelFilterModifyFunc
_f model :: TreeModel
model iter :: TreeIter
iter value :: GValue
value column :: Int32
column _ = TreeModelFilterModifyFunc
_f TreeModel
model TreeIter
iter GValue
value Int32
column

-- | Wrap the callback into a `GClosure`.
genClosure_TreeModelFilterModifyFunc :: MonadIO m => TreeModelFilterModifyFunc -> m (GClosure C_TreeModelFilterModifyFunc)
genClosure_TreeModelFilterModifyFunc :: TreeModelFilterModifyFunc
-> m (GClosure C_TreeModelFilterModifyFunc)
genClosure_TreeModelFilterModifyFunc cb :: TreeModelFilterModifyFunc
cb = IO (GClosure C_TreeModelFilterModifyFunc)
-> m (GClosure C_TreeModelFilterModifyFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelFilterModifyFunc)
 -> m (GClosure C_TreeModelFilterModifyFunc))
-> IO (GClosure C_TreeModelFilterModifyFunc)
-> m (GClosure C_TreeModelFilterModifyFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeModelFilterModifyFunc_WithClosures
cb' = TreeModelFilterModifyFunc -> TreeModelFilterModifyFunc_WithClosures
drop_closures_TreeModelFilterModifyFunc TreeModelFilterModifyFunc
cb
    let cb'' :: C_TreeModelFilterModifyFunc
cb'' = Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc))
-> TreeModelFilterModifyFunc_WithClosures
-> C_TreeModelFilterModifyFunc
wrap_TreeModelFilterModifyFunc Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc))
forall a. Maybe a
Nothing TreeModelFilterModifyFunc_WithClosures
cb'
    C_TreeModelFilterModifyFunc
-> IO (FunPtr C_TreeModelFilterModifyFunc)
mk_TreeModelFilterModifyFunc C_TreeModelFilterModifyFunc
cb'' IO (FunPtr C_TreeModelFilterModifyFunc)
-> (FunPtr C_TreeModelFilterModifyFunc
    -> IO (GClosure C_TreeModelFilterModifyFunc))
-> IO (GClosure C_TreeModelFilterModifyFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelFilterModifyFunc
-> IO (GClosure C_TreeModelFilterModifyFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeModelFilterModifyFunc` into a `C_TreeModelFilterModifyFunc`.
wrap_TreeModelFilterModifyFunc ::
    Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc)) ->
    TreeModelFilterModifyFunc_WithClosures ->
    C_TreeModelFilterModifyFunc
wrap_TreeModelFilterModifyFunc :: Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc))
-> TreeModelFilterModifyFunc_WithClosures
-> C_TreeModelFilterModifyFunc
wrap_TreeModelFilterModifyFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc))
funptrptr _cb :: TreeModelFilterModifyFunc_WithClosures
_cb model :: Ptr TreeModel
model iter :: Ptr TreeIter
iter value :: Ptr GValue
value column :: Int32
column data_ :: Ptr ()
data_ = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        (ManagedPtr GValue -> GValue)
-> Ptr GValue -> (GValue -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr GValue -> GValue
GValue Ptr GValue
value ((GValue -> IO ()) -> IO ()) -> (GValue -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \value' :: GValue
value' -> do
            TreeModelFilterModifyFunc_WithClosures
_cb  TreeModel
model' TreeIter
iter' GValue
value' Int32
column Ptr ()
data_
            Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeModelFilterModifyFunc))
funptrptr


-- callback TreeIterCompareFunc
--          -> Callable {returnType = Just (TBasicType TInt), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "a negative integer, zero or a positive integer depending on whether\n  @a sorts before, with or after @b", sinceVersion = Nothing}, args = [Arg {argCName = "model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreeModel the comparison is within", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "a", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeIter in @model", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "b", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Another #GtkTreeIter in @model", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "Data passed when the compare func is assigned e.g. by\n gtk_tree_sortable_set_sort_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive\ninteger if @a sorts before @b, @a sorts with @b, or @a sorts after @b\nrespectively. If two iters compare as equal, their order in the sorted model\nis undefined. In order to ensure that the #GtkTreeSortable behaves as\nexpected, the GtkTreeIterCompareFunc must define a partial order on\nthe model, i.e. it must be reflexive, antisymmetric and transitive.\n\nFor example, if @model is a product catalogue, then a compare function\nfor the \8220price\8221 column could be one which returns\n`price_of(@a) - price_of(@b)`.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeIterCompareFunc =
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreeModel the comparison is within"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "a"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeIter in @model"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "b"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Another #GtkTreeIter in @model"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Data passed when the compare func is assigned e.g. by\n gtk_tree_sortable_set_sort_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeIterCompareFunc :: FunPtr C_TreeIterCompareFunc -> C_TreeIterCompareFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeIterCompareFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
    FunPtr C_TreeIterCompareFunc
    -> a
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' the comparison is within
    -> Gtk.TreeIter.TreeIter
    -- ^ /@a@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> Gtk.TreeIter.TreeIter
    -- ^ /@b@/: Another t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> Ptr ()
    -- ^ /@userData@/: Data passed when the compare func is assigned e.g. by
    --  'GI.Gtk.Interfaces.TreeSortable.treeSortableSetSortFunc'
    -> m Int32
    -- ^ __Returns:__ a negative integer, zero or a positive integer depending on whether
    --   /@a@/ sorts before, with or after /@b@/
dynamic_TreeIterCompareFunc :: FunPtr C_TreeIterCompareFunc
-> a -> TreeIter -> TreeIter -> Ptr () -> m Int32
dynamic_TreeIterCompareFunc __funPtr :: FunPtr C_TreeIterCompareFunc
__funPtr model :: a
model a :: TreeIter
a b :: TreeIter
b userData :: Ptr ()
userData = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
    Ptr TreeIter
a' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
a
    Ptr TreeIter
b' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
b
    Int32
result <- (FunPtr C_TreeIterCompareFunc -> C_TreeIterCompareFunc
__dynamic_C_TreeIterCompareFunc FunPtr C_TreeIterCompareFunc
__funPtr) Ptr TreeModel
model' Ptr TreeIter
a' Ptr TreeIter
b' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
a
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
b
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

-- | A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
-- integer if /@a@/ sorts before /@b@/, /@a@/ sorts with /@b@/, or /@a@/ sorts after /@b@/
-- respectively. If two iters compare as equal, their order in the sorted model
-- is undefined. In order to ensure that the t'GI.Gtk.Interfaces.TreeSortable.TreeSortable' behaves as
-- expected, the GtkTreeIterCompareFunc must define a partial order on
-- the model, i.e. it must be reflexive, antisymmetric and transitive.
-- 
-- For example, if /@model@/ is a product catalogue, then a compare function
-- for the “price” column could be one which returns
-- @price_of(\@a) - price_of(\@b)@.
type TreeIterCompareFunc =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' the comparison is within
    -> Gtk.TreeIter.TreeIter
    -- ^ /@a@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> Gtk.TreeIter.TreeIter
    -- ^ /@b@/: Another t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> IO Int32
    -- ^ __Returns:__ a negative integer, zero or a positive integer depending on whether
    --   /@a@/ sorts before, with or after /@b@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeIterCompareFunc`@.
noTreeIterCompareFunc :: Maybe TreeIterCompareFunc
noTreeIterCompareFunc :: Maybe TreeIterCompareFunc
noTreeIterCompareFunc = Maybe TreeIterCompareFunc
forall a. Maybe a
Nothing

-- | A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
-- integer if /@a@/ sorts before /@b@/, /@a@/ sorts with /@b@/, or /@a@/ sorts after /@b@/
-- respectively. If two iters compare as equal, their order in the sorted model
-- is undefined. In order to ensure that the t'GI.Gtk.Interfaces.TreeSortable.TreeSortable' behaves as
-- expected, the GtkTreeIterCompareFunc must define a partial order on
-- the model, i.e. it must be reflexive, antisymmetric and transitive.
-- 
-- For example, if /@model@/ is a product catalogue, then a compare function
-- for the “price” column could be one which returns
-- @price_of(\@a) - price_of(\@b)@.
type TreeIterCompareFunc_WithClosures =
    Gtk.TreeModel.TreeModel
    -- ^ /@model@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' the comparison is within
    -> Gtk.TreeIter.TreeIter
    -- ^ /@a@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> Gtk.TreeIter.TreeIter
    -- ^ /@b@/: Another t'GI.Gtk.Structs.TreeIter.TreeIter' in /@model@/
    -> Ptr ()
    -- ^ /@userData@/: Data passed when the compare func is assigned e.g. by
    --  'GI.Gtk.Interfaces.TreeSortable.treeSortableSetSortFunc'
    -> IO Int32
    -- ^ __Returns:__ a negative integer, zero or a positive integer depending on whether
    --   /@a@/ sorts before, with or after /@b@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeIterCompareFunc_WithClosures`@.
noTreeIterCompareFunc_WithClosures :: Maybe TreeIterCompareFunc_WithClosures
noTreeIterCompareFunc_WithClosures :: Maybe TreeIterCompareFunc_WithClosures
noTreeIterCompareFunc_WithClosures = Maybe TreeIterCompareFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeIterCompareFunc :: TreeIterCompareFunc -> TreeIterCompareFunc_WithClosures
drop_closures_TreeIterCompareFunc :: TreeIterCompareFunc -> TreeIterCompareFunc_WithClosures
drop_closures_TreeIterCompareFunc _f :: TreeIterCompareFunc
_f model :: TreeModel
model a :: TreeIter
a b :: TreeIter
b _ = TreeIterCompareFunc
_f TreeModel
model TreeIter
a TreeIter
b

-- | Wrap the callback into a `GClosure`.
genClosure_TreeIterCompareFunc :: MonadIO m => TreeIterCompareFunc -> m (GClosure C_TreeIterCompareFunc)
genClosure_TreeIterCompareFunc :: TreeIterCompareFunc -> m (GClosure C_TreeIterCompareFunc)
genClosure_TreeIterCompareFunc cb :: TreeIterCompareFunc
cb = IO (GClosure C_TreeIterCompareFunc)
-> m (GClosure C_TreeIterCompareFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeIterCompareFunc)
 -> m (GClosure C_TreeIterCompareFunc))
-> IO (GClosure C_TreeIterCompareFunc)
-> m (GClosure C_TreeIterCompareFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeIterCompareFunc_WithClosures
cb' = TreeIterCompareFunc -> TreeIterCompareFunc_WithClosures
drop_closures_TreeIterCompareFunc TreeIterCompareFunc
cb
    let cb'' :: C_TreeIterCompareFunc
cb'' = Maybe (Ptr (FunPtr C_TreeIterCompareFunc))
-> TreeIterCompareFunc_WithClosures -> C_TreeIterCompareFunc
wrap_TreeIterCompareFunc Maybe (Ptr (FunPtr C_TreeIterCompareFunc))
forall a. Maybe a
Nothing TreeIterCompareFunc_WithClosures
cb'
    C_TreeIterCompareFunc -> IO (FunPtr C_TreeIterCompareFunc)
mk_TreeIterCompareFunc C_TreeIterCompareFunc
cb'' IO (FunPtr C_TreeIterCompareFunc)
-> (FunPtr C_TreeIterCompareFunc
    -> IO (GClosure C_TreeIterCompareFunc))
-> IO (GClosure C_TreeIterCompareFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeIterCompareFunc -> IO (GClosure C_TreeIterCompareFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeIterCompareFunc` into a `C_TreeIterCompareFunc`.
wrap_TreeIterCompareFunc ::
    Maybe (Ptr (FunPtr C_TreeIterCompareFunc)) ->
    TreeIterCompareFunc_WithClosures ->
    C_TreeIterCompareFunc
wrap_TreeIterCompareFunc :: Maybe (Ptr (FunPtr C_TreeIterCompareFunc))
-> TreeIterCompareFunc_WithClosures -> C_TreeIterCompareFunc
wrap_TreeIterCompareFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeIterCompareFunc))
funptrptr _cb :: TreeIterCompareFunc_WithClosures
_cb model :: Ptr TreeModel
model a :: Ptr TreeIter
a b :: Ptr TreeIter
b userData :: Ptr ()
userData = do
    TreeModel
model' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
model
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
a ((TreeIter -> IO Int32) -> IO Int32)
-> (TreeIter -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \a' :: TreeIter
a' -> do
        (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO Int32) -> IO Int32
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
b ((TreeIter -> IO Int32) -> IO Int32)
-> (TreeIter -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \b' :: TreeIter
b' -> do
            Int32
result <- TreeIterCompareFunc_WithClosures
_cb  TreeModel
model' TreeIter
a' TreeIter
b' Ptr ()
userData
            Maybe (Ptr (FunPtr C_TreeIterCompareFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeIterCompareFunc))
funptrptr
            Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback TreeCellDataFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "tree_column", argType = TInterface (Name {namespace = "Gtk", name = "TreeViewColumn"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeViewColumn", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkCellRenderer that is being rendered by @tree_column", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree_model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreeModel being rendered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkTreeIter of the current row rendered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function to set the properties of a cell instead of just using the\nstraight mapping between the cell and the model.  This is useful for\ncustomizing the cell renderer.  For example, a function might get an\ninteger from the @tree_model, and render it to the \8220text\8221 attribute of\n\8220cell\8221 by converting it to its written equivalent.  This is set by\ncalling gtk_tree_view_column_set_cell_data_func()", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TreeCellDataFunc =
    Ptr Gtk.TreeViewColumn.TreeViewColumn ->
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "tree_column"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeViewColumn" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeViewColumn"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cell"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "CellRenderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The #GtkCellRenderer that is being rendered by @tree_column"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tree_model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreeModel being rendered"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkTreeIter of the current row rendered"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TreeCellDataFunc :: FunPtr C_TreeCellDataFunc -> C_TreeCellDataFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TreeCellDataFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TreeViewColumn.IsTreeViewColumn a, Gtk.CellRenderer.IsCellRenderer b, Gtk.TreeModel.IsTreeModel c) =>
    FunPtr C_TreeCellDataFunc
    -> a
    -- ^ /@treeColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn'
    -> b
    -- ^ /@cell@/: The t'GI.Gtk.Objects.CellRenderer.CellRenderer' that is being rendered by /@treeColumn@/
    -> c
    -- ^ /@treeModel@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being rendered
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' of the current row rendered
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m ()
dynamic_TreeCellDataFunc :: FunPtr C_TreeCellDataFunc
-> a -> b -> c -> TreeIter -> Ptr () -> m ()
dynamic_TreeCellDataFunc __funPtr :: FunPtr C_TreeCellDataFunc
__funPtr treeColumn :: a
treeColumn cell :: b
cell treeModel :: c
treeModel iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TreeViewColumn
treeColumn' <- a -> IO (Ptr TreeViewColumn)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeColumn
    Ptr CellRenderer
cell' <- b -> IO (Ptr CellRenderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cell
    Ptr TreeModel
treeModel' <- c -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
treeModel
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    (FunPtr C_TreeCellDataFunc -> C_TreeCellDataFunc
__dynamic_C_TreeCellDataFunc FunPtr C_TreeCellDataFunc
__funPtr) Ptr TreeViewColumn
treeColumn' Ptr CellRenderer
cell' Ptr TreeModel
treeModel' Ptr TreeIter
iter' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeColumn
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cell
    c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
treeModel
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function to set the properties of a cell instead of just using the
-- straight mapping between the cell and the model.  This is useful for
-- customizing the cell renderer.  For example, a function might get an
-- integer from the /@treeModel@/, and render it to the “text” attribute of
-- “cell” by converting it to its written equivalent.  This is set by
-- calling 'GI.Gtk.Objects.TreeViewColumn.treeViewColumnSetCellDataFunc'
type TreeCellDataFunc =
    Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@treeColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn'
    -> Gtk.CellRenderer.CellRenderer
    -- ^ /@cell@/: The t'GI.Gtk.Objects.CellRenderer.CellRenderer' that is being rendered by /@treeColumn@/
    -> Gtk.TreeModel.TreeModel
    -- ^ /@treeModel@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being rendered
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' of the current row rendered
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeCellDataFunc`@.
noTreeCellDataFunc :: Maybe TreeCellDataFunc
noTreeCellDataFunc :: Maybe TreeCellDataFunc
noTreeCellDataFunc = Maybe TreeCellDataFunc
forall a. Maybe a
Nothing

-- | A function to set the properties of a cell instead of just using the
-- straight mapping between the cell and the model.  This is useful for
-- customizing the cell renderer.  For example, a function might get an
-- integer from the /@treeModel@/, and render it to the “text” attribute of
-- “cell” by converting it to its written equivalent.  This is set by
-- calling 'GI.Gtk.Objects.TreeViewColumn.treeViewColumnSetCellDataFunc'
type TreeCellDataFunc_WithClosures =
    Gtk.TreeViewColumn.TreeViewColumn
    -- ^ /@treeColumn@/: A t'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn'
    -> Gtk.CellRenderer.CellRenderer
    -- ^ /@cell@/: The t'GI.Gtk.Objects.CellRenderer.CellRenderer' that is being rendered by /@treeColumn@/
    -> Gtk.TreeModel.TreeModel
    -- ^ /@treeModel@/: The t'GI.Gtk.Interfaces.TreeModel.TreeModel' being rendered
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: A t'GI.Gtk.Structs.TreeIter.TreeIter' of the current row rendered
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TreeCellDataFunc_WithClosures`@.
noTreeCellDataFunc_WithClosures :: Maybe TreeCellDataFunc_WithClosures
noTreeCellDataFunc_WithClosures :: Maybe TreeCellDataFunc_WithClosures
noTreeCellDataFunc_WithClosures = Maybe TreeCellDataFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TreeCellDataFunc :: TreeCellDataFunc -> TreeCellDataFunc_WithClosures
drop_closures_TreeCellDataFunc :: TreeCellDataFunc -> TreeCellDataFunc_WithClosures
drop_closures_TreeCellDataFunc _f :: TreeCellDataFunc
_f treeColumn :: TreeViewColumn
treeColumn cell :: CellRenderer
cell treeModel :: TreeModel
treeModel iter :: TreeIter
iter _ = TreeCellDataFunc
_f TreeViewColumn
treeColumn CellRenderer
cell TreeModel
treeModel TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_TreeCellDataFunc :: MonadIO m => TreeCellDataFunc -> m (GClosure C_TreeCellDataFunc)
genClosure_TreeCellDataFunc :: TreeCellDataFunc -> m (GClosure C_TreeCellDataFunc)
genClosure_TreeCellDataFunc cb :: TreeCellDataFunc
cb = IO (GClosure C_TreeCellDataFunc) -> m (GClosure C_TreeCellDataFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeCellDataFunc)
 -> m (GClosure C_TreeCellDataFunc))
-> IO (GClosure C_TreeCellDataFunc)
-> m (GClosure C_TreeCellDataFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TreeCellDataFunc_WithClosures
cb' = TreeCellDataFunc -> TreeCellDataFunc_WithClosures
drop_closures_TreeCellDataFunc TreeCellDataFunc
cb
    let cb'' :: C_TreeCellDataFunc
cb'' = Maybe (Ptr (FunPtr C_TreeCellDataFunc))
-> TreeCellDataFunc_WithClosures -> C_TreeCellDataFunc
wrap_TreeCellDataFunc Maybe (Ptr (FunPtr C_TreeCellDataFunc))
forall a. Maybe a
Nothing TreeCellDataFunc_WithClosures
cb'
    C_TreeCellDataFunc -> IO (FunPtr C_TreeCellDataFunc)
mk_TreeCellDataFunc C_TreeCellDataFunc
cb'' IO (FunPtr C_TreeCellDataFunc)
-> (FunPtr C_TreeCellDataFunc -> IO (GClosure C_TreeCellDataFunc))
-> IO (GClosure C_TreeCellDataFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeCellDataFunc -> IO (GClosure C_TreeCellDataFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TreeCellDataFunc` into a `C_TreeCellDataFunc`.
wrap_TreeCellDataFunc ::
    Maybe (Ptr (FunPtr C_TreeCellDataFunc)) ->
    TreeCellDataFunc_WithClosures ->
    C_TreeCellDataFunc
wrap_TreeCellDataFunc :: Maybe (Ptr (FunPtr C_TreeCellDataFunc))
-> TreeCellDataFunc_WithClosures -> C_TreeCellDataFunc
wrap_TreeCellDataFunc funptrptr :: Maybe (Ptr (FunPtr C_TreeCellDataFunc))
funptrptr _cb :: TreeCellDataFunc_WithClosures
_cb treeColumn :: Ptr TreeViewColumn
treeColumn cell :: Ptr CellRenderer
cell treeModel :: Ptr TreeModel
treeModel iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    TreeViewColumn
treeColumn' <- ((ManagedPtr TreeViewColumn -> TreeViewColumn)
-> Ptr TreeViewColumn -> IO TreeViewColumn
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeViewColumn -> TreeViewColumn
Gtk.TreeViewColumn.TreeViewColumn) Ptr TreeViewColumn
treeColumn
    CellRenderer
cell' <- ((ManagedPtr CellRenderer -> CellRenderer)
-> Ptr CellRenderer -> IO CellRenderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CellRenderer -> CellRenderer
Gtk.CellRenderer.CellRenderer) Ptr CellRenderer
cell
    TreeModel
treeModel' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
treeModel
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        TreeCellDataFunc_WithClosures
_cb  TreeViewColumn
treeColumn' CellRenderer
cell' TreeModel
treeModel' TreeIter
iter' Ptr ()
data_
        Maybe (Ptr (FunPtr C_TreeCellDataFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TreeCellDataFunc))
funptrptr


-- callback TickCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%G_SOURCE_CONTINUE if the tick callback should continue to be called,\n %G_SOURCE_REMOVE if the tick callback should be removed.", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frame clock for the widget (same as calling gtk_widget_get_frame_clock())", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to gtk_widget_add_tick_callback().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Callback type for adding a function to update animations. See gtk_widget_add_tick_callback().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TickCallback =
    Ptr Gtk.Widget.Widget ->
    Ptr Gdk.FrameClock.FrameClock ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "frame_clock"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "FrameClock" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the frame clock for the widget (same as calling gtk_widget_get_frame_clock())"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data passed to gtk_widget_add_tick_callback()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TickCallback :: FunPtr C_TickCallback -> C_TickCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TickCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gdk.FrameClock.IsFrameClock b) =>
    FunPtr C_TickCallback
    -> a
    -- ^ /@widget@/: the widget
    -> b
    -- ^ /@frameClock@/: the frame clock for the widget (same as calling 'GI.Gtk.Objects.Widget.widgetGetFrameClock')
    -> Ptr ()
    -- ^ /@userData@/: user data passed to 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
    -> m Bool
    -- ^ __Returns:__ 'GI.GLib.Constants.SOURCE_CONTINUE' if the tick callback should continue to be called,
    --  'GI.GLib.Constants.SOURCE_REMOVE' if the tick callback should be removed.
dynamic_TickCallback :: FunPtr C_TickCallback -> a -> b -> Ptr () -> m Bool
dynamic_TickCallback __funPtr :: FunPtr C_TickCallback
__funPtr widget :: a
widget frameClock :: b
frameClock userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FrameClock
frameClock' <- b -> IO (Ptr FrameClock)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
frameClock
    CInt
result <- (FunPtr C_TickCallback -> C_TickCallback
__dynamic_C_TickCallback FunPtr C_TickCallback
__funPtr) Ptr Widget
widget' Ptr FrameClock
frameClock' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
frameClock
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | Callback type for adding a function to update animations. See 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
type TickCallback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget
    -> Gdk.FrameClock.FrameClock
    -- ^ /@frameClock@/: the frame clock for the widget (same as calling 'GI.Gtk.Objects.Widget.widgetGetFrameClock')
    -> IO Bool
    -- ^ __Returns:__ 'GI.GLib.Constants.SOURCE_CONTINUE' if the tick callback should continue to be called,
    --  'GI.GLib.Constants.SOURCE_REMOVE' if the tick callback should be removed.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TickCallback`@.
noTickCallback :: Maybe TickCallback
noTickCallback :: Maybe TickCallback
noTickCallback = Maybe TickCallback
forall a. Maybe a
Nothing

-- | Callback type for adding a function to update animations. See 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
type TickCallback_WithClosures =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget
    -> Gdk.FrameClock.FrameClock
    -- ^ /@frameClock@/: the frame clock for the widget (same as calling 'GI.Gtk.Objects.Widget.widgetGetFrameClock')
    -> Ptr ()
    -- ^ /@userData@/: user data passed to 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
    -> IO Bool
    -- ^ __Returns:__ 'GI.GLib.Constants.SOURCE_CONTINUE' if the tick callback should continue to be called,
    --  'GI.GLib.Constants.SOURCE_REMOVE' if the tick callback should be removed.

-- | A convenience synonym for @`Nothing` :: `Maybe` `TickCallback_WithClosures`@.
noTickCallback_WithClosures :: Maybe TickCallback_WithClosures
noTickCallback_WithClosures :: Maybe TickCallback_WithClosures
noTickCallback_WithClosures = Maybe TickCallback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TickCallback :: TickCallback -> TickCallback_WithClosures
drop_closures_TickCallback :: TickCallback -> TickCallback_WithClosures
drop_closures_TickCallback _f :: TickCallback
_f widget :: Widget
widget frameClock :: FrameClock
frameClock _ = TickCallback
_f Widget
widget FrameClock
frameClock

-- | Wrap the callback into a `GClosure`.
genClosure_TickCallback :: MonadIO m => TickCallback -> m (GClosure C_TickCallback)
genClosure_TickCallback :: TickCallback -> m (GClosure C_TickCallback)
genClosure_TickCallback cb :: TickCallback
cb = IO (GClosure C_TickCallback) -> m (GClosure C_TickCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TickCallback) -> m (GClosure C_TickCallback))
-> IO (GClosure C_TickCallback) -> m (GClosure C_TickCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TickCallback_WithClosures
cb' = TickCallback -> TickCallback_WithClosures
drop_closures_TickCallback TickCallback
cb
    let cb'' :: C_TickCallback
cb'' = Maybe (Ptr (FunPtr C_TickCallback))
-> TickCallback_WithClosures -> C_TickCallback
wrap_TickCallback Maybe (Ptr (FunPtr C_TickCallback))
forall a. Maybe a
Nothing TickCallback_WithClosures
cb'
    C_TickCallback -> IO (FunPtr C_TickCallback)
mk_TickCallback C_TickCallback
cb'' IO (FunPtr C_TickCallback)
-> (FunPtr C_TickCallback -> IO (GClosure C_TickCallback))
-> IO (GClosure C_TickCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TickCallback -> IO (GClosure C_TickCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TickCallback` into a `C_TickCallback`.
wrap_TickCallback ::
    Maybe (Ptr (FunPtr C_TickCallback)) ->
    TickCallback_WithClosures ->
    C_TickCallback
wrap_TickCallback :: Maybe (Ptr (FunPtr C_TickCallback))
-> TickCallback_WithClosures -> C_TickCallback
wrap_TickCallback funptrptr :: Maybe (Ptr (FunPtr C_TickCallback))
funptrptr _cb :: TickCallback_WithClosures
_cb widget :: Ptr Widget
widget frameClock :: Ptr FrameClock
frameClock userData :: Ptr ()
userData = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    FrameClock
frameClock' <- ((ManagedPtr FrameClock -> FrameClock)
-> Ptr FrameClock -> IO FrameClock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock) Ptr FrameClock
frameClock
    Bool
result <- TickCallback_WithClosures
_cb  Widget
widget' FrameClock
frameClock' Ptr ()
userData
    Maybe (Ptr (FunPtr C_TickCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TickCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback TextTagTableForeach
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "tag", argType = TInterface (Name {namespace = "Gtk", name = "TextTag"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTextTag", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data passed to gtk_text_tag_table_foreach()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_TextTagTableForeach =
    Ptr Gtk.TextTag.TextTag ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "tag"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextTag" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkTextTag" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data passed to gtk_text_tag_table_foreach()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_TextTagTableForeach :: FunPtr C_TextTagTableForeach -> C_TextTagTableForeach

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TextTagTableForeach ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.TextTag.IsTextTag a) =>
    FunPtr C_TextTagTableForeach
    -> a
    -- ^ /@tag@/: the t'GI.Gtk.Objects.TextTag.TextTag'
    -> Ptr ()
    -- ^ /@data@/: data passed to 'GI.Gtk.Objects.TextTagTable.textTagTableForeach'
    -> m ()
dynamic_TextTagTableForeach :: FunPtr C_TextTagTableForeach -> a -> Ptr () -> m ()
dynamic_TextTagTableForeach __funPtr :: FunPtr C_TextTagTableForeach
__funPtr tag :: a
tag data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr TextTag
tag' <- a -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
tag
    (FunPtr C_TextTagTableForeach -> C_TextTagTableForeach
__dynamic_C_TextTagTableForeach FunPtr C_TextTagTableForeach
__funPtr) Ptr TextTag
tag' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
tag
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type TextTagTableForeach =
    Gtk.TextTag.TextTag
    -- ^ /@tag@/: the t'GI.Gtk.Objects.TextTag.TextTag'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TextTagTableForeach`@.
noTextTagTableForeach :: Maybe TextTagTableForeach
noTextTagTableForeach :: Maybe TextTagTableForeach
noTextTagTableForeach = Maybe TextTagTableForeach
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type TextTagTableForeach_WithClosures =
    Gtk.TextTag.TextTag
    -- ^ /@tag@/: the t'GI.Gtk.Objects.TextTag.TextTag'
    -> Ptr ()
    -- ^ /@data@/: data passed to 'GI.Gtk.Objects.TextTagTable.textTagTableForeach'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `TextTagTableForeach_WithClosures`@.
noTextTagTableForeach_WithClosures :: Maybe TextTagTableForeach_WithClosures
noTextTagTableForeach_WithClosures :: Maybe TextTagTableForeach_WithClosures
noTextTagTableForeach_WithClosures = Maybe TextTagTableForeach_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TextTagTableForeach :: TextTagTableForeach -> TextTagTableForeach_WithClosures
drop_closures_TextTagTableForeach :: TextTagTableForeach -> TextTagTableForeach_WithClosures
drop_closures_TextTagTableForeach _f :: TextTagTableForeach
_f tag :: TextTag
tag _ = TextTagTableForeach
_f TextTag
tag

-- | Wrap the callback into a `GClosure`.
genClosure_TextTagTableForeach :: MonadIO m => TextTagTableForeach -> m (GClosure C_TextTagTableForeach)
genClosure_TextTagTableForeach :: TextTagTableForeach -> m (GClosure C_TextTagTableForeach)
genClosure_TextTagTableForeach cb :: TextTagTableForeach
cb = IO (GClosure C_TextTagTableForeach)
-> m (GClosure C_TextTagTableForeach)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TextTagTableForeach)
 -> m (GClosure C_TextTagTableForeach))
-> IO (GClosure C_TextTagTableForeach)
-> m (GClosure C_TextTagTableForeach)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TextTagTableForeach_WithClosures
cb' = TextTagTableForeach -> TextTagTableForeach_WithClosures
drop_closures_TextTagTableForeach TextTagTableForeach
cb
    let cb'' :: C_TextTagTableForeach
cb'' = Maybe (Ptr (FunPtr C_TextTagTableForeach))
-> TextTagTableForeach_WithClosures -> C_TextTagTableForeach
wrap_TextTagTableForeach Maybe (Ptr (FunPtr C_TextTagTableForeach))
forall a. Maybe a
Nothing TextTagTableForeach_WithClosures
cb'
    C_TextTagTableForeach -> IO (FunPtr C_TextTagTableForeach)
mk_TextTagTableForeach C_TextTagTableForeach
cb'' IO (FunPtr C_TextTagTableForeach)
-> (FunPtr C_TextTagTableForeach
    -> IO (GClosure C_TextTagTableForeach))
-> IO (GClosure C_TextTagTableForeach)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TextTagTableForeach -> IO (GClosure C_TextTagTableForeach)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TextTagTableForeach` into a `C_TextTagTableForeach`.
wrap_TextTagTableForeach ::
    Maybe (Ptr (FunPtr C_TextTagTableForeach)) ->
    TextTagTableForeach_WithClosures ->
    C_TextTagTableForeach
wrap_TextTagTableForeach :: Maybe (Ptr (FunPtr C_TextTagTableForeach))
-> TextTagTableForeach_WithClosures -> C_TextTagTableForeach
wrap_TextTagTableForeach funptrptr :: Maybe (Ptr (FunPtr C_TextTagTableForeach))
funptrptr _cb :: TextTagTableForeach_WithClosures
_cb tag :: Ptr TextTag
tag data_ :: Ptr ()
data_ = do
    TextTag
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
    TextTagTableForeach_WithClosures
_cb  TextTag
tag' Ptr ()
data_
    Maybe (Ptr (FunPtr C_TextTagTableForeach)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TextTagTableForeach))
funptrptr


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

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

foreign import ccall "dynamic" __dynamic_C_TextCharPredicate :: FunPtr C_TextCharPredicate -> C_TextCharPredicate

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_TextCharPredicate ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_TextCharPredicate
    -> Char
    -> Ptr ()
    -> m Bool
dynamic_TextCharPredicate :: FunPtr C_TextCharPredicate -> Char -> Ptr () -> m Bool
dynamic_TextCharPredicate __funPtr :: FunPtr C_TextCharPredicate
__funPtr ch :: Char
ch userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    let ch' :: CInt
ch' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Char -> Int) -> Char -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Char -> Int
ord) Char
ch
    CInt
result <- (FunPtr C_TextCharPredicate -> C_TextCharPredicate
__dynamic_C_TextCharPredicate FunPtr C_TextCharPredicate
__funPtr) CInt
ch' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type TextCharPredicate =
    Char
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `TextCharPredicate`@.
noTextCharPredicate :: Maybe TextCharPredicate
noTextCharPredicate :: Maybe TextCharPredicate
noTextCharPredicate = Maybe TextCharPredicate
forall a. Maybe a
Nothing

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

-- | A convenience synonym for @`Nothing` :: `Maybe` `TextCharPredicate_WithClosures`@.
noTextCharPredicate_WithClosures :: Maybe TextCharPredicate_WithClosures
noTextCharPredicate_WithClosures :: Maybe TextCharPredicate_WithClosures
noTextCharPredicate_WithClosures = Maybe TextCharPredicate_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_TextCharPredicate :: TextCharPredicate -> TextCharPredicate_WithClosures
drop_closures_TextCharPredicate :: TextCharPredicate -> TextCharPredicate_WithClosures
drop_closures_TextCharPredicate _f :: TextCharPredicate
_f ch :: Char
ch _ = TextCharPredicate
_f Char
ch

-- | Wrap the callback into a `GClosure`.
genClosure_TextCharPredicate :: MonadIO m => TextCharPredicate -> m (GClosure C_TextCharPredicate)
genClosure_TextCharPredicate :: TextCharPredicate -> m (GClosure C_TextCharPredicate)
genClosure_TextCharPredicate cb :: TextCharPredicate
cb = IO (GClosure C_TextCharPredicate)
-> m (GClosure C_TextCharPredicate)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TextCharPredicate)
 -> m (GClosure C_TextCharPredicate))
-> IO (GClosure C_TextCharPredicate)
-> m (GClosure C_TextCharPredicate)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: TextCharPredicate_WithClosures
cb' = TextCharPredicate -> TextCharPredicate_WithClosures
drop_closures_TextCharPredicate TextCharPredicate
cb
    let cb'' :: C_TextCharPredicate
cb'' = Maybe (Ptr (FunPtr C_TextCharPredicate))
-> TextCharPredicate_WithClosures -> C_TextCharPredicate
wrap_TextCharPredicate Maybe (Ptr (FunPtr C_TextCharPredicate))
forall a. Maybe a
Nothing TextCharPredicate_WithClosures
cb'
    C_TextCharPredicate -> IO (FunPtr C_TextCharPredicate)
mk_TextCharPredicate C_TextCharPredicate
cb'' IO (FunPtr C_TextCharPredicate)
-> (FunPtr C_TextCharPredicate
    -> IO (GClosure C_TextCharPredicate))
-> IO (GClosure C_TextCharPredicate)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TextCharPredicate -> IO (GClosure C_TextCharPredicate)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `TextCharPredicate` into a `C_TextCharPredicate`.
wrap_TextCharPredicate ::
    Maybe (Ptr (FunPtr C_TextCharPredicate)) ->
    TextCharPredicate_WithClosures ->
    C_TextCharPredicate
wrap_TextCharPredicate :: Maybe (Ptr (FunPtr C_TextCharPredicate))
-> TextCharPredicate_WithClosures -> C_TextCharPredicate
wrap_TextCharPredicate funptrptr :: Maybe (Ptr (FunPtr C_TextCharPredicate))
funptrptr _cb :: TextCharPredicate_WithClosures
_cb ch :: CInt
ch userData :: Ptr ()
userData = do
    let ch' :: Char
ch' = (Int -> Char
chr (Int -> Char) -> (CInt -> Int) -> CInt -> Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
ch
    Bool
result <- TextCharPredicate_WithClosures
_cb  Char
ch' Ptr ()
userData
    Maybe (Ptr (FunPtr C_TextCharPredicate)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_TextCharPredicate))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback RcPropertyParser
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "pspec", argType = TParamSpec, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "rc_string", argType = TInterface (Name {namespace = "GLib", name = "String"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_RcPropertyParser =
    Ptr GParamSpec ->
    Ptr GLib.String.String ->
    Ptr GValue ->
    IO CInt

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

foreign import ccall "dynamic" __dynamic_C_RcPropertyParser :: FunPtr C_RcPropertyParser -> C_RcPropertyParser

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_RcPropertyParser ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_RcPropertyParser
    -> GParamSpec
    -> GLib.String.String
    -> GValue
    -> m Bool
dynamic_RcPropertyParser :: FunPtr C_RcPropertyParser
-> GParamSpec -> String -> GValue -> m Bool
dynamic_RcPropertyParser __funPtr :: FunPtr C_RcPropertyParser
__funPtr pspec :: GParamSpec
pspec rcString :: String
rcString propertyValue :: GValue
propertyValue = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr GParamSpec
pspec' <- GParamSpec -> IO (Ptr GParamSpec)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GParamSpec
pspec
    Ptr String
rcString' <- String -> IO (Ptr String)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr String
rcString
    Ptr GValue
propertyValue' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
propertyValue
    CInt
result <- (FunPtr C_RcPropertyParser -> C_RcPropertyParser
__dynamic_C_RcPropertyParser FunPtr C_RcPropertyParser
__funPtr) Ptr GParamSpec
pspec' Ptr String
rcString' Ptr GValue
propertyValue'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    GParamSpec -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GParamSpec
pspec
    String -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr String
rcString
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
propertyValue
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type RcPropertyParser =
    GParamSpec
    -> GLib.String.String
    -> GValue
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `RcPropertyParser`@.
noRcPropertyParser :: Maybe RcPropertyParser
noRcPropertyParser :: Maybe RcPropertyParser
noRcPropertyParser = Maybe RcPropertyParser
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_RcPropertyParser :: MonadIO m => RcPropertyParser -> m (GClosure C_RcPropertyParser)
genClosure_RcPropertyParser :: RcPropertyParser -> m (GClosure C_RcPropertyParser)
genClosure_RcPropertyParser cb :: RcPropertyParser
cb = IO (GClosure C_RcPropertyParser) -> m (GClosure C_RcPropertyParser)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_RcPropertyParser)
 -> m (GClosure C_RcPropertyParser))
-> IO (GClosure C_RcPropertyParser)
-> m (GClosure C_RcPropertyParser)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_RcPropertyParser
cb' = Maybe (Ptr (FunPtr C_RcPropertyParser))
-> RcPropertyParser -> C_RcPropertyParser
wrap_RcPropertyParser Maybe (Ptr (FunPtr C_RcPropertyParser))
forall a. Maybe a
Nothing RcPropertyParser
cb
    C_RcPropertyParser -> IO (FunPtr C_RcPropertyParser)
mk_RcPropertyParser C_RcPropertyParser
cb' IO (FunPtr C_RcPropertyParser)
-> (FunPtr C_RcPropertyParser -> IO (GClosure C_RcPropertyParser))
-> IO (GClosure C_RcPropertyParser)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_RcPropertyParser -> IO (GClosure C_RcPropertyParser)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `RcPropertyParser` into a `C_RcPropertyParser`.
wrap_RcPropertyParser ::
    Maybe (Ptr (FunPtr C_RcPropertyParser)) ->
    RcPropertyParser ->
    C_RcPropertyParser
wrap_RcPropertyParser :: Maybe (Ptr (FunPtr C_RcPropertyParser))
-> RcPropertyParser -> C_RcPropertyParser
wrap_RcPropertyParser funptrptr :: Maybe (Ptr (FunPtr C_RcPropertyParser))
funptrptr _cb :: RcPropertyParser
_cb pspec :: Ptr GParamSpec
pspec rcString :: Ptr String
rcString propertyValue :: Ptr GValue
propertyValue = do
    GParamSpec
pspec' <- Ptr GParamSpec -> IO GParamSpec
B.GParamSpec.newGParamSpecFromPtr Ptr GParamSpec
pspec
    (ManagedPtr String -> String)
-> Ptr String -> (String -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr String -> String
GLib.String.String Ptr String
rcString ((String -> IO CInt) -> IO CInt) -> (String -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \rcString' :: String
rcString' -> do
        (ManagedPtr GValue -> GValue)
-> Ptr GValue -> (GValue -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr GValue -> GValue
GValue Ptr GValue
propertyValue ((GValue -> IO CInt) -> IO CInt) -> (GValue -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \propertyValue' :: GValue
propertyValue' -> do
            Bool
result <- RcPropertyParser
_cb  GParamSpec
pspec' String
rcString' GValue
propertyValue'
            Maybe (Ptr (FunPtr C_RcPropertyParser)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_RcPropertyParser))
funptrptr
            let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
            CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


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

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

foreign import ccall "dynamic" __dynamic_C_PrintSettingsFunc :: FunPtr C_PrintSettingsFunc -> C_PrintSettingsFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_PrintSettingsFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_PrintSettingsFunc
    -> T.Text
    -> T.Text
    -> Ptr ()
    -> m ()
dynamic_PrintSettingsFunc :: FunPtr C_PrintSettingsFunc -> Text -> Text -> Ptr () -> m ()
dynamic_PrintSettingsFunc __funPtr :: FunPtr C_PrintSettingsFunc
__funPtr key :: Text
key value :: Text
value userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
key' <- Text -> IO CString
textToCString Text
key
    CString
value' <- Text -> IO CString
textToCString Text
value
    (FunPtr C_PrintSettingsFunc -> C_PrintSettingsFunc
__dynamic_C_PrintSettingsFunc FunPtr C_PrintSettingsFunc
__funPtr) CString
key' CString
value' Ptr ()
userData
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
value'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type PrintSettingsFunc =
    T.Text
    -> T.Text
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `PrintSettingsFunc`@.
noPrintSettingsFunc :: Maybe PrintSettingsFunc
noPrintSettingsFunc :: Maybe PrintSettingsFunc
noPrintSettingsFunc = Maybe PrintSettingsFunc
forall a. Maybe a
Nothing

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

-- | A convenience synonym for @`Nothing` :: `Maybe` `PrintSettingsFunc_WithClosures`@.
noPrintSettingsFunc_WithClosures :: Maybe PrintSettingsFunc_WithClosures
noPrintSettingsFunc_WithClosures :: Maybe PrintSettingsFunc_WithClosures
noPrintSettingsFunc_WithClosures = Maybe PrintSettingsFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_PrintSettingsFunc :: PrintSettingsFunc -> PrintSettingsFunc_WithClosures
drop_closures_PrintSettingsFunc :: PrintSettingsFunc -> PrintSettingsFunc_WithClosures
drop_closures_PrintSettingsFunc _f :: PrintSettingsFunc
_f key :: Text
key value :: Text
value _ = PrintSettingsFunc
_f Text
key Text
value

-- | Wrap the callback into a `GClosure`.
genClosure_PrintSettingsFunc :: MonadIO m => PrintSettingsFunc -> m (GClosure C_PrintSettingsFunc)
genClosure_PrintSettingsFunc :: PrintSettingsFunc -> m (GClosure C_PrintSettingsFunc)
genClosure_PrintSettingsFunc cb :: PrintSettingsFunc
cb = IO (GClosure C_PrintSettingsFunc)
-> m (GClosure C_PrintSettingsFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PrintSettingsFunc)
 -> m (GClosure C_PrintSettingsFunc))
-> IO (GClosure C_PrintSettingsFunc)
-> m (GClosure C_PrintSettingsFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: PrintSettingsFunc_WithClosures
cb' = PrintSettingsFunc -> PrintSettingsFunc_WithClosures
drop_closures_PrintSettingsFunc PrintSettingsFunc
cb
    let cb'' :: C_PrintSettingsFunc
cb'' = Maybe (Ptr (FunPtr C_PrintSettingsFunc))
-> PrintSettingsFunc_WithClosures -> C_PrintSettingsFunc
wrap_PrintSettingsFunc Maybe (Ptr (FunPtr C_PrintSettingsFunc))
forall a. Maybe a
Nothing PrintSettingsFunc_WithClosures
cb'
    C_PrintSettingsFunc -> IO (FunPtr C_PrintSettingsFunc)
mk_PrintSettingsFunc C_PrintSettingsFunc
cb'' IO (FunPtr C_PrintSettingsFunc)
-> (FunPtr C_PrintSettingsFunc
    -> IO (GClosure C_PrintSettingsFunc))
-> IO (GClosure C_PrintSettingsFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PrintSettingsFunc -> IO (GClosure C_PrintSettingsFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `PrintSettingsFunc` into a `C_PrintSettingsFunc`.
wrap_PrintSettingsFunc ::
    Maybe (Ptr (FunPtr C_PrintSettingsFunc)) ->
    PrintSettingsFunc_WithClosures ->
    C_PrintSettingsFunc
wrap_PrintSettingsFunc :: Maybe (Ptr (FunPtr C_PrintSettingsFunc))
-> PrintSettingsFunc_WithClosures -> C_PrintSettingsFunc
wrap_PrintSettingsFunc funptrptr :: Maybe (Ptr (FunPtr C_PrintSettingsFunc))
funptrptr _cb :: PrintSettingsFunc_WithClosures
_cb key :: CString
key value :: CString
value userData :: Ptr ()
userData = do
    Text
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
    Text
value' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
value
    PrintSettingsFunc_WithClosures
_cb  Text
key' Text
value' Ptr ()
userData
    Maybe (Ptr (FunPtr C_PrintSettingsFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PrintSettingsFunc))
funptrptr


-- callback PageSetupDoneFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "page_setup", argType = TInterface (Name {namespace = "Gtk", name = "PageSetup"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkPageSetup that has been", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data that has been passed to\n    gtk_print_run_page_setup_dialog_async()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of function that is passed to\ngtk_print_run_page_setup_dialog_async().\n\nThis function will be called when the page setup dialog\nis dismissed, and also serves as destroy notify for @data.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_PageSetupDoneFunc =
    Ptr Gtk.PageSetup.PageSetup ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "page_setup"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "PageSetup" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkPageSetup that has been"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "user data that has been passed to\n    gtk_print_run_page_setup_dialog_async()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_PageSetupDoneFunc :: FunPtr C_PageSetupDoneFunc -> C_PageSetupDoneFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_PageSetupDoneFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.PageSetup.IsPageSetup a) =>
    FunPtr C_PageSetupDoneFunc
    -> a
    -- ^ /@pageSetup@/: the t'GI.Gtk.Objects.PageSetup.PageSetup' that has been
    -> Ptr ()
    -- ^ /@data@/: user data that has been passed to
    --     'GI.Gtk.Functions.printRunPageSetupDialogAsync'
    -> m ()
dynamic_PageSetupDoneFunc :: FunPtr C_PageSetupDoneFunc -> a -> Ptr () -> m ()
dynamic_PageSetupDoneFunc __funPtr :: FunPtr C_PageSetupDoneFunc
__funPtr pageSetup :: a
pageSetup data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr PageSetup
pageSetup' <- a -> IO (Ptr PageSetup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pageSetup
    (FunPtr C_PageSetupDoneFunc -> C_PageSetupDoneFunc
__dynamic_C_PageSetupDoneFunc FunPtr C_PageSetupDoneFunc
__funPtr) Ptr PageSetup
pageSetup' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pageSetup
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | The type of function that is passed to
-- 'GI.Gtk.Functions.printRunPageSetupDialogAsync'.
-- 
-- This function will be called when the page setup dialog
-- is dismissed, and also serves as destroy notify for /@data@/.
type PageSetupDoneFunc =
    Gtk.PageSetup.PageSetup
    -- ^ /@pageSetup@/: the t'GI.Gtk.Objects.PageSetup.PageSetup' that has been
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `PageSetupDoneFunc`@.
noPageSetupDoneFunc :: Maybe PageSetupDoneFunc
noPageSetupDoneFunc :: Maybe PageSetupDoneFunc
noPageSetupDoneFunc = Maybe PageSetupDoneFunc
forall a. Maybe a
Nothing

-- | The type of function that is passed to
-- 'GI.Gtk.Functions.printRunPageSetupDialogAsync'.
-- 
-- This function will be called when the page setup dialog
-- is dismissed, and also serves as destroy notify for /@data@/.
type PageSetupDoneFunc_WithClosures =
    Gtk.PageSetup.PageSetup
    -- ^ /@pageSetup@/: the t'GI.Gtk.Objects.PageSetup.PageSetup' that has been
    -> Ptr ()
    -- ^ /@data@/: user data that has been passed to
    --     'GI.Gtk.Functions.printRunPageSetupDialogAsync'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `PageSetupDoneFunc_WithClosures`@.
noPageSetupDoneFunc_WithClosures :: Maybe PageSetupDoneFunc_WithClosures
noPageSetupDoneFunc_WithClosures :: Maybe PageSetupDoneFunc_WithClosures
noPageSetupDoneFunc_WithClosures = Maybe PageSetupDoneFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_PageSetupDoneFunc :: PageSetupDoneFunc -> PageSetupDoneFunc_WithClosures
drop_closures_PageSetupDoneFunc :: PageSetupDoneFunc -> PageSetupDoneFunc_WithClosures
drop_closures_PageSetupDoneFunc _f :: PageSetupDoneFunc
_f pageSetup :: PageSetup
pageSetup _ = PageSetupDoneFunc
_f PageSetup
pageSetup

-- | Wrap the callback into a `GClosure`.
genClosure_PageSetupDoneFunc :: MonadIO m => PageSetupDoneFunc -> m (GClosure C_PageSetupDoneFunc)
genClosure_PageSetupDoneFunc :: PageSetupDoneFunc -> m (GClosure C_PageSetupDoneFunc)
genClosure_PageSetupDoneFunc cb :: PageSetupDoneFunc
cb = IO (GClosure C_PageSetupDoneFunc)
-> m (GClosure C_PageSetupDoneFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PageSetupDoneFunc)
 -> m (GClosure C_PageSetupDoneFunc))
-> IO (GClosure C_PageSetupDoneFunc)
-> m (GClosure C_PageSetupDoneFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: PageSetupDoneFunc_WithClosures
cb' = PageSetupDoneFunc -> PageSetupDoneFunc_WithClosures
drop_closures_PageSetupDoneFunc PageSetupDoneFunc
cb
    let cb'' :: C_PageSetupDoneFunc
cb'' = Maybe (Ptr (FunPtr C_PageSetupDoneFunc))
-> PageSetupDoneFunc_WithClosures -> C_PageSetupDoneFunc
wrap_PageSetupDoneFunc Maybe (Ptr (FunPtr C_PageSetupDoneFunc))
forall a. Maybe a
Nothing PageSetupDoneFunc_WithClosures
cb'
    C_PageSetupDoneFunc -> IO (FunPtr C_PageSetupDoneFunc)
mk_PageSetupDoneFunc C_PageSetupDoneFunc
cb'' IO (FunPtr C_PageSetupDoneFunc)
-> (FunPtr C_PageSetupDoneFunc
    -> IO (GClosure C_PageSetupDoneFunc))
-> IO (GClosure C_PageSetupDoneFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PageSetupDoneFunc -> IO (GClosure C_PageSetupDoneFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `PageSetupDoneFunc` into a `C_PageSetupDoneFunc`.
wrap_PageSetupDoneFunc ::
    Maybe (Ptr (FunPtr C_PageSetupDoneFunc)) ->
    PageSetupDoneFunc_WithClosures ->
    C_PageSetupDoneFunc
wrap_PageSetupDoneFunc :: Maybe (Ptr (FunPtr C_PageSetupDoneFunc))
-> PageSetupDoneFunc_WithClosures -> C_PageSetupDoneFunc
wrap_PageSetupDoneFunc funptrptr :: Maybe (Ptr (FunPtr C_PageSetupDoneFunc))
funptrptr _cb :: PageSetupDoneFunc_WithClosures
_cb pageSetup :: Ptr PageSetup
pageSetup data_ :: Ptr ()
data_ = do
    PageSetup
pageSetup' <- ((ManagedPtr PageSetup -> PageSetup)
-> Ptr PageSetup -> IO PageSetup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PageSetup -> PageSetup
Gtk.PageSetup.PageSetup) Ptr PageSetup
pageSetup
    PageSetupDoneFunc_WithClosures
_cb  PageSetup
pageSetup' Ptr ()
data_
    Maybe (Ptr (FunPtr C_PageSetupDoneFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_PageSetupDoneFunc))
funptrptr


-- callback MenuDetachFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "attach_widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that the menu is being detached from.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "menu", argType = TInterface (Name {namespace = "Gtk", name = "Menu"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkMenu being detached.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A user function supplied when calling gtk_menu_attach_to_widget() which\nwill be called when the menu is later detached from the widget.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_MenuDetachFunc =
    Ptr Gtk.Widget.Widget ->
    Ptr Gtk.Menu.Menu ->
    IO ()

-- Args: [ Arg
--           { argCName = "attach_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #GtkWidget that the menu is being detached from."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "menu"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Menu" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkMenu being detached."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_MenuDetachFunc :: FunPtr C_MenuDetachFunc -> C_MenuDetachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_MenuDetachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a, Gtk.Menu.IsMenu b) =>
    FunPtr C_MenuDetachFunc
    -> a
    -- ^ /@attachWidget@/: the t'GI.Gtk.Objects.Widget.Widget' that the menu is being detached from.
    -> b
    -- ^ /@menu@/: the t'GI.Gtk.Objects.Menu.Menu' being detached.
    -> m ()
dynamic_MenuDetachFunc :: FunPtr C_MenuDetachFunc -> a -> b -> m ()
dynamic_MenuDetachFunc __funPtr :: FunPtr C_MenuDetachFunc
__funPtr attachWidget :: a
attachWidget menu :: b
menu = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
attachWidget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
attachWidget
    Ptr Menu
menu' <- b -> IO (Ptr Menu)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
menu
    (FunPtr C_MenuDetachFunc -> C_MenuDetachFunc
__dynamic_C_MenuDetachFunc FunPtr C_MenuDetachFunc
__funPtr) Ptr Widget
attachWidget' Ptr Menu
menu'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
attachWidget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
menu
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A user function supplied when calling 'GI.Gtk.Objects.Menu.menuAttachToWidget' which
-- will be called when the menu is later detached from the widget.
type MenuDetachFunc =
    Gtk.Widget.Widget
    -- ^ /@attachWidget@/: the t'GI.Gtk.Objects.Widget.Widget' that the menu is being detached from.
    -> Gtk.Menu.Menu
    -- ^ /@menu@/: the t'GI.Gtk.Objects.Menu.Menu' being detached.
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `MenuDetachFunc`@.
noMenuDetachFunc :: Maybe MenuDetachFunc
noMenuDetachFunc :: Maybe MenuDetachFunc
noMenuDetachFunc = Maybe MenuDetachFunc
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_MenuDetachFunc :: MonadIO m => MenuDetachFunc -> m (GClosure C_MenuDetachFunc)
genClosure_MenuDetachFunc :: MenuDetachFunc -> m (GClosure C_MenuDetachFunc)
genClosure_MenuDetachFunc cb :: MenuDetachFunc
cb = IO (GClosure C_MenuDetachFunc) -> m (GClosure C_MenuDetachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MenuDetachFunc) -> m (GClosure C_MenuDetachFunc))
-> IO (GClosure C_MenuDetachFunc) -> m (GClosure C_MenuDetachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_MenuDetachFunc
cb' = Maybe (Ptr (FunPtr C_MenuDetachFunc))
-> MenuDetachFunc -> C_MenuDetachFunc
wrap_MenuDetachFunc Maybe (Ptr (FunPtr C_MenuDetachFunc))
forall a. Maybe a
Nothing MenuDetachFunc
cb
    C_MenuDetachFunc -> IO (FunPtr C_MenuDetachFunc)
mk_MenuDetachFunc C_MenuDetachFunc
cb' IO (FunPtr C_MenuDetachFunc)
-> (FunPtr C_MenuDetachFunc -> IO (GClosure C_MenuDetachFunc))
-> IO (GClosure C_MenuDetachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MenuDetachFunc -> IO (GClosure C_MenuDetachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `MenuDetachFunc` into a `C_MenuDetachFunc`.
wrap_MenuDetachFunc ::
    Maybe (Ptr (FunPtr C_MenuDetachFunc)) ->
    MenuDetachFunc ->
    C_MenuDetachFunc
wrap_MenuDetachFunc :: Maybe (Ptr (FunPtr C_MenuDetachFunc))
-> MenuDetachFunc -> C_MenuDetachFunc
wrap_MenuDetachFunc funptrptr :: Maybe (Ptr (FunPtr C_MenuDetachFunc))
funptrptr _cb :: MenuDetachFunc
_cb attachWidget :: Ptr Widget
attachWidget menu :: Ptr Menu
menu = do
    Widget
attachWidget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
attachWidget
    Menu
menu' <- ((ManagedPtr Menu -> Menu) -> Ptr Menu -> IO Menu
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Menu -> Menu
Gtk.Menu.Menu) Ptr Menu
menu
    MenuDetachFunc
_cb  Widget
attachWidget' Menu
menu'
    Maybe (Ptr (FunPtr C_MenuDetachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MenuDetachFunc))
funptrptr


-- callback MapListModelMapFunc
--          -> Callable {returnType = Just (TInterface (Name {namespace = "GObject", name = "Object"})), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "The item to map to.\n    This function may not return %NULL", sinceVersion = Nothing}, args = [Arg {argCName = "item", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The item to map", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},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, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "User function that is called to map an @item of the original model to\nan item expected by the map model.\n\nThe returned items must conform to the item type of the model they are\nused with.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_MapListModelMapFunc =
    Ptr GObject.Object.Object ->
    Ptr () ->
    IO (Ptr GObject.Object.Object)

-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item to map" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , 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
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GObject" , name = "Object" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_MapListModelMapFunc :: FunPtr C_MapListModelMapFunc -> C_MapListModelMapFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_MapListModelMapFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_MapListModelMapFunc
    -> a
    -- ^ /@item@/: The item to map
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m GObject.Object.Object
    -- ^ __Returns:__ The item to map to.
    --     This function may not return 'P.Nothing'
dynamic_MapListModelMapFunc :: FunPtr C_MapListModelMapFunc -> a -> Ptr () -> m Object
dynamic_MapListModelMapFunc __funPtr :: FunPtr C_MapListModelMapFunc
__funPtr item :: a
item userData :: Ptr ()
userData = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
item' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
item
    Ptr Object
result <- (FunPtr C_MapListModelMapFunc -> C_MapListModelMapFunc
__dynamic_C_MapListModelMapFunc FunPtr C_MapListModelMapFunc
__funPtr) Ptr Object
item' Ptr ()
userData
    Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "mapListModelMapFunc" Ptr Object
result
    Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'

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

-- | User function that is called to map an /@item@/ of the original model to
-- an item expected by the map model.
-- 
-- The returned items must conform to the item type of the model they are
-- used with.
type MapListModelMapFunc =
    GObject.Object.Object
    -- ^ /@item@/: The item to map
    -> IO GObject.Object.Object
    -- ^ __Returns:__ The item to map to.
    --     This function may not return 'P.Nothing'

-- | A convenience synonym for @`Nothing` :: `Maybe` `MapListModelMapFunc`@.
noMapListModelMapFunc :: Maybe MapListModelMapFunc
noMapListModelMapFunc :: Maybe (Object -> IO Object)
noMapListModelMapFunc = Maybe (Object -> IO Object)
forall a. Maybe a
Nothing

-- | User function that is called to map an /@item@/ of the original model to
-- an item expected by the map model.
-- 
-- The returned items must conform to the item type of the model they are
-- used with.
type MapListModelMapFunc_WithClosures =
    GObject.Object.Object
    -- ^ /@item@/: The item to map
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO GObject.Object.Object
    -- ^ __Returns:__ The item to map to.
    --     This function may not return 'P.Nothing'

-- | A convenience synonym for @`Nothing` :: `Maybe` `MapListModelMapFunc_WithClosures`@.
noMapListModelMapFunc_WithClosures :: Maybe MapListModelMapFunc_WithClosures
noMapListModelMapFunc_WithClosures :: Maybe MapListModelMapFunc_WithClosures
noMapListModelMapFunc_WithClosures = Maybe MapListModelMapFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_MapListModelMapFunc :: MapListModelMapFunc -> MapListModelMapFunc_WithClosures
drop_closures_MapListModelMapFunc :: (Object -> IO Object) -> MapListModelMapFunc_WithClosures
drop_closures_MapListModelMapFunc _f :: Object -> IO Object
_f item :: Object
item _ = Object -> IO Object
_f Object
item

-- | Wrap the callback into a `GClosure`.
genClosure_MapListModelMapFunc :: MonadIO m => MapListModelMapFunc -> m (GClosure C_MapListModelMapFunc)
genClosure_MapListModelMapFunc :: (Object -> IO Object) -> m (GClosure C_MapListModelMapFunc)
genClosure_MapListModelMapFunc cb :: Object -> IO Object
cb = IO (GClosure C_MapListModelMapFunc)
-> m (GClosure C_MapListModelMapFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MapListModelMapFunc)
 -> m (GClosure C_MapListModelMapFunc))
-> IO (GClosure C_MapListModelMapFunc)
-> m (GClosure C_MapListModelMapFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: MapListModelMapFunc_WithClosures
cb' = (Object -> IO Object) -> MapListModelMapFunc_WithClosures
drop_closures_MapListModelMapFunc Object -> IO Object
cb
    let cb'' :: C_MapListModelMapFunc
cb'' = Maybe (Ptr (FunPtr C_MapListModelMapFunc))
-> MapListModelMapFunc_WithClosures -> C_MapListModelMapFunc
wrap_MapListModelMapFunc Maybe (Ptr (FunPtr C_MapListModelMapFunc))
forall a. Maybe a
Nothing MapListModelMapFunc_WithClosures
cb'
    C_MapListModelMapFunc -> IO (FunPtr C_MapListModelMapFunc)
mk_MapListModelMapFunc C_MapListModelMapFunc
cb'' IO (FunPtr C_MapListModelMapFunc)
-> (FunPtr C_MapListModelMapFunc
    -> IO (GClosure C_MapListModelMapFunc))
-> IO (GClosure C_MapListModelMapFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MapListModelMapFunc -> IO (GClosure C_MapListModelMapFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `MapListModelMapFunc` into a `C_MapListModelMapFunc`.
wrap_MapListModelMapFunc ::
    Maybe (Ptr (FunPtr C_MapListModelMapFunc)) ->
    MapListModelMapFunc_WithClosures ->
    C_MapListModelMapFunc
wrap_MapListModelMapFunc :: Maybe (Ptr (FunPtr C_MapListModelMapFunc))
-> MapListModelMapFunc_WithClosures -> C_MapListModelMapFunc
wrap_MapListModelMapFunc funptrptr :: Maybe (Ptr (FunPtr C_MapListModelMapFunc))
funptrptr _cb :: MapListModelMapFunc_WithClosures
_cb item :: Ptr Object
item userData :: Ptr ()
userData = do
    Object
item' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
item
    Object
result <- MapListModelMapFunc_WithClosures
_cb  Object
item' Ptr ()
userData
    Maybe (Ptr (FunPtr C_MapListModelMapFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MapListModelMapFunc))
funptrptr
    Ptr Object
result' <- Object -> IO (Ptr Object)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject Object
result
    Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
result'


-- callback ListBoxUpdateHeaderFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "row", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the row to update", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "before", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the row before @row, or %NULL if it is first", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Whenever @row changes or which row is before @row changes this\nis called, which lets you update the header on @row. You may\nremove or set a new one via gtk_list_box_row_set_header() or\njust change the state of the current header widget.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxUpdateHeaderFunc =
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "row"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the row to update" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "before"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the row before @row, or %NULL if it is first"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ListBoxUpdateHeaderFunc :: FunPtr C_ListBoxUpdateHeaderFunc -> C_ListBoxUpdateHeaderFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ListBoxUpdateHeaderFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.ListBoxRow.IsListBoxRow a, Gtk.ListBoxRow.IsListBoxRow b) =>
    FunPtr C_ListBoxUpdateHeaderFunc
    -> a
    -- ^ /@row@/: the row to update
    -> Maybe (b)
    -- ^ /@before@/: the row before /@row@/, or 'P.Nothing' if it is first
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_ListBoxUpdateHeaderFunc :: FunPtr C_ListBoxUpdateHeaderFunc -> a -> Maybe b -> Ptr () -> m ()
dynamic_ListBoxUpdateHeaderFunc __funPtr :: FunPtr C_ListBoxUpdateHeaderFunc
__funPtr row :: a
row before :: Maybe b
before userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListBoxRow
row' <- a -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
row
    Ptr ListBoxRow
maybeBefore <- case Maybe b
before of
        Nothing -> Ptr ListBoxRow -> IO (Ptr ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListBoxRow
forall a. Ptr a
nullPtr
        Just jBefore :: b
jBefore -> do
            Ptr ListBoxRow
jBefore' <- b -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jBefore
            Ptr ListBoxRow -> IO (Ptr ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListBoxRow
jBefore'
    (FunPtr C_ListBoxUpdateHeaderFunc -> C_ListBoxUpdateHeaderFunc
__dynamic_C_ListBoxUpdateHeaderFunc FunPtr C_ListBoxUpdateHeaderFunc
__funPtr) Ptr ListBoxRow
row' Ptr ListBoxRow
maybeBefore Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
row
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
before b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | Whenever /@row@/ changes or which row is before /@row@/ changes this
-- is called, which lets you update the header on /@row@/. You may
-- remove or set a new one via 'GI.Gtk.Objects.ListBoxRow.listBoxRowSetHeader' or
-- just change the state of the current header widget.
type ListBoxUpdateHeaderFunc =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the row to update
    -> Maybe Gtk.ListBoxRow.ListBoxRow
    -- ^ /@before@/: the row before /@row@/, or 'P.Nothing' if it is first
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxUpdateHeaderFunc`@.
noListBoxUpdateHeaderFunc :: Maybe ListBoxUpdateHeaderFunc
noListBoxUpdateHeaderFunc :: Maybe ListBoxUpdateHeaderFunc
noListBoxUpdateHeaderFunc = Maybe ListBoxUpdateHeaderFunc
forall a. Maybe a
Nothing

-- | Whenever /@row@/ changes or which row is before /@row@/ changes this
-- is called, which lets you update the header on /@row@/. You may
-- remove or set a new one via 'GI.Gtk.Objects.ListBoxRow.listBoxRowSetHeader' or
-- just change the state of the current header widget.
type ListBoxUpdateHeaderFunc_WithClosures =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the row to update
    -> Maybe Gtk.ListBoxRow.ListBoxRow
    -- ^ /@before@/: the row before /@row@/, or 'P.Nothing' if it is first
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxUpdateHeaderFunc_WithClosures`@.
noListBoxUpdateHeaderFunc_WithClosures :: Maybe ListBoxUpdateHeaderFunc_WithClosures
noListBoxUpdateHeaderFunc_WithClosures :: Maybe ListBoxUpdateHeaderFunc_WithClosures
noListBoxUpdateHeaderFunc_WithClosures = Maybe ListBoxUpdateHeaderFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ListBoxUpdateHeaderFunc :: ListBoxUpdateHeaderFunc -> ListBoxUpdateHeaderFunc_WithClosures
drop_closures_ListBoxUpdateHeaderFunc :: ListBoxUpdateHeaderFunc -> ListBoxUpdateHeaderFunc_WithClosures
drop_closures_ListBoxUpdateHeaderFunc _f :: ListBoxUpdateHeaderFunc
_f row :: ListBoxRow
row before :: Maybe ListBoxRow
before _ = ListBoxUpdateHeaderFunc
_f ListBoxRow
row Maybe ListBoxRow
before

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxUpdateHeaderFunc :: MonadIO m => ListBoxUpdateHeaderFunc -> m (GClosure C_ListBoxUpdateHeaderFunc)
genClosure_ListBoxUpdateHeaderFunc :: ListBoxUpdateHeaderFunc -> m (GClosure C_ListBoxUpdateHeaderFunc)
genClosure_ListBoxUpdateHeaderFunc cb :: ListBoxUpdateHeaderFunc
cb = IO (GClosure C_ListBoxUpdateHeaderFunc)
-> m (GClosure C_ListBoxUpdateHeaderFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxUpdateHeaderFunc)
 -> m (GClosure C_ListBoxUpdateHeaderFunc))
-> IO (GClosure C_ListBoxUpdateHeaderFunc)
-> m (GClosure C_ListBoxUpdateHeaderFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxUpdateHeaderFunc_WithClosures
cb' = ListBoxUpdateHeaderFunc -> ListBoxUpdateHeaderFunc_WithClosures
drop_closures_ListBoxUpdateHeaderFunc ListBoxUpdateHeaderFunc
cb
    let cb'' :: C_ListBoxUpdateHeaderFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
-> ListBoxUpdateHeaderFunc_WithClosures
-> C_ListBoxUpdateHeaderFunc
wrap_ListBoxUpdateHeaderFunc Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
forall a. Maybe a
Nothing ListBoxUpdateHeaderFunc_WithClosures
cb'
    C_ListBoxUpdateHeaderFunc -> IO (FunPtr C_ListBoxUpdateHeaderFunc)
mk_ListBoxUpdateHeaderFunc C_ListBoxUpdateHeaderFunc
cb'' IO (FunPtr C_ListBoxUpdateHeaderFunc)
-> (FunPtr C_ListBoxUpdateHeaderFunc
    -> IO (GClosure C_ListBoxUpdateHeaderFunc))
-> IO (GClosure C_ListBoxUpdateHeaderFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxUpdateHeaderFunc
-> IO (GClosure C_ListBoxUpdateHeaderFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxUpdateHeaderFunc` into a `C_ListBoxUpdateHeaderFunc`.
wrap_ListBoxUpdateHeaderFunc ::
    Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc)) ->
    ListBoxUpdateHeaderFunc_WithClosures ->
    C_ListBoxUpdateHeaderFunc
wrap_ListBoxUpdateHeaderFunc :: Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
-> ListBoxUpdateHeaderFunc_WithClosures
-> C_ListBoxUpdateHeaderFunc
wrap_ListBoxUpdateHeaderFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
funptrptr _cb :: ListBoxUpdateHeaderFunc_WithClosures
_cb row :: Ptr ListBoxRow
row before :: Ptr ListBoxRow
before userData :: Ptr ()
userData = do
    ListBoxRow
row' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
row
    Maybe ListBoxRow
maybeBefore <-
        if Ptr ListBoxRow
before Ptr ListBoxRow -> Ptr ListBoxRow -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr ListBoxRow
forall a. Ptr a
nullPtr
        then Maybe ListBoxRow -> IO (Maybe ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ListBoxRow
forall a. Maybe a
Nothing
        else do
            ListBoxRow
before' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
before
            Maybe ListBoxRow -> IO (Maybe ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe ListBoxRow -> IO (Maybe ListBoxRow))
-> Maybe ListBoxRow -> IO (Maybe ListBoxRow)
forall a b. (a -> b) -> a -> b
$ ListBoxRow -> Maybe ListBoxRow
forall a. a -> Maybe a
Just ListBoxRow
before'
    ListBoxUpdateHeaderFunc_WithClosures
_cb  ListBoxRow
row' Maybe ListBoxRow
maybeBefore Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
funptrptr


-- callback ListBoxSortFunc
--          -> Callable {returnType = Just (TBasicType TInt), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "< 0 if @row1 should be before @row2, 0 if they are\n    equal and > 0 otherwise", sinceVersion = Nothing}, args = [Arg {argCName = "row1", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the first row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "row2", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the second row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Compare two rows to determine which should be first.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxSortFunc =
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "row1"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the first row" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "row2"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the second row" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ListBoxSortFunc :: FunPtr C_ListBoxSortFunc -> C_ListBoxSortFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ListBoxSortFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.ListBoxRow.IsListBoxRow a, Gtk.ListBoxRow.IsListBoxRow b) =>
    FunPtr C_ListBoxSortFunc
    -> a
    -- ^ /@row1@/: the first row
    -> b
    -- ^ /@row2@/: the second row
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Int32
    -- ^ __Returns:__ \< 0 if /@row1@/ should be before /@row2@/, 0 if they are
    --     equal and > 0 otherwise
dynamic_ListBoxSortFunc :: FunPtr C_ListBoxSortFunc -> a -> b -> Ptr () -> m Int32
dynamic_ListBoxSortFunc __funPtr :: FunPtr C_ListBoxSortFunc
__funPtr row1 :: a
row1 row2 :: b
row2 userData :: Ptr ()
userData = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListBoxRow
row1' <- a -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
row1
    Ptr ListBoxRow
row2' <- b -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
row2
    Int32
result <- (FunPtr C_ListBoxSortFunc -> C_ListBoxSortFunc
__dynamic_C_ListBoxSortFunc FunPtr C_ListBoxSortFunc
__funPtr) Ptr ListBoxRow
row1' Ptr ListBoxRow
row2' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
row1
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
row2
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

-- | Compare two rows to determine which should be first.
type ListBoxSortFunc =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row1@/: the first row
    -> Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row2@/: the second row
    -> IO Int32
    -- ^ __Returns:__ \< 0 if /@row1@/ should be before /@row2@/, 0 if they are
    --     equal and > 0 otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxSortFunc`@.
noListBoxSortFunc :: Maybe ListBoxSortFunc
noListBoxSortFunc :: Maybe ListBoxSortFunc
noListBoxSortFunc = Maybe ListBoxSortFunc
forall a. Maybe a
Nothing

-- | Compare two rows to determine which should be first.
type ListBoxSortFunc_WithClosures =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row1@/: the first row
    -> Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row2@/: the second row
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Int32
    -- ^ __Returns:__ \< 0 if /@row1@/ should be before /@row2@/, 0 if they are
    --     equal and > 0 otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxSortFunc_WithClosures`@.
noListBoxSortFunc_WithClosures :: Maybe ListBoxSortFunc_WithClosures
noListBoxSortFunc_WithClosures :: Maybe ListBoxSortFunc_WithClosures
noListBoxSortFunc_WithClosures = Maybe ListBoxSortFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ListBoxSortFunc :: ListBoxSortFunc -> ListBoxSortFunc_WithClosures
drop_closures_ListBoxSortFunc :: ListBoxSortFunc -> ListBoxSortFunc_WithClosures
drop_closures_ListBoxSortFunc _f :: ListBoxSortFunc
_f row1 :: ListBoxRow
row1 row2 :: ListBoxRow
row2 _ = ListBoxSortFunc
_f ListBoxRow
row1 ListBoxRow
row2

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxSortFunc :: MonadIO m => ListBoxSortFunc -> m (GClosure C_ListBoxSortFunc)
genClosure_ListBoxSortFunc :: ListBoxSortFunc -> m (GClosure C_ListBoxSortFunc)
genClosure_ListBoxSortFunc cb :: ListBoxSortFunc
cb = IO (GClosure C_ListBoxSortFunc) -> m (GClosure C_ListBoxSortFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxSortFunc) -> m (GClosure C_ListBoxSortFunc))
-> IO (GClosure C_ListBoxSortFunc)
-> m (GClosure C_ListBoxSortFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxSortFunc_WithClosures
cb' = ListBoxSortFunc -> ListBoxSortFunc_WithClosures
drop_closures_ListBoxSortFunc ListBoxSortFunc
cb
    let cb'' :: C_ListBoxSortFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxSortFunc))
-> ListBoxSortFunc_WithClosures -> C_ListBoxSortFunc
wrap_ListBoxSortFunc Maybe (Ptr (FunPtr C_ListBoxSortFunc))
forall a. Maybe a
Nothing ListBoxSortFunc_WithClosures
cb'
    C_ListBoxSortFunc -> IO (FunPtr C_ListBoxSortFunc)
mk_ListBoxSortFunc C_ListBoxSortFunc
cb'' IO (FunPtr C_ListBoxSortFunc)
-> (FunPtr C_ListBoxSortFunc -> IO (GClosure C_ListBoxSortFunc))
-> IO (GClosure C_ListBoxSortFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxSortFunc -> IO (GClosure C_ListBoxSortFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxSortFunc` into a `C_ListBoxSortFunc`.
wrap_ListBoxSortFunc ::
    Maybe (Ptr (FunPtr C_ListBoxSortFunc)) ->
    ListBoxSortFunc_WithClosures ->
    C_ListBoxSortFunc
wrap_ListBoxSortFunc :: Maybe (Ptr (FunPtr C_ListBoxSortFunc))
-> ListBoxSortFunc_WithClosures -> C_ListBoxSortFunc
wrap_ListBoxSortFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxSortFunc))
funptrptr _cb :: ListBoxSortFunc_WithClosures
_cb row1 :: Ptr ListBoxRow
row1 row2 :: Ptr ListBoxRow
row2 userData :: Ptr ()
userData = do
    ListBoxRow
row1' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
row1
    ListBoxRow
row2' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
row2
    Int32
result <- ListBoxSortFunc_WithClosures
_cb  ListBoxRow
row1' ListBoxRow
row2' Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxSortFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxSortFunc))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback ListBoxForeachFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "box", argType = TInterface (Name {namespace = "Gtk", name = "ListBox"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkListBox", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "row", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkListBoxRow", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_list_box_selected_foreach().\nIt will be called on every selected child of the @box.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxForeachFunc =
    Ptr Gtk.ListBox.ListBox ->
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "box"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBox" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkListBox" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "row"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkListBoxRow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ListBoxForeachFunc :: FunPtr C_ListBoxForeachFunc -> C_ListBoxForeachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ListBoxForeachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.ListBox.IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) =>
    FunPtr C_ListBoxForeachFunc
    -> a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@row@/: a t'GI.Gtk.Objects.ListBoxRow.ListBoxRow'
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_ListBoxForeachFunc :: FunPtr C_ListBoxForeachFunc -> a -> b -> Ptr () -> m ()
dynamic_ListBoxForeachFunc __funPtr :: FunPtr C_ListBoxForeachFunc
__funPtr box :: a
box row :: b
row userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    Ptr ListBoxRow
row' <- b -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
row
    (FunPtr C_ListBoxForeachFunc -> C_ListBoxForeachFunc
__dynamic_C_ListBoxForeachFunc FunPtr C_ListBoxForeachFunc
__funPtr) Ptr ListBox
box' Ptr ListBoxRow
row' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
row
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function used by 'GI.Gtk.Objects.ListBox.listBoxSelectedForeach'.
-- It will be called on every selected child of the /@box@/.
type ListBoxForeachFunc =
    Gtk.ListBox.ListBox
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: a t'GI.Gtk.Objects.ListBoxRow.ListBoxRow'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxForeachFunc`@.
noListBoxForeachFunc :: Maybe ListBoxForeachFunc
noListBoxForeachFunc :: Maybe ListBoxForeachFunc
noListBoxForeachFunc = Maybe ListBoxForeachFunc
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.ListBox.listBoxSelectedForeach'.
-- It will be called on every selected child of the /@box@/.
type ListBoxForeachFunc_WithClosures =
    Gtk.ListBox.ListBox
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: a t'GI.Gtk.Objects.ListBoxRow.ListBoxRow'
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxForeachFunc_WithClosures`@.
noListBoxForeachFunc_WithClosures :: Maybe ListBoxForeachFunc_WithClosures
noListBoxForeachFunc_WithClosures :: Maybe ListBoxForeachFunc_WithClosures
noListBoxForeachFunc_WithClosures = Maybe ListBoxForeachFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ListBoxForeachFunc :: ListBoxForeachFunc -> ListBoxForeachFunc_WithClosures
drop_closures_ListBoxForeachFunc :: ListBoxForeachFunc -> ListBoxForeachFunc_WithClosures
drop_closures_ListBoxForeachFunc _f :: ListBoxForeachFunc
_f box :: ListBox
box row :: ListBoxRow
row _ = ListBoxForeachFunc
_f ListBox
box ListBoxRow
row

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxForeachFunc :: MonadIO m => ListBoxForeachFunc -> m (GClosure C_ListBoxForeachFunc)
genClosure_ListBoxForeachFunc :: ListBoxForeachFunc -> m (GClosure C_ListBoxForeachFunc)
genClosure_ListBoxForeachFunc cb :: ListBoxForeachFunc
cb = IO (GClosure C_ListBoxForeachFunc)
-> m (GClosure C_ListBoxForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxForeachFunc)
 -> m (GClosure C_ListBoxForeachFunc))
-> IO (GClosure C_ListBoxForeachFunc)
-> m (GClosure C_ListBoxForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxForeachFunc_WithClosures
cb' = ListBoxForeachFunc -> ListBoxForeachFunc_WithClosures
drop_closures_ListBoxForeachFunc ListBoxForeachFunc
cb
    let cb'' :: C_ListBoxForeachFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
-> ListBoxForeachFunc_WithClosures -> C_ListBoxForeachFunc
wrap_ListBoxForeachFunc Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
forall a. Maybe a
Nothing ListBoxForeachFunc_WithClosures
cb'
    C_ListBoxForeachFunc -> IO (FunPtr C_ListBoxForeachFunc)
mk_ListBoxForeachFunc C_ListBoxForeachFunc
cb'' IO (FunPtr C_ListBoxForeachFunc)
-> (FunPtr C_ListBoxForeachFunc
    -> IO (GClosure C_ListBoxForeachFunc))
-> IO (GClosure C_ListBoxForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxForeachFunc -> IO (GClosure C_ListBoxForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxForeachFunc` into a `C_ListBoxForeachFunc`.
wrap_ListBoxForeachFunc ::
    Maybe (Ptr (FunPtr C_ListBoxForeachFunc)) ->
    ListBoxForeachFunc_WithClosures ->
    C_ListBoxForeachFunc
wrap_ListBoxForeachFunc :: Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
-> ListBoxForeachFunc_WithClosures -> C_ListBoxForeachFunc
wrap_ListBoxForeachFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
funptrptr _cb :: ListBoxForeachFunc_WithClosures
_cb box :: Ptr ListBox
box row :: Ptr ListBoxRow
row userData :: Ptr ()
userData = do
    ListBox
box' <- ((ManagedPtr ListBox -> ListBox) -> Ptr ListBox -> IO ListBox
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBox -> ListBox
Gtk.ListBox.ListBox) Ptr ListBox
box
    ListBoxRow
row' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
row
    ListBoxForeachFunc_WithClosures
_cb  ListBox
box' ListBoxRow
row' Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
funptrptr


-- callback ListBoxFilterFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the row should be visible, %FALSE otherwise", sinceVersion = Nothing}, args = [Arg {argCName = "row", argType = TInterface (Name {namespace = "Gtk", name = "ListBoxRow"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the row that may be filtered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Will be called whenever the row changes or is added and lets you control\nif the row should be visible or not.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxFilterFunc =
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "row"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the row that may be filtered"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ListBoxFilterFunc :: FunPtr C_ListBoxFilterFunc -> C_ListBoxFilterFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ListBoxFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.ListBoxRow.IsListBoxRow a) =>
    FunPtr C_ListBoxFilterFunc
    -> a
    -- ^ /@row@/: the row that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise
dynamic_ListBoxFilterFunc :: FunPtr C_ListBoxFilterFunc -> a -> Ptr () -> m Bool
dynamic_ListBoxFilterFunc __funPtr :: FunPtr C_ListBoxFilterFunc
__funPtr row :: a
row userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListBoxRow
row' <- a -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
row
    CInt
result <- (FunPtr C_ListBoxFilterFunc -> C_ListBoxFilterFunc
__dynamic_C_ListBoxFilterFunc FunPtr C_ListBoxFilterFunc
__funPtr) Ptr ListBoxRow
row' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
row
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | Will be called whenever the row changes or is added and lets you control
-- if the row should be visible or not.
type ListBoxFilterFunc =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the row that may be filtered
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxFilterFunc`@.
noListBoxFilterFunc :: Maybe ListBoxFilterFunc
noListBoxFilterFunc :: Maybe ListBoxFilterFunc
noListBoxFilterFunc = Maybe ListBoxFilterFunc
forall a. Maybe a
Nothing

-- | Will be called whenever the row changes or is added and lets you control
-- if the row should be visible or not.
type ListBoxFilterFunc_WithClosures =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the row that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxFilterFunc_WithClosures`@.
noListBoxFilterFunc_WithClosures :: Maybe ListBoxFilterFunc_WithClosures
noListBoxFilterFunc_WithClosures :: Maybe ListBoxFilterFunc_WithClosures
noListBoxFilterFunc_WithClosures = Maybe ListBoxFilterFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ListBoxFilterFunc :: ListBoxFilterFunc -> ListBoxFilterFunc_WithClosures
drop_closures_ListBoxFilterFunc :: ListBoxFilterFunc -> ListBoxFilterFunc_WithClosures
drop_closures_ListBoxFilterFunc _f :: ListBoxFilterFunc
_f row :: ListBoxRow
row _ = ListBoxFilterFunc
_f ListBoxRow
row

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxFilterFunc :: MonadIO m => ListBoxFilterFunc -> m (GClosure C_ListBoxFilterFunc)
genClosure_ListBoxFilterFunc :: ListBoxFilterFunc -> m (GClosure C_ListBoxFilterFunc)
genClosure_ListBoxFilterFunc cb :: ListBoxFilterFunc
cb = IO (GClosure C_ListBoxFilterFunc)
-> m (GClosure C_ListBoxFilterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxFilterFunc)
 -> m (GClosure C_ListBoxFilterFunc))
-> IO (GClosure C_ListBoxFilterFunc)
-> m (GClosure C_ListBoxFilterFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxFilterFunc_WithClosures
cb' = ListBoxFilterFunc -> ListBoxFilterFunc_WithClosures
drop_closures_ListBoxFilterFunc ListBoxFilterFunc
cb
    let cb'' :: C_ListBoxFilterFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
-> ListBoxFilterFunc_WithClosures -> C_ListBoxFilterFunc
wrap_ListBoxFilterFunc Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
forall a. Maybe a
Nothing ListBoxFilterFunc_WithClosures
cb'
    C_ListBoxFilterFunc -> IO (FunPtr C_ListBoxFilterFunc)
mk_ListBoxFilterFunc C_ListBoxFilterFunc
cb'' IO (FunPtr C_ListBoxFilterFunc)
-> (FunPtr C_ListBoxFilterFunc
    -> IO (GClosure C_ListBoxFilterFunc))
-> IO (GClosure C_ListBoxFilterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxFilterFunc -> IO (GClosure C_ListBoxFilterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxFilterFunc` into a `C_ListBoxFilterFunc`.
wrap_ListBoxFilterFunc ::
    Maybe (Ptr (FunPtr C_ListBoxFilterFunc)) ->
    ListBoxFilterFunc_WithClosures ->
    C_ListBoxFilterFunc
wrap_ListBoxFilterFunc :: Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
-> ListBoxFilterFunc_WithClosures -> C_ListBoxFilterFunc
wrap_ListBoxFilterFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
funptrptr _cb :: ListBoxFilterFunc_WithClosures
_cb row :: Ptr ListBoxRow
row userData :: Ptr ()
userData = do
    ListBoxRow
row' <- ((ManagedPtr ListBoxRow -> ListBoxRow)
-> Ptr ListBoxRow -> IO ListBoxRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListBoxRow -> ListBoxRow
Gtk.ListBoxRow.ListBoxRow) Ptr ListBoxRow
row
    Bool
result <- ListBoxFilterFunc_WithClosures
_cb  ListBoxRow
row' Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxFilterFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback ListBoxCreateWidgetFunc
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Gtk", name = "Widget"})), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "a #GtkWidget that represents @item", sinceVersion = Nothing}, args = [Arg {argCName = "item", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the item from the model for which to create a widget for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Called for list boxes that are bound to a #GListModel with\ngtk_list_box_bind_model() for each item that gets added to the model.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxCreateWidgetFunc =
    Ptr GObject.Object.Object ->
    Ptr () ->
    IO (Ptr Gtk.Widget.Widget)

-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the item from the model for which to create a widget for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ListBoxCreateWidgetFunc :: FunPtr C_ListBoxCreateWidgetFunc -> C_ListBoxCreateWidgetFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ListBoxCreateWidgetFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_ListBoxCreateWidgetFunc
    -> a
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/
dynamic_ListBoxCreateWidgetFunc :: FunPtr C_ListBoxCreateWidgetFunc -> a -> Ptr () -> m Widget
dynamic_ListBoxCreateWidgetFunc __funPtr :: FunPtr C_ListBoxCreateWidgetFunc
__funPtr item :: a
item userData :: Ptr ()
userData = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
item' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    Ptr Widget
result <- (FunPtr C_ListBoxCreateWidgetFunc -> C_ListBoxCreateWidgetFunc
__dynamic_C_ListBoxCreateWidgetFunc FunPtr C_ListBoxCreateWidgetFunc
__funPtr) Ptr Object
item' Ptr ()
userData
    Text -> C_WidgetClassUnrootFieldCallback
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "listBoxCreateWidgetFunc" Ptr Widget
result
    Widget
result' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result'

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

-- | Called for list boxes that are bound to a t'GI.Gio.Interfaces.ListModel.ListModel' with
-- 'GI.Gtk.Objects.ListBox.listBoxBindModel' for each item that gets added to the model.
type ListBoxCreateWidgetFunc =
    GObject.Object.Object
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> IO Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxCreateWidgetFunc`@.
noListBoxCreateWidgetFunc :: Maybe ListBoxCreateWidgetFunc
noListBoxCreateWidgetFunc :: Maybe ListBoxCreateWidgetFunc
noListBoxCreateWidgetFunc = Maybe ListBoxCreateWidgetFunc
forall a. Maybe a
Nothing

-- | Called for list boxes that are bound to a t'GI.Gio.Interfaces.ListModel.ListModel' with
-- 'GI.Gtk.Objects.ListBox.listBoxBindModel' for each item that gets added to the model.
type ListBoxCreateWidgetFunc_WithClosures =
    GObject.Object.Object
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxCreateWidgetFunc_WithClosures`@.
noListBoxCreateWidgetFunc_WithClosures :: Maybe ListBoxCreateWidgetFunc_WithClosures
noListBoxCreateWidgetFunc_WithClosures :: Maybe ListBoxCreateWidgetFunc_WithClosures
noListBoxCreateWidgetFunc_WithClosures = Maybe ListBoxCreateWidgetFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ListBoxCreateWidgetFunc :: ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
drop_closures_ListBoxCreateWidgetFunc :: ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
drop_closures_ListBoxCreateWidgetFunc _f :: ListBoxCreateWidgetFunc
_f item :: Object
item _ = ListBoxCreateWidgetFunc
_f Object
item

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxCreateWidgetFunc :: MonadIO m => ListBoxCreateWidgetFunc -> m (GClosure C_ListBoxCreateWidgetFunc)
genClosure_ListBoxCreateWidgetFunc :: ListBoxCreateWidgetFunc -> m (GClosure C_ListBoxCreateWidgetFunc)
genClosure_ListBoxCreateWidgetFunc cb :: ListBoxCreateWidgetFunc
cb = IO (GClosure C_ListBoxCreateWidgetFunc)
-> m (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxCreateWidgetFunc)
 -> m (GClosure C_ListBoxCreateWidgetFunc))
-> IO (GClosure C_ListBoxCreateWidgetFunc)
-> m (GClosure C_ListBoxCreateWidgetFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxCreateWidgetFunc_WithClosures
cb' = ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
drop_closures_ListBoxCreateWidgetFunc ListBoxCreateWidgetFunc
cb
    let cb'' :: C_ListBoxCreateWidgetFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
-> ListBoxCreateWidgetFunc_WithClosures
-> C_ListBoxCreateWidgetFunc
wrap_ListBoxCreateWidgetFunc Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
forall a. Maybe a
Nothing ListBoxCreateWidgetFunc_WithClosures
cb'
    C_ListBoxCreateWidgetFunc -> IO (FunPtr C_ListBoxCreateWidgetFunc)
mk_ListBoxCreateWidgetFunc C_ListBoxCreateWidgetFunc
cb'' IO (FunPtr C_ListBoxCreateWidgetFunc)
-> (FunPtr C_ListBoxCreateWidgetFunc
    -> IO (GClosure C_ListBoxCreateWidgetFunc))
-> IO (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxCreateWidgetFunc
-> IO (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxCreateWidgetFunc` into a `C_ListBoxCreateWidgetFunc`.
wrap_ListBoxCreateWidgetFunc ::
    Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc)) ->
    ListBoxCreateWidgetFunc_WithClosures ->
    C_ListBoxCreateWidgetFunc
wrap_ListBoxCreateWidgetFunc :: Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
-> ListBoxCreateWidgetFunc_WithClosures
-> C_ListBoxCreateWidgetFunc
wrap_ListBoxCreateWidgetFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
funptrptr _cb :: ListBoxCreateWidgetFunc_WithClosures
_cb item :: Ptr Object
item userData :: Ptr ()
userData = do
    Object
item' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
item
    Widget
result <- ListBoxCreateWidgetFunc_WithClosures
_cb  Object
item' Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
funptrptr
    Ptr Widget
result' <- Widget -> IO (Ptr Widget)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject Widget
result
    Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
result'


-- callback IconViewForeachFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "icon_view", argType = TInterface (Name {namespace = "Gtk", name = "IconView"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkIconView", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "path", argType = TInterface (Name {namespace = "Gtk", name = "TreePath"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GtkTreePath of a selected row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_icon_view_selected_foreach() to map all\nselected rows.  It will be called on every selected row in the view.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_IconViewForeachFunc =
    Ptr Gtk.IconView.IconView ->
    Ptr Gtk.TreePath.TreePath ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "icon_view"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "IconView" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkIconView" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "path"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreePath" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkTreePath of a selected row"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_IconViewForeachFunc :: FunPtr C_IconViewForeachFunc -> C_IconViewForeachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_IconViewForeachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.IconView.IsIconView a) =>
    FunPtr C_IconViewForeachFunc
    -> a
    -- ^ /@iconView@/: a t'GI.Gtk.Objects.IconView.IconView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> Ptr ()
    -- ^ /@data@/: user data
    -> m ()
dynamic_IconViewForeachFunc :: FunPtr C_IconViewForeachFunc -> a -> TreePath -> Ptr () -> m ()
dynamic_IconViewForeachFunc __funPtr :: FunPtr C_IconViewForeachFunc
__funPtr iconView :: a
iconView path :: TreePath
path data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr IconView
iconView' <- a -> IO (Ptr IconView)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
iconView
    Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
    (FunPtr C_IconViewForeachFunc -> C_IconViewForeachFunc
__dynamic_C_IconViewForeachFunc FunPtr C_IconViewForeachFunc
__funPtr) Ptr IconView
iconView' Ptr TreePath
path' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
iconView
    TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function used by 'GI.Gtk.Objects.IconView.iconViewSelectedForeach' to map all
-- selected rows.  It will be called on every selected row in the view.
type IconViewForeachFunc =
    Gtk.IconView.IconView
    -- ^ /@iconView@/: a t'GI.Gtk.Objects.IconView.IconView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `IconViewForeachFunc`@.
noIconViewForeachFunc :: Maybe IconViewForeachFunc
noIconViewForeachFunc :: Maybe IconViewForeachFunc
noIconViewForeachFunc = Maybe IconViewForeachFunc
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.IconView.iconViewSelectedForeach' to map all
-- selected rows.  It will be called on every selected row in the view.
type IconViewForeachFunc_WithClosures =
    Gtk.IconView.IconView
    -- ^ /@iconView@/: a t'GI.Gtk.Objects.IconView.IconView'
    -> Gtk.TreePath.TreePath
    -- ^ /@path@/: The t'GI.Gtk.Structs.TreePath.TreePath' of a selected row
    -> Ptr ()
    -- ^ /@data@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `IconViewForeachFunc_WithClosures`@.
noIconViewForeachFunc_WithClosures :: Maybe IconViewForeachFunc_WithClosures
noIconViewForeachFunc_WithClosures :: Maybe IconViewForeachFunc_WithClosures
noIconViewForeachFunc_WithClosures = Maybe IconViewForeachFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_IconViewForeachFunc :: IconViewForeachFunc -> IconViewForeachFunc_WithClosures
drop_closures_IconViewForeachFunc :: IconViewForeachFunc -> IconViewForeachFunc_WithClosures
drop_closures_IconViewForeachFunc _f :: IconViewForeachFunc
_f iconView :: IconView
iconView path :: TreePath
path _ = IconViewForeachFunc
_f IconView
iconView TreePath
path

-- | Wrap the callback into a `GClosure`.
genClosure_IconViewForeachFunc :: MonadIO m => IconViewForeachFunc -> m (GClosure C_IconViewForeachFunc)
genClosure_IconViewForeachFunc :: IconViewForeachFunc -> m (GClosure C_IconViewForeachFunc)
genClosure_IconViewForeachFunc cb :: IconViewForeachFunc
cb = IO (GClosure C_IconViewForeachFunc)
-> m (GClosure C_IconViewForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_IconViewForeachFunc)
 -> m (GClosure C_IconViewForeachFunc))
-> IO (GClosure C_IconViewForeachFunc)
-> m (GClosure C_IconViewForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: IconViewForeachFunc_WithClosures
cb' = IconViewForeachFunc -> IconViewForeachFunc_WithClosures
drop_closures_IconViewForeachFunc IconViewForeachFunc
cb
    let cb'' :: C_IconViewForeachFunc
cb'' = Maybe (Ptr (FunPtr C_IconViewForeachFunc))
-> IconViewForeachFunc_WithClosures -> C_IconViewForeachFunc
wrap_IconViewForeachFunc Maybe (Ptr (FunPtr C_IconViewForeachFunc))
forall a. Maybe a
Nothing IconViewForeachFunc_WithClosures
cb'
    C_IconViewForeachFunc -> IO (FunPtr C_IconViewForeachFunc)
mk_IconViewForeachFunc C_IconViewForeachFunc
cb'' IO (FunPtr C_IconViewForeachFunc)
-> (FunPtr C_IconViewForeachFunc
    -> IO (GClosure C_IconViewForeachFunc))
-> IO (GClosure C_IconViewForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_IconViewForeachFunc -> IO (GClosure C_IconViewForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `IconViewForeachFunc` into a `C_IconViewForeachFunc`.
wrap_IconViewForeachFunc ::
    Maybe (Ptr (FunPtr C_IconViewForeachFunc)) ->
    IconViewForeachFunc_WithClosures ->
    C_IconViewForeachFunc
wrap_IconViewForeachFunc :: Maybe (Ptr (FunPtr C_IconViewForeachFunc))
-> IconViewForeachFunc_WithClosures -> C_IconViewForeachFunc
wrap_IconViewForeachFunc funptrptr :: Maybe (Ptr (FunPtr C_IconViewForeachFunc))
funptrptr _cb :: IconViewForeachFunc_WithClosures
_cb iconView :: Ptr IconView
iconView path :: Ptr TreePath
path data_ :: Ptr ()
data_ = do
    IconView
iconView' <- ((ManagedPtr IconView -> IconView) -> Ptr IconView -> IO IconView
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IconView -> IconView
Gtk.IconView.IconView) Ptr IconView
iconView
    (ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
        IconViewForeachFunc_WithClosures
_cb  IconView
iconView' TreePath
path' Ptr ()
data_
        Maybe (Ptr (FunPtr C_IconViewForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_IconViewForeachFunc))
funptrptr


-- callback FontFilterFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the font should be displayed", sinceVersion = Nothing}, args = [Arg {argCName = "family", argType = TInterface (Name {namespace = "Pango", name = "FontFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFamily", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "face", argType = TInterface (Name {namespace = "Pango", name = "FontFace"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #PangoFontFace belonging to @family", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to gtk_font_chooser_set_filter_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of function that is used for deciding what fonts get\nshown in a #GtkFontChooser. See gtk_font_chooser_set_filter_func().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FontFilterFunc =
    Ptr Pango.FontFamily.FontFamily ->
    Ptr Pango.FontFace.FontFace ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "family"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontFamily" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoFontFamily" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "face"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontFace" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #PangoFontFace belonging to @family"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data passed to gtk_font_chooser_set_filter_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FontFilterFunc :: FunPtr C_FontFilterFunc -> C_FontFilterFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FontFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Pango.FontFamily.IsFontFamily a, Pango.FontFace.IsFontFace b) =>
    FunPtr C_FontFilterFunc
    -> a
    -- ^ /@family@/: a t'GI.Pango.Objects.FontFamily.FontFamily'
    -> b
    -- ^ /@face@/: a t'GI.Pango.Objects.FontFace.FontFace' belonging to /@family@/
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Interfaces.FontChooser.fontChooserSetFilterFunc'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the font should be displayed
dynamic_FontFilterFunc :: FunPtr C_FontFilterFunc -> a -> b -> Ptr () -> m Bool
dynamic_FontFilterFunc __funPtr :: FunPtr C_FontFilterFunc
__funPtr family :: a
family face :: b
face data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FontFamily
family' <- a -> IO (Ptr FontFamily)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
family
    Ptr FontFace
face' <- b -> IO (Ptr FontFace)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
face
    CInt
result <- (FunPtr C_FontFilterFunc -> C_FontFilterFunc
__dynamic_C_FontFilterFunc FunPtr C_FontFilterFunc
__funPtr) Ptr FontFamily
family' Ptr FontFace
face' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
family
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
face
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | The type of function that is used for deciding what fonts get
-- shown in a t'GI.Gtk.Interfaces.FontChooser.FontChooser'. See 'GI.Gtk.Interfaces.FontChooser.fontChooserSetFilterFunc'.
type FontFilterFunc =
    Pango.FontFamily.FontFamily
    -- ^ /@family@/: a t'GI.Pango.Objects.FontFamily.FontFamily'
    -> Pango.FontFace.FontFace
    -- ^ /@face@/: a t'GI.Pango.Objects.FontFace.FontFace' belonging to /@family@/
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the font should be displayed

-- | A convenience synonym for @`Nothing` :: `Maybe` `FontFilterFunc`@.
noFontFilterFunc :: Maybe FontFilterFunc
noFontFilterFunc :: Maybe FontFilterFunc
noFontFilterFunc = Maybe FontFilterFunc
forall a. Maybe a
Nothing

-- | The type of function that is used for deciding what fonts get
-- shown in a t'GI.Gtk.Interfaces.FontChooser.FontChooser'. See 'GI.Gtk.Interfaces.FontChooser.fontChooserSetFilterFunc'.
type FontFilterFunc_WithClosures =
    Pango.FontFamily.FontFamily
    -- ^ /@family@/: a t'GI.Pango.Objects.FontFamily.FontFamily'
    -> Pango.FontFace.FontFace
    -- ^ /@face@/: a t'GI.Pango.Objects.FontFace.FontFace' belonging to /@family@/
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Interfaces.FontChooser.fontChooserSetFilterFunc'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the font should be displayed

-- | A convenience synonym for @`Nothing` :: `Maybe` `FontFilterFunc_WithClosures`@.
noFontFilterFunc_WithClosures :: Maybe FontFilterFunc_WithClosures
noFontFilterFunc_WithClosures :: Maybe FontFilterFunc_WithClosures
noFontFilterFunc_WithClosures = Maybe FontFilterFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FontFilterFunc :: FontFilterFunc -> FontFilterFunc_WithClosures
drop_closures_FontFilterFunc :: FontFilterFunc -> FontFilterFunc_WithClosures
drop_closures_FontFilterFunc _f :: FontFilterFunc
_f family :: FontFamily
family face :: FontFace
face _ = FontFilterFunc
_f FontFamily
family FontFace
face

-- | Wrap the callback into a `GClosure`.
genClosure_FontFilterFunc :: MonadIO m => FontFilterFunc -> m (GClosure C_FontFilterFunc)
genClosure_FontFilterFunc :: FontFilterFunc -> m (GClosure C_FontFilterFunc)
genClosure_FontFilterFunc cb :: FontFilterFunc
cb = IO (GClosure C_FontFilterFunc) -> m (GClosure C_FontFilterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FontFilterFunc) -> m (GClosure C_FontFilterFunc))
-> IO (GClosure C_FontFilterFunc) -> m (GClosure C_FontFilterFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FontFilterFunc_WithClosures
cb' = FontFilterFunc -> FontFilterFunc_WithClosures
drop_closures_FontFilterFunc FontFilterFunc
cb
    let cb'' :: C_FontFilterFunc
cb'' = Maybe (Ptr (FunPtr C_FontFilterFunc))
-> FontFilterFunc_WithClosures -> C_FontFilterFunc
wrap_FontFilterFunc Maybe (Ptr (FunPtr C_FontFilterFunc))
forall a. Maybe a
Nothing FontFilterFunc_WithClosures
cb'
    C_FontFilterFunc -> IO (FunPtr C_FontFilterFunc)
mk_FontFilterFunc C_FontFilterFunc
cb'' IO (FunPtr C_FontFilterFunc)
-> (FunPtr C_FontFilterFunc -> IO (GClosure C_FontFilterFunc))
-> IO (GClosure C_FontFilterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FontFilterFunc -> IO (GClosure C_FontFilterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FontFilterFunc` into a `C_FontFilterFunc`.
wrap_FontFilterFunc ::
    Maybe (Ptr (FunPtr C_FontFilterFunc)) ->
    FontFilterFunc_WithClosures ->
    C_FontFilterFunc
wrap_FontFilterFunc :: Maybe (Ptr (FunPtr C_FontFilterFunc))
-> FontFilterFunc_WithClosures -> C_FontFilterFunc
wrap_FontFilterFunc funptrptr :: Maybe (Ptr (FunPtr C_FontFilterFunc))
funptrptr _cb :: FontFilterFunc_WithClosures
_cb family :: Ptr FontFamily
family face :: Ptr FontFace
face data_ :: Ptr ()
data_ = do
    FontFamily
family' <- ((ManagedPtr FontFamily -> FontFamily)
-> Ptr FontFamily -> IO FontFamily
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FontFamily -> FontFamily
Pango.FontFamily.FontFamily) Ptr FontFamily
family
    FontFace
face' <- ((ManagedPtr FontFace -> FontFace) -> Ptr FontFace -> IO FontFace
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FontFace -> FontFace
Pango.FontFace.FontFace) Ptr FontFace
face
    Bool
result <- FontFilterFunc_WithClosures
_cb  FontFamily
family' FontFace
face' Ptr ()
data_
    Maybe (Ptr (FunPtr C_FontFilterFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FontFilterFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback FlowBoxSortFunc
--          -> Callable {returnType = Just (TBasicType TInt), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "< 0 if @child1 should be before @child2, 0 if\n    the are equal, and > 0 otherwise", sinceVersion = Nothing}, args = [Arg {argCName = "child1", argType = TInterface (Name {namespace = "Gtk", name = "FlowBoxChild"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the first child", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child2", argType = TInterface (Name {namespace = "Gtk", name = "FlowBoxChild"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the second child", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function to compare two children to determine which\nshould come first.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FlowBoxSortFunc =
    Ptr Gtk.FlowBoxChild.FlowBoxChild ->
    Ptr Gtk.FlowBoxChild.FlowBoxChild ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "child1"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FlowBoxChild" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the first child" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child2"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FlowBoxChild" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the second child" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FlowBoxSortFunc :: FunPtr C_FlowBoxSortFunc -> C_FlowBoxSortFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FlowBoxSortFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.FlowBoxChild.IsFlowBoxChild a, Gtk.FlowBoxChild.IsFlowBoxChild b) =>
    FunPtr C_FlowBoxSortFunc
    -> a
    -- ^ /@child1@/: the first child
    -> b
    -- ^ /@child2@/: the second child
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Int32
    -- ^ __Returns:__ \< 0 if /@child1@/ should be before /@child2@/, 0 if
    --     the are equal, and > 0 otherwise
dynamic_FlowBoxSortFunc :: FunPtr C_FlowBoxSortFunc -> a -> b -> Ptr () -> m Int32
dynamic_FlowBoxSortFunc __funPtr :: FunPtr C_FlowBoxSortFunc
__funPtr child1 :: a
child1 child2 :: b
child2 userData :: Ptr ()
userData = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr FlowBoxChild
child1' <- a -> IO (Ptr FlowBoxChild)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
child1
    Ptr FlowBoxChild
child2' <- b -> IO (Ptr FlowBoxChild)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child2
    Int32
result <- (FunPtr C_FlowBoxSortFunc -> C_FlowBoxSortFunc
__dynamic_C_FlowBoxSortFunc FunPtr C_FlowBoxSortFunc
__funPtr) Ptr FlowBoxChild
child1' Ptr FlowBoxChild
child2' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
child1
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child2
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

-- | A function to compare two children to determine which
-- should come first.
type FlowBoxSortFunc =
    Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child1@/: the first child
    -> Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child2@/: the second child
    -> IO Int32
    -- ^ __Returns:__ \< 0 if /@child1@/ should be before /@child2@/, 0 if
    --     the are equal, and > 0 otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxSortFunc`@.
noFlowBoxSortFunc :: Maybe FlowBoxSortFunc
noFlowBoxSortFunc :: Maybe FlowBoxSortFunc
noFlowBoxSortFunc = Maybe FlowBoxSortFunc
forall a. Maybe a
Nothing

-- | A function to compare two children to determine which
-- should come first.
type FlowBoxSortFunc_WithClosures =
    Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child1@/: the first child
    -> Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child2@/: the second child
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Int32
    -- ^ __Returns:__ \< 0 if /@child1@/ should be before /@child2@/, 0 if
    --     the are equal, and > 0 otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxSortFunc_WithClosures`@.
noFlowBoxSortFunc_WithClosures :: Maybe FlowBoxSortFunc_WithClosures
noFlowBoxSortFunc_WithClosures :: Maybe FlowBoxSortFunc_WithClosures
noFlowBoxSortFunc_WithClosures = Maybe FlowBoxSortFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FlowBoxSortFunc :: FlowBoxSortFunc -> FlowBoxSortFunc_WithClosures
drop_closures_FlowBoxSortFunc :: FlowBoxSortFunc -> FlowBoxSortFunc_WithClosures
drop_closures_FlowBoxSortFunc _f :: FlowBoxSortFunc
_f child1 :: FlowBoxChild
child1 child2 :: FlowBoxChild
child2 _ = FlowBoxSortFunc
_f FlowBoxChild
child1 FlowBoxChild
child2

-- | Wrap the callback into a `GClosure`.
genClosure_FlowBoxSortFunc :: MonadIO m => FlowBoxSortFunc -> m (GClosure C_FlowBoxSortFunc)
genClosure_FlowBoxSortFunc :: FlowBoxSortFunc -> m (GClosure C_FlowBoxSortFunc)
genClosure_FlowBoxSortFunc cb :: FlowBoxSortFunc
cb = IO (GClosure C_FlowBoxSortFunc) -> m (GClosure C_FlowBoxSortFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FlowBoxSortFunc) -> m (GClosure C_FlowBoxSortFunc))
-> IO (GClosure C_FlowBoxSortFunc)
-> m (GClosure C_FlowBoxSortFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FlowBoxSortFunc_WithClosures
cb' = FlowBoxSortFunc -> FlowBoxSortFunc_WithClosures
drop_closures_FlowBoxSortFunc FlowBoxSortFunc
cb
    let cb'' :: C_FlowBoxSortFunc
cb'' = Maybe (Ptr (FunPtr C_FlowBoxSortFunc))
-> FlowBoxSortFunc_WithClosures -> C_FlowBoxSortFunc
wrap_FlowBoxSortFunc Maybe (Ptr (FunPtr C_FlowBoxSortFunc))
forall a. Maybe a
Nothing FlowBoxSortFunc_WithClosures
cb'
    C_FlowBoxSortFunc -> IO (FunPtr C_FlowBoxSortFunc)
mk_FlowBoxSortFunc C_FlowBoxSortFunc
cb'' IO (FunPtr C_FlowBoxSortFunc)
-> (FunPtr C_FlowBoxSortFunc -> IO (GClosure C_FlowBoxSortFunc))
-> IO (GClosure C_FlowBoxSortFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FlowBoxSortFunc -> IO (GClosure C_FlowBoxSortFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FlowBoxSortFunc` into a `C_FlowBoxSortFunc`.
wrap_FlowBoxSortFunc ::
    Maybe (Ptr (FunPtr C_FlowBoxSortFunc)) ->
    FlowBoxSortFunc_WithClosures ->
    C_FlowBoxSortFunc
wrap_FlowBoxSortFunc :: Maybe (Ptr (FunPtr C_FlowBoxSortFunc))
-> FlowBoxSortFunc_WithClosures -> C_FlowBoxSortFunc
wrap_FlowBoxSortFunc funptrptr :: Maybe (Ptr (FunPtr C_FlowBoxSortFunc))
funptrptr _cb :: FlowBoxSortFunc_WithClosures
_cb child1 :: Ptr FlowBoxChild
child1 child2 :: Ptr FlowBoxChild
child2 userData :: Ptr ()
userData = do
    FlowBoxChild
child1' <- ((ManagedPtr FlowBoxChild -> FlowBoxChild)
-> Ptr FlowBoxChild -> IO FlowBoxChild
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FlowBoxChild -> FlowBoxChild
Gtk.FlowBoxChild.FlowBoxChild) Ptr FlowBoxChild
child1
    FlowBoxChild
child2' <- ((ManagedPtr FlowBoxChild -> FlowBoxChild)
-> Ptr FlowBoxChild -> IO FlowBoxChild
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FlowBoxChild -> FlowBoxChild
Gtk.FlowBoxChild.FlowBoxChild) Ptr FlowBoxChild
child2
    Int32
result <- FlowBoxSortFunc_WithClosures
_cb  FlowBoxChild
child1' FlowBoxChild
child2' Ptr ()
userData
    Maybe (Ptr (FunPtr C_FlowBoxSortFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FlowBoxSortFunc))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback FlowBoxForeachFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "box", argType = TInterface (Name {namespace = "Gtk", name = "FlowBox"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFlowBox", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Gtk", name = "FlowBoxChild"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFlowBoxChild", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_flow_box_selected_foreach().\nIt will be called on every selected child of the @box.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FlowBoxForeachFunc =
    Ptr Gtk.FlowBox.FlowBox ->
    Ptr Gtk.FlowBoxChild.FlowBoxChild ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "box"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FlowBox" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFlowBox" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FlowBoxChild" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFlowBoxChild" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FlowBoxForeachFunc :: FunPtr C_FlowBoxForeachFunc -> C_FlowBoxForeachFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FlowBoxForeachFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.FlowBox.IsFlowBox a, Gtk.FlowBoxChild.IsFlowBoxChild b) =>
    FunPtr C_FlowBoxForeachFunc
    -> a
    -- ^ /@box@/: a t'GI.Gtk.Objects.FlowBox.FlowBox'
    -> b
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild'
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_FlowBoxForeachFunc :: FunPtr C_FlowBoxForeachFunc -> a -> b -> Ptr () -> m ()
dynamic_FlowBoxForeachFunc __funPtr :: FunPtr C_FlowBoxForeachFunc
__funPtr box :: a
box child :: b
child userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FlowBox
box' <- a -> IO (Ptr FlowBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    Ptr FlowBoxChild
child' <- b -> IO (Ptr FlowBoxChild)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    (FunPtr C_FlowBoxForeachFunc -> C_FlowBoxForeachFunc
__dynamic_C_FlowBoxForeachFunc FunPtr C_FlowBoxForeachFunc
__funPtr) Ptr FlowBox
box' Ptr FlowBoxChild
child' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function used by 'GI.Gtk.Objects.FlowBox.flowBoxSelectedForeach'.
-- It will be called on every selected child of the /@box@/.
type FlowBoxForeachFunc =
    Gtk.FlowBox.FlowBox
    -- ^ /@box@/: a t'GI.Gtk.Objects.FlowBox.FlowBox'
    -> Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxForeachFunc`@.
noFlowBoxForeachFunc :: Maybe FlowBoxForeachFunc
noFlowBoxForeachFunc :: Maybe FlowBoxForeachFunc
noFlowBoxForeachFunc = Maybe FlowBoxForeachFunc
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.FlowBox.flowBoxSelectedForeach'.
-- It will be called on every selected child of the /@box@/.
type FlowBoxForeachFunc_WithClosures =
    Gtk.FlowBox.FlowBox
    -- ^ /@box@/: a t'GI.Gtk.Objects.FlowBox.FlowBox'
    -> Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild'
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxForeachFunc_WithClosures`@.
noFlowBoxForeachFunc_WithClosures :: Maybe FlowBoxForeachFunc_WithClosures
noFlowBoxForeachFunc_WithClosures :: Maybe FlowBoxForeachFunc_WithClosures
noFlowBoxForeachFunc_WithClosures = Maybe FlowBoxForeachFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FlowBoxForeachFunc :: FlowBoxForeachFunc -> FlowBoxForeachFunc_WithClosures
drop_closures_FlowBoxForeachFunc :: FlowBoxForeachFunc -> FlowBoxForeachFunc_WithClosures
drop_closures_FlowBoxForeachFunc _f :: FlowBoxForeachFunc
_f box :: FlowBox
box child :: FlowBoxChild
child _ = FlowBoxForeachFunc
_f FlowBox
box FlowBoxChild
child

-- | Wrap the callback into a `GClosure`.
genClosure_FlowBoxForeachFunc :: MonadIO m => FlowBoxForeachFunc -> m (GClosure C_FlowBoxForeachFunc)
genClosure_FlowBoxForeachFunc :: FlowBoxForeachFunc -> m (GClosure C_FlowBoxForeachFunc)
genClosure_FlowBoxForeachFunc cb :: FlowBoxForeachFunc
cb = IO (GClosure C_FlowBoxForeachFunc)
-> m (GClosure C_FlowBoxForeachFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FlowBoxForeachFunc)
 -> m (GClosure C_FlowBoxForeachFunc))
-> IO (GClosure C_FlowBoxForeachFunc)
-> m (GClosure C_FlowBoxForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FlowBoxForeachFunc_WithClosures
cb' = FlowBoxForeachFunc -> FlowBoxForeachFunc_WithClosures
drop_closures_FlowBoxForeachFunc FlowBoxForeachFunc
cb
    let cb'' :: C_FlowBoxForeachFunc
cb'' = Maybe (Ptr (FunPtr C_FlowBoxForeachFunc))
-> FlowBoxForeachFunc_WithClosures -> C_FlowBoxForeachFunc
wrap_FlowBoxForeachFunc Maybe (Ptr (FunPtr C_FlowBoxForeachFunc))
forall a. Maybe a
Nothing FlowBoxForeachFunc_WithClosures
cb'
    C_FlowBoxForeachFunc -> IO (FunPtr C_FlowBoxForeachFunc)
mk_FlowBoxForeachFunc C_FlowBoxForeachFunc
cb'' IO (FunPtr C_FlowBoxForeachFunc)
-> (FunPtr C_FlowBoxForeachFunc
    -> IO (GClosure C_FlowBoxForeachFunc))
-> IO (GClosure C_FlowBoxForeachFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FlowBoxForeachFunc -> IO (GClosure C_FlowBoxForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FlowBoxForeachFunc` into a `C_FlowBoxForeachFunc`.
wrap_FlowBoxForeachFunc ::
    Maybe (Ptr (FunPtr C_FlowBoxForeachFunc)) ->
    FlowBoxForeachFunc_WithClosures ->
    C_FlowBoxForeachFunc
wrap_FlowBoxForeachFunc :: Maybe (Ptr (FunPtr C_FlowBoxForeachFunc))
-> FlowBoxForeachFunc_WithClosures -> C_FlowBoxForeachFunc
wrap_FlowBoxForeachFunc funptrptr :: Maybe (Ptr (FunPtr C_FlowBoxForeachFunc))
funptrptr _cb :: FlowBoxForeachFunc_WithClosures
_cb box :: Ptr FlowBox
box child :: Ptr FlowBoxChild
child userData :: Ptr ()
userData = do
    FlowBox
box' <- ((ManagedPtr FlowBox -> FlowBox) -> Ptr FlowBox -> IO FlowBox
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FlowBox -> FlowBox
Gtk.FlowBox.FlowBox) Ptr FlowBox
box
    FlowBoxChild
child' <- ((ManagedPtr FlowBoxChild -> FlowBoxChild)
-> Ptr FlowBoxChild -> IO FlowBoxChild
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FlowBoxChild -> FlowBoxChild
Gtk.FlowBoxChild.FlowBoxChild) Ptr FlowBoxChild
child
    FlowBoxForeachFunc_WithClosures
_cb  FlowBox
box' FlowBoxChild
child' Ptr ()
userData
    Maybe (Ptr (FunPtr C_FlowBoxForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FlowBoxForeachFunc))
funptrptr


-- callback FlowBoxFilterFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the row should be visible, %FALSE otherwise", sinceVersion = Nothing}, args = [Arg {argCName = "child", argType = TInterface (Name {namespace = "Gtk", name = "FlowBoxChild"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFlowBoxChild that may be filtered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function that will be called whenrever a child changes\nor is added. It lets you control if the child should be\nvisible or not.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FlowBoxFilterFunc =
    Ptr Gtk.FlowBoxChild.FlowBoxChild ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "child"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FlowBoxChild" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFlowBoxChild that may be filtered"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FlowBoxFilterFunc :: FunPtr C_FlowBoxFilterFunc -> C_FlowBoxFilterFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FlowBoxFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.FlowBoxChild.IsFlowBoxChild a) =>
    FunPtr C_FlowBoxFilterFunc
    -> a
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild' that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise
dynamic_FlowBoxFilterFunc :: FunPtr C_FlowBoxFilterFunc -> a -> Ptr () -> m Bool
dynamic_FlowBoxFilterFunc __funPtr :: FunPtr C_FlowBoxFilterFunc
__funPtr child :: a
child userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FlowBoxChild
child' <- a -> IO (Ptr FlowBoxChild)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
child
    CInt
result <- (FunPtr C_FlowBoxFilterFunc -> C_FlowBoxFilterFunc
__dynamic_C_FlowBoxFilterFunc FunPtr C_FlowBoxFilterFunc
__funPtr) Ptr FlowBoxChild
child' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
child
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | A function that will be called whenrever a child changes
-- or is added. It lets you control if the child should be
-- visible or not.
type FlowBoxFilterFunc =
    Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild' that may be filtered
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxFilterFunc`@.
noFlowBoxFilterFunc :: Maybe FlowBoxFilterFunc
noFlowBoxFilterFunc :: Maybe FlowBoxFilterFunc
noFlowBoxFilterFunc = Maybe FlowBoxFilterFunc
forall a. Maybe a
Nothing

-- | A function that will be called whenrever a child changes
-- or is added. It lets you control if the child should be
-- visible or not.
type FlowBoxFilterFunc_WithClosures =
    Gtk.FlowBoxChild.FlowBoxChild
    -- ^ /@child@/: a t'GI.Gtk.Objects.FlowBoxChild.FlowBoxChild' that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the row should be visible, 'P.False' otherwise

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxFilterFunc_WithClosures`@.
noFlowBoxFilterFunc_WithClosures :: Maybe FlowBoxFilterFunc_WithClosures
noFlowBoxFilterFunc_WithClosures :: Maybe FlowBoxFilterFunc_WithClosures
noFlowBoxFilterFunc_WithClosures = Maybe FlowBoxFilterFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FlowBoxFilterFunc :: FlowBoxFilterFunc -> FlowBoxFilterFunc_WithClosures
drop_closures_FlowBoxFilterFunc :: FlowBoxFilterFunc -> FlowBoxFilterFunc_WithClosures
drop_closures_FlowBoxFilterFunc _f :: FlowBoxFilterFunc
_f child :: FlowBoxChild
child _ = FlowBoxFilterFunc
_f FlowBoxChild
child

-- | Wrap the callback into a `GClosure`.
genClosure_FlowBoxFilterFunc :: MonadIO m => FlowBoxFilterFunc -> m (GClosure C_FlowBoxFilterFunc)
genClosure_FlowBoxFilterFunc :: FlowBoxFilterFunc -> m (GClosure C_FlowBoxFilterFunc)
genClosure_FlowBoxFilterFunc cb :: FlowBoxFilterFunc
cb = IO (GClosure C_FlowBoxFilterFunc)
-> m (GClosure C_FlowBoxFilterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FlowBoxFilterFunc)
 -> m (GClosure C_FlowBoxFilterFunc))
-> IO (GClosure C_FlowBoxFilterFunc)
-> m (GClosure C_FlowBoxFilterFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FlowBoxFilterFunc_WithClosures
cb' = FlowBoxFilterFunc -> FlowBoxFilterFunc_WithClosures
drop_closures_FlowBoxFilterFunc FlowBoxFilterFunc
cb
    let cb'' :: C_FlowBoxFilterFunc
cb'' = Maybe (Ptr (FunPtr C_FlowBoxFilterFunc))
-> FlowBoxFilterFunc_WithClosures -> C_FlowBoxFilterFunc
wrap_FlowBoxFilterFunc Maybe (Ptr (FunPtr C_FlowBoxFilterFunc))
forall a. Maybe a
Nothing FlowBoxFilterFunc_WithClosures
cb'
    C_FlowBoxFilterFunc -> IO (FunPtr C_FlowBoxFilterFunc)
mk_FlowBoxFilterFunc C_FlowBoxFilterFunc
cb'' IO (FunPtr C_FlowBoxFilterFunc)
-> (FunPtr C_FlowBoxFilterFunc
    -> IO (GClosure C_FlowBoxFilterFunc))
-> IO (GClosure C_FlowBoxFilterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FlowBoxFilterFunc -> IO (GClosure C_FlowBoxFilterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FlowBoxFilterFunc` into a `C_FlowBoxFilterFunc`.
wrap_FlowBoxFilterFunc ::
    Maybe (Ptr (FunPtr C_FlowBoxFilterFunc)) ->
    FlowBoxFilterFunc_WithClosures ->
    C_FlowBoxFilterFunc
wrap_FlowBoxFilterFunc :: Maybe (Ptr (FunPtr C_FlowBoxFilterFunc))
-> FlowBoxFilterFunc_WithClosures -> C_FlowBoxFilterFunc
wrap_FlowBoxFilterFunc funptrptr :: Maybe (Ptr (FunPtr C_FlowBoxFilterFunc))
funptrptr _cb :: FlowBoxFilterFunc_WithClosures
_cb child :: Ptr FlowBoxChild
child userData :: Ptr ()
userData = do
    FlowBoxChild
child' <- ((ManagedPtr FlowBoxChild -> FlowBoxChild)
-> Ptr FlowBoxChild -> IO FlowBoxChild
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FlowBoxChild -> FlowBoxChild
Gtk.FlowBoxChild.FlowBoxChild) Ptr FlowBoxChild
child
    Bool
result <- FlowBoxFilterFunc_WithClosures
_cb  FlowBoxChild
child' Ptr ()
userData
    Maybe (Ptr (FunPtr C_FlowBoxFilterFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FlowBoxFilterFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback FlowBoxCreateWidgetFunc
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Gtk", name = "Widget"})), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "a #GtkWidget that represents @item", sinceVersion = Nothing}, args = [Arg {argCName = "item", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the item from the model for which to create a widget for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data from gtk_flow_box_bind_model()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Called for flow boxes that are bound to a #GListModel with\ngtk_flow_box_bind_model() for each item that gets added to the model.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FlowBoxCreateWidgetFunc =
    Ptr GObject.Object.Object ->
    Ptr () ->
    IO (Ptr Gtk.Widget.Widget)

-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the item from the model for which to create a widget for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data from gtk_flow_box_bind_model()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FlowBoxCreateWidgetFunc :: FunPtr C_FlowBoxCreateWidgetFunc -> C_FlowBoxCreateWidgetFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FlowBoxCreateWidgetFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_FlowBoxCreateWidgetFunc
    -> a
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> Ptr ()
    -- ^ /@userData@/: user data from 'GI.Gtk.Objects.FlowBox.flowBoxBindModel'
    -> m Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/
dynamic_FlowBoxCreateWidgetFunc :: FunPtr C_ListBoxCreateWidgetFunc -> a -> Ptr () -> m Widget
dynamic_FlowBoxCreateWidgetFunc __funPtr :: FunPtr C_ListBoxCreateWidgetFunc
__funPtr item :: a
item userData :: Ptr ()
userData = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
item' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    Ptr Widget
result <- (FunPtr C_ListBoxCreateWidgetFunc -> C_ListBoxCreateWidgetFunc
__dynamic_C_FlowBoxCreateWidgetFunc FunPtr C_ListBoxCreateWidgetFunc
__funPtr) Ptr Object
item' Ptr ()
userData
    Text -> C_WidgetClassUnrootFieldCallback
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "flowBoxCreateWidgetFunc" Ptr Widget
result
    Widget
result' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result'

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

-- | Called for flow boxes that are bound to a t'GI.Gio.Interfaces.ListModel.ListModel' with
-- 'GI.Gtk.Objects.FlowBox.flowBoxBindModel' for each item that gets added to the model.
type FlowBoxCreateWidgetFunc =
    GObject.Object.Object
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> IO Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxCreateWidgetFunc`@.
noFlowBoxCreateWidgetFunc :: Maybe FlowBoxCreateWidgetFunc
noFlowBoxCreateWidgetFunc :: Maybe ListBoxCreateWidgetFunc
noFlowBoxCreateWidgetFunc = Maybe ListBoxCreateWidgetFunc
forall a. Maybe a
Nothing

-- | Called for flow boxes that are bound to a t'GI.Gio.Interfaces.ListModel.ListModel' with
-- 'GI.Gtk.Objects.FlowBox.flowBoxBindModel' for each item that gets added to the model.
type FlowBoxCreateWidgetFunc_WithClosures =
    GObject.Object.Object
    -- ^ /@item@/: the item from the model for which to create a widget for
    -> Ptr ()
    -- ^ /@userData@/: user data from 'GI.Gtk.Objects.FlowBox.flowBoxBindModel'
    -> IO Gtk.Widget.Widget
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget' that represents /@item@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `FlowBoxCreateWidgetFunc_WithClosures`@.
noFlowBoxCreateWidgetFunc_WithClosures :: Maybe FlowBoxCreateWidgetFunc_WithClosures
noFlowBoxCreateWidgetFunc_WithClosures :: Maybe ListBoxCreateWidgetFunc_WithClosures
noFlowBoxCreateWidgetFunc_WithClosures = Maybe ListBoxCreateWidgetFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FlowBoxCreateWidgetFunc :: FlowBoxCreateWidgetFunc -> FlowBoxCreateWidgetFunc_WithClosures
drop_closures_FlowBoxCreateWidgetFunc :: ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
drop_closures_FlowBoxCreateWidgetFunc _f :: ListBoxCreateWidgetFunc
_f item :: Object
item _ = ListBoxCreateWidgetFunc
_f Object
item

-- | Wrap the callback into a `GClosure`.
genClosure_FlowBoxCreateWidgetFunc :: MonadIO m => FlowBoxCreateWidgetFunc -> m (GClosure C_FlowBoxCreateWidgetFunc)
genClosure_FlowBoxCreateWidgetFunc :: ListBoxCreateWidgetFunc -> m (GClosure C_ListBoxCreateWidgetFunc)
genClosure_FlowBoxCreateWidgetFunc cb :: ListBoxCreateWidgetFunc
cb = IO (GClosure C_ListBoxCreateWidgetFunc)
-> m (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxCreateWidgetFunc)
 -> m (GClosure C_ListBoxCreateWidgetFunc))
-> IO (GClosure C_ListBoxCreateWidgetFunc)
-> m (GClosure C_ListBoxCreateWidgetFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ListBoxCreateWidgetFunc_WithClosures
cb' = ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
drop_closures_FlowBoxCreateWidgetFunc ListBoxCreateWidgetFunc
cb
    let cb'' :: C_ListBoxCreateWidgetFunc
cb'' = Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
-> ListBoxCreateWidgetFunc_WithClosures
-> C_ListBoxCreateWidgetFunc
wrap_FlowBoxCreateWidgetFunc Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
forall a. Maybe a
Nothing ListBoxCreateWidgetFunc_WithClosures
cb'
    C_ListBoxCreateWidgetFunc -> IO (FunPtr C_ListBoxCreateWidgetFunc)
mk_FlowBoxCreateWidgetFunc C_ListBoxCreateWidgetFunc
cb'' IO (FunPtr C_ListBoxCreateWidgetFunc)
-> (FunPtr C_ListBoxCreateWidgetFunc
    -> IO (GClosure C_ListBoxCreateWidgetFunc))
-> IO (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxCreateWidgetFunc
-> IO (GClosure C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FlowBoxCreateWidgetFunc` into a `C_FlowBoxCreateWidgetFunc`.
wrap_FlowBoxCreateWidgetFunc ::
    Maybe (Ptr (FunPtr C_FlowBoxCreateWidgetFunc)) ->
    FlowBoxCreateWidgetFunc_WithClosures ->
    C_FlowBoxCreateWidgetFunc
wrap_FlowBoxCreateWidgetFunc :: Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
-> ListBoxCreateWidgetFunc_WithClosures
-> C_ListBoxCreateWidgetFunc
wrap_FlowBoxCreateWidgetFunc funptrptr :: Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
funptrptr _cb :: ListBoxCreateWidgetFunc_WithClosures
_cb item :: Ptr Object
item userData :: Ptr ()
userData = do
    Object
item' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
item
    Widget
result <- ListBoxCreateWidgetFunc_WithClosures
_cb  Object
item' Ptr ()
userData
    Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
funptrptr
    Ptr Widget
result' <- Widget -> IO (Ptr Widget)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject Widget
result
    Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
result'


-- callback FilterListModelFilterFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE to keep the item around", sinceVersion = Nothing}, args = [Arg {argCName = "item", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The item that may be filtered", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "User function that is called to determine if the @item of the original model should be visible.\nIf it should be visible, this function must return %TRUE. If the model should filter out the\n@item, %FALSE must be returned.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FilterListModelFilterFunc =
    Ptr GObject.Object.Object ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "item"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The item that may be filtered"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FilterListModelFilterFunc :: FunPtr C_FilterListModelFilterFunc -> C_FilterListModelFilterFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FilterListModelFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
    FunPtr C_FilterListModelFilterFunc
    -> a
    -- ^ /@item@/: The item that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m Bool
    -- ^ __Returns:__ 'P.True' to keep the item around
dynamic_FilterListModelFilterFunc :: FunPtr C_FilterListModelFilterFunc -> a -> Ptr () -> m Bool
dynamic_FilterListModelFilterFunc __funPtr :: FunPtr C_FilterListModelFilterFunc
__funPtr item :: a
item userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Object
item' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
item
    CInt
result <- (FunPtr C_FilterListModelFilterFunc -> C_FilterListModelFilterFunc
__dynamic_C_FilterListModelFilterFunc FunPtr C_FilterListModelFilterFunc
__funPtr) Ptr Object
item' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
item
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | User function that is called to determine if the /@item@/ of the original model should be visible.
-- If it should be visible, this function must return 'P.True'. If the model should filter out the
-- /@item@/, 'P.False' must be returned.
type FilterListModelFilterFunc =
    GObject.Object.Object
    -- ^ /@item@/: The item that may be filtered
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to keep the item around

-- | A convenience synonym for @`Nothing` :: `Maybe` `FilterListModelFilterFunc`@.
noFilterListModelFilterFunc :: Maybe FilterListModelFilterFunc
noFilterListModelFilterFunc :: Maybe FilterListModelFilterFunc
noFilterListModelFilterFunc = Maybe FilterListModelFilterFunc
forall a. Maybe a
Nothing

-- | User function that is called to determine if the /@item@/ of the original model should be visible.
-- If it should be visible, this function must return 'P.True'. If the model should filter out the
-- /@item@/, 'P.False' must be returned.
type FilterListModelFilterFunc_WithClosures =
    GObject.Object.Object
    -- ^ /@item@/: The item that may be filtered
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to keep the item around

-- | A convenience synonym for @`Nothing` :: `Maybe` `FilterListModelFilterFunc_WithClosures`@.
noFilterListModelFilterFunc_WithClosures :: Maybe FilterListModelFilterFunc_WithClosures
noFilterListModelFilterFunc_WithClosures :: Maybe FilterListModelFilterFunc_WithClosures
noFilterListModelFilterFunc_WithClosures = Maybe FilterListModelFilterFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FilterListModelFilterFunc :: FilterListModelFilterFunc -> FilterListModelFilterFunc_WithClosures
drop_closures_FilterListModelFilterFunc :: FilterListModelFilterFunc -> FilterListModelFilterFunc_WithClosures
drop_closures_FilterListModelFilterFunc _f :: FilterListModelFilterFunc
_f item :: Object
item _ = FilterListModelFilterFunc
_f Object
item

-- | Wrap the callback into a `GClosure`.
genClosure_FilterListModelFilterFunc :: MonadIO m => FilterListModelFilterFunc -> m (GClosure C_FilterListModelFilterFunc)
genClosure_FilterListModelFilterFunc :: FilterListModelFilterFunc
-> m (GClosure C_FilterListModelFilterFunc)
genClosure_FilterListModelFilterFunc cb :: FilterListModelFilterFunc
cb = IO (GClosure C_FilterListModelFilterFunc)
-> m (GClosure C_FilterListModelFilterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FilterListModelFilterFunc)
 -> m (GClosure C_FilterListModelFilterFunc))
-> IO (GClosure C_FilterListModelFilterFunc)
-> m (GClosure C_FilterListModelFilterFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FilterListModelFilterFunc_WithClosures
cb' = FilterListModelFilterFunc -> FilterListModelFilterFunc_WithClosures
drop_closures_FilterListModelFilterFunc FilterListModelFilterFunc
cb
    let cb'' :: C_FilterListModelFilterFunc
cb'' = Maybe (Ptr (FunPtr C_FilterListModelFilterFunc))
-> FilterListModelFilterFunc_WithClosures
-> C_FilterListModelFilterFunc
wrap_FilterListModelFilterFunc Maybe (Ptr (FunPtr C_FilterListModelFilterFunc))
forall a. Maybe a
Nothing FilterListModelFilterFunc_WithClosures
cb'
    C_FilterListModelFilterFunc
-> IO (FunPtr C_FilterListModelFilterFunc)
mk_FilterListModelFilterFunc C_FilterListModelFilterFunc
cb'' IO (FunPtr C_FilterListModelFilterFunc)
-> (FunPtr C_FilterListModelFilterFunc
    -> IO (GClosure C_FilterListModelFilterFunc))
-> IO (GClosure C_FilterListModelFilterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FilterListModelFilterFunc
-> IO (GClosure C_FilterListModelFilterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FilterListModelFilterFunc` into a `C_FilterListModelFilterFunc`.
wrap_FilterListModelFilterFunc ::
    Maybe (Ptr (FunPtr C_FilterListModelFilterFunc)) ->
    FilterListModelFilterFunc_WithClosures ->
    C_FilterListModelFilterFunc
wrap_FilterListModelFilterFunc :: Maybe (Ptr (FunPtr C_FilterListModelFilterFunc))
-> FilterListModelFilterFunc_WithClosures
-> C_FilterListModelFilterFunc
wrap_FilterListModelFilterFunc funptrptr :: Maybe (Ptr (FunPtr C_FilterListModelFilterFunc))
funptrptr _cb :: FilterListModelFilterFunc_WithClosures
_cb item :: Ptr Object
item userData :: Ptr ()
userData = do
    Object
item' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
item
    Bool
result <- FilterListModelFilterFunc_WithClosures
_cb  Object
item' Ptr ()
userData
    Maybe (Ptr (FunPtr C_FilterListModelFilterFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FilterListModelFilterFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback FileFilterFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if the file should be displayed", sinceVersion = Nothing}, args = [Arg {argCName = "filter_info", argType = TInterface (Name {namespace = "Gtk", name = "FileFilterInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileFilterInfo that is filled according\n  to the @needed flags passed to gtk_file_filter_add_custom()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to gtk_file_filter_add_custom()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of function that is used with custom filters, see\ngtk_file_filter_add_custom().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_FileFilterFunc =
    Ptr Gtk.FileFilterInfo.FileFilterInfo ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "filter_info"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileFilterInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkFileFilterInfo that is filled according\n  to the @needed flags passed to gtk_file_filter_add_custom()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data passed to gtk_file_filter_add_custom()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_FileFilterFunc :: FunPtr C_FileFilterFunc -> C_FileFilterFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_FileFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_FileFilterFunc
    -> Gtk.FileFilterInfo.FileFilterInfo
    -- ^ /@filterInfo@/: a t'GI.Gtk.Structs.FileFilterInfo.FileFilterInfo' that is filled according
    --   to the /@needed@/ flags passed to 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the file should be displayed
dynamic_FileFilterFunc :: FunPtr C_FileFilterFunc -> FileFilterInfo -> Ptr () -> m Bool
dynamic_FileFilterFunc __funPtr :: FunPtr C_FileFilterFunc
__funPtr filterInfo :: FileFilterInfo
filterInfo data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileFilterInfo
filterInfo' <- FileFilterInfo -> IO (Ptr FileFilterInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileFilterInfo
filterInfo
    CInt
result <- (FunPtr C_FileFilterFunc -> C_FileFilterFunc
__dynamic_C_FileFilterFunc FunPtr C_FileFilterFunc
__funPtr) Ptr FileFilterInfo
filterInfo' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    FileFilterInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileFilterInfo
filterInfo
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | The type of function that is used with custom filters, see
-- 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'.
type FileFilterFunc =
    Gtk.FileFilterInfo.FileFilterInfo
    -- ^ /@filterInfo@/: a t'GI.Gtk.Structs.FileFilterInfo.FileFilterInfo' that is filled according
    --   to the /@needed@/ flags passed to 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the file should be displayed

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileFilterFunc`@.
noFileFilterFunc :: Maybe FileFilterFunc
noFileFilterFunc :: Maybe FileFilterFunc
noFileFilterFunc = Maybe FileFilterFunc
forall a. Maybe a
Nothing

-- | The type of function that is used with custom filters, see
-- 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'.
type FileFilterFunc_WithClosures =
    Gtk.FileFilterInfo.FileFilterInfo
    -- ^ /@filterInfo@/: a t'GI.Gtk.Structs.FileFilterInfo.FileFilterInfo' that is filled according
    --   to the /@needed@/ flags passed to 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Objects.FileFilter.fileFilterAddCustom'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the file should be displayed

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileFilterFunc_WithClosures`@.
noFileFilterFunc_WithClosures :: Maybe FileFilterFunc_WithClosures
noFileFilterFunc_WithClosures :: Maybe FileFilterFunc_WithClosures
noFileFilterFunc_WithClosures = Maybe FileFilterFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_FileFilterFunc :: FileFilterFunc -> FileFilterFunc_WithClosures
drop_closures_FileFilterFunc :: FileFilterFunc -> FileFilterFunc_WithClosures
drop_closures_FileFilterFunc _f :: FileFilterFunc
_f filterInfo :: FileFilterInfo
filterInfo _ = FileFilterFunc
_f FileFilterInfo
filterInfo

-- | Wrap the callback into a `GClosure`.
genClosure_FileFilterFunc :: MonadIO m => FileFilterFunc -> m (GClosure C_FileFilterFunc)
genClosure_FileFilterFunc :: FileFilterFunc -> m (GClosure C_FileFilterFunc)
genClosure_FileFilterFunc cb :: FileFilterFunc
cb = IO (GClosure C_FileFilterFunc) -> m (GClosure C_FileFilterFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileFilterFunc) -> m (GClosure C_FileFilterFunc))
-> IO (GClosure C_FileFilterFunc) -> m (GClosure C_FileFilterFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: FileFilterFunc_WithClosures
cb' = FileFilterFunc -> FileFilterFunc_WithClosures
drop_closures_FileFilterFunc FileFilterFunc
cb
    let cb'' :: C_FileFilterFunc
cb'' = Maybe (Ptr (FunPtr C_FileFilterFunc))
-> FileFilterFunc_WithClosures -> C_FileFilterFunc
wrap_FileFilterFunc Maybe (Ptr (FunPtr C_FileFilterFunc))
forall a. Maybe a
Nothing FileFilterFunc_WithClosures
cb'
    C_FileFilterFunc -> IO (FunPtr C_FileFilterFunc)
mk_FileFilterFunc C_FileFilterFunc
cb'' IO (FunPtr C_FileFilterFunc)
-> (FunPtr C_FileFilterFunc -> IO (GClosure C_FileFilterFunc))
-> IO (GClosure C_FileFilterFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileFilterFunc -> IO (GClosure C_FileFilterFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileFilterFunc` into a `C_FileFilterFunc`.
wrap_FileFilterFunc ::
    Maybe (Ptr (FunPtr C_FileFilterFunc)) ->
    FileFilterFunc_WithClosures ->
    C_FileFilterFunc
wrap_FileFilterFunc :: Maybe (Ptr (FunPtr C_FileFilterFunc))
-> FileFilterFunc_WithClosures -> C_FileFilterFunc
wrap_FileFilterFunc funptrptr :: Maybe (Ptr (FunPtr C_FileFilterFunc))
funptrptr _cb :: FileFilterFunc_WithClosures
_cb filterInfo :: Ptr FileFilterInfo
filterInfo data_ :: Ptr ()
data_ = do
    FileFilterInfo
filterInfo' <- ((ManagedPtr FileFilterInfo -> FileFilterInfo)
-> Ptr FileFilterInfo -> IO FileFilterInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr FileFilterInfo -> FileFilterInfo
Gtk.FileFilterInfo.FileFilterInfo) Ptr FileFilterInfo
filterInfo
    Bool
result <- FileFilterFunc_WithClosures
_cb  FileFilterInfo
filterInfo' Ptr ()
data_
    Maybe (Ptr (FunPtr C_FileFilterFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FileFilterFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback EntryCompletionMatchFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE if @iter should be displayed as a possible completion\n    for @key", sinceVersion = Nothing}, args = [Arg {argCName = "completion", argType = TInterface (Name {namespace = "Gtk", name = "EntryCompletion"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkEntryCompletion", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "key", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the string to match, normalized and case-folded", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter indicating the row to match", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data given to gtk_entry_completion_set_match_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function which decides whether the row indicated by @iter matches\na given @key, and should be displayed as a possible completion for @key.\nNote that @key is normalized and case-folded (see g_utf8_normalize()\nand g_utf8_casefold()). If this is not appropriate, match functions\nhave access to the unmodified key via\n`gtk_editable_get_text (GTK_EDITABLE (gtk_entry_completion_get_entry ()))`.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_EntryCompletionMatchFunc =
    Ptr Gtk.EntryCompletion.EntryCompletion ->
    CString ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "completion"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "EntryCompletion" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkEntryCompletion"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the string to match, normalized and case-folded"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkTreeIter indicating the row to match"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data given to gtk_entry_completion_set_match_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_EntryCompletionMatchFunc :: FunPtr C_EntryCompletionMatchFunc -> C_EntryCompletionMatchFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_EntryCompletionMatchFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.EntryCompletion.IsEntryCompletion a) =>
    FunPtr C_EntryCompletionMatchFunc
    -> a
    -- ^ /@completion@/: the t'GI.Gtk.Objects.EntryCompletion.EntryCompletion'
    -> T.Text
    -- ^ /@key@/: the string to match, normalized and case-folded
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to match
    -> Ptr ()
    -- ^ /@userData@/: user data given to 'GI.Gtk.Objects.EntryCompletion.entryCompletionSetMatchFunc'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@iter@/ should be displayed as a possible completion
    --     for /@key@/
dynamic_EntryCompletionMatchFunc :: FunPtr C_EntryCompletionMatchFunc
-> a -> Text -> TreeIter -> Ptr () -> m Bool
dynamic_EntryCompletionMatchFunc __funPtr :: FunPtr C_EntryCompletionMatchFunc
__funPtr completion :: a
completion key :: Text
key iter :: TreeIter
iter userData :: Ptr ()
userData = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr EntryCompletion
completion' <- a -> IO (Ptr EntryCompletion)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
completion
    CString
key' <- Text -> IO CString
textToCString Text
key
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    CInt
result <- (FunPtr C_EntryCompletionMatchFunc -> C_EntryCompletionMatchFunc
__dynamic_C_EntryCompletionMatchFunc FunPtr C_EntryCompletionMatchFunc
__funPtr) Ptr EntryCompletion
completion' CString
key' Ptr TreeIter
iter' Ptr ()
userData
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
completion
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | A function which decides whether the row indicated by /@iter@/ matches
-- a given /@key@/, and should be displayed as a possible completion for /@key@/.
-- Note that /@key@/ is normalized and case-folded (see 'GI.GLib.Functions.utf8Normalize'
-- and 'GI.GLib.Functions.utf8Casefold'). If this is not appropriate, match functions
-- have access to the unmodified key via
-- @gtk_editable_get_text (GTK_EDITABLE (gtk_entry_completion_get_entry ()))@.
type EntryCompletionMatchFunc =
    Gtk.EntryCompletion.EntryCompletion
    -- ^ /@completion@/: the t'GI.Gtk.Objects.EntryCompletion.EntryCompletion'
    -> T.Text
    -- ^ /@key@/: the string to match, normalized and case-folded
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to match
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if /@iter@/ should be displayed as a possible completion
    --     for /@key@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `EntryCompletionMatchFunc`@.
noEntryCompletionMatchFunc :: Maybe EntryCompletionMatchFunc
noEntryCompletionMatchFunc :: Maybe EntryCompletionMatchFunc
noEntryCompletionMatchFunc = Maybe EntryCompletionMatchFunc
forall a. Maybe a
Nothing

-- | A function which decides whether the row indicated by /@iter@/ matches
-- a given /@key@/, and should be displayed as a possible completion for /@key@/.
-- Note that /@key@/ is normalized and case-folded (see 'GI.GLib.Functions.utf8Normalize'
-- and 'GI.GLib.Functions.utf8Casefold'). If this is not appropriate, match functions
-- have access to the unmodified key via
-- @gtk_editable_get_text (GTK_EDITABLE (gtk_entry_completion_get_entry ()))@.
type EntryCompletionMatchFunc_WithClosures =
    Gtk.EntryCompletion.EntryCompletion
    -- ^ /@completion@/: the t'GI.Gtk.Objects.EntryCompletion.EntryCompletion'
    -> T.Text
    -- ^ /@key@/: the string to match, normalized and case-folded
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to match
    -> Ptr ()
    -- ^ /@userData@/: user data given to 'GI.Gtk.Objects.EntryCompletion.entryCompletionSetMatchFunc'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if /@iter@/ should be displayed as a possible completion
    --     for /@key@/

-- | A convenience synonym for @`Nothing` :: `Maybe` `EntryCompletionMatchFunc_WithClosures`@.
noEntryCompletionMatchFunc_WithClosures :: Maybe EntryCompletionMatchFunc_WithClosures
noEntryCompletionMatchFunc_WithClosures :: Maybe EntryCompletionMatchFunc_WithClosures
noEntryCompletionMatchFunc_WithClosures = Maybe EntryCompletionMatchFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_EntryCompletionMatchFunc :: EntryCompletionMatchFunc -> EntryCompletionMatchFunc_WithClosures
drop_closures_EntryCompletionMatchFunc :: EntryCompletionMatchFunc -> EntryCompletionMatchFunc_WithClosures
drop_closures_EntryCompletionMatchFunc _f :: EntryCompletionMatchFunc
_f completion :: EntryCompletion
completion key :: Text
key iter :: TreeIter
iter _ = EntryCompletionMatchFunc
_f EntryCompletion
completion Text
key TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_EntryCompletionMatchFunc :: MonadIO m => EntryCompletionMatchFunc -> m (GClosure C_EntryCompletionMatchFunc)
genClosure_EntryCompletionMatchFunc :: EntryCompletionMatchFunc -> m (GClosure C_EntryCompletionMatchFunc)
genClosure_EntryCompletionMatchFunc cb :: EntryCompletionMatchFunc
cb = IO (GClosure C_EntryCompletionMatchFunc)
-> m (GClosure C_EntryCompletionMatchFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_EntryCompletionMatchFunc)
 -> m (GClosure C_EntryCompletionMatchFunc))
-> IO (GClosure C_EntryCompletionMatchFunc)
-> m (GClosure C_EntryCompletionMatchFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: EntryCompletionMatchFunc_WithClosures
cb' = EntryCompletionMatchFunc -> EntryCompletionMatchFunc_WithClosures
drop_closures_EntryCompletionMatchFunc EntryCompletionMatchFunc
cb
    let cb'' :: C_EntryCompletionMatchFunc
cb'' = Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc))
-> EntryCompletionMatchFunc_WithClosures
-> C_EntryCompletionMatchFunc
wrap_EntryCompletionMatchFunc Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc))
forall a. Maybe a
Nothing EntryCompletionMatchFunc_WithClosures
cb'
    C_EntryCompletionMatchFunc
-> IO (FunPtr C_EntryCompletionMatchFunc)
mk_EntryCompletionMatchFunc C_EntryCompletionMatchFunc
cb'' IO (FunPtr C_EntryCompletionMatchFunc)
-> (FunPtr C_EntryCompletionMatchFunc
    -> IO (GClosure C_EntryCompletionMatchFunc))
-> IO (GClosure C_EntryCompletionMatchFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_EntryCompletionMatchFunc
-> IO (GClosure C_EntryCompletionMatchFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `EntryCompletionMatchFunc` into a `C_EntryCompletionMatchFunc`.
wrap_EntryCompletionMatchFunc ::
    Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc)) ->
    EntryCompletionMatchFunc_WithClosures ->
    C_EntryCompletionMatchFunc
wrap_EntryCompletionMatchFunc :: Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc))
-> EntryCompletionMatchFunc_WithClosures
-> C_EntryCompletionMatchFunc
wrap_EntryCompletionMatchFunc funptrptr :: Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc))
funptrptr _cb :: EntryCompletionMatchFunc_WithClosures
_cb completion :: Ptr EntryCompletion
completion key :: CString
key iter :: Ptr TreeIter
iter userData :: Ptr ()
userData = do
    EntryCompletion
completion' <- ((ManagedPtr EntryCompletion -> EntryCompletion)
-> Ptr EntryCompletion -> IO EntryCompletion
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr EntryCompletion -> EntryCompletion
Gtk.EntryCompletion.EntryCompletion) Ptr EntryCompletion
completion
    Text
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO CInt) -> IO CInt)
-> (TreeIter -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        Bool
result <- EntryCompletionMatchFunc_WithClosures
_cb  EntryCompletion
completion' Text
key' TreeIter
iter' Ptr ()
userData
        Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_EntryCompletionMatchFunc))
funptrptr
        let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
        CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback DrawingAreaDrawFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "drawing_area", argType = TInterface (Name {namespace = "Gtk", name = "DrawingArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkDrawingArea to redraw", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the context to draw to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the actual width of the contents. This value will be at least\n  as wide as GtkDrawingArea:width.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the actual height of the contents. This value will be at least\n  as wide as GtkDrawingArea:height.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Whenever @drawing_area needs to redraw, this function will be called.\n\nThis function should exclusively redraw the contents of the drawing area\nand must not call any widget functions that cause changes.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_DrawingAreaDrawFunc =
    Ptr Gtk.DrawingArea.DrawingArea ->
    Ptr Cairo.Context.Context ->
    Int32 ->
    Int32 ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "drawing_area"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DrawingArea" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkDrawingArea to redraw"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cr"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Context" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the context to draw to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the actual width of the contents. This value will be at least\n  as wide as GtkDrawingArea:width."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the actual height of the contents. This value will be at least\n  as wide as GtkDrawingArea:height."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_DrawingAreaDrawFunc :: FunPtr C_DrawingAreaDrawFunc -> C_DrawingAreaDrawFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_DrawingAreaDrawFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.DrawingArea.IsDrawingArea a) =>
    FunPtr C_DrawingAreaDrawFunc
    -> a
    -- ^ /@drawingArea@/: the t'GI.Gtk.Objects.DrawingArea.DrawingArea' to redraw
    -> Cairo.Context.Context
    -- ^ /@cr@/: the context to draw to
    -> Int32
    -- ^ /@width@/: the actual width of the contents. This value will be at least
    --   as wide as GtkDrawingArea:width.
    -> Int32
    -- ^ /@height@/: the actual height of the contents. This value will be at least
    --   as wide as GtkDrawingArea:height.
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_DrawingAreaDrawFunc :: FunPtr C_DrawingAreaDrawFunc
-> a -> Context -> Int32 -> Int32 -> Ptr () -> m ()
dynamic_DrawingAreaDrawFunc __funPtr :: FunPtr C_DrawingAreaDrawFunc
__funPtr drawingArea :: a
drawingArea cr :: Context
cr width :: Int32
width height :: Int32
height userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr DrawingArea
drawingArea' <- a -> IO (Ptr DrawingArea)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
drawingArea
    Ptr Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
    (FunPtr C_DrawingAreaDrawFunc -> C_DrawingAreaDrawFunc
__dynamic_C_DrawingAreaDrawFunc FunPtr C_DrawingAreaDrawFunc
__funPtr) Ptr DrawingArea
drawingArea' Ptr Context
cr' Int32
width Int32
height Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
drawingArea
    Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | Whenever /@drawingArea@/ needs to redraw, this function will be called.
-- 
-- This function should exclusively redraw the contents of the drawing area
-- and must not call any widget functions that cause changes.
type DrawingAreaDrawFunc =
    Gtk.DrawingArea.DrawingArea
    -- ^ /@drawingArea@/: the t'GI.Gtk.Objects.DrawingArea.DrawingArea' to redraw
    -> Cairo.Context.Context
    -- ^ /@cr@/: the context to draw to
    -> Int32
    -- ^ /@width@/: the actual width of the contents. This value will be at least
    --   as wide as GtkDrawingArea:width.
    -> Int32
    -- ^ /@height@/: the actual height of the contents. This value will be at least
    --   as wide as GtkDrawingArea:height.
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DrawingAreaDrawFunc`@.
noDrawingAreaDrawFunc :: Maybe DrawingAreaDrawFunc
noDrawingAreaDrawFunc :: Maybe DrawingAreaDrawFunc
noDrawingAreaDrawFunc = Maybe DrawingAreaDrawFunc
forall a. Maybe a
Nothing

-- | Whenever /@drawingArea@/ needs to redraw, this function will be called.
-- 
-- This function should exclusively redraw the contents of the drawing area
-- and must not call any widget functions that cause changes.
type DrawingAreaDrawFunc_WithClosures =
    Gtk.DrawingArea.DrawingArea
    -- ^ /@drawingArea@/: the t'GI.Gtk.Objects.DrawingArea.DrawingArea' to redraw
    -> Cairo.Context.Context
    -- ^ /@cr@/: the context to draw to
    -> Int32
    -- ^ /@width@/: the actual width of the contents. This value will be at least
    --   as wide as GtkDrawingArea:width.
    -> Int32
    -- ^ /@height@/: the actual height of the contents. This value will be at least
    --   as wide as GtkDrawingArea:height.
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `DrawingAreaDrawFunc_WithClosures`@.
noDrawingAreaDrawFunc_WithClosures :: Maybe DrawingAreaDrawFunc_WithClosures
noDrawingAreaDrawFunc_WithClosures :: Maybe DrawingAreaDrawFunc_WithClosures
noDrawingAreaDrawFunc_WithClosures = Maybe DrawingAreaDrawFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DrawingAreaDrawFunc :: DrawingAreaDrawFunc -> DrawingAreaDrawFunc_WithClosures
drop_closures_DrawingAreaDrawFunc :: DrawingAreaDrawFunc -> DrawingAreaDrawFunc_WithClosures
drop_closures_DrawingAreaDrawFunc _f :: DrawingAreaDrawFunc
_f drawingArea :: DrawingArea
drawingArea cr :: Context
cr width :: Int32
width height :: Int32
height _ = DrawingAreaDrawFunc
_f DrawingArea
drawingArea Context
cr Int32
width Int32
height

-- | Wrap the callback into a `GClosure`.
genClosure_DrawingAreaDrawFunc :: MonadIO m => DrawingAreaDrawFunc -> m (GClosure C_DrawingAreaDrawFunc)
genClosure_DrawingAreaDrawFunc :: DrawingAreaDrawFunc -> m (GClosure C_DrawingAreaDrawFunc)
genClosure_DrawingAreaDrawFunc cb :: DrawingAreaDrawFunc
cb = IO (GClosure C_DrawingAreaDrawFunc)
-> m (GClosure C_DrawingAreaDrawFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DrawingAreaDrawFunc)
 -> m (GClosure C_DrawingAreaDrawFunc))
-> IO (GClosure C_DrawingAreaDrawFunc)
-> m (GClosure C_DrawingAreaDrawFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: DrawingAreaDrawFunc_WithClosures
cb' = DrawingAreaDrawFunc -> DrawingAreaDrawFunc_WithClosures
drop_closures_DrawingAreaDrawFunc DrawingAreaDrawFunc
cb
    let cb'' :: C_DrawingAreaDrawFunc
cb'' = Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc))
-> DrawingAreaDrawFunc_WithClosures -> C_DrawingAreaDrawFunc
wrap_DrawingAreaDrawFunc Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc))
forall a. Maybe a
Nothing DrawingAreaDrawFunc_WithClosures
cb'
    C_DrawingAreaDrawFunc -> IO (FunPtr C_DrawingAreaDrawFunc)
mk_DrawingAreaDrawFunc C_DrawingAreaDrawFunc
cb'' IO (FunPtr C_DrawingAreaDrawFunc)
-> (FunPtr C_DrawingAreaDrawFunc
    -> IO (GClosure C_DrawingAreaDrawFunc))
-> IO (GClosure C_DrawingAreaDrawFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DrawingAreaDrawFunc -> IO (GClosure C_DrawingAreaDrawFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `DrawingAreaDrawFunc` into a `C_DrawingAreaDrawFunc`.
wrap_DrawingAreaDrawFunc ::
    Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc)) ->
    DrawingAreaDrawFunc_WithClosures ->
    C_DrawingAreaDrawFunc
wrap_DrawingAreaDrawFunc :: Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc))
-> DrawingAreaDrawFunc_WithClosures -> C_DrawingAreaDrawFunc
wrap_DrawingAreaDrawFunc funptrptr :: Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc))
funptrptr _cb :: DrawingAreaDrawFunc_WithClosures
_cb drawingArea :: Ptr DrawingArea
drawingArea cr :: Ptr Context
cr width :: Int32
width height :: Int32
height userData :: Ptr ()
userData = do
    DrawingArea
drawingArea' <- ((ManagedPtr DrawingArea -> DrawingArea)
-> Ptr DrawingArea -> IO DrawingArea
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DrawingArea -> DrawingArea
Gtk.DrawingArea.DrawingArea) Ptr DrawingArea
drawingArea
    (ManagedPtr Context -> Context)
-> Ptr Context -> (Context -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Context -> Context
Cairo.Context.Context Ptr Context
cr ((Context -> IO ()) -> IO ()) -> (Context -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \cr' :: Context
cr' -> do
        DrawingAreaDrawFunc_WithClosures
_cb  DrawingArea
drawingArea' Context
cr' Int32
width Int32
height Ptr ()
userData
        Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_DrawingAreaDrawFunc))
funptrptr


-- callback CustomRequestModeFunc
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Gtk", name = "SizeRequestMode"})), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "the size request mode", sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget to be queried", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "Queries a widget for its preferred size request mode.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CustomRequestModeFunc =
    Ptr Gtk.Widget.Widget ->
    IO CUInt

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to be queried"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "SizeRequestMode" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CustomRequestModeFunc :: FunPtr C_CustomRequestModeFunc -> C_CustomRequestModeFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CustomRequestModeFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_CustomRequestModeFunc
    -> a
    -- ^ /@widget@/: the widget to be queried
    -> m Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ the size request mode
dynamic_CustomRequestModeFunc :: FunPtr C_WidgetClassGetRequestModeFieldCallback
-> a -> m SizeRequestMode
dynamic_CustomRequestModeFunc __funPtr :: FunPtr C_WidgetClassGetRequestModeFieldCallback
__funPtr widget :: a
widget = IO SizeRequestMode -> m SizeRequestMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeRequestMode -> m SizeRequestMode)
-> IO SizeRequestMode -> m SizeRequestMode
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- (FunPtr C_WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
__dynamic_C_CustomRequestModeFunc FunPtr C_WidgetClassGetRequestModeFieldCallback
__funPtr) Ptr Widget
widget'
    let result' :: SizeRequestMode
result' = (Int -> SizeRequestMode
forall a. Enum a => Int -> a
toEnum (Int -> SizeRequestMode)
-> (CUInt -> Int) -> CUInt -> SizeRequestMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    SizeRequestMode -> IO SizeRequestMode
forall (m :: * -> *) a. Monad m => a -> m a
return SizeRequestMode
result'

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

-- | Queries a widget for its preferred size request mode.
type CustomRequestModeFunc =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to be queried
    -> IO Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ the size request mode

-- | A convenience synonym for @`Nothing` :: `Maybe` `CustomRequestModeFunc`@.
noCustomRequestModeFunc :: Maybe CustomRequestModeFunc
noCustomRequestModeFunc :: Maybe WidgetClassGetRequestModeFieldCallback
noCustomRequestModeFunc = Maybe WidgetClassGetRequestModeFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_CustomRequestModeFunc :: MonadIO m => CustomRequestModeFunc -> m (GClosure C_CustomRequestModeFunc)
genClosure_CustomRequestModeFunc :: WidgetClassGetRequestModeFieldCallback
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
genClosure_CustomRequestModeFunc cb :: WidgetClassGetRequestModeFieldCallback
cb = IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
 -> m (GClosure C_WidgetClassGetRequestModeFieldCallback))
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
-> m (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassGetRequestModeFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
wrap_CustomRequestModeFunc Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
forall a. Maybe a
Nothing WidgetClassGetRequestModeFieldCallback
cb
    C_WidgetClassGetRequestModeFieldCallback
-> IO (FunPtr C_WidgetClassGetRequestModeFieldCallback)
mk_CustomRequestModeFunc C_WidgetClassGetRequestModeFieldCallback
cb' IO (FunPtr C_WidgetClassGetRequestModeFieldCallback)
-> (FunPtr C_WidgetClassGetRequestModeFieldCallback
    -> IO (GClosure C_WidgetClassGetRequestModeFieldCallback))
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassGetRequestModeFieldCallback
-> IO (GClosure C_WidgetClassGetRequestModeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CustomRequestModeFunc` into a `C_CustomRequestModeFunc`.
wrap_CustomRequestModeFunc ::
    Maybe (Ptr (FunPtr C_CustomRequestModeFunc)) ->
    CustomRequestModeFunc ->
    C_CustomRequestModeFunc
wrap_CustomRequestModeFunc :: Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> WidgetClassGetRequestModeFieldCallback
-> C_WidgetClassGetRequestModeFieldCallback
wrap_CustomRequestModeFunc funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
funptrptr _cb :: WidgetClassGetRequestModeFieldCallback
_cb widget :: Ptr Widget
widget = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    SizeRequestMode
result <- WidgetClassGetRequestModeFieldCallback
_cb  Widget
widget'
    Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassGetRequestModeFieldCallback))
funptrptr
    let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SizeRequestMode -> Int) -> SizeRequestMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SizeRequestMode -> Int
forall a. Enum a => a -> Int
fromEnum) SizeRequestMode
result
    CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'


-- callback CustomMeasureFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget to be measured", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "orientation", argType = TInterface (Name {namespace = "Gtk", name = "Orientation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the direction to be measured", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "for_size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the size to be measured for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the measured minimum size of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the measured natural size of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "minimum_baseline", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the measured minimum baseline of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_baseline", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the measured natural baseline of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function to be used by #GtkCustomLayout to measure a widget.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CustomMeasureFunc =
    Ptr Gtk.Widget.Widget ->
    CUInt ->
    Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    Ptr Int32 ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to be measured"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the direction to be measured"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "for_size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the size to be measured for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the measured minimum size of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the measured natural size of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "minimum_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the measured minimum baseline of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the measured natural baseline of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CustomMeasureFunc :: FunPtr C_CustomMeasureFunc -> C_CustomMeasureFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CustomMeasureFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_CustomMeasureFunc
    -> a
    -- ^ /@widget@/: the widget to be measured
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the direction to be measured
    -> Int32
    -- ^ /@forSize@/: the size to be measured for
    -> m ((Int32, Int32, Int32, Int32))
dynamic_CustomMeasureFunc :: FunPtr C_WidgetClassMeasureFieldCallback
-> a -> Orientation -> Int32 -> m (Int32, Int32, Int32, Int32)
dynamic_CustomMeasureFunc __funPtr :: FunPtr C_WidgetClassMeasureFieldCallback
__funPtr widget :: a
widget orientation :: Orientation
orientation forSize :: Int32
forSize = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Orientation -> Int) -> Orientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Orientation -> Int
forall a. Enum a => a -> Int
fromEnum) Orientation
orientation
    Ptr Int32
minimum <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
natural <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
minimumBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    (FunPtr C_WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
__dynamic_C_CustomMeasureFunc FunPtr C_WidgetClassMeasureFieldCallback
__funPtr) Ptr Widget
widget' CUInt
orientation' Int32
forSize Ptr Int32
minimum Ptr Int32
natural Ptr Int32
minimumBaseline Ptr Int32
naturalBaseline
    Int32
minimum' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimum
    Int32
natural' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
natural
    Int32
minimumBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumBaseline
    Int32
naturalBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalBaseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimum
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
natural
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumBaseline
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalBaseline
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimum', Int32
natural', Int32
minimumBaseline', Int32
naturalBaseline')

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

-- | A function to be used by t'GI.Gtk.Objects.CustomLayout.CustomLayout' to measure a widget.
type CustomMeasureFunc =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to be measured
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the direction to be measured
    -> Int32
    -- ^ /@forSize@/: the size to be measured for
    -> IO ((Int32, Int32, Int32, Int32))

-- | A convenience synonym for @`Nothing` :: `Maybe` `CustomMeasureFunc`@.
noCustomMeasureFunc :: Maybe CustomMeasureFunc
noCustomMeasureFunc :: Maybe WidgetClassMeasureFieldCallback
noCustomMeasureFunc = Maybe WidgetClassMeasureFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_CustomMeasureFunc :: MonadIO m => CustomMeasureFunc -> m (GClosure C_CustomMeasureFunc)
genClosure_CustomMeasureFunc :: WidgetClassMeasureFieldCallback
-> m (GClosure C_WidgetClassMeasureFieldCallback)
genClosure_CustomMeasureFunc cb :: WidgetClassMeasureFieldCallback
cb = IO (GClosure C_WidgetClassMeasureFieldCallback)
-> m (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassMeasureFieldCallback)
 -> m (GClosure C_WidgetClassMeasureFieldCallback))
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
-> m (GClosure C_WidgetClassMeasureFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassMeasureFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
-> WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
wrap_CustomMeasureFunc Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
forall a. Maybe a
Nothing WidgetClassMeasureFieldCallback
cb
    C_WidgetClassMeasureFieldCallback
-> IO (FunPtr C_WidgetClassMeasureFieldCallback)
mk_CustomMeasureFunc C_WidgetClassMeasureFieldCallback
cb' IO (FunPtr C_WidgetClassMeasureFieldCallback)
-> (FunPtr C_WidgetClassMeasureFieldCallback
    -> IO (GClosure C_WidgetClassMeasureFieldCallback))
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassMeasureFieldCallback
-> IO (GClosure C_WidgetClassMeasureFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CustomMeasureFunc` into a `C_CustomMeasureFunc`.
wrap_CustomMeasureFunc ::
    Maybe (Ptr (FunPtr C_CustomMeasureFunc)) ->
    CustomMeasureFunc ->
    C_CustomMeasureFunc
wrap_CustomMeasureFunc :: Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
-> WidgetClassMeasureFieldCallback
-> C_WidgetClassMeasureFieldCallback
wrap_CustomMeasureFunc funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
funptrptr _cb :: WidgetClassMeasureFieldCallback
_cb widget :: Ptr Widget
widget orientation :: CUInt
orientation forSize :: Int32
forSize minimum :: Ptr Int32
minimum natural :: Ptr Int32
natural minimumBaseline :: Ptr Int32
minimumBaseline naturalBaseline :: Ptr Int32
naturalBaseline = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    let orientation' :: Orientation
orientation' = (Int -> Orientation
forall a. Enum a => Int -> a
toEnum (Int -> Orientation) -> (CUInt -> Int) -> CUInt -> Orientation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
orientation
    (outminimum :: Int32
outminimum, outnatural :: Int32
outnatural, outminimumBaseline :: Int32
outminimumBaseline, outnaturalBaseline :: Int32
outnaturalBaseline) <- WidgetClassMeasureFieldCallback
_cb  Widget
widget' Orientation
orientation' Int32
forSize
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
minimum Int32
outminimum
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
natural Int32
outnatural
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
minimumBaseline Int32
outminimumBaseline
    Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr Int32
naturalBaseline Int32
outnaturalBaseline
    Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassMeasureFieldCallback))
funptrptr


-- callback CustomAllocateFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget to allocate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new width of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new height of the widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "baseline", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new baseline of the widget, or -1", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function to be used by #GtkCustomLayout to allocate a widget.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CustomAllocateFunc =
    Ptr Gtk.Widget.Widget ->
    Int32 ->
    Int32 ->
    Int32 ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to allocate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new width of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new height of the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new baseline of the widget, or -1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CustomAllocateFunc :: FunPtr C_CustomAllocateFunc -> C_CustomAllocateFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CustomAllocateFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_CustomAllocateFunc
    -> a
    -- ^ /@widget@/: the widget to allocate
    -> Int32
    -- ^ /@width@/: the new width of the widget
    -> Int32
    -- ^ /@height@/: the new height of the widget
    -> Int32
    -- ^ /@baseline@/: the new baseline of the widget, or -1
    -> m ()
dynamic_CustomAllocateFunc :: FunPtr C_WidgetClassSizeAllocateFieldCallback
-> a -> Int32 -> Int32 -> Int32 -> m ()
dynamic_CustomAllocateFunc __funPtr :: FunPtr C_WidgetClassSizeAllocateFieldCallback
__funPtr widget :: a
widget width :: Int32
width height :: Int32
height baseline :: Int32
baseline = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
__dynamic_C_CustomAllocateFunc FunPtr C_WidgetClassSizeAllocateFieldCallback
__funPtr) Ptr Widget
widget' Int32
width Int32
height Int32
baseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function to be used by t'GI.Gtk.Objects.CustomLayout.CustomLayout' to allocate a widget.
type CustomAllocateFunc =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to allocate
    -> Int32
    -- ^ /@width@/: the new width of the widget
    -> Int32
    -- ^ /@height@/: the new height of the widget
    -> Int32
    -- ^ /@baseline@/: the new baseline of the widget, or -1
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CustomAllocateFunc`@.
noCustomAllocateFunc :: Maybe CustomAllocateFunc
noCustomAllocateFunc :: Maybe WidgetClassSizeAllocateFieldCallback
noCustomAllocateFunc = Maybe WidgetClassSizeAllocateFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_CustomAllocateFunc :: MonadIO m => CustomAllocateFunc -> m (GClosure C_CustomAllocateFunc)
genClosure_CustomAllocateFunc :: WidgetClassSizeAllocateFieldCallback
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
genClosure_CustomAllocateFunc cb :: WidgetClassSizeAllocateFieldCallback
cb = IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
 -> m (GClosure C_WidgetClassSizeAllocateFieldCallback))
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
-> m (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetClassSizeAllocateFieldCallback
cb' = Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
wrap_CustomAllocateFunc Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
forall a. Maybe a
Nothing WidgetClassSizeAllocateFieldCallback
cb
    C_WidgetClassSizeAllocateFieldCallback
-> IO (FunPtr C_WidgetClassSizeAllocateFieldCallback)
mk_CustomAllocateFunc C_WidgetClassSizeAllocateFieldCallback
cb' IO (FunPtr C_WidgetClassSizeAllocateFieldCallback)
-> (FunPtr C_WidgetClassSizeAllocateFieldCallback
    -> IO (GClosure C_WidgetClassSizeAllocateFieldCallback))
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetClassSizeAllocateFieldCallback
-> IO (GClosure C_WidgetClassSizeAllocateFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CustomAllocateFunc` into a `C_CustomAllocateFunc`.
wrap_CustomAllocateFunc ::
    Maybe (Ptr (FunPtr C_CustomAllocateFunc)) ->
    CustomAllocateFunc ->
    C_CustomAllocateFunc
wrap_CustomAllocateFunc :: Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> WidgetClassSizeAllocateFieldCallback
-> C_WidgetClassSizeAllocateFieldCallback
wrap_CustomAllocateFunc funptrptr :: Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
funptrptr _cb :: WidgetClassSizeAllocateFieldCallback
_cb widget :: Ptr Widget
widget width :: Int32
width height :: Int32
height baseline :: Int32
baseline = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    WidgetClassSizeAllocateFieldCallback
_cb  Widget
widget' Int32
width Int32
height Int32
baseline
    Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_WidgetClassSizeAllocateFieldCallback))
funptrptr


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

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

foreign import ccall "dynamic" __dynamic_C_ContainerClassSetFocusChildFieldCallback :: FunPtr C_ContainerClassSetFocusChildFieldCallback -> C_ContainerClassSetFocusChildFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassSetFocusChildFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a, Gtk.Widget.IsWidget b) =>
    FunPtr C_ContainerClassSetFocusChildFieldCallback
    -> a
    -> b
    -> m ()
dynamic_ContainerClassSetFocusChildFieldCallback :: FunPtr C_ContainerClassSetFocusChildFieldCallback -> a -> b -> m ()
dynamic_ContainerClassSetFocusChildFieldCallback __funPtr :: FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr container :: a
container child :: b
child = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    (FunPtr C_ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
__dynamic_C_ContainerClassSetFocusChildFieldCallback FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr) Ptr Container
container' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type ContainerClassSetFocusChildFieldCallback =
    Gtk.Container.Container
    -> Gtk.Widget.Widget
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassSetFocusChildFieldCallback`@.
noContainerClassSetFocusChildFieldCallback :: Maybe ContainerClassSetFocusChildFieldCallback
noContainerClassSetFocusChildFieldCallback :: Maybe ContainerClassSetFocusChildFieldCallback
noContainerClassSetFocusChildFieldCallback = Maybe ContainerClassSetFocusChildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassSetFocusChildFieldCallback :: MonadIO m => ContainerClassSetFocusChildFieldCallback -> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
genClosure_ContainerClassSetFocusChildFieldCallback :: ContainerClassSetFocusChildFieldCallback
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
genClosure_ContainerClassSetFocusChildFieldCallback cb :: ContainerClassSetFocusChildFieldCallback
cb = IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
 -> m (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ContainerClassSetFocusChildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassSetFocusChildFieldCallback Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
forall a. Maybe a
Nothing ContainerClassSetFocusChildFieldCallback
cb
    C_ContainerClassSetFocusChildFieldCallback
-> IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
mk_ContainerClassSetFocusChildFieldCallback C_ContainerClassSetFocusChildFieldCallback
cb' IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
-> (FunPtr C_ContainerClassSetFocusChildFieldCallback
    -> IO (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassSetFocusChildFieldCallback
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassSetFocusChildFieldCallback` into a `C_ContainerClassSetFocusChildFieldCallback`.
wrap_ContainerClassSetFocusChildFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback)) ->
    ContainerClassSetFocusChildFieldCallback ->
    C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassSetFocusChildFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassSetFocusChildFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr _cb :: ContainerClassSetFocusChildFieldCallback
_cb container :: Ptr Container
container child :: Ptr Widget
child = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    Widget
child' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
child
    ContainerClassSetFocusChildFieldCallback
_cb  Container
container' Widget
child'
    Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr


-- callback ContainerClassRemoveFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "container", argType = TInterface (Name {namespace = "Gtk", name = "Container"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkContainer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a current child of @container", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ContainerClassRemoveFieldCallback =
    Ptr Gtk.Container.Container ->
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a current child of @container"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ContainerClassRemoveFieldCallback :: FunPtr C_ContainerClassRemoveFieldCallback -> C_ContainerClassRemoveFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassRemoveFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a, Gtk.Widget.IsWidget b) =>
    FunPtr C_ContainerClassRemoveFieldCallback
    -> a
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> b
    -- ^ /@widget@/: a current child of /@container@/
    -> m ()
dynamic_ContainerClassRemoveFieldCallback :: FunPtr C_ContainerClassSetFocusChildFieldCallback -> a -> b -> m ()
dynamic_ContainerClassRemoveFieldCallback __funPtr :: FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr container :: a
container widget :: b
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr Widget
widget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
widget
    (FunPtr C_ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
__dynamic_C_ContainerClassRemoveFieldCallback FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr) Ptr Container
container' Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type ContainerClassRemoveFieldCallback =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Gtk.Widget.Widget
    -- ^ /@widget@/: a current child of /@container@/
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassRemoveFieldCallback`@.
noContainerClassRemoveFieldCallback :: Maybe ContainerClassRemoveFieldCallback
noContainerClassRemoveFieldCallback :: Maybe ContainerClassSetFocusChildFieldCallback
noContainerClassRemoveFieldCallback = Maybe ContainerClassSetFocusChildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassRemoveFieldCallback :: MonadIO m => ContainerClassRemoveFieldCallback -> m (GClosure C_ContainerClassRemoveFieldCallback)
genClosure_ContainerClassRemoveFieldCallback :: ContainerClassSetFocusChildFieldCallback
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
genClosure_ContainerClassRemoveFieldCallback cb :: ContainerClassSetFocusChildFieldCallback
cb = IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
 -> m (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ContainerClassSetFocusChildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassRemoveFieldCallback Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
forall a. Maybe a
Nothing ContainerClassSetFocusChildFieldCallback
cb
    C_ContainerClassSetFocusChildFieldCallback
-> IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
mk_ContainerClassRemoveFieldCallback C_ContainerClassSetFocusChildFieldCallback
cb' IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
-> (FunPtr C_ContainerClassSetFocusChildFieldCallback
    -> IO (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassSetFocusChildFieldCallback
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassRemoveFieldCallback` into a `C_ContainerClassRemoveFieldCallback`.
wrap_ContainerClassRemoveFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassRemoveFieldCallback)) ->
    ContainerClassRemoveFieldCallback ->
    C_ContainerClassRemoveFieldCallback
wrap_ContainerClassRemoveFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassRemoveFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr _cb :: ContainerClassSetFocusChildFieldCallback
_cb container :: Ptr Container
container widget :: Ptr Widget
widget = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    ContainerClassSetFocusChildFieldCallback
_cb  Container
container' Widget
widget'
    Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr


-- callback ContainerClassGetPathForChildFieldCallback
--          -> Callable {returnType = Just (TInterface (Name {namespace = "Gtk", name = "WidgetPath"})), returnMayBeNull = False, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "A newly created #GtkWidgetPath", sinceVersion = Nothing}, args = [Arg {argCName = "container", argType = TInterface (Name {namespace = "Gtk", name = "Container"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkContainer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "child", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a child of @container", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ContainerClassGetPathForChildFieldCallback =
    Ptr Gtk.Container.Container ->
    Ptr Gtk.Widget.Widget ->
    IO (Ptr Gtk.WidgetPath.WidgetPath)

-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child of @container"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "WidgetPath" })
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ContainerClassGetPathForChildFieldCallback :: FunPtr C_ContainerClassGetPathForChildFieldCallback -> C_ContainerClassGetPathForChildFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassGetPathForChildFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a, Gtk.Widget.IsWidget b) =>
    FunPtr C_ContainerClassGetPathForChildFieldCallback
    -> a
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> b
    -- ^ /@child@/: a child of /@container@/
    -> m Gtk.WidgetPath.WidgetPath
    -- ^ __Returns:__ A newly created t'GI.Gtk.Structs.WidgetPath.WidgetPath'
dynamic_ContainerClassGetPathForChildFieldCallback :: FunPtr C_ContainerClassGetPathForChildFieldCallback
-> a -> b -> m WidgetPath
dynamic_ContainerClassGetPathForChildFieldCallback __funPtr :: FunPtr C_ContainerClassGetPathForChildFieldCallback
__funPtr container :: a
container child :: b
child = IO WidgetPath -> m WidgetPath
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WidgetPath -> m WidgetPath) -> IO WidgetPath -> m WidgetPath
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr WidgetPath
result <- (FunPtr C_ContainerClassGetPathForChildFieldCallback
-> C_ContainerClassGetPathForChildFieldCallback
__dynamic_C_ContainerClassGetPathForChildFieldCallback FunPtr C_ContainerClassGetPathForChildFieldCallback
__funPtr) Ptr Container
container' Ptr Widget
child'
    Text -> Ptr WidgetPath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "containerClassGetPathForChildFieldCallback" Ptr WidgetPath
result
    WidgetPath
result' <- ((ManagedPtr WidgetPath -> WidgetPath)
-> Ptr WidgetPath -> IO WidgetPath
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr WidgetPath -> WidgetPath
Gtk.WidgetPath.WidgetPath) Ptr WidgetPath
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    WidgetPath -> IO WidgetPath
forall (m :: * -> *) a. Monad m => a -> m a
return WidgetPath
result'

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

-- | /No description available in the introspection data./
type ContainerClassGetPathForChildFieldCallback =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Gtk.Widget.Widget
    -- ^ /@child@/: a child of /@container@/
    -> IO Gtk.WidgetPath.WidgetPath
    -- ^ __Returns:__ A newly created t'GI.Gtk.Structs.WidgetPath.WidgetPath'

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassGetPathForChildFieldCallback`@.
noContainerClassGetPathForChildFieldCallback :: Maybe ContainerClassGetPathForChildFieldCallback
noContainerClassGetPathForChildFieldCallback :: Maybe ContainerClassGetPathForChildFieldCallback
noContainerClassGetPathForChildFieldCallback = Maybe ContainerClassGetPathForChildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassGetPathForChildFieldCallback :: MonadIO m => ContainerClassGetPathForChildFieldCallback -> m (GClosure C_ContainerClassGetPathForChildFieldCallback)
genClosure_ContainerClassGetPathForChildFieldCallback :: ContainerClassGetPathForChildFieldCallback
-> m (GClosure C_ContainerClassGetPathForChildFieldCallback)
genClosure_ContainerClassGetPathForChildFieldCallback cb :: ContainerClassGetPathForChildFieldCallback
cb = IO (GClosure C_ContainerClassGetPathForChildFieldCallback)
-> m (GClosure C_ContainerClassGetPathForChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassGetPathForChildFieldCallback)
 -> m (GClosure C_ContainerClassGetPathForChildFieldCallback))
-> IO (GClosure C_ContainerClassGetPathForChildFieldCallback)
-> m (GClosure C_ContainerClassGetPathForChildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ContainerClassGetPathForChildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
-> ContainerClassGetPathForChildFieldCallback
-> C_ContainerClassGetPathForChildFieldCallback
wrap_ContainerClassGetPathForChildFieldCallback Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
forall a. Maybe a
Nothing ContainerClassGetPathForChildFieldCallback
cb
    C_ContainerClassGetPathForChildFieldCallback
-> IO (FunPtr C_ContainerClassGetPathForChildFieldCallback)
mk_ContainerClassGetPathForChildFieldCallback C_ContainerClassGetPathForChildFieldCallback
cb' IO (FunPtr C_ContainerClassGetPathForChildFieldCallback)
-> (FunPtr C_ContainerClassGetPathForChildFieldCallback
    -> IO (GClosure C_ContainerClassGetPathForChildFieldCallback))
-> IO (GClosure C_ContainerClassGetPathForChildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassGetPathForChildFieldCallback
-> IO (GClosure C_ContainerClassGetPathForChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassGetPathForChildFieldCallback` into a `C_ContainerClassGetPathForChildFieldCallback`.
wrap_ContainerClassGetPathForChildFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback)) ->
    ContainerClassGetPathForChildFieldCallback ->
    C_ContainerClassGetPathForChildFieldCallback
wrap_ContainerClassGetPathForChildFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
-> ContainerClassGetPathForChildFieldCallback
-> C_ContainerClassGetPathForChildFieldCallback
wrap_ContainerClassGetPathForChildFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
funptrptr _cb :: ContainerClassGetPathForChildFieldCallback
_cb container :: Ptr Container
container child :: Ptr Widget
child = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    Widget
child' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
child
    WidgetPath
result <- ContainerClassGetPathForChildFieldCallback
_cb  Container
container' Widget
child'
    Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassGetPathForChildFieldCallback))
funptrptr
    Ptr WidgetPath
result' <- WidgetPath -> IO (Ptr WidgetPath)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed WidgetPath
result
    Ptr WidgetPath -> IO (Ptr WidgetPath)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr WidgetPath
result'


-- callback ContainerClassForallFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "container", argType = TInterface (Name {namespace = "Gtk", name = "Container"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkContainer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gtk", name = "Callback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a callback", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "callback user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ContainerClassForallFieldCallback =
    Ptr Gtk.Container.Container ->
    FunPtr C_Callback ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Callback" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a callback" , sinceVersion = Nothing }
--           , argScope = ScopeTypeCall
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "callback user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ContainerClassForallFieldCallback :: FunPtr C_ContainerClassForallFieldCallback -> C_ContainerClassForallFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassForallFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a) =>
    FunPtr C_ContainerClassForallFieldCallback
    -> a
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Callback_WithClosures
    -- ^ /@callback@/: a callback
    -> Ptr ()
    -- ^ /@callbackData@/: callback user data
    -> m ()
dynamic_ContainerClassForallFieldCallback :: FunPtr C_ContainerClassForallFieldCallback
-> a -> Callback_WithClosures -> Ptr () -> m ()
dynamic_ContainerClassForallFieldCallback __funPtr :: FunPtr C_ContainerClassForallFieldCallback
__funPtr container :: a
container callback :: Callback_WithClosures
callback callbackData :: Ptr ()
callbackData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    FunPtr C_Callback
callback' <- C_Callback -> IO (FunPtr C_Callback)
mk_Callback (Maybe (Ptr (FunPtr C_Callback))
-> Callback_WithClosures -> C_Callback
wrap_Callback Maybe (Ptr (FunPtr C_Callback))
forall a. Maybe a
Nothing Callback_WithClosures
callback)
    (FunPtr C_ContainerClassForallFieldCallback
-> C_ContainerClassForallFieldCallback
__dynamic_C_ContainerClassForallFieldCallback FunPtr C_ContainerClassForallFieldCallback
__funPtr) Ptr Container
container' FunPtr C_Callback
callback' Ptr ()
callbackData
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_Callback -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_Callback
callback'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type ContainerClassForallFieldCallback =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Callback_WithClosures
    -- ^ /@callback@/: a callback
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassForallFieldCallback`@.
noContainerClassForallFieldCallback :: Maybe ContainerClassForallFieldCallback
noContainerClassForallFieldCallback :: Maybe ContainerClassForallFieldCallback
noContainerClassForallFieldCallback = Maybe ContainerClassForallFieldCallback
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type ContainerClassForallFieldCallback_WithClosures =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Callback_WithClosures
    -- ^ /@callback@/: a callback
    -> Ptr ()
    -- ^ /@callbackData@/: callback user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassForallFieldCallback_WithClosures`@.
noContainerClassForallFieldCallback_WithClosures :: Maybe ContainerClassForallFieldCallback_WithClosures
noContainerClassForallFieldCallback_WithClosures :: Maybe ContainerClassForallFieldCallback_WithClosures
noContainerClassForallFieldCallback_WithClosures = Maybe ContainerClassForallFieldCallback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ContainerClassForallFieldCallback :: ContainerClassForallFieldCallback -> ContainerClassForallFieldCallback_WithClosures
drop_closures_ContainerClassForallFieldCallback :: ContainerClassForallFieldCallback
-> ContainerClassForallFieldCallback_WithClosures
drop_closures_ContainerClassForallFieldCallback _f :: ContainerClassForallFieldCallback
_f container :: Container
container callback :: Callback_WithClosures
callback _ = ContainerClassForallFieldCallback
_f Container
container Callback_WithClosures
callback

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassForallFieldCallback :: MonadIO m => ContainerClassForallFieldCallback -> m (GClosure C_ContainerClassForallFieldCallback)
genClosure_ContainerClassForallFieldCallback :: ContainerClassForallFieldCallback
-> m (GClosure C_ContainerClassForallFieldCallback)
genClosure_ContainerClassForallFieldCallback cb :: ContainerClassForallFieldCallback
cb = IO (GClosure C_ContainerClassForallFieldCallback)
-> m (GClosure C_ContainerClassForallFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassForallFieldCallback)
 -> m (GClosure C_ContainerClassForallFieldCallback))
-> IO (GClosure C_ContainerClassForallFieldCallback)
-> m (GClosure C_ContainerClassForallFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: ContainerClassForallFieldCallback_WithClosures
cb' = ContainerClassForallFieldCallback
-> ContainerClassForallFieldCallback_WithClosures
drop_closures_ContainerClassForallFieldCallback ContainerClassForallFieldCallback
cb
    let cb'' :: C_ContainerClassForallFieldCallback
cb'' = Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback))
-> ContainerClassForallFieldCallback_WithClosures
-> C_ContainerClassForallFieldCallback
wrap_ContainerClassForallFieldCallback Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback))
forall a. Maybe a
Nothing ContainerClassForallFieldCallback_WithClosures
cb'
    C_ContainerClassForallFieldCallback
-> IO (FunPtr C_ContainerClassForallFieldCallback)
mk_ContainerClassForallFieldCallback C_ContainerClassForallFieldCallback
cb'' IO (FunPtr C_ContainerClassForallFieldCallback)
-> (FunPtr C_ContainerClassForallFieldCallback
    -> IO (GClosure C_ContainerClassForallFieldCallback))
-> IO (GClosure C_ContainerClassForallFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassForallFieldCallback
-> IO (GClosure C_ContainerClassForallFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassForallFieldCallback` into a `C_ContainerClassForallFieldCallback`.
wrap_ContainerClassForallFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback)) ->
    ContainerClassForallFieldCallback_WithClosures ->
    C_ContainerClassForallFieldCallback
wrap_ContainerClassForallFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback))
-> ContainerClassForallFieldCallback_WithClosures
-> C_ContainerClassForallFieldCallback
wrap_ContainerClassForallFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback))
funptrptr _cb :: ContainerClassForallFieldCallback_WithClosures
_cb container :: Ptr Container
container callback :: FunPtr C_Callback
callback callbackData :: Ptr ()
callbackData = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    let callback' :: Callback_WithClosures
callback' = FunPtr C_Callback -> Callback_WithClosures
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
FunPtr C_Callback -> a -> Ptr () -> m ()
dynamic_Callback FunPtr C_Callback
callback
    ContainerClassForallFieldCallback_WithClosures
_cb  Container
container' Callback_WithClosures
callback' Ptr ()
callbackData
    Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassForallFieldCallback))
funptrptr


-- callback ContainerClassChildTypeFieldCallback
--          -> Callable {returnType = Just (TBasicType TGType), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "a #GType", sinceVersion = Nothing}, args = [Arg {argCName = "container", argType = TInterface (Name {namespace = "Gtk", name = "Container"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkContainer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ContainerClassChildTypeFieldCallback =
    Ptr Gtk.Container.Container ->
    IO CGType

-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ContainerClassChildTypeFieldCallback :: FunPtr C_ContainerClassChildTypeFieldCallback -> C_ContainerClassChildTypeFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassChildTypeFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a) =>
    FunPtr C_ContainerClassChildTypeFieldCallback
    -> a
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> m GType
    -- ^ __Returns:__ a t'GType'
dynamic_ContainerClassChildTypeFieldCallback :: FunPtr C_ContainerClassChildTypeFieldCallback -> a -> m GType
dynamic_ContainerClassChildTypeFieldCallback __funPtr :: FunPtr C_ContainerClassChildTypeFieldCallback
__funPtr container :: a
container = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    CGType
result <- (FunPtr C_ContainerClassChildTypeFieldCallback
-> C_ContainerClassChildTypeFieldCallback
__dynamic_C_ContainerClassChildTypeFieldCallback FunPtr C_ContainerClassChildTypeFieldCallback
__funPtr) Ptr Container
container'
    let result' :: GType
result' = CGType -> GType
GType CGType
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'

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

-- | /No description available in the introspection data./
type ContainerClassChildTypeFieldCallback =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> IO GType
    -- ^ __Returns:__ a t'GType'

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassChildTypeFieldCallback`@.
noContainerClassChildTypeFieldCallback :: Maybe ContainerClassChildTypeFieldCallback
noContainerClassChildTypeFieldCallback :: Maybe ContainerClassChildTypeFieldCallback
noContainerClassChildTypeFieldCallback = Maybe ContainerClassChildTypeFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassChildTypeFieldCallback :: MonadIO m => ContainerClassChildTypeFieldCallback -> m (GClosure C_ContainerClassChildTypeFieldCallback)
genClosure_ContainerClassChildTypeFieldCallback :: ContainerClassChildTypeFieldCallback
-> m (GClosure C_ContainerClassChildTypeFieldCallback)
genClosure_ContainerClassChildTypeFieldCallback cb :: ContainerClassChildTypeFieldCallback
cb = IO (GClosure C_ContainerClassChildTypeFieldCallback)
-> m (GClosure C_ContainerClassChildTypeFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassChildTypeFieldCallback)
 -> m (GClosure C_ContainerClassChildTypeFieldCallback))
-> IO (GClosure C_ContainerClassChildTypeFieldCallback)
-> m (GClosure C_ContainerClassChildTypeFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ContainerClassChildTypeFieldCallback
cb' = Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
-> ContainerClassChildTypeFieldCallback
-> C_ContainerClassChildTypeFieldCallback
wrap_ContainerClassChildTypeFieldCallback Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
forall a. Maybe a
Nothing ContainerClassChildTypeFieldCallback
cb
    C_ContainerClassChildTypeFieldCallback
-> IO (FunPtr C_ContainerClassChildTypeFieldCallback)
mk_ContainerClassChildTypeFieldCallback C_ContainerClassChildTypeFieldCallback
cb' IO (FunPtr C_ContainerClassChildTypeFieldCallback)
-> (FunPtr C_ContainerClassChildTypeFieldCallback
    -> IO (GClosure C_ContainerClassChildTypeFieldCallback))
-> IO (GClosure C_ContainerClassChildTypeFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassChildTypeFieldCallback
-> IO (GClosure C_ContainerClassChildTypeFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassChildTypeFieldCallback` into a `C_ContainerClassChildTypeFieldCallback`.
wrap_ContainerClassChildTypeFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback)) ->
    ContainerClassChildTypeFieldCallback ->
    C_ContainerClassChildTypeFieldCallback
wrap_ContainerClassChildTypeFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
-> ContainerClassChildTypeFieldCallback
-> C_ContainerClassChildTypeFieldCallback
wrap_ContainerClassChildTypeFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
funptrptr _cb :: ContainerClassChildTypeFieldCallback
_cb container :: Ptr Container
container = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    GType
result <- ContainerClassChildTypeFieldCallback
_cb  Container
container'
    Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassChildTypeFieldCallback))
funptrptr
    let result' :: CGType
result' = GType -> CGType
gtypeToCGType GType
result
    CGType -> IO CGType
forall (m :: * -> *) a. Monad m => a -> m a
return CGType
result'


-- callback ContainerClassAddFieldCallback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "container", argType = TInterface (Name {namespace = "Gtk", name = "Container"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkContainer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a widget to be placed inside @container", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_ContainerClassAddFieldCallback =
    Ptr Gtk.Container.Container ->
    Ptr Gtk.Widget.Widget ->
    IO ()

-- Args: [ Arg
--           { argCName = "container"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Container" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget to be placed inside @container"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_ContainerClassAddFieldCallback :: FunPtr C_ContainerClassAddFieldCallback -> C_ContainerClassAddFieldCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_ContainerClassAddFieldCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Container.IsContainer a, Gtk.Widget.IsWidget b) =>
    FunPtr C_ContainerClassAddFieldCallback
    -> a
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> b
    -- ^ /@widget@/: a widget to be placed inside /@container@/
    -> m ()
dynamic_ContainerClassAddFieldCallback :: FunPtr C_ContainerClassSetFocusChildFieldCallback -> a -> b -> m ()
dynamic_ContainerClassAddFieldCallback __funPtr :: FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr container :: a
container widget :: b
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Container
container' <- a -> IO (Ptr Container)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
    Ptr Widget
widget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
widget
    (FunPtr C_ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
__dynamic_C_ContainerClassAddFieldCallback FunPtr C_ContainerClassSetFocusChildFieldCallback
__funPtr) Ptr Container
container' Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type ContainerClassAddFieldCallback =
    Gtk.Container.Container
    -- ^ /@container@/: a t'GI.Gtk.Objects.Container.Container'
    -> Gtk.Widget.Widget
    -- ^ /@widget@/: a widget to be placed inside /@container@/
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ContainerClassAddFieldCallback`@.
noContainerClassAddFieldCallback :: Maybe ContainerClassAddFieldCallback
noContainerClassAddFieldCallback :: Maybe ContainerClassSetFocusChildFieldCallback
noContainerClassAddFieldCallback = Maybe ContainerClassSetFocusChildFieldCallback
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_ContainerClassAddFieldCallback :: MonadIO m => ContainerClassAddFieldCallback -> m (GClosure C_ContainerClassAddFieldCallback)
genClosure_ContainerClassAddFieldCallback :: ContainerClassSetFocusChildFieldCallback
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
genClosure_ContainerClassAddFieldCallback cb :: ContainerClassSetFocusChildFieldCallback
cb = IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
 -> m (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
-> m (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ContainerClassSetFocusChildFieldCallback
cb' = Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassAddFieldCallback Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
forall a. Maybe a
Nothing ContainerClassSetFocusChildFieldCallback
cb
    C_ContainerClassSetFocusChildFieldCallback
-> IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
mk_ContainerClassAddFieldCallback C_ContainerClassSetFocusChildFieldCallback
cb' IO (FunPtr C_ContainerClassSetFocusChildFieldCallback)
-> (FunPtr C_ContainerClassSetFocusChildFieldCallback
    -> IO (GClosure C_ContainerClassSetFocusChildFieldCallback))
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ContainerClassSetFocusChildFieldCallback
-> IO (GClosure C_ContainerClassSetFocusChildFieldCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ContainerClassAddFieldCallback` into a `C_ContainerClassAddFieldCallback`.
wrap_ContainerClassAddFieldCallback ::
    Maybe (Ptr (FunPtr C_ContainerClassAddFieldCallback)) ->
    ContainerClassAddFieldCallback ->
    C_ContainerClassAddFieldCallback
wrap_ContainerClassAddFieldCallback :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> ContainerClassSetFocusChildFieldCallback
-> C_ContainerClassSetFocusChildFieldCallback
wrap_ContainerClassAddFieldCallback funptrptr :: Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr _cb :: ContainerClassSetFocusChildFieldCallback
_cb container :: Ptr Container
container widget :: Ptr Widget
widget = do
    Container
container' <- ((ManagedPtr Container -> Container)
-> Ptr Container -> IO Container
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Container -> Container
Gtk.Container.Container) Ptr Container
container
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    ContainerClassSetFocusChildFieldCallback
_cb  Container
container' Widget
widget'
    Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
-> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_ContainerClassSetFocusChildFieldCallback))
funptrptr


-- callback CellLayoutDataFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "cell_layout", argType = TInterface (Name {namespace = "Gtk", name = "CellLayout"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellLayout", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the cell renderer whose value is to be set", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree_model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the model", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkTreeIter indicating the row to set the value for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data passed to gtk_cell_layout_set_cell_data_func()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function which should set the value of @cell_layout\8217s cell renderer(s)\nas appropriate.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CellLayoutDataFunc =
    Ptr Gtk.CellLayout.CellLayout ->
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "cell_layout"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "CellLayout" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCellLayout" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cell"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "CellRenderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the cell renderer whose value is to be set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "tree_model"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeModel" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the model" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "iter"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TreeIter" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GtkTreeIter indicating the row to set the value for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "user data passed to gtk_cell_layout_set_cell_data_func()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CellLayoutDataFunc :: FunPtr C_CellLayoutDataFunc -> C_CellLayoutDataFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CellLayoutDataFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.CellLayout.IsCellLayout a, Gtk.CellRenderer.IsCellRenderer b, Gtk.TreeModel.IsTreeModel c) =>
    FunPtr C_CellLayoutDataFunc
    -> a
    -- ^ /@cellLayout@/: a t'GI.Gtk.Interfaces.CellLayout.CellLayout'
    -> b
    -- ^ /@cell@/: the cell renderer whose value is to be set
    -> c
    -- ^ /@treeModel@/: the model
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to set the value for
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Interfaces.CellLayout.cellLayoutSetCellDataFunc'
    -> m ()
dynamic_CellLayoutDataFunc :: FunPtr C_CellLayoutDataFunc
-> a -> b -> c -> TreeIter -> Ptr () -> m ()
dynamic_CellLayoutDataFunc __funPtr :: FunPtr C_CellLayoutDataFunc
__funPtr cellLayout :: a
cellLayout cell :: b
cell treeModel :: c
treeModel iter :: TreeIter
iter data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr CellLayout
cellLayout' <- a -> IO (Ptr CellLayout)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
cellLayout
    Ptr CellRenderer
cell' <- b -> IO (Ptr CellRenderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
cell
    Ptr TreeModel
treeModel' <- c -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
treeModel
    Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
    (FunPtr C_CellLayoutDataFunc -> C_CellLayoutDataFunc
__dynamic_C_CellLayoutDataFunc FunPtr C_CellLayoutDataFunc
__funPtr) Ptr CellLayout
cellLayout' Ptr CellRenderer
cell' Ptr TreeModel
treeModel' Ptr TreeIter
iter' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
cellLayout
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
cell
    c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
treeModel
    TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | A function which should set the value of /@cellLayout@/’s cell renderer(s)
-- as appropriate.
type CellLayoutDataFunc =
    Gtk.CellLayout.CellLayout
    -- ^ /@cellLayout@/: a t'GI.Gtk.Interfaces.CellLayout.CellLayout'
    -> Gtk.CellRenderer.CellRenderer
    -- ^ /@cell@/: the cell renderer whose value is to be set
    -> Gtk.TreeModel.TreeModel
    -- ^ /@treeModel@/: the model
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to set the value for
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellLayoutDataFunc`@.
noCellLayoutDataFunc :: Maybe CellLayoutDataFunc
noCellLayoutDataFunc :: Maybe CellLayoutDataFunc
noCellLayoutDataFunc = Maybe CellLayoutDataFunc
forall a. Maybe a
Nothing

-- | A function which should set the value of /@cellLayout@/’s cell renderer(s)
-- as appropriate.
type CellLayoutDataFunc_WithClosures =
    Gtk.CellLayout.CellLayout
    -- ^ /@cellLayout@/: a t'GI.Gtk.Interfaces.CellLayout.CellLayout'
    -> Gtk.CellRenderer.CellRenderer
    -- ^ /@cell@/: the cell renderer whose value is to be set
    -> Gtk.TreeModel.TreeModel
    -- ^ /@treeModel@/: the model
    -> Gtk.TreeIter.TreeIter
    -- ^ /@iter@/: a t'GI.Gtk.Structs.TreeIter.TreeIter' indicating the row to set the value for
    -> Ptr ()
    -- ^ /@data@/: user data passed to 'GI.Gtk.Interfaces.CellLayout.cellLayoutSetCellDataFunc'
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellLayoutDataFunc_WithClosures`@.
noCellLayoutDataFunc_WithClosures :: Maybe CellLayoutDataFunc_WithClosures
noCellLayoutDataFunc_WithClosures :: Maybe CellLayoutDataFunc_WithClosures
noCellLayoutDataFunc_WithClosures = Maybe CellLayoutDataFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CellLayoutDataFunc :: CellLayoutDataFunc -> CellLayoutDataFunc_WithClosures
drop_closures_CellLayoutDataFunc :: CellLayoutDataFunc -> CellLayoutDataFunc_WithClosures
drop_closures_CellLayoutDataFunc _f :: CellLayoutDataFunc
_f cellLayout :: CellLayout
cellLayout cell :: CellRenderer
cell treeModel :: TreeModel
treeModel iter :: TreeIter
iter _ = CellLayoutDataFunc
_f CellLayout
cellLayout CellRenderer
cell TreeModel
treeModel TreeIter
iter

-- | Wrap the callback into a `GClosure`.
genClosure_CellLayoutDataFunc :: MonadIO m => CellLayoutDataFunc -> m (GClosure C_CellLayoutDataFunc)
genClosure_CellLayoutDataFunc :: CellLayoutDataFunc -> m (GClosure C_CellLayoutDataFunc)
genClosure_CellLayoutDataFunc cb :: CellLayoutDataFunc
cb = IO (GClosure C_CellLayoutDataFunc)
-> m (GClosure C_CellLayoutDataFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CellLayoutDataFunc)
 -> m (GClosure C_CellLayoutDataFunc))
-> IO (GClosure C_CellLayoutDataFunc)
-> m (GClosure C_CellLayoutDataFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: CellLayoutDataFunc_WithClosures
cb' = CellLayoutDataFunc -> CellLayoutDataFunc_WithClosures
drop_closures_CellLayoutDataFunc CellLayoutDataFunc
cb
    let cb'' :: C_CellLayoutDataFunc
cb'' = Maybe (Ptr (FunPtr C_CellLayoutDataFunc))
-> CellLayoutDataFunc_WithClosures -> C_CellLayoutDataFunc
wrap_CellLayoutDataFunc Maybe (Ptr (FunPtr C_CellLayoutDataFunc))
forall a. Maybe a
Nothing CellLayoutDataFunc_WithClosures
cb'
    C_CellLayoutDataFunc -> IO (FunPtr C_CellLayoutDataFunc)
mk_CellLayoutDataFunc C_CellLayoutDataFunc
cb'' IO (FunPtr C_CellLayoutDataFunc)
-> (FunPtr C_CellLayoutDataFunc
    -> IO (GClosure C_CellLayoutDataFunc))
-> IO (GClosure C_CellLayoutDataFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CellLayoutDataFunc -> IO (GClosure C_CellLayoutDataFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CellLayoutDataFunc` into a `C_CellLayoutDataFunc`.
wrap_CellLayoutDataFunc ::
    Maybe (Ptr (FunPtr C_CellLayoutDataFunc)) ->
    CellLayoutDataFunc_WithClosures ->
    C_CellLayoutDataFunc
wrap_CellLayoutDataFunc :: Maybe (Ptr (FunPtr C_CellLayoutDataFunc))
-> CellLayoutDataFunc_WithClosures -> C_CellLayoutDataFunc
wrap_CellLayoutDataFunc funptrptr :: Maybe (Ptr (FunPtr C_CellLayoutDataFunc))
funptrptr _cb :: CellLayoutDataFunc_WithClosures
_cb cellLayout :: Ptr CellLayout
cellLayout cell :: Ptr CellRenderer
cell treeModel :: Ptr TreeModel
treeModel iter :: Ptr TreeIter
iter data_ :: Ptr ()
data_ = do
    CellLayout
cellLayout' <- ((ManagedPtr CellLayout -> CellLayout)
-> Ptr CellLayout -> IO CellLayout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CellLayout -> CellLayout
Gtk.CellLayout.CellLayout) Ptr CellLayout
cellLayout
    CellRenderer
cell' <- ((ManagedPtr CellRenderer -> CellRenderer)
-> Ptr CellRenderer -> IO CellRenderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CellRenderer -> CellRenderer
Gtk.CellRenderer.CellRenderer) Ptr CellRenderer
cell
    TreeModel
treeModel' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
treeModel
    (ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
        CellLayoutDataFunc_WithClosures
_cb  CellLayout
cellLayout' CellRenderer
cell' TreeModel
treeModel' TreeIter
iter' Ptr ()
data_
        Maybe (Ptr (FunPtr C_CellLayoutDataFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CellLayoutDataFunc))
funptrptr


-- callback CellCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE to stop iterating over cells.", sinceVersion = Nothing}, args = [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the cell renderer to operate on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user-supplied data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the callback functions used for iterating over\nthe cell renderers of a #GtkCellArea, see gtk_cell_area_foreach().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CellCallback =
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "CellRenderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the cell renderer to operate on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user-supplied data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CellCallback :: FunPtr C_CellCallback -> C_CellCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CellCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.CellRenderer.IsCellRenderer a) =>
    FunPtr C_CellCallback
    -> a
    -- ^ /@renderer@/: the cell renderer to operate on
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> m Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.
dynamic_CellCallback :: FunPtr C_CellCallback -> a -> Ptr () -> m Bool
dynamic_CellCallback __funPtr :: FunPtr C_CellCallback
__funPtr renderer :: a
renderer data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr CellRenderer
renderer' <- a -> IO (Ptr CellRenderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    CInt
result <- (FunPtr C_CellCallback -> C_CellCallback
__dynamic_C_CellCallback FunPtr C_CellCallback
__funPtr) Ptr CellRenderer
renderer' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | The type of the callback functions used for iterating over
-- the cell renderers of a t'GI.Gtk.Objects.CellArea.CellArea', see 'GI.Gtk.Objects.CellArea.cellAreaForeach'.
type CellCallback =
    Gtk.CellRenderer.CellRenderer
    -- ^ /@renderer@/: the cell renderer to operate on
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellCallback`@.
noCellCallback :: Maybe CellCallback
noCellCallback :: Maybe CellCallback
noCellCallback = Maybe CellCallback
forall a. Maybe a
Nothing

-- | The type of the callback functions used for iterating over
-- the cell renderers of a t'GI.Gtk.Objects.CellArea.CellArea', see 'GI.Gtk.Objects.CellArea.cellAreaForeach'.
type CellCallback_WithClosures =
    Gtk.CellRenderer.CellRenderer
    -- ^ /@renderer@/: the cell renderer to operate on
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellCallback_WithClosures`@.
noCellCallback_WithClosures :: Maybe CellCallback_WithClosures
noCellCallback_WithClosures :: Maybe CellCallback_WithClosures
noCellCallback_WithClosures = Maybe CellCallback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CellCallback :: CellCallback -> CellCallback_WithClosures
drop_closures_CellCallback :: CellCallback -> CellCallback_WithClosures
drop_closures_CellCallback _f :: CellCallback
_f renderer :: CellRenderer
renderer _ = CellCallback
_f CellRenderer
renderer

-- | Wrap the callback into a `GClosure`.
genClosure_CellCallback :: MonadIO m => CellCallback -> m (GClosure C_CellCallback)
genClosure_CellCallback :: CellCallback -> m (GClosure C_CellCallback)
genClosure_CellCallback cb :: CellCallback
cb = IO (GClosure C_CellCallback) -> m (GClosure C_CellCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CellCallback) -> m (GClosure C_CellCallback))
-> IO (GClosure C_CellCallback) -> m (GClosure C_CellCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: CellCallback_WithClosures
cb' = CellCallback -> CellCallback_WithClosures
drop_closures_CellCallback CellCallback
cb
    let cb'' :: C_CellCallback
cb'' = Maybe (Ptr (FunPtr C_CellCallback))
-> CellCallback_WithClosures -> C_CellCallback
wrap_CellCallback Maybe (Ptr (FunPtr C_CellCallback))
forall a. Maybe a
Nothing CellCallback_WithClosures
cb'
    C_CellCallback -> IO (FunPtr C_CellCallback)
mk_CellCallback C_CellCallback
cb'' IO (FunPtr C_CellCallback)
-> (FunPtr C_CellCallback -> IO (GClosure C_CellCallback))
-> IO (GClosure C_CellCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CellCallback -> IO (GClosure C_CellCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CellCallback` into a `C_CellCallback`.
wrap_CellCallback ::
    Maybe (Ptr (FunPtr C_CellCallback)) ->
    CellCallback_WithClosures ->
    C_CellCallback
wrap_CellCallback :: Maybe (Ptr (FunPtr C_CellCallback))
-> CellCallback_WithClosures -> C_CellCallback
wrap_CellCallback funptrptr :: Maybe (Ptr (FunPtr C_CellCallback))
funptrptr _cb :: CellCallback_WithClosures
_cb renderer :: Ptr CellRenderer
renderer data_ :: Ptr ()
data_ = do
    CellRenderer
renderer' <- ((ManagedPtr CellRenderer -> CellRenderer)
-> Ptr CellRenderer -> IO CellRenderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CellRenderer -> CellRenderer
Gtk.CellRenderer.CellRenderer) Ptr CellRenderer
renderer
    Bool
result <- CellCallback_WithClosures
_cb  CellRenderer
renderer' Ptr ()
data_
    Maybe (Ptr (FunPtr C_CellCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CellCallback))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback CellAllocCallback
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "%TRUE to stop iterating over cells.", sinceVersion = Nothing}, args = [Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the cell renderer to operate on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the area allocated to @renderer inside the rectangle\n    provided to gtk_cell_area_foreach_alloc().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_background", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the background area for @renderer inside the\n    background area provided to gtk_cell_area_foreach_alloc().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user-supplied data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the callback functions used for iterating over the\ncell renderers and their allocated areas inside a #GtkCellArea,\nsee gtk_cell_area_foreach_alloc().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CellAllocCallback =
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr Gdk.Rectangle.Rectangle ->
    Ptr Gdk.Rectangle.Rectangle ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "renderer"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "CellRenderer" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the cell renderer to operate on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cell_area"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the area allocated to @renderer inside the rectangle\n    provided to gtk_cell_area_foreach_alloc()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cell_background"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the background area for @renderer inside the\n    background area provided to gtk_cell_area_foreach_alloc()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user-supplied data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CellAllocCallback :: FunPtr C_CellAllocCallback -> C_CellAllocCallback

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CellAllocCallback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.CellRenderer.IsCellRenderer a) =>
    FunPtr C_CellAllocCallback
    -> a
    -- ^ /@renderer@/: the cell renderer to operate on
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellArea@/: the area allocated to /@renderer@/ inside the rectangle
    --     provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellBackground@/: the background area for /@renderer@/ inside the
    --     background area provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> m Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.
dynamic_CellAllocCallback :: FunPtr C_CellAllocCallback
-> a -> Rectangle -> Rectangle -> Ptr () -> m Bool
dynamic_CellAllocCallback __funPtr :: FunPtr C_CellAllocCallback
__funPtr renderer :: a
renderer cellArea :: Rectangle
cellArea cellBackground :: Rectangle
cellBackground data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr CellRenderer
renderer' <- a -> IO (Ptr CellRenderer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
renderer
    Ptr Rectangle
cellArea' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
cellArea
    Ptr Rectangle
cellBackground' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
cellBackground
    CInt
result <- (FunPtr C_CellAllocCallback -> C_CellAllocCallback
__dynamic_C_CellAllocCallback FunPtr C_CellAllocCallback
__funPtr) Ptr CellRenderer
renderer' Ptr Rectangle
cellArea' Ptr Rectangle
cellBackground' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
renderer
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
cellArea
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
cellBackground
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | The type of the callback functions used for iterating over the
-- cell renderers and their allocated areas inside a t'GI.Gtk.Objects.CellArea.CellArea',
-- see 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
type CellAllocCallback =
    Gtk.CellRenderer.CellRenderer
    -- ^ /@renderer@/: the cell renderer to operate on
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellArea@/: the area allocated to /@renderer@/ inside the rectangle
    --     provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellBackground@/: the background area for /@renderer@/ inside the
    --     background area provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAllocCallback`@.
noCellAllocCallback :: Maybe CellAllocCallback
noCellAllocCallback :: Maybe CellAllocCallback
noCellAllocCallback = Maybe CellAllocCallback
forall a. Maybe a
Nothing

-- | The type of the callback functions used for iterating over the
-- cell renderers and their allocated areas inside a t'GI.Gtk.Objects.CellArea.CellArea',
-- see 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
type CellAllocCallback_WithClosures =
    Gtk.CellRenderer.CellRenderer
    -- ^ /@renderer@/: the cell renderer to operate on
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellArea@/: the area allocated to /@renderer@/ inside the rectangle
    --     provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> Gdk.Rectangle.Rectangle
    -- ^ /@cellBackground@/: the background area for /@renderer@/ inside the
    --     background area provided to 'GI.Gtk.Objects.CellArea.cellAreaForeachAlloc'.
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop iterating over cells.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAllocCallback_WithClosures`@.
noCellAllocCallback_WithClosures :: Maybe CellAllocCallback_WithClosures
noCellAllocCallback_WithClosures :: Maybe CellAllocCallback_WithClosures
noCellAllocCallback_WithClosures = Maybe CellAllocCallback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CellAllocCallback :: CellAllocCallback -> CellAllocCallback_WithClosures
drop_closures_CellAllocCallback :: CellAllocCallback -> CellAllocCallback_WithClosures
drop_closures_CellAllocCallback _f :: CellAllocCallback
_f renderer :: CellRenderer
renderer cellArea :: Rectangle
cellArea cellBackground :: Rectangle
cellBackground _ = CellAllocCallback
_f CellRenderer
renderer Rectangle
cellArea Rectangle
cellBackground

-- | Wrap the callback into a `GClosure`.
genClosure_CellAllocCallback :: MonadIO m => CellAllocCallback -> m (GClosure C_CellAllocCallback)
genClosure_CellAllocCallback :: CellAllocCallback -> m (GClosure C_CellAllocCallback)
genClosure_CellAllocCallback cb :: CellAllocCallback
cb = IO (GClosure C_CellAllocCallback)
-> m (GClosure C_CellAllocCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CellAllocCallback)
 -> m (GClosure C_CellAllocCallback))
-> IO (GClosure C_CellAllocCallback)
-> m (GClosure C_CellAllocCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: CellAllocCallback_WithClosures
cb' = CellAllocCallback -> CellAllocCallback_WithClosures
drop_closures_CellAllocCallback CellAllocCallback
cb
    let cb'' :: C_CellAllocCallback
cb'' = Maybe (Ptr (FunPtr C_CellAllocCallback))
-> CellAllocCallback_WithClosures -> C_CellAllocCallback
wrap_CellAllocCallback Maybe (Ptr (FunPtr C_CellAllocCallback))
forall a. Maybe a
Nothing CellAllocCallback_WithClosures
cb'
    C_CellAllocCallback -> IO (FunPtr C_CellAllocCallback)
mk_CellAllocCallback C_CellAllocCallback
cb'' IO (FunPtr C_CellAllocCallback)
-> (FunPtr C_CellAllocCallback
    -> IO (GClosure C_CellAllocCallback))
-> IO (GClosure C_CellAllocCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CellAllocCallback -> IO (GClosure C_CellAllocCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CellAllocCallback` into a `C_CellAllocCallback`.
wrap_CellAllocCallback ::
    Maybe (Ptr (FunPtr C_CellAllocCallback)) ->
    CellAllocCallback_WithClosures ->
    C_CellAllocCallback
wrap_CellAllocCallback :: Maybe (Ptr (FunPtr C_CellAllocCallback))
-> CellAllocCallback_WithClosures -> C_CellAllocCallback
wrap_CellAllocCallback funptrptr :: Maybe (Ptr (FunPtr C_CellAllocCallback))
funptrptr _cb :: CellAllocCallback_WithClosures
_cb renderer :: Ptr CellRenderer
renderer cellArea :: Ptr Rectangle
cellArea cellBackground :: Ptr Rectangle
cellBackground data_ :: Ptr ()
data_ = do
    CellRenderer
renderer' <- ((ManagedPtr CellRenderer -> CellRenderer)
-> Ptr CellRenderer -> IO CellRenderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CellRenderer -> CellRenderer
Gtk.CellRenderer.CellRenderer) Ptr CellRenderer
renderer
    (ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> (Rectangle -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle Ptr Rectangle
cellArea ((Rectangle -> IO CInt) -> IO CInt)
-> (Rectangle -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \cellArea' :: Rectangle
cellArea' -> do
        (ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> (Rectangle -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle Ptr Rectangle
cellBackground ((Rectangle -> IO CInt) -> IO CInt)
-> (Rectangle -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \cellBackground' :: Rectangle
cellBackground' -> do
            Bool
result <- CellAllocCallback_WithClosures
_cb  CellRenderer
renderer' Rectangle
cellArea' Rectangle
cellBackground' Ptr ()
data_
            Maybe (Ptr (FunPtr C_CellAllocCallback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CellAllocCallback))
funptrptr
            let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
            CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback Callback
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the widget to operate on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user-supplied data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "The type of the callback functions used for e.g. iterating over\nthe children of a container, see gtk_container_foreach().", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_Callback =
    Ptr Gtk.Widget.Widget ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to operate on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user-supplied data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_Callback ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    FunPtr C_Callback
    -> a
    -- ^ /@widget@/: the widget to operate on
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> m ()
dynamic_Callback :: FunPtr C_Callback -> a -> Ptr () -> m ()
dynamic_Callback __funPtr :: FunPtr C_Callback
__funPtr widget :: a
widget data_ :: Ptr ()
data_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    (FunPtr C_Callback -> C_Callback
__dynamic_C_Callback FunPtr C_Callback
__funPtr) Ptr Widget
widget' Ptr ()
data_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | The type of the callback functions used for e.g. iterating over
-- the children of a container, see 'GI.Gtk.Objects.Container.containerForeach'.
type Callback =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to operate on
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `Callback`@.
noCallback :: Maybe Callback
noCallback :: Maybe WidgetClassUnrootFieldCallback
noCallback = Maybe WidgetClassUnrootFieldCallback
forall a. Maybe a
Nothing

-- | The type of the callback functions used for e.g. iterating over
-- the children of a container, see 'GI.Gtk.Objects.Container.containerForeach'.
type Callback_WithClosures =
    Gtk.Widget.Widget
    -- ^ /@widget@/: the widget to operate on
    -> Ptr ()
    -- ^ /@data@/: user-supplied data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `Callback_WithClosures`@.
noCallback_WithClosures :: Maybe Callback_WithClosures
noCallback_WithClosures :: Maybe Callback_WithClosures
noCallback_WithClosures = Maybe Callback_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_Callback :: Callback -> Callback_WithClosures
drop_closures_Callback :: WidgetClassUnrootFieldCallback -> Callback_WithClosures
drop_closures_Callback _f :: WidgetClassUnrootFieldCallback
_f widget :: Widget
widget _ = WidgetClassUnrootFieldCallback
_f Widget
widget

-- | Wrap the callback into a `GClosure`.
genClosure_Callback :: MonadIO m => Callback -> m (GClosure C_Callback)
genClosure_Callback :: WidgetClassUnrootFieldCallback -> m (GClosure C_Callback)
genClosure_Callback cb :: WidgetClassUnrootFieldCallback
cb = IO (GClosure C_Callback) -> m (GClosure C_Callback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_Callback) -> m (GClosure C_Callback))
-> IO (GClosure C_Callback) -> m (GClosure C_Callback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: Callback_WithClosures
cb' = WidgetClassUnrootFieldCallback -> Callback_WithClosures
drop_closures_Callback WidgetClassUnrootFieldCallback
cb
    let cb'' :: C_Callback
cb'' = Maybe (Ptr (FunPtr C_Callback))
-> Callback_WithClosures -> C_Callback
wrap_Callback Maybe (Ptr (FunPtr C_Callback))
forall a. Maybe a
Nothing Callback_WithClosures
cb'
    C_Callback -> IO (FunPtr C_Callback)
mk_Callback C_Callback
cb'' IO (FunPtr C_Callback)
-> (FunPtr C_Callback -> IO (GClosure C_Callback))
-> IO (GClosure C_Callback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_Callback -> IO (GClosure C_Callback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `Callback` into a `C_Callback`.
wrap_Callback ::
    Maybe (Ptr (FunPtr C_Callback)) ->
    Callback_WithClosures ->
    C_Callback
wrap_Callback :: Maybe (Ptr (FunPtr C_Callback))
-> Callback_WithClosures -> C_Callback
wrap_Callback funptrptr :: Maybe (Ptr (FunPtr C_Callback))
funptrptr _cb :: Callback_WithClosures
_cb widget :: Ptr Widget
widget data_ :: Ptr ()
data_ = do
    Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
    Callback_WithClosures
_cb  Widget
widget' Ptr ()
data_
    Maybe (Ptr (FunPtr C_Callback)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_Callback))
funptrptr


-- callback CalendarDetailFunc
--          -> Callable {returnType = Just (TBasicType TUTF8), returnMayBeNull = True, returnTransfer = TransferEverything, returnDocumentation = Documentation {rawDocText = Just "Newly allocated string with Pango markup\n    with details for the specified day or %NULL.", sinceVersion = Nothing}, args = [Arg {argCName = "calendar", argType = TInterface (Name {namespace = "Gtk", name = "Calendar"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCalendar.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "year", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the year for which details are needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "month", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the month for which details are needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "day", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the day of @month for which details are needed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the data passed with gtk_calendar_set_detail_func().", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "This kind of functions provide Pango markup with detail information for the\nspecified day. Examples for such details are holidays or appointments. The\nfunction returns %NULL when no information is available.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_CalendarDetailFunc =
    Ptr Gtk.Calendar.Calendar ->
    Word32 ->
    Word32 ->
    Word32 ->
    Ptr () ->
    IO CString

-- Args: [ Arg
--           { argCName = "calendar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "year"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the year for which details are needed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "month"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the month for which details are needed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "day"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the day of @month for which details are needed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the data passed with gtk_calendar_set_detail_func()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_CalendarDetailFunc :: FunPtr C_CalendarDetailFunc -> C_CalendarDetailFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_CalendarDetailFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Calendar.IsCalendar a) =>
    FunPtr C_CalendarDetailFunc
    -> a
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'.
    -> Word32
    -- ^ /@year@/: the year for which details are needed.
    -> Word32
    -- ^ /@month@/: the month for which details are needed.
    -> Word32
    -- ^ /@day@/: the day of /@month@/ for which details are needed.
    -> Ptr ()
    -- ^ /@userData@/: the data passed with 'GI.Gtk.Objects.Calendar.calendarSetDetailFunc'.
    -> m (Maybe T.Text)
    -- ^ __Returns:__ Newly allocated string with Pango markup
    --     with details for the specified day or 'P.Nothing'.
dynamic_CalendarDetailFunc :: FunPtr C_CalendarDetailFunc
-> a -> Word32 -> Word32 -> Word32 -> Ptr () -> m (Maybe Text)
dynamic_CalendarDetailFunc __funPtr :: FunPtr C_CalendarDetailFunc
__funPtr calendar :: a
calendar year :: Word32
year month :: Word32
month day :: Word32
day userData :: Ptr ()
userData = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Calendar
calendar' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
calendar
    CString
result <- (FunPtr C_CalendarDetailFunc -> C_CalendarDetailFunc
__dynamic_C_CalendarDetailFunc FunPtr C_CalendarDetailFunc
__funPtr) Ptr Calendar
calendar' Word32
year Word32
month Word32
day Ptr ()
userData
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
calendar
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

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

-- | This kind of functions provide Pango markup with detail information for the
-- specified day. Examples for such details are holidays or appointments. The
-- function returns 'P.Nothing' when no information is available.
type CalendarDetailFunc =
    Gtk.Calendar.Calendar
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'.
    -> Word32
    -- ^ /@year@/: the year for which details are needed.
    -> Word32
    -- ^ /@month@/: the month for which details are needed.
    -> Word32
    -- ^ /@day@/: the day of /@month@/ for which details are needed.
    -> IO (Maybe T.Text)
    -- ^ __Returns:__ Newly allocated string with Pango markup
    --     with details for the specified day or 'P.Nothing'.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarDetailFunc`@.
noCalendarDetailFunc :: Maybe CalendarDetailFunc
noCalendarDetailFunc :: Maybe CalendarDetailFunc
noCalendarDetailFunc = Maybe CalendarDetailFunc
forall a. Maybe a
Nothing

-- | This kind of functions provide Pango markup with detail information for the
-- specified day. Examples for such details are holidays or appointments. The
-- function returns 'P.Nothing' when no information is available.
type CalendarDetailFunc_WithClosures =
    Gtk.Calendar.Calendar
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'.
    -> Word32
    -- ^ /@year@/: the year for which details are needed.
    -> Word32
    -- ^ /@month@/: the month for which details are needed.
    -> Word32
    -- ^ /@day@/: the day of /@month@/ for which details are needed.
    -> Ptr ()
    -- ^ /@userData@/: the data passed with 'GI.Gtk.Objects.Calendar.calendarSetDetailFunc'.
    -> IO (Maybe T.Text)
    -- ^ __Returns:__ Newly allocated string with Pango markup
    --     with details for the specified day or 'P.Nothing'.

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarDetailFunc_WithClosures`@.
noCalendarDetailFunc_WithClosures :: Maybe CalendarDetailFunc_WithClosures
noCalendarDetailFunc_WithClosures :: Maybe CalendarDetailFunc_WithClosures
noCalendarDetailFunc_WithClosures = Maybe CalendarDetailFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_CalendarDetailFunc :: CalendarDetailFunc -> CalendarDetailFunc_WithClosures
drop_closures_CalendarDetailFunc :: CalendarDetailFunc -> CalendarDetailFunc_WithClosures
drop_closures_CalendarDetailFunc _f :: CalendarDetailFunc
_f calendar :: Calendar
calendar year :: Word32
year month :: Word32
month day :: Word32
day _ = CalendarDetailFunc
_f Calendar
calendar Word32
year Word32
month Word32
day

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarDetailFunc :: MonadIO m => CalendarDetailFunc -> m (GClosure C_CalendarDetailFunc)
genClosure_CalendarDetailFunc :: CalendarDetailFunc -> m (GClosure C_CalendarDetailFunc)
genClosure_CalendarDetailFunc cb :: CalendarDetailFunc
cb = IO (GClosure C_CalendarDetailFunc)
-> m (GClosure C_CalendarDetailFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDetailFunc)
 -> m (GClosure C_CalendarDetailFunc))
-> IO (GClosure C_CalendarDetailFunc)
-> m (GClosure C_CalendarDetailFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: CalendarDetailFunc_WithClosures
cb' = CalendarDetailFunc -> CalendarDetailFunc_WithClosures
drop_closures_CalendarDetailFunc CalendarDetailFunc
cb
    let cb'' :: C_CalendarDetailFunc
cb'' = Maybe (Ptr (FunPtr C_CalendarDetailFunc))
-> CalendarDetailFunc_WithClosures -> C_CalendarDetailFunc
wrap_CalendarDetailFunc Maybe (Ptr (FunPtr C_CalendarDetailFunc))
forall a. Maybe a
Nothing CalendarDetailFunc_WithClosures
cb'
    C_CalendarDetailFunc -> IO (FunPtr C_CalendarDetailFunc)
mk_CalendarDetailFunc C_CalendarDetailFunc
cb'' IO (FunPtr C_CalendarDetailFunc)
-> (FunPtr C_CalendarDetailFunc
    -> IO (GClosure C_CalendarDetailFunc))
-> IO (GClosure C_CalendarDetailFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDetailFunc -> IO (GClosure C_CalendarDetailFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarDetailFunc` into a `C_CalendarDetailFunc`.
wrap_CalendarDetailFunc ::
    Maybe (Ptr (FunPtr C_CalendarDetailFunc)) ->
    CalendarDetailFunc_WithClosures ->
    C_CalendarDetailFunc
wrap_CalendarDetailFunc :: Maybe (Ptr (FunPtr C_CalendarDetailFunc))
-> CalendarDetailFunc_WithClosures -> C_CalendarDetailFunc
wrap_CalendarDetailFunc funptrptr :: Maybe (Ptr (FunPtr C_CalendarDetailFunc))
funptrptr _cb :: CalendarDetailFunc_WithClosures
_cb calendar :: Ptr Calendar
calendar year :: Word32
year month :: Word32
month day :: Word32
day userData :: Ptr ()
userData = do
    Calendar
calendar' <- ((ManagedPtr Calendar -> Calendar) -> Ptr Calendar -> IO Calendar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Calendar -> Calendar
Gtk.Calendar.Calendar) Ptr Calendar
calendar
    Maybe Text
result <- CalendarDetailFunc_WithClosures
_cb  Calendar
calendar' Word32
year Word32
month Word32
day Ptr ()
userData
    Maybe (Ptr (FunPtr C_CalendarDetailFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CalendarDetailFunc))
funptrptr
    CString -> Maybe Text -> (Text -> IO CString) -> IO CString
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM CString
forall a. Ptr a
nullPtr Maybe Text
result ((Text -> IO CString) -> IO CString)
-> (Text -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \result' :: Text
result' -> do
        CString
result'' <- Text -> IO CString
textToCString Text
result'
        CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
result''


-- callback BuilderConnectFunc
--          -> Callable {returnType = Nothing, returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "builder", argType = TInterface (Name {namespace = "Gtk", name = "Builder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkBuilder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "object to connect a signal to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "signal_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "name of the signal", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "handler_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "name of the handler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "connect_object", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GObject, if non-%NULL, use g_signal_connect_object()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GObject", name = "ConnectFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GConnectFlags to use", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 6, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "This is the signature of a function used to connect signals.  It is used\nby the gtk_builder_connect_signals() and gtk_builder_connect_signals_full()\nmethods.  It is mainly intended for interpreted language bindings, but\ncould be useful where the programmer wants more control over the signal\nconnection process. Note that this function can only be called once,\nsubsequent calls will do nothing.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_BuilderConnectFunc =
    Ptr Gtk.Builder.Builder ->
    Ptr GObject.Object.Object ->
    CString ->
    CString ->
    Ptr GObject.Object.Object ->
    CUInt ->
    Ptr () ->
    IO ()

-- Args: [ Arg
--           { argCName = "builder"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Builder" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkBuilder" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "object"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "object to connect a signal to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signal_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name of the signal" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "handler_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name of the handler"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connect_object"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GObject, if non-%NULL, use g_signal_connect_object()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "ConnectFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#GConnectFlags to use"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 6
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_BuilderConnectFunc :: FunPtr C_BuilderConnectFunc -> C_BuilderConnectFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_BuilderConnectFunc ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Builder.IsBuilder a, GObject.Object.IsObject b, GObject.Object.IsObject c) =>
    FunPtr C_BuilderConnectFunc
    -> a
    -- ^ /@builder@/: a t'GI.Gtk.Objects.Builder.Builder'
    -> b
    -- ^ /@object@/: object to connect a signal to
    -> T.Text
    -- ^ /@signalName@/: name of the signal
    -> T.Text
    -- ^ /@handlerName@/: name of the handler
    -> Maybe (c)
    -- ^ /@connectObject@/: a t'GI.GObject.Objects.Object.Object', if non-'P.Nothing', use @/g_signal_connect_object()/@
    -> [GObject.Flags.ConnectFlags]
    -- ^ /@flags@/: t'GI.GObject.Flags.ConnectFlags' to use
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> m ()
dynamic_BuilderConnectFunc :: FunPtr C_BuilderConnectFunc
-> a
-> b
-> Text
-> Text
-> Maybe c
-> [ConnectFlags]
-> Ptr ()
-> m ()
dynamic_BuilderConnectFunc __funPtr :: FunPtr C_BuilderConnectFunc
__funPtr builder :: a
builder object :: b
object signalName :: Text
signalName handlerName :: Text
handlerName connectObject :: Maybe c
connectObject flags :: [ConnectFlags]
flags userData :: Ptr ()
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Builder
builder' <- a -> IO (Ptr Builder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
builder
    Ptr Object
object' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
    CString
signalName' <- Text -> IO CString
textToCString Text
signalName
    CString
handlerName' <- Text -> IO CString
textToCString Text
handlerName
    Ptr Object
maybeConnectObject <- case Maybe c
connectObject of
        Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
        Just jConnectObject :: c
jConnectObject -> do
            Ptr Object
jConnectObject' <- c -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jConnectObject
            Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jConnectObject'
    let flags' :: CUInt
flags' = [ConnectFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ConnectFlags]
flags
    (FunPtr C_BuilderConnectFunc -> C_BuilderConnectFunc
__dynamic_C_BuilderConnectFunc FunPtr C_BuilderConnectFunc
__funPtr) Ptr Builder
builder' Ptr Object
object' CString
signalName' CString
handlerName' Ptr Object
maybeConnectObject CUInt
flags' Ptr ()
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
builder
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
connectObject c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
signalName'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
handlerName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | This is the signature of a function used to connect signals.  It is used
-- by the 'GI.Gtk.Objects.Builder.builderConnectSignals' and 'GI.Gtk.Objects.Builder.builderConnectSignalsFull'
-- methods.  It is mainly intended for interpreted language bindings, but
-- could be useful where the programmer wants more control over the signal
-- connection process. Note that this function can only be called once,
-- subsequent calls will do nothing.
type BuilderConnectFunc =
    Gtk.Builder.Builder
    -- ^ /@builder@/: a t'GI.Gtk.Objects.Builder.Builder'
    -> GObject.Object.Object
    -- ^ /@object@/: object to connect a signal to
    -> T.Text
    -- ^ /@signalName@/: name of the signal
    -> T.Text
    -- ^ /@handlerName@/: name of the handler
    -> Maybe GObject.Object.Object
    -- ^ /@connectObject@/: a t'GI.GObject.Objects.Object.Object', if non-'P.Nothing', use @/g_signal_connect_object()/@
    -> [GObject.Flags.ConnectFlags]
    -- ^ /@flags@/: t'GI.GObject.Flags.ConnectFlags' to use
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `BuilderConnectFunc`@.
noBuilderConnectFunc :: Maybe BuilderConnectFunc
noBuilderConnectFunc :: Maybe BuilderConnectFunc
noBuilderConnectFunc = Maybe BuilderConnectFunc
forall a. Maybe a
Nothing

-- | This is the signature of a function used to connect signals.  It is used
-- by the 'GI.Gtk.Objects.Builder.builderConnectSignals' and 'GI.Gtk.Objects.Builder.builderConnectSignalsFull'
-- methods.  It is mainly intended for interpreted language bindings, but
-- could be useful where the programmer wants more control over the signal
-- connection process. Note that this function can only be called once,
-- subsequent calls will do nothing.
type BuilderConnectFunc_WithClosures =
    Gtk.Builder.Builder
    -- ^ /@builder@/: a t'GI.Gtk.Objects.Builder.Builder'
    -> GObject.Object.Object
    -- ^ /@object@/: object to connect a signal to
    -> T.Text
    -- ^ /@signalName@/: name of the signal
    -> T.Text
    -- ^ /@handlerName@/: name of the handler
    -> Maybe GObject.Object.Object
    -- ^ /@connectObject@/: a t'GI.GObject.Objects.Object.Object', if non-'P.Nothing', use @/g_signal_connect_object()/@
    -> [GObject.Flags.ConnectFlags]
    -- ^ /@flags@/: t'GI.GObject.Flags.ConnectFlags' to use
    -> Ptr ()
    -- ^ /@userData@/: user data
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `BuilderConnectFunc_WithClosures`@.
noBuilderConnectFunc_WithClosures :: Maybe BuilderConnectFunc_WithClosures
noBuilderConnectFunc_WithClosures :: Maybe BuilderConnectFunc_WithClosures
noBuilderConnectFunc_WithClosures = Maybe BuilderConnectFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BuilderConnectFunc :: BuilderConnectFunc -> BuilderConnectFunc_WithClosures
drop_closures_BuilderConnectFunc :: BuilderConnectFunc -> BuilderConnectFunc_WithClosures
drop_closures_BuilderConnectFunc _f :: BuilderConnectFunc
_f builder :: Builder
builder object :: Object
object signalName :: Text
signalName handlerName :: Text
handlerName connectObject :: Maybe Object
connectObject flags :: [ConnectFlags]
flags _ = BuilderConnectFunc
_f Builder
builder Object
object Text
signalName Text
handlerName Maybe Object
connectObject [ConnectFlags]
flags

-- | Wrap the callback into a `GClosure`.
genClosure_BuilderConnectFunc :: MonadIO m => BuilderConnectFunc -> m (GClosure C_BuilderConnectFunc)
genClosure_BuilderConnectFunc :: BuilderConnectFunc -> m (GClosure C_BuilderConnectFunc)
genClosure_BuilderConnectFunc cb :: BuilderConnectFunc
cb = IO (GClosure C_BuilderConnectFunc)
-> m (GClosure C_BuilderConnectFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BuilderConnectFunc)
 -> m (GClosure C_BuilderConnectFunc))
-> IO (GClosure C_BuilderConnectFunc)
-> m (GClosure C_BuilderConnectFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: BuilderConnectFunc_WithClosures
cb' = BuilderConnectFunc -> BuilderConnectFunc_WithClosures
drop_closures_BuilderConnectFunc BuilderConnectFunc
cb
    let cb'' :: C_BuilderConnectFunc
cb'' = Maybe (Ptr (FunPtr C_BuilderConnectFunc))
-> BuilderConnectFunc_WithClosures -> C_BuilderConnectFunc
wrap_BuilderConnectFunc Maybe (Ptr (FunPtr C_BuilderConnectFunc))
forall a. Maybe a
Nothing BuilderConnectFunc_WithClosures
cb'
    C_BuilderConnectFunc -> IO (FunPtr C_BuilderConnectFunc)
mk_BuilderConnectFunc C_BuilderConnectFunc
cb'' IO (FunPtr C_BuilderConnectFunc)
-> (FunPtr C_BuilderConnectFunc
    -> IO (GClosure C_BuilderConnectFunc))
-> IO (GClosure C_BuilderConnectFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BuilderConnectFunc -> IO (GClosure C_BuilderConnectFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `BuilderConnectFunc` into a `C_BuilderConnectFunc`.
wrap_BuilderConnectFunc ::
    Maybe (Ptr (FunPtr C_BuilderConnectFunc)) ->
    BuilderConnectFunc_WithClosures ->
    C_BuilderConnectFunc
wrap_BuilderConnectFunc :: Maybe (Ptr (FunPtr C_BuilderConnectFunc))
-> BuilderConnectFunc_WithClosures -> C_BuilderConnectFunc
wrap_BuilderConnectFunc funptrptr :: Maybe (Ptr (FunPtr C_BuilderConnectFunc))
funptrptr _cb :: BuilderConnectFunc_WithClosures
_cb builder :: Ptr Builder
builder object :: Ptr Object
object signalName :: CString
signalName handlerName :: CString
handlerName connectObject :: Ptr Object
connectObject flags :: CUInt
flags userData :: Ptr ()
userData = do
    Builder
builder' <- ((ManagedPtr Builder -> Builder) -> Ptr Builder -> IO Builder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Builder -> Builder
Gtk.Builder.Builder) Ptr Builder
builder
    Object
object' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
object
    Text
signalName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
signalName
    Text
handlerName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
handlerName
    Maybe Object
maybeConnectObject <-
        if Ptr Object
connectObject Ptr Object -> Ptr Object -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Object
forall a. Ptr a
nullPtr
        then Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
forall a. Maybe a
Nothing
        else do
            Object
connectObject' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
connectObject
            Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Object -> IO (Maybe Object))
-> Maybe Object -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ Object -> Maybe Object
forall a. a -> Maybe a
Just Object
connectObject'
    let flags' :: [ConnectFlags]
flags' = CUInt -> [ConnectFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flags
    BuilderConnectFunc_WithClosures
_cb  Builder
builder' Object
object' Text
signalName' Text
handlerName' Maybe Object
maybeConnectObject [ConnectFlags]
flags' Ptr ()
userData
    Maybe (Ptr (FunPtr C_BuilderConnectFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BuilderConnectFunc))
funptrptr


-- callback AssistantPageFunc
--          -> Callable {returnType = Just (TBasicType TInt), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Just "The next page number.", sinceVersion = Nothing}, args = [Arg {argCName = "current_page", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The page number used to calculate the next page.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Just "A function used by gtk_assistant_set_forward_page_func() to know which\nis the next page given a current one. It\8217s called both for computing the\nnext page when the user presses the \8220forward\8221 button and for handling\nthe behavior of the \8220last\8221 button.", sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_AssistantPageFunc =
    Int32 ->
    Ptr () ->
    IO Int32

-- Args: [ Arg
--           { argCName = "current_page"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The page number used to calculate the next page."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_AssistantPageFunc :: FunPtr C_AssistantPageFunc -> C_AssistantPageFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_AssistantPageFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_AssistantPageFunc
    -> Int32
    -- ^ /@currentPage@/: The page number used to calculate the next page.
    -> Ptr ()
    -- ^ /@data@/: user data.
    -> m Int32
    -- ^ __Returns:__ The next page number.
dynamic_AssistantPageFunc :: FunPtr C_AssistantPageFunc -> Int32 -> Ptr () -> m Int32
dynamic_AssistantPageFunc __funPtr :: FunPtr C_AssistantPageFunc
__funPtr currentPage :: Int32
currentPage data_ :: Ptr ()
data_ = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- (FunPtr C_AssistantPageFunc -> C_AssistantPageFunc
__dynamic_C_AssistantPageFunc FunPtr C_AssistantPageFunc
__funPtr) Int32
currentPage Ptr ()
data_
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

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

-- | A function used by 'GI.Gtk.Objects.Assistant.assistantSetForwardPageFunc' to know which
-- is the next page given a current one. It’s called both for computing the
-- next page when the user presses the “forward” button and for handling
-- the behavior of the “last” button.
type AssistantPageFunc =
    Int32
    -- ^ /@currentPage@/: The page number used to calculate the next page.
    -> IO Int32
    -- ^ __Returns:__ The next page number.

-- | A convenience synonym for @`Nothing` :: `Maybe` `AssistantPageFunc`@.
noAssistantPageFunc :: Maybe AssistantPageFunc
noAssistantPageFunc :: Maybe (Int32 -> IO Int32)
noAssistantPageFunc = Maybe (Int32 -> IO Int32)
forall a. Maybe a
Nothing

-- | A function used by 'GI.Gtk.Objects.Assistant.assistantSetForwardPageFunc' to know which
-- is the next page given a current one. It’s called both for computing the
-- next page when the user presses the “forward” button and for handling
-- the behavior of the “last” button.
type AssistantPageFunc_WithClosures =
    Int32
    -- ^ /@currentPage@/: The page number used to calculate the next page.
    -> Ptr ()
    -- ^ /@data@/: user data.
    -> IO Int32
    -- ^ __Returns:__ The next page number.

-- | A convenience synonym for @`Nothing` :: `Maybe` `AssistantPageFunc_WithClosures`@.
noAssistantPageFunc_WithClosures :: Maybe AssistantPageFunc_WithClosures
noAssistantPageFunc_WithClosures :: Maybe C_AssistantPageFunc
noAssistantPageFunc_WithClosures = Maybe C_AssistantPageFunc
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_AssistantPageFunc :: AssistantPageFunc -> AssistantPageFunc_WithClosures
drop_closures_AssistantPageFunc :: (Int32 -> IO Int32) -> C_AssistantPageFunc
drop_closures_AssistantPageFunc _f :: Int32 -> IO Int32
_f currentPage :: Int32
currentPage _ = Int32 -> IO Int32
_f Int32
currentPage

-- | Wrap the callback into a `GClosure`.
genClosure_AssistantPageFunc :: MonadIO m => AssistantPageFunc -> m (GClosure C_AssistantPageFunc)
genClosure_AssistantPageFunc :: (Int32 -> IO Int32) -> m (GClosure C_AssistantPageFunc)
genClosure_AssistantPageFunc cb :: Int32 -> IO Int32
cb = IO (GClosure C_AssistantPageFunc)
-> m (GClosure C_AssistantPageFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AssistantPageFunc)
 -> m (GClosure C_AssistantPageFunc))
-> IO (GClosure C_AssistantPageFunc)
-> m (GClosure C_AssistantPageFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_AssistantPageFunc
cb' = (Int32 -> IO Int32) -> C_AssistantPageFunc
drop_closures_AssistantPageFunc Int32 -> IO Int32
cb
    let cb'' :: C_AssistantPageFunc
cb'' = Maybe (Ptr (FunPtr C_AssistantPageFunc))
-> C_AssistantPageFunc -> C_AssistantPageFunc
wrap_AssistantPageFunc Maybe (Ptr (FunPtr C_AssistantPageFunc))
forall a. Maybe a
Nothing C_AssistantPageFunc
cb'
    C_AssistantPageFunc -> IO (FunPtr C_AssistantPageFunc)
mk_AssistantPageFunc C_AssistantPageFunc
cb'' IO (FunPtr C_AssistantPageFunc)
-> (FunPtr C_AssistantPageFunc
    -> IO (GClosure C_AssistantPageFunc))
-> IO (GClosure C_AssistantPageFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AssistantPageFunc -> IO (GClosure C_AssistantPageFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `AssistantPageFunc` into a `C_AssistantPageFunc`.
wrap_AssistantPageFunc ::
    Maybe (Ptr (FunPtr C_AssistantPageFunc)) ->
    AssistantPageFunc_WithClosures ->
    C_AssistantPageFunc
wrap_AssistantPageFunc :: Maybe (Ptr (FunPtr C_AssistantPageFunc))
-> C_AssistantPageFunc -> C_AssistantPageFunc
wrap_AssistantPageFunc funptrptr :: Maybe (Ptr (FunPtr C_AssistantPageFunc))
funptrptr _cb :: C_AssistantPageFunc
_cb currentPage :: Int32
currentPage data_ :: Ptr ()
data_ = do
    Int32
result <- C_AssistantPageFunc
_cb  Int32
currentPage Ptr ()
data_
    Maybe (Ptr (FunPtr C_AssistantPageFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_AssistantPageFunc))
funptrptr
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result


-- callback AccelMapForeach
--          -> 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 gtk_accel_map_foreach() or\n gtk_accel_map_foreach_unfiltered()", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "accel_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Accel path of the current accelerator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "accel_key", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Key of the current accelerator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "accel_mods", argType = TInterface (Name {namespace = "Gdk", name = "ModifierType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Modifiers of the current accelerator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "changed", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Changed flag of the accelerator (if %TRUE, accelerator has changed\n during runtime and would need to be saved during an accelerator dump)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_AccelMapForeach =
    Ptr () ->
    CString ->
    Word32 ->
    CUInt ->
    CInt ->
    IO ()

-- Args: [ Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "User data passed to gtk_accel_map_foreach() or\n gtk_accel_map_foreach_unfiltered()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Accel path of the current accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_key"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Key of the current accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_mods"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Modifiers of the current accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "changed"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Changed flag of the accelerator (if %TRUE, accelerator has changed\n during runtime and would need to be saved during an accelerator dump)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_AccelMapForeach :: FunPtr C_AccelMapForeach -> C_AccelMapForeach

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_AccelMapForeach ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_AccelMapForeach
    -> Ptr ()
    -- ^ /@data@/: User data passed to 'GI.Gtk.Objects.AccelMap.accelMapForeach' or
    --  'GI.Gtk.Objects.AccelMap.accelMapForeachUnfiltered'
    -> T.Text
    -- ^ /@accelPath@/: Accel path of the current accelerator
    -> Word32
    -- ^ /@accelKey@/: Key of the current accelerator
    -> [Gdk.Flags.ModifierType]
    -- ^ /@accelMods@/: Modifiers of the current accelerator
    -> Bool
    -- ^ /@changed@/: Changed flag of the accelerator (if 'P.True', accelerator has changed
    --  during runtime and would need to be saved during an accelerator dump)
    -> m ()
dynamic_AccelMapForeach :: FunPtr C_AccelMapForeach
-> Ptr () -> Text -> Word32 -> [ModifierType] -> Bool -> m ()
dynamic_AccelMapForeach __funPtr :: FunPtr C_AccelMapForeach
__funPtr data_ :: Ptr ()
data_ accelPath :: Text
accelPath accelKey :: Word32
accelKey accelMods :: [ModifierType]
accelMods changed :: Bool
changed = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    CString
accelPath' <- Text -> IO CString
textToCString Text
accelPath
    let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
    let changed' :: CInt
changed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
changed
    (FunPtr C_AccelMapForeach -> C_AccelMapForeach
__dynamic_C_AccelMapForeach FunPtr C_AccelMapForeach
__funPtr) Ptr ()
data_ CString
accelPath' Word32
accelKey CUInt
accelMods' CInt
changed'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
accelPath'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

-- | /No description available in the introspection data./
type AccelMapForeach =
    Ptr ()
    -- ^ /@data@/: User data passed to 'GI.Gtk.Objects.AccelMap.accelMapForeach' or
    --  'GI.Gtk.Objects.AccelMap.accelMapForeachUnfiltered'
    -> T.Text
    -- ^ /@accelPath@/: Accel path of the current accelerator
    -> Word32
    -- ^ /@accelKey@/: Key of the current accelerator
    -> [Gdk.Flags.ModifierType]
    -- ^ /@accelMods@/: Modifiers of the current accelerator
    -> Bool
    -- ^ /@changed@/: Changed flag of the accelerator (if 'P.True', accelerator has changed
    --  during runtime and would need to be saved during an accelerator dump)
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `AccelMapForeach`@.
noAccelMapForeach :: Maybe AccelMapForeach
noAccelMapForeach :: Maybe AccelMapForeach
noAccelMapForeach = Maybe AccelMapForeach
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_AccelMapForeach :: MonadIO m => AccelMapForeach -> m (GClosure C_AccelMapForeach)
genClosure_AccelMapForeach :: AccelMapForeach -> m (GClosure C_AccelMapForeach)
genClosure_AccelMapForeach cb :: AccelMapForeach
cb = IO (GClosure C_AccelMapForeach) -> m (GClosure C_AccelMapForeach)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AccelMapForeach) -> m (GClosure C_AccelMapForeach))
-> IO (GClosure C_AccelMapForeach)
-> m (GClosure C_AccelMapForeach)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_AccelMapForeach
cb' = Maybe (Ptr (FunPtr C_AccelMapForeach))
-> AccelMapForeach -> C_AccelMapForeach
wrap_AccelMapForeach Maybe (Ptr (FunPtr C_AccelMapForeach))
forall a. Maybe a
Nothing AccelMapForeach
cb
    C_AccelMapForeach -> IO (FunPtr C_AccelMapForeach)
mk_AccelMapForeach C_AccelMapForeach
cb' IO (FunPtr C_AccelMapForeach)
-> (FunPtr C_AccelMapForeach -> IO (GClosure C_AccelMapForeach))
-> IO (GClosure C_AccelMapForeach)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AccelMapForeach -> IO (GClosure C_AccelMapForeach)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `AccelMapForeach` into a `C_AccelMapForeach`.
wrap_AccelMapForeach ::
    Maybe (Ptr (FunPtr C_AccelMapForeach)) ->
    AccelMapForeach ->
    C_AccelMapForeach
wrap_AccelMapForeach :: Maybe (Ptr (FunPtr C_AccelMapForeach))
-> AccelMapForeach -> C_AccelMapForeach
wrap_AccelMapForeach funptrptr :: Maybe (Ptr (FunPtr C_AccelMapForeach))
funptrptr _cb :: AccelMapForeach
_cb data_ :: Ptr ()
data_ accelPath :: CString
accelPath accelKey :: Word32
accelKey accelMods :: CUInt
accelMods changed :: CInt
changed = do
    Text
accelPath' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
accelPath
    let accelMods' :: [ModifierType]
accelMods' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
accelMods
    let changed' :: Bool
changed' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
changed
    AccelMapForeach
_cb  Ptr ()
data_ Text
accelPath' Word32
accelKey [ModifierType]
accelMods' Bool
changed'
    Maybe (Ptr (FunPtr C_AccelMapForeach)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_AccelMapForeach))
funptrptr


-- callback AccelGroupFindFunc
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "key", argType = TInterface (Name {namespace = "Gtk", name = "AccelKey"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "closure", argType = TGClosure Nothing, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_AccelGroupFindFunc =
    Ptr Gtk.AccelKey.AccelKey ->
    Ptr (GClosure ()) ->
    Ptr () ->
    IO CInt

-- Args: [ Arg
--           { argCName = "key"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelKey" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "closure"
--           , argType = TGClosure Nothing
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_AccelGroupFindFunc :: FunPtr C_AccelGroupFindFunc -> C_AccelGroupFindFunc

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_AccelGroupFindFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    FunPtr C_AccelGroupFindFunc
    -> Gtk.AccelKey.AccelKey
    -> GClosure a
    -> Ptr ()
    -> m Bool
dynamic_AccelGroupFindFunc :: FunPtr C_AccelGroupFindFunc
-> AccelKey -> GClosure a -> Ptr () -> m Bool
dynamic_AccelGroupFindFunc __funPtr :: FunPtr C_AccelGroupFindFunc
__funPtr key :: AccelKey
key closure :: GClosure a
closure data_ :: Ptr ()
data_ = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccelKey
key' <- AccelKey -> IO (Ptr AccelKey)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AccelKey
key
    Ptr (GClosure ())
closure' <- GClosure a -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure a
closure
    CInt
result <- (FunPtr C_AccelGroupFindFunc -> C_AccelGroupFindFunc
__dynamic_C_AccelGroupFindFunc FunPtr C_AccelGroupFindFunc
__funPtr) Ptr AccelKey
key' Ptr (GClosure ())
closure' Ptr ()
data_
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    AccelKey -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr AccelKey
key
    GClosure a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GClosure a
closure
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type AccelGroupFindFunc =
    Gtk.AccelKey.AccelKey
    -> GClosure ()
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `AccelGroupFindFunc`@.
noAccelGroupFindFunc :: Maybe AccelGroupFindFunc
noAccelGroupFindFunc :: Maybe AccelGroupFindFunc
noAccelGroupFindFunc = Maybe AccelGroupFindFunc
forall a. Maybe a
Nothing

-- | /No description available in the introspection data./
type AccelGroupFindFunc_WithClosures =
    Gtk.AccelKey.AccelKey
    -> GClosure ()
    -> Ptr ()
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `AccelGroupFindFunc_WithClosures`@.
noAccelGroupFindFunc_WithClosures :: Maybe AccelGroupFindFunc_WithClosures
noAccelGroupFindFunc_WithClosures :: Maybe AccelGroupFindFunc_WithClosures
noAccelGroupFindFunc_WithClosures = Maybe AccelGroupFindFunc_WithClosures
forall a. Maybe a
Nothing

-- | A simple wrapper that ignores the closure arguments.
drop_closures_AccelGroupFindFunc :: AccelGroupFindFunc -> AccelGroupFindFunc_WithClosures
drop_closures_AccelGroupFindFunc :: AccelGroupFindFunc -> AccelGroupFindFunc_WithClosures
drop_closures_AccelGroupFindFunc _f :: AccelGroupFindFunc
_f key :: AccelKey
key closure :: GClosure ()
closure _ = AccelGroupFindFunc
_f AccelKey
key GClosure ()
closure

-- | Wrap the callback into a `GClosure`.
genClosure_AccelGroupFindFunc :: MonadIO m => AccelGroupFindFunc -> m (GClosure C_AccelGroupFindFunc)
genClosure_AccelGroupFindFunc :: AccelGroupFindFunc -> m (GClosure C_AccelGroupFindFunc)
genClosure_AccelGroupFindFunc cb :: AccelGroupFindFunc
cb = IO (GClosure C_AccelGroupFindFunc)
-> m (GClosure C_AccelGroupFindFunc)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AccelGroupFindFunc)
 -> m (GClosure C_AccelGroupFindFunc))
-> IO (GClosure C_AccelGroupFindFunc)
-> m (GClosure C_AccelGroupFindFunc)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: AccelGroupFindFunc_WithClosures
cb' = AccelGroupFindFunc -> AccelGroupFindFunc_WithClosures
drop_closures_AccelGroupFindFunc AccelGroupFindFunc
cb
    let cb'' :: C_AccelGroupFindFunc
cb'' = Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
-> AccelGroupFindFunc_WithClosures -> C_AccelGroupFindFunc
wrap_AccelGroupFindFunc Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
forall a. Maybe a
Nothing AccelGroupFindFunc_WithClosures
cb'
    C_AccelGroupFindFunc -> IO (FunPtr C_AccelGroupFindFunc)
mk_AccelGroupFindFunc C_AccelGroupFindFunc
cb'' IO (FunPtr C_AccelGroupFindFunc)
-> (FunPtr C_AccelGroupFindFunc
    -> IO (GClosure C_AccelGroupFindFunc))
-> IO (GClosure C_AccelGroupFindFunc)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AccelGroupFindFunc -> IO (GClosure C_AccelGroupFindFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `AccelGroupFindFunc` into a `C_AccelGroupFindFunc`.
wrap_AccelGroupFindFunc ::
    Maybe (Ptr (FunPtr C_AccelGroupFindFunc)) ->
    AccelGroupFindFunc_WithClosures ->
    C_AccelGroupFindFunc
wrap_AccelGroupFindFunc :: Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
-> AccelGroupFindFunc_WithClosures -> C_AccelGroupFindFunc
wrap_AccelGroupFindFunc funptrptr :: Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
funptrptr _cb :: AccelGroupFindFunc_WithClosures
_cb key :: Ptr AccelKey
key closure :: Ptr (GClosure ())
closure data_ :: Ptr ()
data_ = do
    AccelKey
key' <- ((ManagedPtr AccelKey -> AccelKey) -> Ptr AccelKey -> IO AccelKey
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr AccelKey -> AccelKey
Gtk.AccelKey.AccelKey) Ptr AccelKey
key
    GClosure ()
closure' <- (Ptr (GClosure ()) -> IO (GClosure ())
forall a. Ptr (GClosure a) -> IO (GClosure a)
B.GClosure.newGClosureFromPtr (Ptr (GClosure ()) -> IO (GClosure ()))
-> (Ptr (GClosure ()) -> Ptr (GClosure ()))
-> Ptr (GClosure ())
-> IO (GClosure ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (GClosure ()) -> Ptr (GClosure ())
forall a b. Ptr a -> Ptr b
FP.castPtr) Ptr (GClosure ())
closure
    Bool
result <- AccelGroupFindFunc_WithClosures
_cb  AccelKey
key' GClosure ()
closure' Ptr ()
data_
    Maybe (Ptr (FunPtr C_AccelGroupFindFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_AccelGroupFindFunc))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- callback AccelGroupActivate
--          -> Callable {returnType = Just (TBasicType TBoolean), returnMayBeNull = False, returnTransfer = TransferNothing, returnDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, args = [Arg {argCName = "accel_group", argType = TInterface (Name {namespace = "Gtk", name = "AccelGroup"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "acceleratable", argType = TInterface (Name {namespace = "GObject", name = "Object"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "keyval", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "modifier", argType = TInterface (Name {namespace = "Gdk", name = "ModifierType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}], skipReturn = False, callableThrows = False, callableDeprecated = Nothing, callableDocumentation = Documentation {rawDocText = Nothing, sinceVersion = Nothing}}
-- | Type for the callback on the (unwrapped) C side.
type C_AccelGroupActivate =
    Ptr Gtk.AccelGroup.AccelGroup ->
    Ptr GObject.Object.Object ->
    Word32 ->
    CUInt ->
    IO CInt

-- Args: [ Arg
--           { argCName = "accel_group"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelGroup" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "acceleratable"
--           , argType =
--               TInterface Name { namespace = "GObject" , name = "Object" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keyval"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "modifier"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "dynamic" __dynamic_C_AccelGroupActivate :: FunPtr C_AccelGroupActivate -> C_AccelGroupActivate

-- | Given a pointer to a foreign C function, wrap it into a function callable from Haskell.
dynamic_AccelGroupActivate ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.AccelGroup.IsAccelGroup a, GObject.Object.IsObject b) =>
    FunPtr C_AccelGroupActivate
    -> a
    -> b
    -> Word32
    -> [Gdk.Flags.ModifierType]
    -> m Bool
dynamic_AccelGroupActivate :: FunPtr C_AccelGroupActivate
-> a -> b -> Word32 -> [ModifierType] -> m Bool
dynamic_AccelGroupActivate __funPtr :: FunPtr C_AccelGroupActivate
__funPtr accelGroup :: a
accelGroup acceleratable :: b
acceleratable keyval :: Word32
keyval modifier :: [ModifierType]
modifier = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccelGroup
accelGroup' <- a -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accelGroup
    Ptr Object
acceleratable' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
acceleratable
    let modifier' :: CUInt
modifier' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
modifier
    CInt
result <- (FunPtr C_AccelGroupActivate -> C_AccelGroupActivate
__dynamic_C_AccelGroupActivate FunPtr C_AccelGroupActivate
__funPtr) Ptr AccelGroup
accelGroup' Ptr Object
acceleratable' Word32
keyval CUInt
modifier'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accelGroup
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
acceleratable
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

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

-- | /No description available in the introspection data./
type AccelGroupActivate =
    Gtk.AccelGroup.AccelGroup
    -> GObject.Object.Object
    -> Word32
    -> [Gdk.Flags.ModifierType]
    -> IO Bool

-- | A convenience synonym for @`Nothing` :: `Maybe` `AccelGroupActivate`@.
noAccelGroupActivate :: Maybe AccelGroupActivate
noAccelGroupActivate :: Maybe AccelGroupActivate
noAccelGroupActivate = Maybe AccelGroupActivate
forall a. Maybe a
Nothing

-- | Wrap the callback into a `GClosure`.
genClosure_AccelGroupActivate :: MonadIO m => AccelGroupActivate -> m (GClosure C_AccelGroupActivate)
genClosure_AccelGroupActivate :: AccelGroupActivate -> m (GClosure C_AccelGroupActivate)
genClosure_AccelGroupActivate cb :: AccelGroupActivate
cb = IO (GClosure C_AccelGroupActivate)
-> m (GClosure C_AccelGroupActivate)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AccelGroupActivate)
 -> m (GClosure C_AccelGroupActivate))
-> IO (GClosure C_AccelGroupActivate)
-> m (GClosure C_AccelGroupActivate)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_AccelGroupActivate
cb' = Maybe (Ptr (FunPtr C_AccelGroupActivate))
-> AccelGroupActivate -> C_AccelGroupActivate
wrap_AccelGroupActivate Maybe (Ptr (FunPtr C_AccelGroupActivate))
forall a. Maybe a
Nothing AccelGroupActivate
cb
    C_AccelGroupActivate -> IO (FunPtr C_AccelGroupActivate)
mk_AccelGroupActivate C_AccelGroupActivate
cb' IO (FunPtr C_AccelGroupActivate)
-> (FunPtr C_AccelGroupActivate
    -> IO (GClosure C_AccelGroupActivate))
-> IO (GClosure C_AccelGroupActivate)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AccelGroupActivate -> IO (GClosure C_AccelGroupActivate)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `AccelGroupActivate` into a `C_AccelGroupActivate`.
wrap_AccelGroupActivate ::
    Maybe (Ptr (FunPtr C_AccelGroupActivate)) ->
    AccelGroupActivate ->
    C_AccelGroupActivate
wrap_AccelGroupActivate :: Maybe (Ptr (FunPtr C_AccelGroupActivate))
-> AccelGroupActivate -> C_AccelGroupActivate
wrap_AccelGroupActivate funptrptr :: Maybe (Ptr (FunPtr C_AccelGroupActivate))
funptrptr _cb :: AccelGroupActivate
_cb accelGroup :: Ptr AccelGroup
accelGroup acceleratable :: Ptr Object
acceleratable keyval :: Word32
keyval modifier :: CUInt
modifier = do
    AccelGroup
accelGroup' <- ((ManagedPtr AccelGroup -> AccelGroup)
-> Ptr AccelGroup -> IO AccelGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AccelGroup -> AccelGroup
Gtk.AccelGroup.AccelGroup) Ptr AccelGroup
accelGroup
    Object
acceleratable' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
acceleratable
    let modifier' :: [ModifierType]
modifier' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
modifier
    Bool
result <- AccelGroupActivate
_cb  AccelGroup
accelGroup' Object
acceleratable' Word32
keyval [ModifierType]
modifier'
    Maybe (Ptr (FunPtr C_AccelGroupActivate)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_AccelGroupActivate))
funptrptr
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'