{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A GtkListBox is a vertical container that contains GtkListBoxRow
-- children. These rows can by dynamically sorted and filtered, and
-- headers can be added dynamically depending on the row content.
-- It also allows keyboard and mouse navigation and selection like
-- a typical list.
-- 
-- Using GtkListBox is often an alternative to t'GI.Gtk.Objects.TreeView.TreeView', especially
-- when the list contents has a more complicated layout than what is allowed
-- by a t'GI.Gtk.Objects.CellRenderer.CellRenderer', or when the contents is interactive (i.e. has a
-- button in it).
-- 
-- Although a t'GI.Gtk.Objects.ListBox.ListBox' must have only t'GI.Gtk.Objects.ListBoxRow.ListBoxRow' children you can
-- add any kind of widget to it via 'GI.Gtk.Objects.ListBox.listBoxPrepend',
-- 'GI.Gtk.Objects.ListBox.listBoxAppend' and 'GI.Gtk.Objects.ListBox.listBoxInsert' and a t'GI.Gtk.Objects.ListBoxRow.ListBoxRow'
-- widget will automatically be inserted between the list and the widget.
-- 
-- @/GtkListBoxRows/@ can be marked as activatable or selectable. If a row
-- is activatable, [rowActivated]("GI.Gtk.Objects.ListBox#g:signal:rowActivated") will be emitted for it when
-- the user tries to activate it. If it is selectable, the row will be marked
-- as selected when the user tries to select it.
-- 
-- = GtkListBox as GtkBuildable
-- 
-- The GtkListBox implementation of the t'GI.Gtk.Interfaces.Buildable.Buildable' interface supports
-- setting a child as the placeholder by specifying “placeholder” as the “type”
-- attribute of a \<child> element. See 'GI.Gtk.Objects.ListBox.listBoxSetPlaceholder' for info.
-- 
-- = CSS nodes
-- 
-- 
-- === /plain code/
-- >
-- >list[.separators][.rich-list][.navigation-sidebar]
-- >╰── row[.activatable]
-- 
-- 
-- GtkListBox uses a single CSS node named list. It may carry the .separators
-- style class, when the t'GI.Gtk.Objects.ListBox.ListBox':@/show-separators/@ property is set. Each
-- GtkListBoxRow uses a single CSS node named row. The row nodes get the
-- .activatable style class added when appropriate.
-- 
-- The main list node may also carry style classes to select
-- the style of <https://developer.gnome.org/gtk4/stable/ListContainers.html#list-styles list presentation>:
-- .rich-list, .navigation-sidebar or .data-table.
-- 
-- = Accessibility
-- 
-- GtkListBox uses the @/GTK_ACCESSIBLE_ROLE_LIST/@ role and GtkListBoxRow uses
-- the @/GTK_ACCESSIBLE_ROLE_LIST_ITEM/@ role.

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

module GI.Gtk.Objects.ListBox
    ( 

-- * Exported types
    ListBox(..)                             ,
    IsListBox                               ,
    toListBox                               ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [actionSetEnabled]("GI.Gtk.Objects.Widget#g:method:actionSetEnabled"), [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [activateAction]("GI.Gtk.Objects.Widget#g:method:activateAction"), [activateDefault]("GI.Gtk.Objects.Widget#g:method:activateDefault"), [addController]("GI.Gtk.Objects.Widget#g:method:addController"), [addCssClass]("GI.Gtk.Objects.Widget#g:method:addCssClass"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [allocate]("GI.Gtk.Objects.Widget#g:method:allocate"), [append]("GI.Gtk.Objects.ListBox#g:method:append"), [bindModel]("GI.Gtk.Objects.ListBox#g:method:bindModel"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [computeBounds]("GI.Gtk.Objects.Widget#g:method:computeBounds"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [computePoint]("GI.Gtk.Objects.Widget#g:method:computePoint"), [computeTransform]("GI.Gtk.Objects.Widget#g:method:computeTransform"), [contains]("GI.Gtk.Objects.Widget#g:method:contains"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [dragHighlightRow]("GI.Gtk.Objects.ListBox#g:method:dragHighlightRow"), [dragUnhighlightRow]("GI.Gtk.Objects.ListBox#g:method:dragUnhighlightRow"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [hasCssClass]("GI.Gtk.Objects.Widget#g:method:hasCssClass"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [insert]("GI.Gtk.Objects.ListBox#g:method:insert"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [insertAfter]("GI.Gtk.Objects.Widget#g:method:insertAfter"), [insertBefore]("GI.Gtk.Objects.Widget#g:method:insertBefore"), [invalidateFilter]("GI.Gtk.Objects.ListBox#g:method:invalidateFilter"), [invalidateHeaders]("GI.Gtk.Objects.ListBox#g:method:invalidateHeaders"), [invalidateSort]("GI.Gtk.Objects.ListBox#g:method:invalidateSort"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [measure]("GI.Gtk.Objects.Widget#g:method:measure"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [observeChildren]("GI.Gtk.Objects.Widget#g:method:observeChildren"), [observeControllers]("GI.Gtk.Objects.Widget#g:method:observeControllers"), [pick]("GI.Gtk.Objects.Widget#g:method:pick"), [prepend]("GI.Gtk.Objects.ListBox#g:method:prepend"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [remove]("GI.Gtk.Objects.ListBox#g:method:remove"), [removeController]("GI.Gtk.Objects.Widget#g:method:removeController"), [removeCssClass]("GI.Gtk.Objects.Widget#g:method:removeCssClass"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [resetProperty]("GI.Gtk.Interfaces.Accessible#g:method:resetProperty"), [resetRelation]("GI.Gtk.Interfaces.Accessible#g:method:resetRelation"), [resetState]("GI.Gtk.Interfaces.Accessible#g:method:resetState"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [selectAll]("GI.Gtk.Objects.ListBox#g:method:selectAll"), [selectRow]("GI.Gtk.Objects.ListBox#g:method:selectRow"), [selectedForeach]("GI.Gtk.Objects.ListBox#g:method:selectedForeach"), [shouldLayout]("GI.Gtk.Objects.Widget#g:method:shouldLayout"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [snapshotChild]("GI.Gtk.Objects.Widget#g:method:snapshotChild"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Objects.Widget#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unselectAll]("GI.Gtk.Objects.ListBox#g:method:unselectAll"), [unselectRow]("GI.Gtk.Objects.ListBox#g:method:unselectRow"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [updateProperty]("GI.Gtk.Interfaces.Accessible#g:method:updateProperty"), [updateRelation]("GI.Gtk.Interfaces.Accessible#g:method:updateRelation"), [updateState]("GI.Gtk.Interfaces.Accessible#g:method:updateState"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessibleRole]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleRole"), [getActivateOnSingleClick]("GI.Gtk.Objects.ListBox#g:method:getActivateOnSingleClick"), [getAdjustment]("GI.Gtk.Objects.ListBox#g:method:getAdjustment"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getBuildableId]("GI.Gtk.Interfaces.Buildable#g:method:getBuildableId"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getCanTarget]("GI.Gtk.Objects.Widget#g:method:getCanTarget"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getCssClasses]("GI.Gtk.Objects.Widget#g:method:getCssClasses"), [getCssName]("GI.Gtk.Objects.Widget#g:method:getCssName"), [getCursor]("GI.Gtk.Objects.Widget#g:method:getCursor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getFirstChild]("GI.Gtk.Objects.Widget#g:method:getFirstChild"), [getFocusChild]("GI.Gtk.Objects.Widget#g:method:getFocusChild"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFocusable]("GI.Gtk.Objects.Widget#g:method:getFocusable"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHeight]("GI.Gtk.Objects.Widget#g:method:getHeight"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getLastChild]("GI.Gtk.Objects.Widget#g:method:getLastChild"), [getLayoutManager]("GI.Gtk.Objects.Widget#g:method:getLayoutManager"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNative]("GI.Gtk.Objects.Widget#g:method:getNative"), [getNextSibling]("GI.Gtk.Objects.Widget#g:method:getNextSibling"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getOverflow]("GI.Gtk.Objects.Widget#g:method:getOverflow"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPrevSibling]("GI.Gtk.Objects.Widget#g:method:getPrevSibling"), [getPrimaryClipboard]("GI.Gtk.Objects.Widget#g:method:getPrimaryClipboard"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRoot]("GI.Gtk.Objects.Widget#g:method:getRoot"), [getRowAtIndex]("GI.Gtk.Objects.ListBox#g:method:getRowAtIndex"), [getRowAtY]("GI.Gtk.Objects.ListBox#g:method:getRowAtY"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getSelectedRow]("GI.Gtk.Objects.ListBox#g:method:getSelectedRow"), [getSelectedRows]("GI.Gtk.Objects.ListBox#g:method:getSelectedRows"), [getSelectionMode]("GI.Gtk.Objects.ListBox#g:method:getSelectionMode"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getShowSeparators]("GI.Gtk.Objects.ListBox#g:method:getShowSeparators"), [getSize]("GI.Gtk.Objects.Widget#g:method:getSize"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getWidth]("GI.Gtk.Objects.Widget#g:method:getWidth").
-- 
-- ==== Setters
-- [setActivateOnSingleClick]("GI.Gtk.Objects.ListBox#g:method:setActivateOnSingleClick"), [setAdjustment]("GI.Gtk.Objects.ListBox#g:method:setAdjustment"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setCanTarget]("GI.Gtk.Objects.Widget#g:method:setCanTarget"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setCssClasses]("GI.Gtk.Objects.Widget#g:method:setCssClasses"), [setCursor]("GI.Gtk.Objects.Widget#g:method:setCursor"), [setCursorFromName]("GI.Gtk.Objects.Widget#g:method:setCursorFromName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setFilterFunc]("GI.Gtk.Objects.ListBox#g:method:setFilterFunc"), [setFocusChild]("GI.Gtk.Objects.Widget#g:method:setFocusChild"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFocusable]("GI.Gtk.Objects.Widget#g:method:setFocusable"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHeaderFunc]("GI.Gtk.Objects.ListBox#g:method:setHeaderFunc"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setLayoutManager]("GI.Gtk.Objects.Widget#g:method:setLayoutManager"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setOverflow]("GI.Gtk.Objects.Widget#g:method:setOverflow"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setPlaceholder]("GI.Gtk.Objects.ListBox#g:method:setPlaceholder"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setSelectionMode]("GI.Gtk.Objects.ListBox#g:method:setSelectionMode"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setShowSeparators]("GI.Gtk.Objects.ListBox#g:method:setShowSeparators"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setSortFunc]("GI.Gtk.Objects.ListBox#g:method:setSortFunc"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible").

#if defined(ENABLE_OVERLOADING)
    ResolveListBoxMethod                    ,
#endif

-- ** append #method:append#

#if defined(ENABLE_OVERLOADING)
    ListBoxAppendMethodInfo                 ,
#endif
    listBoxAppend                           ,


-- ** bindModel #method:bindModel#

#if defined(ENABLE_OVERLOADING)
    ListBoxBindModelMethodInfo              ,
#endif
    listBoxBindModel                        ,


-- ** dragHighlightRow #method:dragHighlightRow#

#if defined(ENABLE_OVERLOADING)
    ListBoxDragHighlightRowMethodInfo       ,
#endif
    listBoxDragHighlightRow                 ,


-- ** dragUnhighlightRow #method:dragUnhighlightRow#

#if defined(ENABLE_OVERLOADING)
    ListBoxDragUnhighlightRowMethodInfo     ,
#endif
    listBoxDragUnhighlightRow               ,


-- ** getActivateOnSingleClick #method:getActivateOnSingleClick#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetActivateOnSingleClickMethodInfo,
#endif
    listBoxGetActivateOnSingleClick         ,


-- ** getAdjustment #method:getAdjustment#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetAdjustmentMethodInfo          ,
#endif
    listBoxGetAdjustment                    ,


-- ** getRowAtIndex #method:getRowAtIndex#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetRowAtIndexMethodInfo          ,
#endif
    listBoxGetRowAtIndex                    ,


-- ** getRowAtY #method:getRowAtY#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetRowAtYMethodInfo              ,
#endif
    listBoxGetRowAtY                        ,


-- ** getSelectedRow #method:getSelectedRow#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetSelectedRowMethodInfo         ,
#endif
    listBoxGetSelectedRow                   ,


-- ** getSelectedRows #method:getSelectedRows#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetSelectedRowsMethodInfo        ,
#endif
    listBoxGetSelectedRows                  ,


-- ** getSelectionMode #method:getSelectionMode#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetSelectionModeMethodInfo       ,
#endif
    listBoxGetSelectionMode                 ,


-- ** getShowSeparators #method:getShowSeparators#

#if defined(ENABLE_OVERLOADING)
    ListBoxGetShowSeparatorsMethodInfo      ,
#endif
    listBoxGetShowSeparators                ,


-- ** insert #method:insert#

#if defined(ENABLE_OVERLOADING)
    ListBoxInsertMethodInfo                 ,
#endif
    listBoxInsert                           ,


-- ** invalidateFilter #method:invalidateFilter#

#if defined(ENABLE_OVERLOADING)
    ListBoxInvalidateFilterMethodInfo       ,
#endif
    listBoxInvalidateFilter                 ,


-- ** invalidateHeaders #method:invalidateHeaders#

#if defined(ENABLE_OVERLOADING)
    ListBoxInvalidateHeadersMethodInfo      ,
#endif
    listBoxInvalidateHeaders                ,


-- ** invalidateSort #method:invalidateSort#

#if defined(ENABLE_OVERLOADING)
    ListBoxInvalidateSortMethodInfo         ,
#endif
    listBoxInvalidateSort                   ,


-- ** new #method:new#

    listBoxNew                              ,


-- ** prepend #method:prepend#

#if defined(ENABLE_OVERLOADING)
    ListBoxPrependMethodInfo                ,
#endif
    listBoxPrepend                          ,


-- ** remove #method:remove#

#if defined(ENABLE_OVERLOADING)
    ListBoxRemoveMethodInfo                 ,
#endif
    listBoxRemove                           ,


-- ** selectAll #method:selectAll#

#if defined(ENABLE_OVERLOADING)
    ListBoxSelectAllMethodInfo              ,
#endif
    listBoxSelectAll                        ,


-- ** selectRow #method:selectRow#

#if defined(ENABLE_OVERLOADING)
    ListBoxSelectRowMethodInfo              ,
#endif
    listBoxSelectRow                        ,


-- ** selectedForeach #method:selectedForeach#

#if defined(ENABLE_OVERLOADING)
    ListBoxSelectedForeachMethodInfo        ,
#endif
    listBoxSelectedForeach                  ,


-- ** setActivateOnSingleClick #method:setActivateOnSingleClick#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetActivateOnSingleClickMethodInfo,
#endif
    listBoxSetActivateOnSingleClick         ,


-- ** setAdjustment #method:setAdjustment#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetAdjustmentMethodInfo          ,
#endif
    listBoxSetAdjustment                    ,


-- ** setFilterFunc #method:setFilterFunc#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetFilterFuncMethodInfo          ,
#endif
    listBoxSetFilterFunc                    ,


-- ** setHeaderFunc #method:setHeaderFunc#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetHeaderFuncMethodInfo          ,
#endif
    listBoxSetHeaderFunc                    ,


-- ** setPlaceholder #method:setPlaceholder#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetPlaceholderMethodInfo         ,
#endif
    listBoxSetPlaceholder                   ,


-- ** setSelectionMode #method:setSelectionMode#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetSelectionModeMethodInfo       ,
#endif
    listBoxSetSelectionMode                 ,


-- ** setShowSeparators #method:setShowSeparators#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetShowSeparatorsMethodInfo      ,
#endif
    listBoxSetShowSeparators                ,


-- ** setSortFunc #method:setSortFunc#

#if defined(ENABLE_OVERLOADING)
    ListBoxSetSortFuncMethodInfo            ,
#endif
    listBoxSetSortFunc                      ,


-- ** unselectAll #method:unselectAll#

#if defined(ENABLE_OVERLOADING)
    ListBoxUnselectAllMethodInfo            ,
#endif
    listBoxUnselectAll                      ,


-- ** unselectRow #method:unselectRow#

#if defined(ENABLE_OVERLOADING)
    ListBoxUnselectRowMethodInfo            ,
#endif
    listBoxUnselectRow                      ,




 -- * Properties


-- ** acceptUnpairedRelease #attr:acceptUnpairedRelease#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ListBoxAcceptUnpairedReleasePropertyInfo,
#endif
    constructListBoxAcceptUnpairedRelease   ,
    getListBoxAcceptUnpairedRelease         ,
#if defined(ENABLE_OVERLOADING)
    listBoxAcceptUnpairedRelease            ,
#endif
    setListBoxAcceptUnpairedRelease         ,


-- ** activateOnSingleClick #attr:activateOnSingleClick#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ListBoxActivateOnSingleClickPropertyInfo,
#endif
    constructListBoxActivateOnSingleClick   ,
    getListBoxActivateOnSingleClick         ,
#if defined(ENABLE_OVERLOADING)
    listBoxActivateOnSingleClick            ,
#endif
    setListBoxActivateOnSingleClick         ,


-- ** selectionMode #attr:selectionMode#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ListBoxSelectionModePropertyInfo        ,
#endif
    constructListBoxSelectionMode           ,
    getListBoxSelectionMode                 ,
#if defined(ENABLE_OVERLOADING)
    listBoxSelectionMode                    ,
#endif
    setListBoxSelectionMode                 ,


-- ** showSeparators #attr:showSeparators#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    ListBoxShowSeparatorsPropertyInfo       ,
#endif
    constructListBoxShowSeparators          ,
    getListBoxShowSeparators                ,
#if defined(ENABLE_OVERLOADING)
    listBoxShowSeparators                   ,
#endif
    setListBoxShowSeparators                ,




 -- * Signals


-- ** activateCursorRow #signal:activateCursorRow#

    C_ListBoxActivateCursorRowCallback      ,
    ListBoxActivateCursorRowCallback        ,
#if defined(ENABLE_OVERLOADING)
    ListBoxActivateCursorRowSignalInfo      ,
#endif
    afterListBoxActivateCursorRow           ,
    genClosure_ListBoxActivateCursorRow     ,
    mk_ListBoxActivateCursorRowCallback     ,
    noListBoxActivateCursorRowCallback      ,
    onListBoxActivateCursorRow              ,
    wrap_ListBoxActivateCursorRowCallback   ,


-- ** moveCursor #signal:moveCursor#

    C_ListBoxMoveCursorCallback             ,
    ListBoxMoveCursorCallback               ,
#if defined(ENABLE_OVERLOADING)
    ListBoxMoveCursorSignalInfo             ,
#endif
    afterListBoxMoveCursor                  ,
    genClosure_ListBoxMoveCursor            ,
    mk_ListBoxMoveCursorCallback            ,
    noListBoxMoveCursorCallback             ,
    onListBoxMoveCursor                     ,
    wrap_ListBoxMoveCursorCallback          ,


-- ** rowActivated #signal:rowActivated#

    C_ListBoxRowActivatedCallback           ,
    ListBoxRowActivatedCallback             ,
#if defined(ENABLE_OVERLOADING)
    ListBoxRowActivatedSignalInfo           ,
#endif
    afterListBoxRowActivated                ,
    genClosure_ListBoxRowActivated          ,
    mk_ListBoxRowActivatedCallback          ,
    noListBoxRowActivatedCallback           ,
    onListBoxRowActivated                   ,
    wrap_ListBoxRowActivatedCallback        ,


-- ** rowSelected #signal:rowSelected#

    C_ListBoxRowSelectedCallback            ,
    ListBoxRowSelectedCallback              ,
#if defined(ENABLE_OVERLOADING)
    ListBoxRowSelectedSignalInfo            ,
#endif
    afterListBoxRowSelected                 ,
    genClosure_ListBoxRowSelected           ,
    mk_ListBoxRowSelectedCallback           ,
    noListBoxRowSelectedCallback            ,
    onListBoxRowSelected                    ,
    wrap_ListBoxRowSelectedCallback         ,


-- ** selectAll #signal:selectAll#

    C_ListBoxSelectAllCallback              ,
    ListBoxSelectAllCallback                ,
#if defined(ENABLE_OVERLOADING)
    ListBoxSelectAllSignalInfo              ,
#endif
    afterListBoxSelectAll                   ,
    genClosure_ListBoxSelectAll             ,
    mk_ListBoxSelectAllCallback             ,
    noListBoxSelectAllCallback              ,
    onListBoxSelectAll                      ,
    wrap_ListBoxSelectAllCallback           ,


-- ** selectedRowsChanged #signal:selectedRowsChanged#

    C_ListBoxSelectedRowsChangedCallback    ,
    ListBoxSelectedRowsChangedCallback      ,
#if defined(ENABLE_OVERLOADING)
    ListBoxSelectedRowsChangedSignalInfo    ,
#endif
    afterListBoxSelectedRowsChanged         ,
    genClosure_ListBoxSelectedRowsChanged   ,
    mk_ListBoxSelectedRowsChangedCallback   ,
    noListBoxSelectedRowsChangedCallback    ,
    onListBoxSelectedRowsChanged            ,
    wrap_ListBoxSelectedRowsChangedCallback ,


-- ** toggleCursorRow #signal:toggleCursorRow#

    C_ListBoxToggleCursorRowCallback        ,
    ListBoxToggleCursorRowCallback          ,
#if defined(ENABLE_OVERLOADING)
    ListBoxToggleCursorRowSignalInfo        ,
#endif
    afterListBoxToggleCursorRow             ,
    genClosure_ListBoxToggleCursorRow       ,
    mk_ListBoxToggleCursorRowCallback       ,
    noListBoxToggleCursorRowCallback        ,
    onListBoxToggleCursorRow                ,
    wrap_ListBoxToggleCursorRowCallback     ,


-- ** unselectAll #signal:unselectAll#

    C_ListBoxUnselectAllCallback            ,
    ListBoxUnselectAllCallback              ,
#if defined(ENABLE_OVERLOADING)
    ListBoxUnselectAllSignalInfo            ,
#endif
    afterListBoxUnselectAll                 ,
    genClosure_ListBoxUnselectAll           ,
    mk_ListBoxUnselectAllCallback           ,
    noListBoxUnselectAllCallback            ,
    onListBoxUnselectAll                    ,
    wrap_ListBoxUnselectAllCallback         ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import {-# SOURCE #-} qualified GI.Gtk.Objects.ListBoxRow as Gtk.ListBoxRow
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype ListBox = ListBox (SP.ManagedPtr ListBox)
    deriving (ListBox -> ListBox -> Bool
(ListBox -> ListBox -> Bool)
-> (ListBox -> ListBox -> Bool) -> Eq ListBox
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBox -> ListBox -> Bool
$c/= :: ListBox -> ListBox -> Bool
== :: ListBox -> ListBox -> Bool
$c== :: ListBox -> ListBox -> Bool
Eq)

instance SP.ManagedPtrNewtype ListBox where
    toManagedPtr :: ListBox -> ManagedPtr ListBox
toManagedPtr (ListBox ManagedPtr ListBox
p) = ManagedPtr ListBox
p

foreign import ccall "gtk_list_box_get_type"
    c_gtk_list_box_get_type :: IO B.Types.GType

instance B.Types.TypedObject ListBox where
    glibType :: IO GType
glibType = IO GType
c_gtk_list_box_get_type

instance B.Types.GObject ListBox

-- | Type class for types which can be safely cast to `ListBox`, for instance with `toListBox`.
class (SP.GObject o, O.IsDescendantOf ListBox o) => IsListBox o
instance (SP.GObject o, O.IsDescendantOf ListBox o) => IsListBox o

instance O.HasParentTypes ListBox
type instance O.ParentTypes ListBox = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]

-- | Cast to `ListBox`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toListBox :: (MIO.MonadIO m, IsListBox o) => o -> m ListBox
toListBox :: forall (m :: * -> *) o. (MonadIO m, IsListBox o) => o -> m ListBox
toListBox = IO ListBox -> m ListBox
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ListBox -> m ListBox) -> (o -> IO ListBox) -> o -> m ListBox
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ListBox -> ListBox) -> o -> IO ListBox
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ListBox -> ListBox
ListBox

-- | Convert 'ListBox' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe ListBox) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_list_box_get_type
    gvalueSet_ :: Ptr GValue -> Maybe ListBox -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ListBox
P.Nothing = Ptr GValue -> Ptr ListBox -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ListBox
forall a. Ptr a
FP.nullPtr :: FP.Ptr ListBox)
    gvalueSet_ Ptr GValue
gv (P.Just ListBox
obj) = ListBox -> (Ptr ListBox -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ListBox
obj (Ptr GValue -> Ptr ListBox -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe ListBox)
gvalueGet_ Ptr GValue
gv = do
        Ptr ListBox
ptr <- Ptr GValue -> IO (Ptr ListBox)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ListBox)
        if Ptr ListBox
ptr Ptr ListBox -> Ptr ListBox -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ListBox
forall a. Ptr a
FP.nullPtr
        then ListBox -> Maybe ListBox
forall a. a -> Maybe a
P.Just (ListBox -> Maybe ListBox) -> IO ListBox -> IO (Maybe ListBox)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ListBox -> ListBox) -> Ptr ListBox -> IO ListBox
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ListBox -> ListBox
ListBox Ptr ListBox
ptr
        else Maybe ListBox -> IO (Maybe ListBox)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ListBox
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveListBoxMethod (t :: Symbol) (o :: *) :: * where
    ResolveListBoxMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
    ResolveListBoxMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveListBoxMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
    ResolveListBoxMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
    ResolveListBoxMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
    ResolveListBoxMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
    ResolveListBoxMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveListBoxMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveListBoxMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
    ResolveListBoxMethod "append" o = ListBoxAppendMethodInfo
    ResolveListBoxMethod "bindModel" o = ListBoxBindModelMethodInfo
    ResolveListBoxMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveListBoxMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveListBoxMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveListBoxMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
    ResolveListBoxMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveListBoxMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
    ResolveListBoxMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
    ResolveListBoxMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
    ResolveListBoxMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveListBoxMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveListBoxMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveListBoxMethod "dragHighlightRow" o = ListBoxDragHighlightRowMethodInfo
    ResolveListBoxMethod "dragUnhighlightRow" o = ListBoxDragUnhighlightRowMethodInfo
    ResolveListBoxMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveListBoxMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveListBoxMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveListBoxMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveListBoxMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveListBoxMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
    ResolveListBoxMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveListBoxMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveListBoxMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveListBoxMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveListBoxMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveListBoxMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveListBoxMethod "insert" o = ListBoxInsertMethodInfo
    ResolveListBoxMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveListBoxMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
    ResolveListBoxMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
    ResolveListBoxMethod "invalidateFilter" o = ListBoxInvalidateFilterMethodInfo
    ResolveListBoxMethod "invalidateHeaders" o = ListBoxInvalidateHeadersMethodInfo
    ResolveListBoxMethod "invalidateSort" o = ListBoxInvalidateSortMethodInfo
    ResolveListBoxMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveListBoxMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveListBoxMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveListBoxMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveListBoxMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveListBoxMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveListBoxMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveListBoxMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveListBoxMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveListBoxMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
    ResolveListBoxMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveListBoxMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveListBoxMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveListBoxMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
    ResolveListBoxMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
    ResolveListBoxMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
    ResolveListBoxMethod "prepend" o = ListBoxPrependMethodInfo
    ResolveListBoxMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveListBoxMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveListBoxMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveListBoxMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveListBoxMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveListBoxMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveListBoxMethod "remove" o = ListBoxRemoveMethodInfo
    ResolveListBoxMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
    ResolveListBoxMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
    ResolveListBoxMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveListBoxMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveListBoxMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
    ResolveListBoxMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
    ResolveListBoxMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
    ResolveListBoxMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveListBoxMethod "selectAll" o = ListBoxSelectAllMethodInfo
    ResolveListBoxMethod "selectRow" o = ListBoxSelectRowMethodInfo
    ResolveListBoxMethod "selectedForeach" o = ListBoxSelectedForeachMethodInfo
    ResolveListBoxMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
    ResolveListBoxMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveListBoxMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveListBoxMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
    ResolveListBoxMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveListBoxMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveListBoxMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveListBoxMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveListBoxMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveListBoxMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveListBoxMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveListBoxMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveListBoxMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveListBoxMethod "unselectAll" o = ListBoxUnselectAllMethodInfo
    ResolveListBoxMethod "unselectRow" o = ListBoxUnselectRowMethodInfo
    ResolveListBoxMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveListBoxMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
    ResolveListBoxMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
    ResolveListBoxMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
    ResolveListBoxMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveListBoxMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
    ResolveListBoxMethod "getActivateOnSingleClick" o = ListBoxGetActivateOnSingleClickMethodInfo
    ResolveListBoxMethod "getAdjustment" o = ListBoxGetAdjustmentMethodInfo
    ResolveListBoxMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveListBoxMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveListBoxMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveListBoxMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveListBoxMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveListBoxMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
    ResolveListBoxMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveListBoxMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
    ResolveListBoxMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveListBoxMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveListBoxMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
    ResolveListBoxMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
    ResolveListBoxMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
    ResolveListBoxMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveListBoxMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveListBoxMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveListBoxMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
    ResolveListBoxMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
    ResolveListBoxMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveListBoxMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
    ResolveListBoxMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveListBoxMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveListBoxMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveListBoxMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveListBoxMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveListBoxMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
    ResolveListBoxMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveListBoxMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveListBoxMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
    ResolveListBoxMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
    ResolveListBoxMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveListBoxMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveListBoxMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveListBoxMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveListBoxMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveListBoxMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveListBoxMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
    ResolveListBoxMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
    ResolveListBoxMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveListBoxMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
    ResolveListBoxMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveListBoxMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveListBoxMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveListBoxMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
    ResolveListBoxMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
    ResolveListBoxMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveListBoxMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveListBoxMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveListBoxMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveListBoxMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveListBoxMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
    ResolveListBoxMethod "getRowAtIndex" o = ListBoxGetRowAtIndexMethodInfo
    ResolveListBoxMethod "getRowAtY" o = ListBoxGetRowAtYMethodInfo
    ResolveListBoxMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveListBoxMethod "getSelectedRow" o = ListBoxGetSelectedRowMethodInfo
    ResolveListBoxMethod "getSelectedRows" o = ListBoxGetSelectedRowsMethodInfo
    ResolveListBoxMethod "getSelectionMode" o = ListBoxGetSelectionModeMethodInfo
    ResolveListBoxMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveListBoxMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
    ResolveListBoxMethod "getShowSeparators" o = ListBoxGetShowSeparatorsMethodInfo
    ResolveListBoxMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
    ResolveListBoxMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveListBoxMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveListBoxMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveListBoxMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveListBoxMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveListBoxMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveListBoxMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveListBoxMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveListBoxMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveListBoxMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveListBoxMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
    ResolveListBoxMethod "setActivateOnSingleClick" o = ListBoxSetActivateOnSingleClickMethodInfo
    ResolveListBoxMethod "setAdjustment" o = ListBoxSetAdjustmentMethodInfo
    ResolveListBoxMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveListBoxMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
    ResolveListBoxMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveListBoxMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
    ResolveListBoxMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
    ResolveListBoxMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
    ResolveListBoxMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveListBoxMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveListBoxMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveListBoxMethod "setFilterFunc" o = ListBoxSetFilterFuncMethodInfo
    ResolveListBoxMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
    ResolveListBoxMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveListBoxMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
    ResolveListBoxMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveListBoxMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveListBoxMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveListBoxMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveListBoxMethod "setHeaderFunc" o = ListBoxSetHeaderFuncMethodInfo
    ResolveListBoxMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveListBoxMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveListBoxMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
    ResolveListBoxMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveListBoxMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveListBoxMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveListBoxMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveListBoxMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveListBoxMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveListBoxMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
    ResolveListBoxMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveListBoxMethod "setPlaceholder" o = ListBoxSetPlaceholderMethodInfo
    ResolveListBoxMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveListBoxMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveListBoxMethod "setSelectionMode" o = ListBoxSetSelectionModeMethodInfo
    ResolveListBoxMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveListBoxMethod "setShowSeparators" o = ListBoxSetShowSeparatorsMethodInfo
    ResolveListBoxMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveListBoxMethod "setSortFunc" o = ListBoxSetSortFuncMethodInfo
    ResolveListBoxMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveListBoxMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveListBoxMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveListBoxMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveListBoxMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveListBoxMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveListBoxMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveListBoxMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveListBoxMethod t ListBox, O.OverloadedMethod info ListBox p) => OL.IsLabel t (ListBox -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveListBoxMethod t ListBox, O.OverloadedMethod info ListBox p, R.HasField t ListBox p) => R.HasField t ListBox p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveListBoxMethod t ListBox, O.OverloadedMethodInfo info ListBox) => OL.IsLabel t (O.MethodProxy info ListBox) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal ListBox::activate-cursor-row
-- | /No description available in the introspection data./
type ListBoxActivateCursorRowCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxActivateCursorRowCallback`@.
noListBoxActivateCursorRowCallback :: Maybe ListBoxActivateCursorRowCallback
noListBoxActivateCursorRowCallback :: Maybe (IO ())
noListBoxActivateCursorRowCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxActivateCursorRowCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxActivateCursorRow :: MonadIO m => ListBoxActivateCursorRowCallback -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxActivateCursorRow :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxActivateCursorRow IO ()
cb = IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxActivateCursorRowCallback)
 -> m (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxActivateCursorRowCallback IO ()
cb
    C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxActivateCursorRowCallback C_ListBoxActivateCursorRowCallback
cb' IO (FunPtr C_ListBoxActivateCursorRowCallback)
-> (FunPtr C_ListBoxActivateCursorRowCallback
    -> IO (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxActivateCursorRowCallback
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxActivateCursorRowCallback` into a `C_ListBoxActivateCursorRowCallback`.
wrap_ListBoxActivateCursorRowCallback ::
    ListBoxActivateCursorRowCallback ->
    C_ListBoxActivateCursorRowCallback
wrap_ListBoxActivateCursorRowCallback :: IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxActivateCursorRowCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [activateCursorRow](#signal:activateCursorRow) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #activateCursorRow callback
-- @
-- 
-- 
onListBoxActivateCursorRow :: (IsListBox a, MonadIO m) => a -> ListBoxActivateCursorRowCallback -> m SignalHandlerId
onListBoxActivateCursorRow :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onListBoxActivateCursorRow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxActivateCursorRowCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxActivateCursorRowCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"activate-cursor-row" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [activateCursorRow](#signal:activateCursorRow) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #activateCursorRow callback
-- @
-- 
-- 
afterListBoxActivateCursorRow :: (IsListBox a, MonadIO m) => a -> ListBoxActivateCursorRowCallback -> m SignalHandlerId
afterListBoxActivateCursorRow :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterListBoxActivateCursorRow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxActivateCursorRowCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxActivateCursorRowCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"activate-cursor-row" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxActivateCursorRowSignalInfo
instance SignalInfo ListBoxActivateCursorRowSignalInfo where
    type HaskellCallbackType ListBoxActivateCursorRowSignalInfo = ListBoxActivateCursorRowCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxActivateCursorRowCallback cb
        cb'' <- mk_ListBoxActivateCursorRowCallback cb'
        connectSignalFunPtr obj "activate-cursor-row" cb'' connectMode detail

#endif

-- signal ListBox::move-cursor
-- | /No description available in the introspection data./
type ListBoxMoveCursorCallback =
    Gtk.Enums.MovementStep
    -> Int32
    -> Bool
    -> Bool
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxMoveCursorCallback`@.
noListBoxMoveCursorCallback :: Maybe ListBoxMoveCursorCallback
noListBoxMoveCursorCallback :: Maybe ListBoxMoveCursorCallback
noListBoxMoveCursorCallback = Maybe ListBoxMoveCursorCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxMoveCursorCallback =
    Ptr () ->                               -- object
    CUInt ->
    Int32 ->
    CInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxMoveCursor :: MonadIO m => ListBoxMoveCursorCallback -> m (GClosure C_ListBoxMoveCursorCallback)
genClosure_ListBoxMoveCursor :: forall (m :: * -> *).
MonadIO m =>
ListBoxMoveCursorCallback
-> m (GClosure C_ListBoxMoveCursorCallback)
genClosure_ListBoxMoveCursor ListBoxMoveCursorCallback
cb = IO (GClosure C_ListBoxMoveCursorCallback)
-> m (GClosure C_ListBoxMoveCursorCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxMoveCursorCallback)
 -> m (GClosure C_ListBoxMoveCursorCallback))
-> IO (GClosure C_ListBoxMoveCursorCallback)
-> m (GClosure C_ListBoxMoveCursorCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxMoveCursorCallback
cb' = ListBoxMoveCursorCallback -> C_ListBoxMoveCursorCallback
wrap_ListBoxMoveCursorCallback ListBoxMoveCursorCallback
cb
    C_ListBoxMoveCursorCallback
-> IO (FunPtr C_ListBoxMoveCursorCallback)
mk_ListBoxMoveCursorCallback C_ListBoxMoveCursorCallback
cb' IO (FunPtr C_ListBoxMoveCursorCallback)
-> (FunPtr C_ListBoxMoveCursorCallback
    -> IO (GClosure C_ListBoxMoveCursorCallback))
-> IO (GClosure C_ListBoxMoveCursorCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxMoveCursorCallback
-> IO (GClosure C_ListBoxMoveCursorCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxMoveCursorCallback` into a `C_ListBoxMoveCursorCallback`.
wrap_ListBoxMoveCursorCallback ::
    ListBoxMoveCursorCallback ->
    C_ListBoxMoveCursorCallback
wrap_ListBoxMoveCursorCallback :: ListBoxMoveCursorCallback -> C_ListBoxMoveCursorCallback
wrap_ListBoxMoveCursorCallback ListBoxMoveCursorCallback
_cb Ptr ()
_ CUInt
object Int32
p0 CInt
p1 CInt
p2 Ptr ()
_ = do
    let object' :: MovementStep
object' = (Int -> MovementStep
forall a. Enum a => Int -> a
toEnum (Int -> MovementStep) -> (CUInt -> Int) -> CUInt -> MovementStep
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
object
    let p1' :: Bool
p1' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
p1
    let p2' :: Bool
p2' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
p2
    ListBoxMoveCursorCallback
_cb  MovementStep
object' Int32
p0 Bool
p1' Bool
p2'


-- | Connect a signal handler for the [moveCursor](#signal:moveCursor) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #moveCursor callback
-- @
-- 
-- 
onListBoxMoveCursor :: (IsListBox a, MonadIO m) => a -> ListBoxMoveCursorCallback -> m SignalHandlerId
onListBoxMoveCursor :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxMoveCursorCallback -> m SignalHandlerId
onListBoxMoveCursor a
obj ListBoxMoveCursorCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxMoveCursorCallback
cb' = ListBoxMoveCursorCallback -> C_ListBoxMoveCursorCallback
wrap_ListBoxMoveCursorCallback ListBoxMoveCursorCallback
cb
    FunPtr C_ListBoxMoveCursorCallback
cb'' <- C_ListBoxMoveCursorCallback
-> IO (FunPtr C_ListBoxMoveCursorCallback)
mk_ListBoxMoveCursorCallback C_ListBoxMoveCursorCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxMoveCursorCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"move-cursor" FunPtr C_ListBoxMoveCursorCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [moveCursor](#signal:moveCursor) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #moveCursor callback
-- @
-- 
-- 
afterListBoxMoveCursor :: (IsListBox a, MonadIO m) => a -> ListBoxMoveCursorCallback -> m SignalHandlerId
afterListBoxMoveCursor :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxMoveCursorCallback -> m SignalHandlerId
afterListBoxMoveCursor a
obj ListBoxMoveCursorCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxMoveCursorCallback
cb' = ListBoxMoveCursorCallback -> C_ListBoxMoveCursorCallback
wrap_ListBoxMoveCursorCallback ListBoxMoveCursorCallback
cb
    FunPtr C_ListBoxMoveCursorCallback
cb'' <- C_ListBoxMoveCursorCallback
-> IO (FunPtr C_ListBoxMoveCursorCallback)
mk_ListBoxMoveCursorCallback C_ListBoxMoveCursorCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxMoveCursorCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"move-cursor" FunPtr C_ListBoxMoveCursorCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxMoveCursorSignalInfo
instance SignalInfo ListBoxMoveCursorSignalInfo where
    type HaskellCallbackType ListBoxMoveCursorSignalInfo = ListBoxMoveCursorCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxMoveCursorCallback cb
        cb'' <- mk_ListBoxMoveCursorCallback cb'
        connectSignalFunPtr obj "move-cursor" cb'' connectMode detail

#endif

-- signal ListBox::row-activated
-- | The [rowActivated](#g:signal:rowActivated) signal is emitted when a row has been activated by the user.
type ListBoxRowActivatedCallback =
    Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the activated row
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxRowActivatedCallback`@.
noListBoxRowActivatedCallback :: Maybe ListBoxRowActivatedCallback
noListBoxRowActivatedCallback :: Maybe ListBoxRowActivatedCallback
noListBoxRowActivatedCallback = Maybe ListBoxRowActivatedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxRowActivatedCallback =
    Ptr () ->                               -- object
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxRowActivated :: MonadIO m => ListBoxRowActivatedCallback -> m (GClosure C_ListBoxRowActivatedCallback)
genClosure_ListBoxRowActivated :: forall (m :: * -> *).
MonadIO m =>
ListBoxRowActivatedCallback
-> m (GClosure C_ListBoxRowActivatedCallback)
genClosure_ListBoxRowActivated ListBoxRowActivatedCallback
cb = IO (GClosure C_ListBoxRowActivatedCallback)
-> m (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxRowActivatedCallback)
 -> m (GClosure C_ListBoxRowActivatedCallback))
-> IO (GClosure C_ListBoxRowActivatedCallback)
-> m (GClosure C_ListBoxRowActivatedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowActivatedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowActivatedCallback ListBoxRowActivatedCallback
cb
    C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowActivatedCallback C_ListBoxRowActivatedCallback
cb' IO (FunPtr C_ListBoxRowActivatedCallback)
-> (FunPtr C_ListBoxRowActivatedCallback
    -> IO (GClosure C_ListBoxRowActivatedCallback))
-> IO (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxRowActivatedCallback
-> IO (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxRowActivatedCallback` into a `C_ListBoxRowActivatedCallback`.
wrap_ListBoxRowActivatedCallback ::
    ListBoxRowActivatedCallback ->
    C_ListBoxRowActivatedCallback
wrap_ListBoxRowActivatedCallback :: ListBoxRowActivatedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowActivatedCallback ListBoxRowActivatedCallback
_cb Ptr ()
_ Ptr ListBoxRow
row Ptr ()
_ = 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
    ListBoxRowActivatedCallback
_cb  ListBoxRow
row'


-- | Connect a signal handler for the [rowActivated](#signal:rowActivated) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #rowActivated callback
-- @
-- 
-- 
onListBoxRowActivated :: (IsListBox a, MonadIO m) => a -> ListBoxRowActivatedCallback -> m SignalHandlerId
onListBoxRowActivated :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxRowActivatedCallback -> m SignalHandlerId
onListBoxRowActivated a
obj ListBoxRowActivatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowActivatedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowActivatedCallback ListBoxRowActivatedCallback
cb
    FunPtr C_ListBoxRowActivatedCallback
cb'' <- C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowActivatedCallback C_ListBoxRowActivatedCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxRowActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"row-activated" FunPtr C_ListBoxRowActivatedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [rowActivated](#signal:rowActivated) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #rowActivated callback
-- @
-- 
-- 
afterListBoxRowActivated :: (IsListBox a, MonadIO m) => a -> ListBoxRowActivatedCallback -> m SignalHandlerId
afterListBoxRowActivated :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxRowActivatedCallback -> m SignalHandlerId
afterListBoxRowActivated a
obj ListBoxRowActivatedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowActivatedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowActivatedCallback ListBoxRowActivatedCallback
cb
    FunPtr C_ListBoxRowActivatedCallback
cb'' <- C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowActivatedCallback C_ListBoxRowActivatedCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxRowActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"row-activated" FunPtr C_ListBoxRowActivatedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxRowActivatedSignalInfo
instance SignalInfo ListBoxRowActivatedSignalInfo where
    type HaskellCallbackType ListBoxRowActivatedSignalInfo = ListBoxRowActivatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxRowActivatedCallback cb
        cb'' <- mk_ListBoxRowActivatedCallback cb'
        connectSignalFunPtr obj "row-activated" cb'' connectMode detail

#endif

-- signal ListBox::row-selected
-- | The [rowSelected](#g:signal:rowSelected) signal is emitted when a new row is selected, or
-- (with a 'P.Nothing' /@row@/) when the selection is cleared.
-- 
-- When the /@box@/ is using @/GTK_SELECTION_MULTIPLE/@, this signal will not
-- give you the full picture of selection changes, and you should use
-- the [selectedRowsChanged]("GI.Gtk.Objects.ListBox#g:signal:selectedRowsChanged") signal instead.
type ListBoxRowSelectedCallback =
    Maybe Gtk.ListBoxRow.ListBoxRow
    -- ^ /@row@/: the selected row
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxRowSelectedCallback`@.
noListBoxRowSelectedCallback :: Maybe ListBoxRowSelectedCallback
noListBoxRowSelectedCallback :: Maybe ListBoxRowSelectedCallback
noListBoxRowSelectedCallback = Maybe ListBoxRowSelectedCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxRowSelectedCallback =
    Ptr () ->                               -- object
    Ptr Gtk.ListBoxRow.ListBoxRow ->
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxRowSelected :: MonadIO m => ListBoxRowSelectedCallback -> m (GClosure C_ListBoxRowSelectedCallback)
genClosure_ListBoxRowSelected :: forall (m :: * -> *).
MonadIO m =>
ListBoxRowSelectedCallback
-> m (GClosure C_ListBoxRowActivatedCallback)
genClosure_ListBoxRowSelected ListBoxRowSelectedCallback
cb = IO (GClosure C_ListBoxRowActivatedCallback)
-> m (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxRowActivatedCallback)
 -> m (GClosure C_ListBoxRowActivatedCallback))
-> IO (GClosure C_ListBoxRowActivatedCallback)
-> m (GClosure C_ListBoxRowActivatedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowSelectedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowSelectedCallback ListBoxRowSelectedCallback
cb
    C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowSelectedCallback C_ListBoxRowActivatedCallback
cb' IO (FunPtr C_ListBoxRowActivatedCallback)
-> (FunPtr C_ListBoxRowActivatedCallback
    -> IO (GClosure C_ListBoxRowActivatedCallback))
-> IO (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxRowActivatedCallback
-> IO (GClosure C_ListBoxRowActivatedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxRowSelectedCallback` into a `C_ListBoxRowSelectedCallback`.
wrap_ListBoxRowSelectedCallback ::
    ListBoxRowSelectedCallback ->
    C_ListBoxRowSelectedCallback
wrap_ListBoxRowSelectedCallback :: ListBoxRowSelectedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowSelectedCallback ListBoxRowSelectedCallback
_cb Ptr ()
_ Ptr ListBoxRow
row Ptr ()
_ = do
    Maybe ListBoxRow
maybeRow <-
        if Ptr ListBoxRow
row 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
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 -> 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
row'
    ListBoxRowSelectedCallback
_cb  Maybe ListBoxRow
maybeRow


-- | Connect a signal handler for the [rowSelected](#signal:rowSelected) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #rowSelected callback
-- @
-- 
-- 
onListBoxRowSelected :: (IsListBox a, MonadIO m) => a -> ListBoxRowSelectedCallback -> m SignalHandlerId
onListBoxRowSelected :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxRowSelectedCallback -> m SignalHandlerId
onListBoxRowSelected a
obj ListBoxRowSelectedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowSelectedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowSelectedCallback ListBoxRowSelectedCallback
cb
    FunPtr C_ListBoxRowActivatedCallback
cb'' <- C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowSelectedCallback C_ListBoxRowActivatedCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxRowActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"row-selected" FunPtr C_ListBoxRowActivatedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [rowSelected](#signal:rowSelected) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #rowSelected callback
-- @
-- 
-- 
afterListBoxRowSelected :: (IsListBox a, MonadIO m) => a -> ListBoxRowSelectedCallback -> m SignalHandlerId
afterListBoxRowSelected :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> ListBoxRowSelectedCallback -> m SignalHandlerId
afterListBoxRowSelected a
obj ListBoxRowSelectedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxRowActivatedCallback
cb' = ListBoxRowSelectedCallback -> C_ListBoxRowActivatedCallback
wrap_ListBoxRowSelectedCallback ListBoxRowSelectedCallback
cb
    FunPtr C_ListBoxRowActivatedCallback
cb'' <- C_ListBoxRowActivatedCallback
-> IO (FunPtr C_ListBoxRowActivatedCallback)
mk_ListBoxRowSelectedCallback C_ListBoxRowActivatedCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxRowActivatedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"row-selected" FunPtr C_ListBoxRowActivatedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxRowSelectedSignalInfo
instance SignalInfo ListBoxRowSelectedSignalInfo where
    type HaskellCallbackType ListBoxRowSelectedSignalInfo = ListBoxRowSelectedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxRowSelectedCallback cb
        cb'' <- mk_ListBoxRowSelectedCallback cb'
        connectSignalFunPtr obj "row-selected" cb'' connectMode detail

#endif

-- signal ListBox::select-all
-- | The [selectAll](#g:signal:selectAll) signal is a [keybinding signal][GtkSignalAction]
-- which gets emitted to select all children of the box, if the selection
-- mode permits it.
-- 
-- The default bindings for this signal is Ctrl-a.
type ListBoxSelectAllCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxSelectAllCallback`@.
noListBoxSelectAllCallback :: Maybe ListBoxSelectAllCallback
noListBoxSelectAllCallback :: Maybe (IO ())
noListBoxSelectAllCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxSelectAllCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxSelectAll :: MonadIO m => ListBoxSelectAllCallback -> m (GClosure C_ListBoxSelectAllCallback)
genClosure_ListBoxSelectAll :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxSelectAll IO ()
cb = IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxActivateCursorRowCallback)
 -> m (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectAllCallback IO ()
cb
    C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectAllCallback C_ListBoxActivateCursorRowCallback
cb' IO (FunPtr C_ListBoxActivateCursorRowCallback)
-> (FunPtr C_ListBoxActivateCursorRowCallback
    -> IO (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxActivateCursorRowCallback
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxSelectAllCallback` into a `C_ListBoxSelectAllCallback`.
wrap_ListBoxSelectAllCallback ::
    ListBoxSelectAllCallback ->
    C_ListBoxSelectAllCallback
wrap_ListBoxSelectAllCallback :: IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectAllCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [selectAll](#signal:selectAll) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #selectAll callback
-- @
-- 
-- 
onListBoxSelectAll :: (IsListBox a, MonadIO m) => a -> ListBoxSelectAllCallback -> m SignalHandlerId
onListBoxSelectAll :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onListBoxSelectAll a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectAllCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectAllCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"select-all" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectAll](#signal:selectAll) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #selectAll callback
-- @
-- 
-- 
afterListBoxSelectAll :: (IsListBox a, MonadIO m) => a -> ListBoxSelectAllCallback -> m SignalHandlerId
afterListBoxSelectAll :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterListBoxSelectAll a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectAllCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectAllCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"select-all" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxSelectAllSignalInfo
instance SignalInfo ListBoxSelectAllSignalInfo where
    type HaskellCallbackType ListBoxSelectAllSignalInfo = ListBoxSelectAllCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxSelectAllCallback cb
        cb'' <- mk_ListBoxSelectAllCallback cb'
        connectSignalFunPtr obj "select-all" cb'' connectMode detail

#endif

-- signal ListBox::selected-rows-changed
-- | The [selectedRowsChanged](#g:signal:selectedRowsChanged) signal is emitted when the
-- set of selected rows changes.
type ListBoxSelectedRowsChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxSelectedRowsChangedCallback`@.
noListBoxSelectedRowsChangedCallback :: Maybe ListBoxSelectedRowsChangedCallback
noListBoxSelectedRowsChangedCallback :: Maybe (IO ())
noListBoxSelectedRowsChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxSelectedRowsChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxSelectedRowsChanged :: MonadIO m => ListBoxSelectedRowsChangedCallback -> m (GClosure C_ListBoxSelectedRowsChangedCallback)
genClosure_ListBoxSelectedRowsChanged :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxSelectedRowsChanged IO ()
cb = IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxActivateCursorRowCallback)
 -> m (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectedRowsChangedCallback IO ()
cb
    C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectedRowsChangedCallback C_ListBoxActivateCursorRowCallback
cb' IO (FunPtr C_ListBoxActivateCursorRowCallback)
-> (FunPtr C_ListBoxActivateCursorRowCallback
    -> IO (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxActivateCursorRowCallback
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxSelectedRowsChangedCallback` into a `C_ListBoxSelectedRowsChangedCallback`.
wrap_ListBoxSelectedRowsChangedCallback ::
    ListBoxSelectedRowsChangedCallback ->
    C_ListBoxSelectedRowsChangedCallback
wrap_ListBoxSelectedRowsChangedCallback :: IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectedRowsChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [selectedRowsChanged](#signal:selectedRowsChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #selectedRowsChanged callback
-- @
-- 
-- 
onListBoxSelectedRowsChanged :: (IsListBox a, MonadIO m) => a -> ListBoxSelectedRowsChangedCallback -> m SignalHandlerId
onListBoxSelectedRowsChanged :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onListBoxSelectedRowsChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectedRowsChangedCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectedRowsChangedCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selected-rows-changed" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectedRowsChanged](#signal:selectedRowsChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #selectedRowsChanged callback
-- @
-- 
-- 
afterListBoxSelectedRowsChanged :: (IsListBox a, MonadIO m) => a -> ListBoxSelectedRowsChangedCallback -> m SignalHandlerId
afterListBoxSelectedRowsChanged :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterListBoxSelectedRowsChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxSelectedRowsChangedCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxSelectedRowsChangedCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selected-rows-changed" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxSelectedRowsChangedSignalInfo
instance SignalInfo ListBoxSelectedRowsChangedSignalInfo where
    type HaskellCallbackType ListBoxSelectedRowsChangedSignalInfo = ListBoxSelectedRowsChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxSelectedRowsChangedCallback cb
        cb'' <- mk_ListBoxSelectedRowsChangedCallback cb'
        connectSignalFunPtr obj "selected-rows-changed" cb'' connectMode detail

#endif

-- signal ListBox::toggle-cursor-row
-- | /No description available in the introspection data./
type ListBoxToggleCursorRowCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxToggleCursorRowCallback`@.
noListBoxToggleCursorRowCallback :: Maybe ListBoxToggleCursorRowCallback
noListBoxToggleCursorRowCallback :: Maybe (IO ())
noListBoxToggleCursorRowCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxToggleCursorRowCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxToggleCursorRow :: MonadIO m => ListBoxToggleCursorRowCallback -> m (GClosure C_ListBoxToggleCursorRowCallback)
genClosure_ListBoxToggleCursorRow :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxToggleCursorRow IO ()
cb = IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxActivateCursorRowCallback)
 -> m (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxToggleCursorRowCallback IO ()
cb
    C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxToggleCursorRowCallback C_ListBoxActivateCursorRowCallback
cb' IO (FunPtr C_ListBoxActivateCursorRowCallback)
-> (FunPtr C_ListBoxActivateCursorRowCallback
    -> IO (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxActivateCursorRowCallback
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxToggleCursorRowCallback` into a `C_ListBoxToggleCursorRowCallback`.
wrap_ListBoxToggleCursorRowCallback ::
    ListBoxToggleCursorRowCallback ->
    C_ListBoxToggleCursorRowCallback
wrap_ListBoxToggleCursorRowCallback :: IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxToggleCursorRowCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [toggleCursorRow](#signal:toggleCursorRow) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #toggleCursorRow callback
-- @
-- 
-- 
onListBoxToggleCursorRow :: (IsListBox a, MonadIO m) => a -> ListBoxToggleCursorRowCallback -> m SignalHandlerId
onListBoxToggleCursorRow :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onListBoxToggleCursorRow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxToggleCursorRowCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxToggleCursorRowCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"toggle-cursor-row" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [toggleCursorRow](#signal:toggleCursorRow) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #toggleCursorRow callback
-- @
-- 
-- 
afterListBoxToggleCursorRow :: (IsListBox a, MonadIO m) => a -> ListBoxToggleCursorRowCallback -> m SignalHandlerId
afterListBoxToggleCursorRow :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterListBoxToggleCursorRow a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxToggleCursorRowCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxToggleCursorRowCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"toggle-cursor-row" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxToggleCursorRowSignalInfo
instance SignalInfo ListBoxToggleCursorRowSignalInfo where
    type HaskellCallbackType ListBoxToggleCursorRowSignalInfo = ListBoxToggleCursorRowCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxToggleCursorRowCallback cb
        cb'' <- mk_ListBoxToggleCursorRowCallback cb'
        connectSignalFunPtr obj "toggle-cursor-row" cb'' connectMode detail

#endif

-- signal ListBox::unselect-all
-- | The [unselectAll](#g:signal:unselectAll) signal is a [keybinding signal][GtkSignalAction]
-- which gets emitted to unselect all children of the box, if the selection
-- mode permits it.
-- 
-- The default bindings for this signal is Ctrl-Shift-a.
type ListBoxUnselectAllCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `ListBoxUnselectAllCallback`@.
noListBoxUnselectAllCallback :: Maybe ListBoxUnselectAllCallback
noListBoxUnselectAllCallback :: Maybe (IO ())
noListBoxUnselectAllCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_ListBoxUnselectAllCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

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

-- | Wrap the callback into a `GClosure`.
genClosure_ListBoxUnselectAll :: MonadIO m => ListBoxUnselectAllCallback -> m (GClosure C_ListBoxUnselectAllCallback)
genClosure_ListBoxUnselectAll :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_ListBoxActivateCursorRowCallback)
genClosure_ListBoxUnselectAll IO ()
cb = IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ListBoxActivateCursorRowCallback)
 -> m (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
-> m (GClosure C_ListBoxActivateCursorRowCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxUnselectAllCallback IO ()
cb
    C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxUnselectAllCallback C_ListBoxActivateCursorRowCallback
cb' IO (FunPtr C_ListBoxActivateCursorRowCallback)
-> (FunPtr C_ListBoxActivateCursorRowCallback
    -> IO (GClosure C_ListBoxActivateCursorRowCallback))
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ListBoxActivateCursorRowCallback
-> IO (GClosure C_ListBoxActivateCursorRowCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `ListBoxUnselectAllCallback` into a `C_ListBoxUnselectAllCallback`.
wrap_ListBoxUnselectAllCallback ::
    ListBoxUnselectAllCallback ->
    C_ListBoxUnselectAllCallback
wrap_ListBoxUnselectAllCallback :: IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxUnselectAllCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [unselectAll](#signal:unselectAll) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' listBox #unselectAll callback
-- @
-- 
-- 
onListBoxUnselectAll :: (IsListBox a, MonadIO m) => a -> ListBoxUnselectAllCallback -> m SignalHandlerId
onListBoxUnselectAll :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onListBoxUnselectAll a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxUnselectAllCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxUnselectAllCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"unselect-all" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [unselectAll](#signal:unselectAll) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' listBox #unselectAll callback
-- @
-- 
-- 
afterListBoxUnselectAll :: (IsListBox a, MonadIO m) => a -> ListBoxUnselectAllCallback -> m SignalHandlerId
afterListBoxUnselectAll :: forall a (m :: * -> *).
(IsListBox a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterListBoxUnselectAll a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_ListBoxActivateCursorRowCallback
cb' = IO () -> C_ListBoxActivateCursorRowCallback
wrap_ListBoxUnselectAllCallback IO ()
cb
    FunPtr C_ListBoxActivateCursorRowCallback
cb'' <- C_ListBoxActivateCursorRowCallback
-> IO (FunPtr C_ListBoxActivateCursorRowCallback)
mk_ListBoxUnselectAllCallback C_ListBoxActivateCursorRowCallback
cb'
    a
-> Text
-> FunPtr C_ListBoxActivateCursorRowCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"unselect-all" FunPtr C_ListBoxActivateCursorRowCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data ListBoxUnselectAllSignalInfo
instance SignalInfo ListBoxUnselectAllSignalInfo where
    type HaskellCallbackType ListBoxUnselectAllSignalInfo = ListBoxUnselectAllCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_ListBoxUnselectAllCallback cb
        cb'' <- mk_ListBoxUnselectAllCallback cb'
        connectSignalFunPtr obj "unselect-all" cb'' connectMode detail

#endif

-- VVV Prop "accept-unpaired-release"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@accept-unpaired-release@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' listBox #acceptUnpairedRelease
-- @
getListBoxAcceptUnpairedRelease :: (MonadIO m, IsListBox o) => o -> m Bool
getListBoxAcceptUnpairedRelease :: forall (m :: * -> *) o. (MonadIO m, IsListBox o) => o -> m Bool
getListBoxAcceptUnpairedRelease o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"accept-unpaired-release"

-- | Set the value of the “@accept-unpaired-release@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' listBox [ #acceptUnpairedRelease 'Data.GI.Base.Attributes.:=' value ]
-- @
setListBoxAcceptUnpairedRelease :: (MonadIO m, IsListBox o) => o -> Bool -> m ()
setListBoxAcceptUnpairedRelease :: forall (m :: * -> *) o.
(MonadIO m, IsListBox o) =>
o -> Bool -> m ()
setListBoxAcceptUnpairedRelease o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"accept-unpaired-release" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@accept-unpaired-release@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructListBoxAcceptUnpairedRelease :: (IsListBox o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructListBoxAcceptUnpairedRelease :: forall o (m :: * -> *).
(IsListBox o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructListBoxAcceptUnpairedRelease Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"accept-unpaired-release" Bool
val

#if defined(ENABLE_OVERLOADING)
data ListBoxAcceptUnpairedReleasePropertyInfo
instance AttrInfo ListBoxAcceptUnpairedReleasePropertyInfo where
    type AttrAllowedOps ListBoxAcceptUnpairedReleasePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ListBoxAcceptUnpairedReleasePropertyInfo = IsListBox
    type AttrSetTypeConstraint ListBoxAcceptUnpairedReleasePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ListBoxAcceptUnpairedReleasePropertyInfo = (~) Bool
    type AttrTransferType ListBoxAcceptUnpairedReleasePropertyInfo = Bool
    type AttrGetType ListBoxAcceptUnpairedReleasePropertyInfo = Bool
    type AttrLabel ListBoxAcceptUnpairedReleasePropertyInfo = "accept-unpaired-release"
    type AttrOrigin ListBoxAcceptUnpairedReleasePropertyInfo = ListBox
    attrGet = getListBoxAcceptUnpairedRelease
    attrSet = setListBoxAcceptUnpairedRelease
    attrTransfer _ v = do
        return v
    attrConstruct = constructListBoxAcceptUnpairedRelease
    attrClear = undefined
#endif

-- VVV Prop "activate-on-single-click"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@activate-on-single-click@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' listBox #activateOnSingleClick
-- @
getListBoxActivateOnSingleClick :: (MonadIO m, IsListBox o) => o -> m Bool
getListBoxActivateOnSingleClick :: forall (m :: * -> *) o. (MonadIO m, IsListBox o) => o -> m Bool
getListBoxActivateOnSingleClick o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"activate-on-single-click"

-- | Set the value of the “@activate-on-single-click@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' listBox [ #activateOnSingleClick 'Data.GI.Base.Attributes.:=' value ]
-- @
setListBoxActivateOnSingleClick :: (MonadIO m, IsListBox o) => o -> Bool -> m ()
setListBoxActivateOnSingleClick :: forall (m :: * -> *) o.
(MonadIO m, IsListBox o) =>
o -> Bool -> m ()
setListBoxActivateOnSingleClick o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"activate-on-single-click" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@activate-on-single-click@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructListBoxActivateOnSingleClick :: (IsListBox o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructListBoxActivateOnSingleClick :: forall o (m :: * -> *).
(IsListBox o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructListBoxActivateOnSingleClick Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"activate-on-single-click" Bool
val

#if defined(ENABLE_OVERLOADING)
data ListBoxActivateOnSingleClickPropertyInfo
instance AttrInfo ListBoxActivateOnSingleClickPropertyInfo where
    type AttrAllowedOps ListBoxActivateOnSingleClickPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ListBoxActivateOnSingleClickPropertyInfo = IsListBox
    type AttrSetTypeConstraint ListBoxActivateOnSingleClickPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ListBoxActivateOnSingleClickPropertyInfo = (~) Bool
    type AttrTransferType ListBoxActivateOnSingleClickPropertyInfo = Bool
    type AttrGetType ListBoxActivateOnSingleClickPropertyInfo = Bool
    type AttrLabel ListBoxActivateOnSingleClickPropertyInfo = "activate-on-single-click"
    type AttrOrigin ListBoxActivateOnSingleClickPropertyInfo = ListBox
    attrGet = getListBoxActivateOnSingleClick
    attrSet = setListBoxActivateOnSingleClick
    attrTransfer _ v = do
        return v
    attrConstruct = constructListBoxActivateOnSingleClick
    attrClear = undefined
#endif

-- VVV Prop "selection-mode"
   -- Type: TInterface (Name {namespace = "Gtk", name = "SelectionMode"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@selection-mode@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' listBox #selectionMode
-- @
getListBoxSelectionMode :: (MonadIO m, IsListBox o) => o -> m Gtk.Enums.SelectionMode
getListBoxSelectionMode :: forall (m :: * -> *) o.
(MonadIO m, IsListBox o) =>
o -> m SelectionMode
getListBoxSelectionMode o
obj = IO SelectionMode -> m SelectionMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SelectionMode -> m SelectionMode)
-> IO SelectionMode -> m SelectionMode
forall a b. (a -> b) -> a -> b
$ o -> String -> IO SelectionMode
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"selection-mode"

-- | Set the value of the “@selection-mode@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' listBox [ #selectionMode 'Data.GI.Base.Attributes.:=' value ]
-- @
setListBoxSelectionMode :: (MonadIO m, IsListBox o) => o -> Gtk.Enums.SelectionMode -> m ()
setListBoxSelectionMode :: forall (m :: * -> *) o.
(MonadIO m, IsListBox o) =>
o -> SelectionMode -> m ()
setListBoxSelectionMode o
obj SelectionMode
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> SelectionMode -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"selection-mode" SelectionMode
val

-- | Construct a `GValueConstruct` with valid value for the “@selection-mode@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructListBoxSelectionMode :: (IsListBox o, MIO.MonadIO m) => Gtk.Enums.SelectionMode -> m (GValueConstruct o)
constructListBoxSelectionMode :: forall o (m :: * -> *).
(IsListBox o, MonadIO m) =>
SelectionMode -> m (GValueConstruct o)
constructListBoxSelectionMode SelectionMode
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> SelectionMode -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"selection-mode" SelectionMode
val

#if defined(ENABLE_OVERLOADING)
data ListBoxSelectionModePropertyInfo
instance AttrInfo ListBoxSelectionModePropertyInfo where
    type AttrAllowedOps ListBoxSelectionModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ListBoxSelectionModePropertyInfo = IsListBox
    type AttrSetTypeConstraint ListBoxSelectionModePropertyInfo = (~) Gtk.Enums.SelectionMode
    type AttrTransferTypeConstraint ListBoxSelectionModePropertyInfo = (~) Gtk.Enums.SelectionMode
    type AttrTransferType ListBoxSelectionModePropertyInfo = Gtk.Enums.SelectionMode
    type AttrGetType ListBoxSelectionModePropertyInfo = Gtk.Enums.SelectionMode
    type AttrLabel ListBoxSelectionModePropertyInfo = "selection-mode"
    type AttrOrigin ListBoxSelectionModePropertyInfo = ListBox
    attrGet = getListBoxSelectionMode
    attrSet = setListBoxSelectionMode
    attrTransfer _ v = do
        return v
    attrConstruct = constructListBoxSelectionMode
    attrClear = undefined
#endif

-- VVV Prop "show-separators"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@show-separators@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' listBox #showSeparators
-- @
getListBoxShowSeparators :: (MonadIO m, IsListBox o) => o -> m Bool
getListBoxShowSeparators :: forall (m :: * -> *) o. (MonadIO m, IsListBox o) => o -> m Bool
getListBoxShowSeparators o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"show-separators"

-- | Set the value of the “@show-separators@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' listBox [ #showSeparators 'Data.GI.Base.Attributes.:=' value ]
-- @
setListBoxShowSeparators :: (MonadIO m, IsListBox o) => o -> Bool -> m ()
setListBoxShowSeparators :: forall (m :: * -> *) o.
(MonadIO m, IsListBox o) =>
o -> Bool -> m ()
setListBoxShowSeparators o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"show-separators" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@show-separators@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructListBoxShowSeparators :: (IsListBox o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructListBoxShowSeparators :: forall o (m :: * -> *).
(IsListBox o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructListBoxShowSeparators Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-separators" Bool
val

#if defined(ENABLE_OVERLOADING)
data ListBoxShowSeparatorsPropertyInfo
instance AttrInfo ListBoxShowSeparatorsPropertyInfo where
    type AttrAllowedOps ListBoxShowSeparatorsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ListBoxShowSeparatorsPropertyInfo = IsListBox
    type AttrSetTypeConstraint ListBoxShowSeparatorsPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ListBoxShowSeparatorsPropertyInfo = (~) Bool
    type AttrTransferType ListBoxShowSeparatorsPropertyInfo = Bool
    type AttrGetType ListBoxShowSeparatorsPropertyInfo = Bool
    type AttrLabel ListBoxShowSeparatorsPropertyInfo = "show-separators"
    type AttrOrigin ListBoxShowSeparatorsPropertyInfo = ListBox
    attrGet = getListBoxShowSeparators
    attrSet = setListBoxShowSeparators
    attrTransfer _ v = do
        return v
    attrConstruct = constructListBoxShowSeparators
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ListBox
type instance O.AttributeList ListBox = ListBoxAttributeList
type ListBoxAttributeList = ('[ '("acceptUnpairedRelease", ListBoxAcceptUnpairedReleasePropertyInfo), '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("activateOnSingleClick", ListBoxActivateOnSingleClickPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("selectionMode", ListBoxSelectionModePropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("showSeparators", ListBoxShowSeparatorsPropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
listBoxAcceptUnpairedRelease :: AttrLabelProxy "acceptUnpairedRelease"
listBoxAcceptUnpairedRelease = AttrLabelProxy

listBoxActivateOnSingleClick :: AttrLabelProxy "activateOnSingleClick"
listBoxActivateOnSingleClick = AttrLabelProxy

listBoxSelectionMode :: AttrLabelProxy "selectionMode"
listBoxSelectionMode = AttrLabelProxy

listBoxShowSeparators :: AttrLabelProxy "showSeparators"
listBoxShowSeparators = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ListBox = ListBoxSignalList
type ListBoxSignalList = ('[ '("activateCursorRow", ListBoxActivateCursorRowSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveCursor", ListBoxMoveCursorSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("rowActivated", ListBoxRowActivatedSignalInfo), '("rowSelected", ListBoxRowSelectedSignalInfo), '("selectAll", ListBoxSelectAllSignalInfo), '("selectedRowsChanged", ListBoxSelectedRowsChangedSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("toggleCursorRow", ListBoxToggleCursorRowSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo), '("unselectAll", ListBoxUnselectAllSignalInfo)] :: [(Symbol, *)])

#endif

-- method ListBox::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "ListBox" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_new" gtk_list_box_new :: 
    IO (Ptr ListBox)

-- | Creates a new t'GI.Gtk.Objects.ListBox.ListBox' container.
listBoxNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ListBox
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.ListBox.ListBox'
listBoxNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ListBox
listBoxNew  = IO ListBox -> m ListBox
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListBox -> m ListBox) -> IO ListBox -> m ListBox
forall a b. (a -> b) -> a -> b
$ do
    Ptr ListBox
result <- IO (Ptr ListBox)
gtk_list_box_new
    Text -> Ptr ListBox -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"listBoxNew" Ptr ListBox
result
    ListBox
result' <- ((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
ListBox) Ptr ListBox
result
    ListBox -> IO ListBox
forall (m :: * -> *) a. Monad m => a -> m a
return ListBox
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method ListBox::append
-- method type : OrdinaryMethod
-- 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 = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to add"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_append" gtk_list_box_append :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Append a widget to the list. If a sort function is set, the widget will
-- actually be inserted at the calculated position.
listBoxAppend ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@child@/: the t'GI.Gtk.Objects.Widget.Widget' to add
    -> m ()
listBoxAppend :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsWidget b) =>
a -> b -> m ()
listBoxAppend a
box 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 ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ListBox -> Ptr Widget -> IO ()
gtk_list_box_append Ptr ListBox
box' Ptr Widget
child'
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxAppendMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ListBoxAppendMethodInfo a signature where
    overloadedMethod = listBoxAppend

instance O.OverloadedMethodInfo ListBoxAppendMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxAppend",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxAppend"
        }


#endif

-- method ListBox::bind_model
-- method type : OrdinaryMethod
-- 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 = "model"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "ListModel" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GListModel to be bound to @box"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "create_widget_func"
--           , argType =
--               TInterface
--                 Name { namespace = "Gtk" , name = "ListBoxCreateWidgetFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a function that creates widgets for items\n  or %NULL in case you also passed %NULL as @model"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 3
--           , argDestroy = 4
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @create_widget_func"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data_free_func"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "function for freeing @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_bind_model" gtk_list_box_bind_model :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gio.ListModel.ListModel ->          -- model : TInterface (Name {namespace = "Gio", name = "ListModel"})
    FunPtr Gtk.Callbacks.C_ListBoxCreateWidgetFunc -> -- create_widget_func : TInterface (Name {namespace = "Gtk", name = "ListBoxCreateWidgetFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- user_data_free_func : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

-- | Binds /@model@/ to /@box@/.
-- 
-- If /@box@/ was already bound to a model, that previous binding is
-- destroyed.
-- 
-- The contents of /@box@/ are cleared and then filled with widgets that
-- represent items from /@model@/. /@box@/ is updated whenever /@model@/ changes.
-- If /@model@/ is 'P.Nothing', /@box@/ is left empty.
-- 
-- It is undefined to add or remove widgets directly (for example, with
-- 'GI.Gtk.Objects.ListBox.listBoxInsert') while /@box@/ is bound to a
-- model.
-- 
-- Note that using a model is incompatible with the filtering and sorting
-- functionality in GtkListBox. When using a model, filtering and sorting
-- should be implemented by the model.
listBoxBindModel ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gio.ListModel.IsListModel b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (b)
    -- ^ /@model@/: the t'GI.Gio.Interfaces.ListModel.ListModel' to be bound to /@box@/
    -> Maybe (Gtk.Callbacks.ListBoxCreateWidgetFunc)
    -- ^ /@createWidgetFunc@/: a function that creates widgets for items
    --   or 'P.Nothing' in case you also passed 'P.Nothing' as /@model@/
    -> m ()
listBoxBindModel :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsListModel b) =>
a -> Maybe b -> Maybe ListBoxCreateWidgetFunc -> m ()
listBoxBindModel a
box Maybe b
model Maybe ListBoxCreateWidgetFunc
createWidgetFunc = 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 ListModel
maybeModel <- case Maybe b
model of
        Maybe b
Nothing -> Ptr ListModel -> IO (Ptr ListModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListModel
forall a. Ptr a
nullPtr
        Just b
jModel -> do
            Ptr ListModel
jModel' <- b -> IO (Ptr ListModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jModel
            Ptr ListModel -> IO (Ptr ListModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListModel
jModel'
    FunPtr C_ListBoxCreateWidgetFunc
maybeCreateWidgetFunc <- case Maybe ListBoxCreateWidgetFunc
createWidgetFunc of
        Maybe ListBoxCreateWidgetFunc
Nothing -> FunPtr C_ListBoxCreateWidgetFunc
-> IO (FunPtr C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_ListBoxCreateWidgetFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just ListBoxCreateWidgetFunc
jCreateWidgetFunc -> do
            FunPtr C_ListBoxCreateWidgetFunc
jCreateWidgetFunc' <- C_ListBoxCreateWidgetFunc -> IO (FunPtr C_ListBoxCreateWidgetFunc)
Gtk.Callbacks.mk_ListBoxCreateWidgetFunc (Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
-> ListBoxCreateWidgetFunc_WithClosures
-> C_ListBoxCreateWidgetFunc
Gtk.Callbacks.wrap_ListBoxCreateWidgetFunc Maybe (Ptr (FunPtr C_ListBoxCreateWidgetFunc))
forall a. Maybe a
Nothing (ListBoxCreateWidgetFunc -> ListBoxCreateWidgetFunc_WithClosures
Gtk.Callbacks.drop_closures_ListBoxCreateWidgetFunc ListBoxCreateWidgetFunc
jCreateWidgetFunc))
            FunPtr C_ListBoxCreateWidgetFunc
-> IO (FunPtr C_ListBoxCreateWidgetFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_ListBoxCreateWidgetFunc
jCreateWidgetFunc'
    let userData :: Ptr ()
userData = FunPtr C_ListBoxCreateWidgetFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ListBoxCreateWidgetFunc
maybeCreateWidgetFunc
    let userDataFreeFunc :: FunPtr (Ptr a -> IO ())
userDataFreeFunc = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr ListBox
-> Ptr ListModel
-> FunPtr C_ListBoxCreateWidgetFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_list_box_bind_model Ptr ListBox
box' Ptr ListModel
maybeModel FunPtr C_ListBoxCreateWidgetFunc
maybeCreateWidgetFunc Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
userDataFreeFunc
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
model b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxBindModelMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gtk.Callbacks.ListBoxCreateWidgetFunc) -> m ()), MonadIO m, IsListBox a, Gio.ListModel.IsListModel b) => O.OverloadedMethod ListBoxBindModelMethodInfo a signature where
    overloadedMethod = listBoxBindModel

instance O.OverloadedMethodInfo ListBoxBindModelMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxBindModel",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxBindModel"
        }


#endif

-- method ListBox::drag_highlight_row
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_drag_highlight_row" gtk_list_box_drag_highlight_row :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.ListBoxRow.ListBoxRow ->        -- row : TInterface (Name {namespace = "Gtk", name = "ListBoxRow"})
    IO ()

-- | This is a helper function for implementing DnD onto a t'GI.Gtk.Objects.ListBox.ListBox'.
-- The passed in /@row@/ will be highlighted by setting the
-- @/GTK_STATE_FLAG_DROP_ACTIVE/@ state and any previously highlighted
-- row will be unhighlighted.
-- 
-- The row will also be unhighlighted when the widget gets
-- a drag leave event.
listBoxDragHighlightRow ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@row@/: a t'GI.Gtk.Objects.ListBoxRow.ListBoxRow'
    -> m ()
listBoxDragHighlightRow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsListBoxRow b) =>
a -> b -> m ()
listBoxDragHighlightRow a
box b
row = 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
    Ptr ListBox -> Ptr ListBoxRow -> IO ()
gtk_list_box_drag_highlight_row Ptr ListBox
box' Ptr ListBoxRow
row'
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxDragHighlightRowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) => O.OverloadedMethod ListBoxDragHighlightRowMethodInfo a signature where
    overloadedMethod = listBoxDragHighlightRow

instance O.OverloadedMethodInfo ListBoxDragHighlightRowMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxDragHighlightRow",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxDragHighlightRow"
        }


#endif

-- method ListBox::drag_unhighlight_row
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_drag_unhighlight_row" gtk_list_box_drag_unhighlight_row :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | If a row has previously been highlighted via 'GI.Gtk.Objects.ListBox.listBoxDragHighlightRow'
-- it will have the highlight removed.
listBoxDragUnhighlightRow ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxDragUnhighlightRow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxDragUnhighlightRow a
box = 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 ListBox -> IO ()
gtk_list_box_drag_unhighlight_row Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxDragUnhighlightRowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxDragUnhighlightRowMethodInfo a signature where
    overloadedMethod = listBoxDragUnhighlightRow

instance O.OverloadedMethodInfo ListBoxDragUnhighlightRowMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxDragUnhighlightRow",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxDragUnhighlightRow"
        }


#endif

-- method ListBox::get_activate_on_single_click
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_activate_on_single_click" gtk_list_box_get_activate_on_single_click :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO CInt

-- | Returns whether rows activate on single clicks.
listBoxGetActivateOnSingleClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if rows are activated on single click, 'P.False' otherwise
listBoxGetActivateOnSingleClick :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m Bool
listBoxGetActivateOnSingleClick a
box = 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 ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    CInt
result <- Ptr ListBox -> IO CInt
gtk_list_box_get_activate_on_single_click Ptr ListBox
box'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ListBoxGetActivateOnSingleClickMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetActivateOnSingleClickMethodInfo a signature where
    overloadedMethod = listBoxGetActivateOnSingleClick

instance O.OverloadedMethodInfo ListBoxGetActivateOnSingleClickMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetActivateOnSingleClick",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetActivateOnSingleClick"
        }


#endif

-- method ListBox::get_adjustment
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Adjustment" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_adjustment" gtk_list_box_get_adjustment :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO (Ptr Gtk.Adjustment.Adjustment)

-- | Gets the adjustment (if any) that the widget uses to
-- for vertical scrolling.
listBoxGetAdjustment ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m Gtk.Adjustment.Adjustment
    -- ^ __Returns:__ the adjustment
listBoxGetAdjustment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m Adjustment
listBoxGetAdjustment a
box = IO Adjustment -> m Adjustment
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Adjustment -> m Adjustment) -> IO Adjustment -> m Adjustment
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 Adjustment
result <- Ptr ListBox -> IO (Ptr Adjustment)
gtk_list_box_get_adjustment Ptr ListBox
box'
    Text -> Ptr Adjustment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"listBoxGetAdjustment" Ptr Adjustment
result
    Adjustment
result' <- ((ManagedPtr Adjustment -> Adjustment)
-> Ptr Adjustment -> IO Adjustment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment) Ptr Adjustment
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Adjustment -> IO Adjustment
forall (m :: * -> *) a. Monad m => a -> m a
return Adjustment
result'

#if defined(ENABLE_OVERLOADING)
data ListBoxGetAdjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetAdjustmentMethodInfo a signature where
    overloadedMethod = listBoxGetAdjustment

instance O.OverloadedMethodInfo ListBoxGetAdjustmentMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetAdjustment",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetAdjustment"
        }


#endif

-- method ListBox::get_row_at_index
-- method type : OrdinaryMethod
-- 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 = "index_"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the index of the row"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "ListBoxRow" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_row_at_index" gtk_list_box_get_row_at_index :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Int32 ->                                -- index_ : TBasicType TInt
    IO (Ptr Gtk.ListBoxRow.ListBoxRow)

-- | Gets the n-th child in the list (not counting headers).
-- If /@index_@/ is negative or larger than the number of items in the
-- list, 'P.Nothing' is returned.
listBoxGetRowAtIndex ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Int32
    -- ^ /@index_@/: the index of the row
    -> m (Maybe Gtk.ListBoxRow.ListBoxRow)
    -- ^ __Returns:__ the child t'GI.Gtk.Objects.Widget.Widget' or 'P.Nothing'
listBoxGetRowAtIndex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Int32 -> m (Maybe ListBoxRow)
listBoxGetRowAtIndex a
box Int32
index_ = IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow))
-> IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow)
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
result <- Ptr ListBox -> Int32 -> IO (Ptr ListBoxRow)
gtk_list_box_get_row_at_index Ptr ListBox
box' Int32
index_
    Maybe ListBoxRow
maybeResult <- Ptr ListBoxRow
-> (Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ListBoxRow
result ((Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow))
-> (Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow)
forall a b. (a -> b) -> a -> b
$ \Ptr ListBoxRow
result' -> do
        ListBoxRow
result'' <- ((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
result'
        ListBoxRow -> IO ListBoxRow
forall (m :: * -> *) a. Monad m => a -> m a
return ListBoxRow
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe ListBoxRow -> IO (Maybe ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ListBoxRow
maybeResult

#if defined(ENABLE_OVERLOADING)
data ListBoxGetRowAtIndexMethodInfo
instance (signature ~ (Int32 -> m (Maybe Gtk.ListBoxRow.ListBoxRow)), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetRowAtIndexMethodInfo a signature where
    overloadedMethod = listBoxGetRowAtIndex

instance O.OverloadedMethodInfo ListBoxGetRowAtIndexMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetRowAtIndex",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetRowAtIndex"
        }


#endif

-- method ListBox::get_row_at_y
-- method type : OrdinaryMethod
-- 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 = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "position" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "ListBoxRow" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_row_at_y" gtk_list_box_get_row_at_y :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Int32 ->                                -- y : TBasicType TInt
    IO (Ptr Gtk.ListBoxRow.ListBoxRow)

-- | Gets the row at the /@y@/ position.
listBoxGetRowAtY ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Int32
    -- ^ /@y@/: position
    -> m (Maybe Gtk.ListBoxRow.ListBoxRow)
    -- ^ __Returns:__ the row or 'P.Nothing'
    --   in case no row exists for the given y coordinate.
listBoxGetRowAtY :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Int32 -> m (Maybe ListBoxRow)
listBoxGetRowAtY a
box Int32
y = IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow))
-> IO (Maybe ListBoxRow) -> m (Maybe ListBoxRow)
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
result <- Ptr ListBox -> Int32 -> IO (Ptr ListBoxRow)
gtk_list_box_get_row_at_y Ptr ListBox
box' Int32
y
    Maybe ListBoxRow
maybeResult <- Ptr ListBoxRow
-> (Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ListBoxRow
result ((Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow))
-> (Ptr ListBoxRow -> IO ListBoxRow) -> IO (Maybe ListBoxRow)
forall a b. (a -> b) -> a -> b
$ \Ptr ListBoxRow
result' -> do
        ListBoxRow
result'' <- ((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
result'
        ListBoxRow -> IO ListBoxRow
forall (m :: * -> *) a. Monad m => a -> m a
return ListBoxRow
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe ListBoxRow -> IO (Maybe ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ListBoxRow
maybeResult

#if defined(ENABLE_OVERLOADING)
data ListBoxGetRowAtYMethodInfo
instance (signature ~ (Int32 -> m (Maybe Gtk.ListBoxRow.ListBoxRow)), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetRowAtYMethodInfo a signature where
    overloadedMethod = listBoxGetRowAtY

instance O.OverloadedMethodInfo ListBoxGetRowAtYMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetRowAtY",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetRowAtY"
        }


#endif

-- method ListBox::get_selected_row
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "ListBoxRow" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selected_row" gtk_list_box_get_selected_row :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO (Ptr Gtk.ListBoxRow.ListBoxRow)

-- | Gets the selected row.
-- 
-- Note that the box may allow multiple selection, in which
-- case you should use 'GI.Gtk.Objects.ListBox.listBoxSelectedForeach' to
-- find all selected rows.
listBoxGetSelectedRow ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m Gtk.ListBoxRow.ListBoxRow
    -- ^ __Returns:__ the selected row
listBoxGetSelectedRow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ListBoxRow
listBoxGetSelectedRow a
box = IO ListBoxRow -> m ListBoxRow
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListBoxRow -> m ListBoxRow) -> IO ListBoxRow -> m ListBoxRow
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
result <- Ptr ListBox -> IO (Ptr ListBoxRow)
gtk_list_box_get_selected_row Ptr ListBox
box'
    Text -> Ptr ListBoxRow -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"listBoxGetSelectedRow" Ptr ListBoxRow
result
    ListBoxRow
result' <- ((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
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    ListBoxRow -> IO ListBoxRow
forall (m :: * -> *) a. Monad m => a -> m a
return ListBoxRow
result'

#if defined(ENABLE_OVERLOADING)
data ListBoxGetSelectedRowMethodInfo
instance (signature ~ (m Gtk.ListBoxRow.ListBoxRow), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetSelectedRowMethodInfo a signature where
    overloadedMethod = listBoxGetSelectedRow

instance O.OverloadedMethodInfo ListBoxGetSelectedRowMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetSelectedRow",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetSelectedRow"
        }


#endif

-- method ListBox::get_selected_rows
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList
--                  (TInterface Name { namespace = "Gtk" , name = "ListBoxRow" }))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selected_rows" gtk_list_box_get_selected_rows :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO (Ptr (GList (Ptr Gtk.ListBoxRow.ListBoxRow)))

-- | Creates a list of all selected children.
listBoxGetSelectedRows ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m [Gtk.ListBoxRow.ListBoxRow]
    -- ^ __Returns:__ 
    --     A t'GI.GLib.Structs.List.List' containing the t'GI.Gtk.Objects.Widget.Widget' for each selected child.
    --     Free with @/g_list_free()/@ when done.
listBoxGetSelectedRows :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m [ListBoxRow]
listBoxGetSelectedRows a
box = IO [ListBoxRow] -> m [ListBoxRow]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ListBoxRow] -> m [ListBoxRow])
-> IO [ListBoxRow] -> m [ListBoxRow]
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 (GList (Ptr ListBoxRow))
result <- Ptr ListBox -> IO (Ptr (GList (Ptr ListBoxRow)))
gtk_list_box_get_selected_rows Ptr ListBox
box'
    [Ptr ListBoxRow]
result' <- Ptr (GList (Ptr ListBoxRow)) -> IO [Ptr ListBoxRow]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr ListBoxRow))
result
    [ListBoxRow]
result'' <- (Ptr ListBoxRow -> IO ListBoxRow)
-> [Ptr ListBoxRow] -> IO [ListBoxRow]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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]
result'
    Ptr (GList (Ptr ListBoxRow)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr ListBoxRow))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    [ListBoxRow] -> IO [ListBoxRow]
forall (m :: * -> *) a. Monad m => a -> m a
return [ListBoxRow]
result''

#if defined(ENABLE_OVERLOADING)
data ListBoxGetSelectedRowsMethodInfo
instance (signature ~ (m [Gtk.ListBoxRow.ListBoxRow]), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetSelectedRowsMethodInfo a signature where
    overloadedMethod = listBoxGetSelectedRows

instance O.OverloadedMethodInfo ListBoxGetSelectedRowsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetSelectedRows",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetSelectedRows"
        }


#endif

-- method ListBox::get_selection_mode
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "SelectionMode" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_selection_mode" gtk_list_box_get_selection_mode :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO CUInt

-- | Gets the selection mode of the listbox.
listBoxGetSelectionMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m Gtk.Enums.SelectionMode
    -- ^ __Returns:__ a t'GI.Gtk.Enums.SelectionMode'
listBoxGetSelectionMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m SelectionMode
listBoxGetSelectionMode a
box = IO SelectionMode -> m SelectionMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SelectionMode -> m SelectionMode)
-> IO SelectionMode -> m SelectionMode
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
    CUInt
result <- Ptr ListBox -> IO CUInt
gtk_list_box_get_selection_mode Ptr ListBox
box'
    let result' :: SelectionMode
result' = (Int -> SelectionMode
forall a. Enum a => Int -> a
toEnum (Int -> SelectionMode) -> (CUInt -> Int) -> CUInt -> SelectionMode
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
box
    SelectionMode -> IO SelectionMode
forall (m :: * -> *) a. Monad m => a -> m a
return SelectionMode
result'

#if defined(ENABLE_OVERLOADING)
data ListBoxGetSelectionModeMethodInfo
instance (signature ~ (m Gtk.Enums.SelectionMode), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetSelectionModeMethodInfo a signature where
    overloadedMethod = listBoxGetSelectionMode

instance O.OverloadedMethodInfo ListBoxGetSelectionModeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetSelectionMode",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetSelectionMode"
        }


#endif

-- method ListBox::get_show_separators
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_get_show_separators" gtk_list_box_get_show_separators :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO CInt

-- | Returns whether the list box should show separators
-- between rows.
listBoxGetShowSeparators ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the list box shows separators
listBoxGetShowSeparators :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m Bool
listBoxGetShowSeparators a
box = 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 ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    CInt
result <- Ptr ListBox -> IO CInt
gtk_list_box_get_show_separators Ptr ListBox
box'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ListBoxGetShowSeparatorsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxGetShowSeparatorsMethodInfo a signature where
    overloadedMethod = listBoxGetShowSeparators

instance O.OverloadedMethodInfo ListBoxGetShowSeparatorsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxGetShowSeparators",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxGetShowSeparators"
        }


#endif

-- method ListBox::insert
-- method type : OrdinaryMethod
-- 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 = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to add"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "position"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the position to insert @child in"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_insert" gtk_list_box_insert :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- position : TBasicType TInt
    IO ()

-- | Insert the /@child@/ into the /@box@/ at /@position@/. If a sort function is
-- set, the widget will actually be inserted at the calculated position.
-- 
-- If /@position@/ is -1, or larger than the total number of items in the
-- /@box@/, then the /@child@/ will be appended to the end.
listBoxInsert ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@child@/: the t'GI.Gtk.Objects.Widget.Widget' to add
    -> Int32
    -- ^ /@position@/: the position to insert /@child@/ in
    -> m ()
listBoxInsert :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsWidget b) =>
a -> b -> Int32 -> m ()
listBoxInsert a
box b
child Int32
position = 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 Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ListBox -> Ptr Widget -> Int32 -> IO ()
gtk_list_box_insert Ptr ListBox
box' Ptr Widget
child' Int32
position
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxInsertMethodInfo
instance (signature ~ (b -> Int32 -> m ()), MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ListBoxInsertMethodInfo a signature where
    overloadedMethod = listBoxInsert

instance O.OverloadedMethodInfo ListBoxInsertMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxInsert",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxInsert"
        }


#endif

-- method ListBox::invalidate_filter
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_filter" gtk_list_box_invalidate_filter :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | Update the filtering for all rows. Call this when result
-- of the filter function on the /@box@/ is changed due
-- to an external factor. For instance, this would be used
-- if the filter function just looked for a specific search
-- string and the entry with the search string has changed.
listBoxInvalidateFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxInvalidateFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxInvalidateFilter a
box = 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 ListBox -> IO ()
gtk_list_box_invalidate_filter Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxInvalidateFilterMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxInvalidateFilterMethodInfo a signature where
    overloadedMethod = listBoxInvalidateFilter

instance O.OverloadedMethodInfo ListBoxInvalidateFilterMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxInvalidateFilter",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxInvalidateFilter"
        }


#endif

-- method ListBox::invalidate_headers
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_headers" gtk_list_box_invalidate_headers :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | Update the separators for all rows. Call this when result
-- of the header function on the /@box@/ is changed due
-- to an external factor.
listBoxInvalidateHeaders ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxInvalidateHeaders :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxInvalidateHeaders a
box = 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 ListBox -> IO ()
gtk_list_box_invalidate_headers Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxInvalidateHeadersMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxInvalidateHeadersMethodInfo a signature where
    overloadedMethod = listBoxInvalidateHeaders

instance O.OverloadedMethodInfo ListBoxInvalidateHeadersMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxInvalidateHeaders",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxInvalidateHeaders"
        }


#endif

-- method ListBox::invalidate_sort
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_invalidate_sort" gtk_list_box_invalidate_sort :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | Update the sorting for all rows. Call this when result
-- of the sort function on the /@box@/ is changed due
-- to an external factor.
listBoxInvalidateSort ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxInvalidateSort :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxInvalidateSort a
box = 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 ListBox -> IO ()
gtk_list_box_invalidate_sort Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxInvalidateSortMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxInvalidateSortMethodInfo a signature where
    overloadedMethod = listBoxInvalidateSort

instance O.OverloadedMethodInfo ListBoxInvalidateSortMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxInvalidateSort",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxInvalidateSort"
        }


#endif

-- method ListBox::prepend
-- method type : OrdinaryMethod
-- 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 = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to add"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_prepend" gtk_list_box_prepend :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Prepend a widget to the list. If a sort function is set, the widget will
-- actually be inserted at the calculated position.
listBoxPrepend ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@child@/: the t'GI.Gtk.Objects.Widget.Widget' to add
    -> m ()
listBoxPrepend :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsWidget b) =>
a -> b -> m ()
listBoxPrepend a
box 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 ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ListBox -> Ptr Widget -> IO ()
gtk_list_box_prepend Ptr ListBox
box' Ptr Widget
child'
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxPrependMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ListBoxPrependMethodInfo a signature where
    overloadedMethod = listBoxPrepend

instance O.OverloadedMethodInfo ListBoxPrependMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxPrepend",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxPrepend"
        }


#endif

-- method ListBox::remove
-- method type : OrdinaryMethod
-- 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 = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the child to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_remove" gtk_list_box_remove :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes a child from /@box@/.
listBoxRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@child@/: the child to remove
    -> m ()
listBoxRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsWidget b) =>
a -> b -> m ()
listBoxRemove a
box 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 ListBox
box' <- a -> IO (Ptr ListBox)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
box
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ListBox -> Ptr Widget -> IO ()
gtk_list_box_remove Ptr ListBox
box' Ptr Widget
child'
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxRemoveMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ListBoxRemoveMethodInfo a signature where
    overloadedMethod = listBoxRemove

instance O.OverloadedMethodInfo ListBoxRemoveMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxRemove",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxRemove"
        }


#endif

-- method ListBox::select_all
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_select_all" gtk_list_box_select_all :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | Select all children of /@box@/, if the selection mode allows it.
listBoxSelectAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxSelectAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxSelectAll a
box = 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 ListBox -> IO ()
gtk_list_box_select_all Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSelectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSelectAllMethodInfo a signature where
    overloadedMethod = listBoxSelectAll

instance O.OverloadedMethodInfo ListBoxSelectAllMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSelectAll",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSelectAll"
        }


#endif

-- method ListBox::select_row
-- method type : OrdinaryMethod
-- 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 = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The row to select or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_select_row" gtk_list_box_select_row :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.ListBoxRow.ListBoxRow ->        -- row : TInterface (Name {namespace = "Gtk", name = "ListBoxRow"})
    IO ()

-- | Make /@row@/ the currently selected row.
listBoxSelectRow ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (b)
    -- ^ /@row@/: The row to select or 'P.Nothing'
    -> m ()
listBoxSelectRow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsListBoxRow b) =>
a -> Maybe b -> m ()
listBoxSelectRow a
box Maybe b
row = 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
maybeRow <- case Maybe b
row of
        Maybe b
Nothing -> Ptr ListBoxRow -> IO (Ptr ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListBoxRow
forall a. Ptr a
nullPtr
        Just b
jRow -> do
            Ptr ListBoxRow
jRow' <- b -> IO (Ptr ListBoxRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jRow
            Ptr ListBoxRow -> IO (Ptr ListBoxRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ListBoxRow
jRow'
    Ptr ListBox -> Ptr ListBoxRow -> IO ()
gtk_list_box_select_row Ptr ListBox
box' Ptr ListBoxRow
maybeRow
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
row b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSelectRowMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) => O.OverloadedMethod ListBoxSelectRowMethodInfo a signature where
    overloadedMethod = listBoxSelectRow

instance O.OverloadedMethodInfo ListBoxSelectRowMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSelectRow",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSelectRow"
        }


#endif

-- method ListBox::selected_foreach
-- method type : OrdinaryMethod
-- 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 = "func"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxForeachFunc" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the function to call for each selected child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeCall
--           , argClosure = 2
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data to pass to the function"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_selected_foreach" gtk_list_box_selected_foreach :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    FunPtr Gtk.Callbacks.C_ListBoxForeachFunc -> -- func : TInterface (Name {namespace = "Gtk", name = "ListBoxForeachFunc"})
    Ptr () ->                               -- data : TBasicType TPtr
    IO ()

-- | Calls a function for each selected child.
-- 
-- Note that the selection cannot be modified from within this function.
listBoxSelectedForeach ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Gtk.Callbacks.ListBoxForeachFunc
    -- ^ /@func@/: the function to call for each selected child
    -> m ()
listBoxSelectedForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> ListBoxForeachFunc -> m ()
listBoxSelectedForeach a
box ListBoxForeachFunc
func = 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
    FunPtr C_ListBoxForeachFunc
func' <- C_ListBoxForeachFunc -> IO (FunPtr C_ListBoxForeachFunc)
Gtk.Callbacks.mk_ListBoxForeachFunc (Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
-> ListBoxForeachFunc_WithClosures -> C_ListBoxForeachFunc
Gtk.Callbacks.wrap_ListBoxForeachFunc Maybe (Ptr (FunPtr C_ListBoxForeachFunc))
forall a. Maybe a
Nothing (ListBoxForeachFunc -> ListBoxForeachFunc_WithClosures
Gtk.Callbacks.drop_closures_ListBoxForeachFunc ListBoxForeachFunc
func))
    let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
    Ptr ListBox -> FunPtr C_ListBoxForeachFunc -> C_DestroyNotify
gtk_list_box_selected_foreach Ptr ListBox
box' FunPtr C_ListBoxForeachFunc
func' Ptr ()
forall a. Ptr a
data_
    Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ListBoxForeachFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ListBoxForeachFunc
func'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSelectedForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.ListBoxForeachFunc -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSelectedForeachMethodInfo a signature where
    overloadedMethod = listBoxSelectedForeach

instance O.OverloadedMethodInfo ListBoxSelectedForeachMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSelectedForeach",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSelectedForeach"
        }


#endif

-- method ListBox::set_activate_on_single_click
-- method type : OrdinaryMethod
-- 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 = "single"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a boolean" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_activate_on_single_click" gtk_list_box_set_activate_on_single_click :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    CInt ->                                 -- single : TBasicType TBoolean
    IO ()

-- | If /@single@/ is 'P.True', rows will be activated when you click on them,
-- otherwise you need to double-click.
listBoxSetActivateOnSingleClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Bool
    -- ^ /@single@/: a boolean
    -> m ()
listBoxSetActivateOnSingleClick :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Bool -> m ()
listBoxSetActivateOnSingleClick a
box Bool
single = 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
    let single' :: CInt
single' = (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
single
    Ptr ListBox -> CInt -> IO ()
gtk_list_box_set_activate_on_single_click Ptr ListBox
box' CInt
single'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetActivateOnSingleClickMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetActivateOnSingleClickMethodInfo a signature where
    overloadedMethod = listBoxSetActivateOnSingleClick

instance O.OverloadedMethodInfo ListBoxSetActivateOnSingleClickMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetActivateOnSingleClick",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetActivateOnSingleClick"
        }


#endif

-- method ListBox::set_adjustment
-- method type : OrdinaryMethod
-- 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 = "adjustment"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Adjustment" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the adjustment, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_adjustment" gtk_list_box_set_adjustment :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Adjustment.Adjustment ->        -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO ()

-- | Sets the adjustment (if any) that the widget uses to
-- for vertical scrolling. For instance, this is used
-- to get the page size for PageUp\/Down key handling.
-- 
-- In the normal case when the /@box@/ is packed inside
-- a t'GI.Gtk.Objects.ScrolledWindow.ScrolledWindow' the adjustment from that will
-- be picked up automatically, so there is no need
-- to manually do that.
listBoxSetAdjustment ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Adjustment.IsAdjustment b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (b)
    -- ^ /@adjustment@/: the adjustment, or 'P.Nothing'
    -> m ()
listBoxSetAdjustment :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsAdjustment b) =>
a -> Maybe b -> m ()
listBoxSetAdjustment a
box Maybe b
adjustment = 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 Adjustment
maybeAdjustment <- case Maybe b
adjustment of
        Maybe b
Nothing -> Ptr Adjustment -> IO (Ptr Adjustment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
forall a. Ptr a
nullPtr
        Just b
jAdjustment -> do
            Ptr Adjustment
jAdjustment' <- b -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jAdjustment
            Ptr Adjustment -> IO (Ptr Adjustment)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jAdjustment'
    Ptr ListBox -> Ptr Adjustment -> IO ()
gtk_list_box_set_adjustment Ptr ListBox
box' Ptr Adjustment
maybeAdjustment
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
adjustment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetAdjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsListBox a, Gtk.Adjustment.IsAdjustment b) => O.OverloadedMethod ListBoxSetAdjustmentMethodInfo a signature where
    overloadedMethod = listBoxSetAdjustment

instance O.OverloadedMethodInfo ListBoxSetAdjustmentMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetAdjustment",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetAdjustment"
        }


#endif

-- method ListBox::set_filter_func
-- method type : OrdinaryMethod
-- 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 = "filter_func"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxFilterFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "callback that lets you filter which rows to show"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @filter_func"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "destroy notifier for @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_filter_func" gtk_list_box_set_filter_func :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    FunPtr Gtk.Callbacks.C_ListBoxFilterFunc -> -- filter_func : TInterface (Name {namespace = "Gtk", name = "ListBoxFilterFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

-- | By setting a filter function on the /@box@/ one can decide dynamically which
-- of the rows to show. For instance, to implement a search function on a list that
-- filters the original list to only show the matching rows.
-- 
-- The /@filterFunc@/ will be called for each row after the call, and it will
-- continue to be called each time a row changes (via 'GI.Gtk.Objects.ListBoxRow.listBoxRowChanged') or
-- when 'GI.Gtk.Objects.ListBox.listBoxInvalidateFilter' is called.
-- 
-- Note that using a filter function is incompatible with using a model
-- (see 'GI.Gtk.Objects.ListBox.listBoxBindModel').
listBoxSetFilterFunc ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (Gtk.Callbacks.ListBoxFilterFunc)
    -- ^ /@filterFunc@/: callback that lets you filter which rows to show
    -> m ()
listBoxSetFilterFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Maybe ListBoxFilterFunc -> m ()
listBoxSetFilterFunc a
box Maybe ListBoxFilterFunc
filterFunc = 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
    FunPtr C_ListBoxFilterFunc
maybeFilterFunc <- case Maybe ListBoxFilterFunc
filterFunc of
        Maybe ListBoxFilterFunc
Nothing -> FunPtr C_ListBoxFilterFunc -> IO (FunPtr C_ListBoxFilterFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_ListBoxFilterFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just ListBoxFilterFunc
jFilterFunc -> do
            FunPtr C_ListBoxFilterFunc
jFilterFunc' <- C_ListBoxFilterFunc -> IO (FunPtr C_ListBoxFilterFunc)
Gtk.Callbacks.mk_ListBoxFilterFunc (Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
-> ListBoxFilterFunc_WithClosures -> C_ListBoxFilterFunc
Gtk.Callbacks.wrap_ListBoxFilterFunc Maybe (Ptr (FunPtr C_ListBoxFilterFunc))
forall a. Maybe a
Nothing (ListBoxFilterFunc -> ListBoxFilterFunc_WithClosures
Gtk.Callbacks.drop_closures_ListBoxFilterFunc ListBoxFilterFunc
jFilterFunc))
            FunPtr C_ListBoxFilterFunc -> IO (FunPtr C_ListBoxFilterFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_ListBoxFilterFunc
jFilterFunc'
    let userData :: Ptr ()
userData = FunPtr C_ListBoxFilterFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ListBoxFilterFunc
maybeFilterFunc
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr ListBox
-> FunPtr C_ListBoxFilterFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_list_box_set_filter_func Ptr ListBox
box' FunPtr C_ListBoxFilterFunc
maybeFilterFunc Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetFilterFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.ListBoxFilterFunc) -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetFilterFuncMethodInfo a signature where
    overloadedMethod = listBoxSetFilterFunc

instance O.OverloadedMethodInfo ListBoxSetFilterFuncMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetFilterFunc",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetFilterFunc"
        }


#endif

-- method ListBox::set_header_func
-- method type : OrdinaryMethod
-- 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 = "update_header"
--           , argType =
--               TInterface
--                 Name { namespace = "Gtk" , name = "ListBoxUpdateHeaderFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "callback that lets you add row headers"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @update_header"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "destroy notifier for @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_header_func" gtk_list_box_set_header_func :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    FunPtr Gtk.Callbacks.C_ListBoxUpdateHeaderFunc -> -- update_header : TInterface (Name {namespace = "Gtk", name = "ListBoxUpdateHeaderFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

-- | By setting a header function on the /@box@/ one can dynamically add headers
-- in front of rows, depending on the contents of the row and its position in the list.
-- For instance, one could use it to add headers in front of the first item of a
-- new kind, in a list sorted by the kind.
-- 
-- The /@updateHeader@/ can look at the current header widget using 'GI.Gtk.Objects.ListBoxRow.listBoxRowGetHeader'
-- and either update the state of the widget as needed, or set a new one using
-- 'GI.Gtk.Objects.ListBoxRow.listBoxRowSetHeader'. If no header is needed, set the header to 'P.Nothing'.
-- 
-- Note that you may get many calls /@updateHeader@/ to this for a particular row when e.g.
-- changing things that don’t affect the header. In this case it is important for performance
-- to not blindly replace an existing header with an identical one.
-- 
-- The /@updateHeader@/ function will be called for each row after the call, and it will
-- continue to be called each time a row changes (via 'GI.Gtk.Objects.ListBoxRow.listBoxRowChanged') and when
-- the row before changes (either by 'GI.Gtk.Objects.ListBoxRow.listBoxRowChanged' on the previous row, or when
-- the previous row becomes a different row). It is also called for all rows when
-- 'GI.Gtk.Objects.ListBox.listBoxInvalidateHeaders' is called.
listBoxSetHeaderFunc ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (Gtk.Callbacks.ListBoxUpdateHeaderFunc)
    -- ^ /@updateHeader@/: callback that lets you add row headers
    -> m ()
listBoxSetHeaderFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Maybe ListBoxUpdateHeaderFunc -> m ()
listBoxSetHeaderFunc a
box Maybe ListBoxUpdateHeaderFunc
updateHeader = 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
    FunPtr C_ListBoxUpdateHeaderFunc
maybeUpdateHeader <- case Maybe ListBoxUpdateHeaderFunc
updateHeader of
        Maybe ListBoxUpdateHeaderFunc
Nothing -> FunPtr C_ListBoxUpdateHeaderFunc
-> IO (FunPtr C_ListBoxUpdateHeaderFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_ListBoxUpdateHeaderFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just ListBoxUpdateHeaderFunc
jUpdateHeader -> do
            FunPtr C_ListBoxUpdateHeaderFunc
jUpdateHeader' <- C_ListBoxUpdateHeaderFunc -> IO (FunPtr C_ListBoxUpdateHeaderFunc)
Gtk.Callbacks.mk_ListBoxUpdateHeaderFunc (Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
-> ListBoxUpdateHeaderFunc_WithClosures
-> C_ListBoxUpdateHeaderFunc
Gtk.Callbacks.wrap_ListBoxUpdateHeaderFunc Maybe (Ptr (FunPtr C_ListBoxUpdateHeaderFunc))
forall a. Maybe a
Nothing (ListBoxUpdateHeaderFunc -> ListBoxUpdateHeaderFunc_WithClosures
Gtk.Callbacks.drop_closures_ListBoxUpdateHeaderFunc ListBoxUpdateHeaderFunc
jUpdateHeader))
            FunPtr C_ListBoxUpdateHeaderFunc
-> IO (FunPtr C_ListBoxUpdateHeaderFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_ListBoxUpdateHeaderFunc
jUpdateHeader'
    let userData :: Ptr ()
userData = FunPtr C_ListBoxUpdateHeaderFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ListBoxUpdateHeaderFunc
maybeUpdateHeader
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr ListBox
-> FunPtr C_ListBoxUpdateHeaderFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_list_box_set_header_func Ptr ListBox
box' FunPtr C_ListBoxUpdateHeaderFunc
maybeUpdateHeader Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetHeaderFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.ListBoxUpdateHeaderFunc) -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetHeaderFuncMethodInfo a signature where
    overloadedMethod = listBoxSetHeaderFunc

instance O.OverloadedMethodInfo ListBoxSetHeaderFuncMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetHeaderFunc",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetHeaderFunc"
        }


#endif

-- method ListBox::set_placeholder
-- method type : OrdinaryMethod
-- 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 = "placeholder"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_placeholder" gtk_list_box_set_placeholder :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.Widget.Widget ->                -- placeholder : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Sets the placeholder widget that is shown in the list when
-- it doesn\'t display any visible children.
listBoxSetPlaceholder ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (b)
    -- ^ /@placeholder@/: a t'GI.Gtk.Objects.Widget.Widget' or 'P.Nothing'
    -> m ()
listBoxSetPlaceholder :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsWidget b) =>
a -> Maybe b -> m ()
listBoxSetPlaceholder a
box Maybe b
placeholder = 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 Widget
maybePlaceholder <- case Maybe b
placeholder of
        Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
        Just b
jPlaceholder -> do
            Ptr Widget
jPlaceholder' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jPlaceholder
            Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jPlaceholder'
    Ptr ListBox -> Ptr Widget -> IO ()
gtk_list_box_set_placeholder Ptr ListBox
box' Ptr Widget
maybePlaceholder
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
placeholder b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetPlaceholderMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsListBox a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ListBoxSetPlaceholderMethodInfo a signature where
    overloadedMethod = listBoxSetPlaceholder

instance O.OverloadedMethodInfo ListBoxSetPlaceholderMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetPlaceholder",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetPlaceholder"
        }


#endif

-- method ListBox::set_selection_mode
-- method type : OrdinaryMethod
-- 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 = "mode"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "SelectionMode" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GtkSelectionMode"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_selection_mode" gtk_list_box_set_selection_mode :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    CUInt ->                                -- mode : TInterface (Name {namespace = "Gtk", name = "SelectionMode"})
    IO ()

-- | Sets how selection works in the listbox.
-- See t'GI.Gtk.Enums.SelectionMode' for details.
listBoxSetSelectionMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Gtk.Enums.SelectionMode
    -- ^ /@mode@/: The t'GI.Gtk.Enums.SelectionMode'
    -> m ()
listBoxSetSelectionMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> SelectionMode -> m ()
listBoxSetSelectionMode a
box SelectionMode
mode = 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
    let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SelectionMode -> Int) -> SelectionMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SelectionMode -> Int
forall a. Enum a => a -> Int
fromEnum) SelectionMode
mode
    Ptr ListBox -> CUInt -> IO ()
gtk_list_box_set_selection_mode Ptr ListBox
box' CUInt
mode'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetSelectionModeMethodInfo
instance (signature ~ (Gtk.Enums.SelectionMode -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetSelectionModeMethodInfo a signature where
    overloadedMethod = listBoxSetSelectionMode

instance O.OverloadedMethodInfo ListBoxSetSelectionModeMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetSelectionMode",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetSelectionMode"
        }


#endif

-- method ListBox::set_show_separators
-- method type : OrdinaryMethod
-- 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 = "show_separators"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to show separators"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_show_separators" gtk_list_box_set_show_separators :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    CInt ->                                 -- show_separators : TBasicType TBoolean
    IO ()

-- | Sets whether the list box should show separators
-- between rows.
listBoxSetShowSeparators ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Bool
    -- ^ /@showSeparators@/: 'P.True' to show separators
    -> m ()
listBoxSetShowSeparators :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Bool -> m ()
listBoxSetShowSeparators a
box Bool
showSeparators = 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
    let showSeparators' :: CInt
showSeparators' = (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
showSeparators
    Ptr ListBox -> CInt -> IO ()
gtk_list_box_set_show_separators Ptr ListBox
box' CInt
showSeparators'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetShowSeparatorsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetShowSeparatorsMethodInfo a signature where
    overloadedMethod = listBoxSetShowSeparators

instance O.OverloadedMethodInfo ListBoxSetShowSeparatorsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetShowSeparators",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetShowSeparators"
        }


#endif

-- method ListBox::set_sort_func
-- method type : OrdinaryMethod
-- 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 = "sort_func"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "ListBoxSortFunc" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sort function" , sinceVersion = Nothing }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user data passed to @sort_func"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "destroy"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "destroy notifier for @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_set_sort_func" gtk_list_box_set_sort_func :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    FunPtr Gtk.Callbacks.C_ListBoxSortFunc -> -- sort_func : TInterface (Name {namespace = "Gtk", name = "ListBoxSortFunc"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

-- | By setting a sort function on the /@box@/ one can dynamically reorder the rows
-- of the list, based on the contents of the rows.
-- 
-- The /@sortFunc@/ will be called for each row after the call, and will continue to
-- be called each time a row changes (via 'GI.Gtk.Objects.ListBoxRow.listBoxRowChanged') and when
-- 'GI.Gtk.Objects.ListBox.listBoxInvalidateSort' is called.
-- 
-- Note that using a sort function is incompatible with using a model
-- (see 'GI.Gtk.Objects.ListBox.listBoxBindModel').
listBoxSetSortFunc ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> Maybe (Gtk.Callbacks.ListBoxSortFunc)
    -- ^ /@sortFunc@/: the sort function
    -> m ()
listBoxSetSortFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> Maybe ListBoxSortFunc -> m ()
listBoxSetSortFunc a
box Maybe ListBoxSortFunc
sortFunc = 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
    FunPtr C_ListBoxSortFunc
maybeSortFunc <- case Maybe ListBoxSortFunc
sortFunc of
        Maybe ListBoxSortFunc
Nothing -> FunPtr C_ListBoxSortFunc -> IO (FunPtr C_ListBoxSortFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_ListBoxSortFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just ListBoxSortFunc
jSortFunc -> do
            FunPtr C_ListBoxSortFunc
jSortFunc' <- C_ListBoxSortFunc -> IO (FunPtr C_ListBoxSortFunc)
Gtk.Callbacks.mk_ListBoxSortFunc (Maybe (Ptr (FunPtr C_ListBoxSortFunc))
-> ListBoxSortFunc_WithClosures -> C_ListBoxSortFunc
Gtk.Callbacks.wrap_ListBoxSortFunc Maybe (Ptr (FunPtr C_ListBoxSortFunc))
forall a. Maybe a
Nothing (ListBoxSortFunc -> ListBoxSortFunc_WithClosures
Gtk.Callbacks.drop_closures_ListBoxSortFunc ListBoxSortFunc
jSortFunc))
            FunPtr C_ListBoxSortFunc -> IO (FunPtr C_ListBoxSortFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_ListBoxSortFunc
jSortFunc'
    let userData :: Ptr ()
userData = FunPtr C_ListBoxSortFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ListBoxSortFunc
maybeSortFunc
    let destroy :: FunPtr (Ptr a -> IO ())
destroy = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    Ptr ListBox
-> FunPtr C_ListBoxSortFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_list_box_set_sort_func Ptr ListBox
box' FunPtr C_ListBoxSortFunc
maybeSortFunc Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroy
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxSetSortFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.ListBoxSortFunc) -> m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxSetSortFuncMethodInfo a signature where
    overloadedMethod = listBoxSetSortFunc

instance O.OverloadedMethodInfo ListBoxSetSortFuncMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxSetSortFunc",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxSetSortFunc"
        }


#endif

-- method ListBox::unselect_all
-- method type : OrdinaryMethod
-- 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
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_unselect_all" gtk_list_box_unselect_all :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    IO ()

-- | Unselect all children of /@box@/, if the selection mode allows it.
listBoxUnselectAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> m ()
listBoxUnselectAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsListBox a) =>
a -> m ()
listBoxUnselectAll a
box = 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 ListBox -> IO ()
gtk_list_box_unselect_all Ptr ListBox
box'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
box
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ListBoxUnselectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsListBox a) => O.OverloadedMethod ListBoxUnselectAllMethodInfo a signature where
    overloadedMethod = listBoxUnselectAll

instance O.OverloadedMethodInfo ListBoxUnselectAllMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxUnselectAll",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxUnselectAll"
        }


#endif

-- method ListBox::unselect_row
-- method type : OrdinaryMethod
-- 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 "the row to unselected"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_list_box_unselect_row" gtk_list_box_unselect_row :: 
    Ptr ListBox ->                          -- box : TInterface (Name {namespace = "Gtk", name = "ListBox"})
    Ptr Gtk.ListBoxRow.ListBoxRow ->        -- row : TInterface (Name {namespace = "Gtk", name = "ListBoxRow"})
    IO ()

-- | Unselects a single row of /@box@/, if the selection mode allows it.
listBoxUnselectRow ::
    (B.CallStack.HasCallStack, MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) =>
    a
    -- ^ /@box@/: a t'GI.Gtk.Objects.ListBox.ListBox'
    -> b
    -- ^ /@row@/: the row to unselected
    -> m ()
listBoxUnselectRow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsListBox a, IsListBoxRow b) =>
a -> b -> m ()
listBoxUnselectRow a
box b
row = 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
    Ptr ListBox -> Ptr ListBoxRow -> IO ()
gtk_list_box_unselect_row Ptr ListBox
box' Ptr ListBoxRow
row'
    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 ()

#if defined(ENABLE_OVERLOADING)
data ListBoxUnselectRowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsListBox a, Gtk.ListBoxRow.IsListBoxRow b) => O.OverloadedMethod ListBoxUnselectRowMethodInfo a signature where
    overloadedMethod = listBoxUnselectRow

instance O.OverloadedMethodInfo ListBoxUnselectRowMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.ListBox.listBoxUnselectRow",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-ListBox.html#v:listBoxUnselectRow"
        }


#endif