{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

'GI.Gtk.Interfaces.RecentChooser.RecentChooser' is an interface that can be implemented by widgets
displaying the list of recently used files.  In GTK+, the main objects
that implement this interface are 'GI.Gtk.Objects.RecentChooserWidget.RecentChooserWidget',
'GI.Gtk.Objects.RecentChooserDialog.RecentChooserDialog' and 'GI.Gtk.Objects.RecentChooserMenu.RecentChooserMenu'.

Recently used files are supported since GTK+ 2.10.
-}

module GI.Gtk.Interfaces.RecentChooser
    ( 

-- * Exported types
    RecentChooser(..)                       ,
    noRecentChooser                         ,
    IsRecentChooser                         ,
    toRecentChooser                         ,


 -- * Methods
-- ** addFilter #method:addFilter#
    RecentChooserAddFilterMethodInfo        ,
    recentChooserAddFilter                  ,


-- ** getCurrentItem #method:getCurrentItem#
    RecentChooserGetCurrentItemMethodInfo   ,
    recentChooserGetCurrentItem             ,


-- ** getCurrentUri #method:getCurrentUri#
    RecentChooserGetCurrentUriMethodInfo    ,
    recentChooserGetCurrentUri              ,


-- ** getFilter #method:getFilter#
    RecentChooserGetFilterMethodInfo        ,
    recentChooserGetFilter                  ,


-- ** getItems #method:getItems#
    RecentChooserGetItemsMethodInfo         ,
    recentChooserGetItems                   ,


-- ** getLimit #method:getLimit#
    RecentChooserGetLimitMethodInfo         ,
    recentChooserGetLimit                   ,


-- ** getLocalOnly #method:getLocalOnly#
    RecentChooserGetLocalOnlyMethodInfo     ,
    recentChooserGetLocalOnly               ,


-- ** getSelectMultiple #method:getSelectMultiple#
    RecentChooserGetSelectMultipleMethodInfo,
    recentChooserGetSelectMultiple          ,


-- ** getShowIcons #method:getShowIcons#
    RecentChooserGetShowIconsMethodInfo     ,
    recentChooserGetShowIcons               ,


-- ** getShowNotFound #method:getShowNotFound#
    RecentChooserGetShowNotFoundMethodInfo  ,
    recentChooserGetShowNotFound            ,


-- ** getShowPrivate #method:getShowPrivate#
    RecentChooserGetShowPrivateMethodInfo   ,
    recentChooserGetShowPrivate             ,


-- ** getShowTips #method:getShowTips#
    RecentChooserGetShowTipsMethodInfo      ,
    recentChooserGetShowTips                ,


-- ** getSortType #method:getSortType#
    RecentChooserGetSortTypeMethodInfo      ,
    recentChooserGetSortType                ,


-- ** getUris #method:getUris#
    RecentChooserGetUrisMethodInfo          ,
    recentChooserGetUris                    ,


-- ** listFilters #method:listFilters#
    RecentChooserListFiltersMethodInfo      ,
    recentChooserListFilters                ,


-- ** removeFilter #method:removeFilter#
    RecentChooserRemoveFilterMethodInfo     ,
    recentChooserRemoveFilter               ,


-- ** selectAll #method:selectAll#
    RecentChooserSelectAllMethodInfo        ,
    recentChooserSelectAll                  ,


-- ** selectUri #method:selectUri#
    RecentChooserSelectUriMethodInfo        ,
    recentChooserSelectUri                  ,


-- ** setCurrentUri #method:setCurrentUri#
    RecentChooserSetCurrentUriMethodInfo    ,
    recentChooserSetCurrentUri              ,


-- ** setFilter #method:setFilter#
    RecentChooserSetFilterMethodInfo        ,
    recentChooserSetFilter                  ,


-- ** setLimit #method:setLimit#
    RecentChooserSetLimitMethodInfo         ,
    recentChooserSetLimit                   ,


-- ** setLocalOnly #method:setLocalOnly#
    RecentChooserSetLocalOnlyMethodInfo     ,
    recentChooserSetLocalOnly               ,


-- ** setSelectMultiple #method:setSelectMultiple#
    RecentChooserSetSelectMultipleMethodInfo,
    recentChooserSetSelectMultiple          ,


-- ** setShowIcons #method:setShowIcons#
    RecentChooserSetShowIconsMethodInfo     ,
    recentChooserSetShowIcons               ,


-- ** setShowNotFound #method:setShowNotFound#
    RecentChooserSetShowNotFoundMethodInfo  ,
    recentChooserSetShowNotFound            ,


-- ** setShowPrivate #method:setShowPrivate#
    RecentChooserSetShowPrivateMethodInfo   ,
    recentChooserSetShowPrivate             ,


-- ** setShowTips #method:setShowTips#
    RecentChooserSetShowTipsMethodInfo      ,
    recentChooserSetShowTips                ,


-- ** setSortFunc #method:setSortFunc#
    RecentChooserSetSortFuncMethodInfo      ,
    recentChooserSetSortFunc                ,


-- ** setSortType #method:setSortType#
    RecentChooserSetSortTypeMethodInfo      ,
    recentChooserSetSortType                ,


-- ** unselectAll #method:unselectAll#
    RecentChooserUnselectAllMethodInfo      ,
    recentChooserUnselectAll                ,


-- ** unselectUri #method:unselectUri#
    RecentChooserUnselectUriMethodInfo      ,
    recentChooserUnselectUri                ,




 -- * Properties
-- ** filter #attr:filter#
    RecentChooserFilterPropertyInfo         ,
    clearRecentChooserFilter                ,
    constructRecentChooserFilter            ,
    getRecentChooserFilter                  ,
    recentChooserFilter                     ,
    setRecentChooserFilter                  ,


-- ** limit #attr:limit#
    RecentChooserLimitPropertyInfo          ,
    constructRecentChooserLimit             ,
    getRecentChooserLimit                   ,
    recentChooserLimit                      ,
    setRecentChooserLimit                   ,


-- ** localOnly #attr:localOnly#
    RecentChooserLocalOnlyPropertyInfo      ,
    constructRecentChooserLocalOnly         ,
    getRecentChooserLocalOnly               ,
    recentChooserLocalOnly                  ,
    setRecentChooserLocalOnly               ,


-- ** recentManager #attr:recentManager#
    RecentChooserRecentManagerPropertyInfo  ,
    constructRecentChooserRecentManager     ,
    recentChooserRecentManager              ,


-- ** selectMultiple #attr:selectMultiple#
    RecentChooserSelectMultiplePropertyInfo ,
    constructRecentChooserSelectMultiple    ,
    getRecentChooserSelectMultiple          ,
    recentChooserSelectMultiple             ,
    setRecentChooserSelectMultiple          ,


-- ** showIcons #attr:showIcons#
    RecentChooserShowIconsPropertyInfo      ,
    constructRecentChooserShowIcons         ,
    getRecentChooserShowIcons               ,
    recentChooserShowIcons                  ,
    setRecentChooserShowIcons               ,


-- ** showNotFound #attr:showNotFound#
    RecentChooserShowNotFoundPropertyInfo   ,
    constructRecentChooserShowNotFound      ,
    getRecentChooserShowNotFound            ,
    recentChooserShowNotFound               ,
    setRecentChooserShowNotFound            ,


-- ** showPrivate #attr:showPrivate#
    RecentChooserShowPrivatePropertyInfo    ,
    constructRecentChooserShowPrivate       ,
    getRecentChooserShowPrivate             ,
    recentChooserShowPrivate                ,
    setRecentChooserShowPrivate             ,


-- ** showTips #attr:showTips#
    RecentChooserShowTipsPropertyInfo       ,
    constructRecentChooserShowTips          ,
    getRecentChooserShowTips                ,
    recentChooserShowTips                   ,
    setRecentChooserShowTips                ,


-- ** sortType #attr:sortType#
    RecentChooserSortTypePropertyInfo       ,
    constructRecentChooserSortType          ,
    getRecentChooserSortType                ,
    recentChooserSortType                   ,
    setRecentChooserSortType                ,




 -- * Signals
-- ** itemActivated #signal:itemActivated#
    C_RecentChooserItemActivatedCallback    ,
    RecentChooserItemActivatedCallback      ,
    RecentChooserItemActivatedSignalInfo    ,
    afterRecentChooserItemActivated         ,
    genClosure_RecentChooserItemActivated   ,
    mk_RecentChooserItemActivatedCallback   ,
    noRecentChooserItemActivatedCallback    ,
    onRecentChooserItemActivated            ,
    wrap_RecentChooserItemActivatedCallback ,


-- ** selectionChanged #signal:selectionChanged#
    C_RecentChooserSelectionChangedCallback ,
    RecentChooserSelectionChangedCallback   ,
    RecentChooserSelectionChangedSignalInfo ,
    afterRecentChooserSelectionChanged      ,
    genClosure_RecentChooserSelectionChanged,
    mk_RecentChooserSelectionChangedCallback,
    noRecentChooserSelectionChangedCallback ,
    onRecentChooserSelectionChanged         ,
    wrap_RecentChooserSelectionChangedCallback,




    ) where

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

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

import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.RecentFilter as Gtk.RecentFilter
import {-# SOURCE #-} qualified GI.Gtk.Objects.RecentManager as Gtk.RecentManager
import {-# SOURCE #-} qualified GI.Gtk.Structs.RecentInfo as Gtk.RecentInfo

-- interface RecentChooser 
newtype RecentChooser = RecentChooser (ManagedPtr RecentChooser)
noRecentChooser :: Maybe RecentChooser
noRecentChooser = Nothing

type family ResolveRecentChooserMethod (t :: Symbol) (o :: *) :: * where
    ResolveRecentChooserMethod "addFilter" o = RecentChooserAddFilterMethodInfo
    ResolveRecentChooserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRecentChooserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRecentChooserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRecentChooserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRecentChooserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRecentChooserMethod "listFilters" o = RecentChooserListFiltersMethodInfo
    ResolveRecentChooserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRecentChooserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRecentChooserMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRecentChooserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRecentChooserMethod "removeFilter" o = RecentChooserRemoveFilterMethodInfo
    ResolveRecentChooserMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveRecentChooserMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveRecentChooserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRecentChooserMethod "selectAll" o = RecentChooserSelectAllMethodInfo
    ResolveRecentChooserMethod "selectUri" o = RecentChooserSelectUriMethodInfo
    ResolveRecentChooserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRecentChooserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRecentChooserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRecentChooserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRecentChooserMethod "unselectAll" o = RecentChooserUnselectAllMethodInfo
    ResolveRecentChooserMethod "unselectUri" o = RecentChooserUnselectUriMethodInfo
    ResolveRecentChooserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRecentChooserMethod "getCurrentItem" o = RecentChooserGetCurrentItemMethodInfo
    ResolveRecentChooserMethod "getCurrentUri" o = RecentChooserGetCurrentUriMethodInfo
    ResolveRecentChooserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRecentChooserMethod "getFilter" o = RecentChooserGetFilterMethodInfo
    ResolveRecentChooserMethod "getItems" o = RecentChooserGetItemsMethodInfo
    ResolveRecentChooserMethod "getLimit" o = RecentChooserGetLimitMethodInfo
    ResolveRecentChooserMethod "getLocalOnly" o = RecentChooserGetLocalOnlyMethodInfo
    ResolveRecentChooserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRecentChooserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRecentChooserMethod "getSelectMultiple" o = RecentChooserGetSelectMultipleMethodInfo
    ResolveRecentChooserMethod "getShowIcons" o = RecentChooserGetShowIconsMethodInfo
    ResolveRecentChooserMethod "getShowNotFound" o = RecentChooserGetShowNotFoundMethodInfo
    ResolveRecentChooserMethod "getShowPrivate" o = RecentChooserGetShowPrivateMethodInfo
    ResolveRecentChooserMethod "getShowTips" o = RecentChooserGetShowTipsMethodInfo
    ResolveRecentChooserMethod "getSortType" o = RecentChooserGetSortTypeMethodInfo
    ResolveRecentChooserMethod "getUris" o = RecentChooserGetUrisMethodInfo
    ResolveRecentChooserMethod "setCurrentUri" o = RecentChooserSetCurrentUriMethodInfo
    ResolveRecentChooserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRecentChooserMethod "setFilter" o = RecentChooserSetFilterMethodInfo
    ResolveRecentChooserMethod "setLimit" o = RecentChooserSetLimitMethodInfo
    ResolveRecentChooserMethod "setLocalOnly" o = RecentChooserSetLocalOnlyMethodInfo
    ResolveRecentChooserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRecentChooserMethod "setSelectMultiple" o = RecentChooserSetSelectMultipleMethodInfo
    ResolveRecentChooserMethod "setShowIcons" o = RecentChooserSetShowIconsMethodInfo
    ResolveRecentChooserMethod "setShowNotFound" o = RecentChooserSetShowNotFoundMethodInfo
    ResolveRecentChooserMethod "setShowPrivate" o = RecentChooserSetShowPrivateMethodInfo
    ResolveRecentChooserMethod "setShowTips" o = RecentChooserSetShowTipsMethodInfo
    ResolveRecentChooserMethod "setSortFunc" o = RecentChooserSetSortFuncMethodInfo
    ResolveRecentChooserMethod "setSortType" o = RecentChooserSetSortTypeMethodInfo
    ResolveRecentChooserMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRecentChooserMethod t RecentChooser, O.MethodInfo info RecentChooser p) => O.IsLabelProxy t (RecentChooser -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveRecentChooserMethod t RecentChooser, O.MethodInfo info RecentChooser p) => O.IsLabel t (RecentChooser -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- signal RecentChooser::item-activated
type RecentChooserItemActivatedCallback =
    IO ()

noRecentChooserItemActivatedCallback :: Maybe RecentChooserItemActivatedCallback
noRecentChooserItemActivatedCallback = Nothing

type C_RecentChooserItemActivatedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_RecentChooserItemActivatedCallback :: C_RecentChooserItemActivatedCallback -> IO (FunPtr C_RecentChooserItemActivatedCallback)

genClosure_RecentChooserItemActivated :: RecentChooserItemActivatedCallback -> IO Closure
genClosure_RecentChooserItemActivated cb = do
    let cb' = wrap_RecentChooserItemActivatedCallback cb
    mk_RecentChooserItemActivatedCallback cb' >>= newCClosure


wrap_RecentChooserItemActivatedCallback ::
    RecentChooserItemActivatedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_RecentChooserItemActivatedCallback _cb _ _ = do
    _cb 


onRecentChooserItemActivated :: (GObject a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId
onRecentChooserItemActivated obj cb = liftIO $ connectRecentChooserItemActivated obj cb SignalConnectBefore
afterRecentChooserItemActivated :: (GObject a, MonadIO m) => a -> RecentChooserItemActivatedCallback -> m SignalHandlerId
afterRecentChooserItemActivated obj cb = connectRecentChooserItemActivated obj cb SignalConnectAfter

connectRecentChooserItemActivated :: (GObject a, MonadIO m) =>
                                     a -> RecentChooserItemActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectRecentChooserItemActivated obj cb after = liftIO $ do
    let cb' = wrap_RecentChooserItemActivatedCallback cb
    cb'' <- mk_RecentChooserItemActivatedCallback cb'
    connectSignalFunPtr obj "item-activated" cb'' after

-- signal RecentChooser::selection-changed
type RecentChooserSelectionChangedCallback =
    IO ()

noRecentChooserSelectionChangedCallback :: Maybe RecentChooserSelectionChangedCallback
noRecentChooserSelectionChangedCallback = Nothing

type C_RecentChooserSelectionChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_RecentChooserSelectionChangedCallback :: C_RecentChooserSelectionChangedCallback -> IO (FunPtr C_RecentChooserSelectionChangedCallback)

genClosure_RecentChooserSelectionChanged :: RecentChooserSelectionChangedCallback -> IO Closure
genClosure_RecentChooserSelectionChanged cb = do
    let cb' = wrap_RecentChooserSelectionChangedCallback cb
    mk_RecentChooserSelectionChangedCallback cb' >>= newCClosure


wrap_RecentChooserSelectionChangedCallback ::
    RecentChooserSelectionChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_RecentChooserSelectionChangedCallback _cb _ _ = do
    _cb 


onRecentChooserSelectionChanged :: (GObject a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId
onRecentChooserSelectionChanged obj cb = liftIO $ connectRecentChooserSelectionChanged obj cb SignalConnectBefore
afterRecentChooserSelectionChanged :: (GObject a, MonadIO m) => a -> RecentChooserSelectionChangedCallback -> m SignalHandlerId
afterRecentChooserSelectionChanged obj cb = connectRecentChooserSelectionChanged obj cb SignalConnectAfter

connectRecentChooserSelectionChanged :: (GObject a, MonadIO m) =>
                                        a -> RecentChooserSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectRecentChooserSelectionChanged obj cb after = liftIO $ do
    let cb' = wrap_RecentChooserSelectionChangedCallback cb
    cb'' <- mk_RecentChooserSelectionChangedCallback cb'
    connectSignalFunPtr obj "selection-changed" cb'' after

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

getRecentChooserFilter :: (MonadIO m, IsRecentChooser o) => o -> m Gtk.RecentFilter.RecentFilter
getRecentChooserFilter obj = liftIO $ checkUnexpectedNothing "getRecentChooserFilter" $ getObjectPropertyObject obj "filter" Gtk.RecentFilter.RecentFilter

setRecentChooserFilter :: (MonadIO m, IsRecentChooser o, Gtk.RecentFilter.IsRecentFilter a) => o -> a -> m ()
setRecentChooserFilter obj val = liftIO $ setObjectPropertyObject obj "filter" (Just val)

constructRecentChooserFilter :: (IsRecentChooser o, Gtk.RecentFilter.IsRecentFilter a) => a -> IO (GValueConstruct o)
constructRecentChooserFilter val = constructObjectPropertyObject "filter" (Just val)

clearRecentChooserFilter :: (MonadIO m, IsRecentChooser o) => o -> m ()
clearRecentChooserFilter obj = liftIO $ setObjectPropertyObject obj "filter" (Nothing :: Maybe Gtk.RecentFilter.RecentFilter)

data RecentChooserFilterPropertyInfo
instance AttrInfo RecentChooserFilterPropertyInfo where
    type AttrAllowedOps RecentChooserFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint RecentChooserFilterPropertyInfo = Gtk.RecentFilter.IsRecentFilter
    type AttrBaseTypeConstraint RecentChooserFilterPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserFilterPropertyInfo = Gtk.RecentFilter.RecentFilter
    type AttrLabel RecentChooserFilterPropertyInfo = "filter"
    type AttrOrigin RecentChooserFilterPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserFilter
    attrSet _ = setRecentChooserFilter
    attrConstruct _ = constructRecentChooserFilter
    attrClear _ = clearRecentChooserFilter

-- VVV Prop "limit"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getRecentChooserLimit :: (MonadIO m, IsRecentChooser o) => o -> m Int32
getRecentChooserLimit obj = liftIO $ getObjectPropertyInt32 obj "limit"

setRecentChooserLimit :: (MonadIO m, IsRecentChooser o) => o -> Int32 -> m ()
setRecentChooserLimit obj val = liftIO $ setObjectPropertyInt32 obj "limit" val

constructRecentChooserLimit :: (IsRecentChooser o) => Int32 -> IO (GValueConstruct o)
constructRecentChooserLimit val = constructObjectPropertyInt32 "limit" val

data RecentChooserLimitPropertyInfo
instance AttrInfo RecentChooserLimitPropertyInfo where
    type AttrAllowedOps RecentChooserLimitPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserLimitPropertyInfo = (~) Int32
    type AttrBaseTypeConstraint RecentChooserLimitPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserLimitPropertyInfo = Int32
    type AttrLabel RecentChooserLimitPropertyInfo = "limit"
    type AttrOrigin RecentChooserLimitPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserLimit
    attrSet _ = setRecentChooserLimit
    attrConstruct _ = constructRecentChooserLimit
    attrClear _ = undefined

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

getRecentChooserLocalOnly :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserLocalOnly obj = liftIO $ getObjectPropertyBool obj "local-only"

setRecentChooserLocalOnly :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserLocalOnly obj val = liftIO $ setObjectPropertyBool obj "local-only" val

constructRecentChooserLocalOnly :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserLocalOnly val = constructObjectPropertyBool "local-only" val

data RecentChooserLocalOnlyPropertyInfo
instance AttrInfo RecentChooserLocalOnlyPropertyInfo where
    type AttrAllowedOps RecentChooserLocalOnlyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserLocalOnlyPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserLocalOnlyPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserLocalOnlyPropertyInfo = Bool
    type AttrLabel RecentChooserLocalOnlyPropertyInfo = "local-only"
    type AttrOrigin RecentChooserLocalOnlyPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserLocalOnly
    attrSet _ = setRecentChooserLocalOnly
    attrConstruct _ = constructRecentChooserLocalOnly
    attrClear _ = undefined

-- VVV Prop "recent-manager"
   -- Type: TInterface (Name {namespace = "Gtk", name = "RecentManager"})
   -- Flags: [PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

constructRecentChooserRecentManager :: (IsRecentChooser o, Gtk.RecentManager.IsRecentManager a) => a -> IO (GValueConstruct o)
constructRecentChooserRecentManager val = constructObjectPropertyObject "recent-manager" (Just val)

data RecentChooserRecentManagerPropertyInfo
instance AttrInfo RecentChooserRecentManagerPropertyInfo where
    type AttrAllowedOps RecentChooserRecentManagerPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
    type AttrSetTypeConstraint RecentChooserRecentManagerPropertyInfo = Gtk.RecentManager.IsRecentManager
    type AttrBaseTypeConstraint RecentChooserRecentManagerPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserRecentManagerPropertyInfo = ()
    type AttrLabel RecentChooserRecentManagerPropertyInfo = "recent-manager"
    type AttrOrigin RecentChooserRecentManagerPropertyInfo = RecentChooser
    attrGet _ = undefined
    attrSet _ = undefined
    attrConstruct _ = constructRecentChooserRecentManager
    attrClear _ = undefined

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

getRecentChooserSelectMultiple :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserSelectMultiple obj = liftIO $ getObjectPropertyBool obj "select-multiple"

setRecentChooserSelectMultiple :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserSelectMultiple obj val = liftIO $ setObjectPropertyBool obj "select-multiple" val

constructRecentChooserSelectMultiple :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserSelectMultiple val = constructObjectPropertyBool "select-multiple" val

data RecentChooserSelectMultiplePropertyInfo
instance AttrInfo RecentChooserSelectMultiplePropertyInfo where
    type AttrAllowedOps RecentChooserSelectMultiplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserSelectMultiplePropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserSelectMultiplePropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserSelectMultiplePropertyInfo = Bool
    type AttrLabel RecentChooserSelectMultiplePropertyInfo = "select-multiple"
    type AttrOrigin RecentChooserSelectMultiplePropertyInfo = RecentChooser
    attrGet _ = getRecentChooserSelectMultiple
    attrSet _ = setRecentChooserSelectMultiple
    attrConstruct _ = constructRecentChooserSelectMultiple
    attrClear _ = undefined

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

getRecentChooserShowIcons :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserShowIcons obj = liftIO $ getObjectPropertyBool obj "show-icons"

setRecentChooserShowIcons :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserShowIcons obj val = liftIO $ setObjectPropertyBool obj "show-icons" val

constructRecentChooserShowIcons :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserShowIcons val = constructObjectPropertyBool "show-icons" val

data RecentChooserShowIconsPropertyInfo
instance AttrInfo RecentChooserShowIconsPropertyInfo where
    type AttrAllowedOps RecentChooserShowIconsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserShowIconsPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserShowIconsPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserShowIconsPropertyInfo = Bool
    type AttrLabel RecentChooserShowIconsPropertyInfo = "show-icons"
    type AttrOrigin RecentChooserShowIconsPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserShowIcons
    attrSet _ = setRecentChooserShowIcons
    attrConstruct _ = constructRecentChooserShowIcons
    attrClear _ = undefined

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

getRecentChooserShowNotFound :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserShowNotFound obj = liftIO $ getObjectPropertyBool obj "show-not-found"

setRecentChooserShowNotFound :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserShowNotFound obj val = liftIO $ setObjectPropertyBool obj "show-not-found" val

constructRecentChooserShowNotFound :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserShowNotFound val = constructObjectPropertyBool "show-not-found" val

data RecentChooserShowNotFoundPropertyInfo
instance AttrInfo RecentChooserShowNotFoundPropertyInfo where
    type AttrAllowedOps RecentChooserShowNotFoundPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserShowNotFoundPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserShowNotFoundPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserShowNotFoundPropertyInfo = Bool
    type AttrLabel RecentChooserShowNotFoundPropertyInfo = "show-not-found"
    type AttrOrigin RecentChooserShowNotFoundPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserShowNotFound
    attrSet _ = setRecentChooserShowNotFound
    attrConstruct _ = constructRecentChooserShowNotFound
    attrClear _ = undefined

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

getRecentChooserShowPrivate :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserShowPrivate obj = liftIO $ getObjectPropertyBool obj "show-private"

setRecentChooserShowPrivate :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserShowPrivate obj val = liftIO $ setObjectPropertyBool obj "show-private" val

constructRecentChooserShowPrivate :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserShowPrivate val = constructObjectPropertyBool "show-private" val

data RecentChooserShowPrivatePropertyInfo
instance AttrInfo RecentChooserShowPrivatePropertyInfo where
    type AttrAllowedOps RecentChooserShowPrivatePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserShowPrivatePropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserShowPrivatePropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserShowPrivatePropertyInfo = Bool
    type AttrLabel RecentChooserShowPrivatePropertyInfo = "show-private"
    type AttrOrigin RecentChooserShowPrivatePropertyInfo = RecentChooser
    attrGet _ = getRecentChooserShowPrivate
    attrSet _ = setRecentChooserShowPrivate
    attrConstruct _ = constructRecentChooserShowPrivate
    attrClear _ = undefined

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

getRecentChooserShowTips :: (MonadIO m, IsRecentChooser o) => o -> m Bool
getRecentChooserShowTips obj = liftIO $ getObjectPropertyBool obj "show-tips"

setRecentChooserShowTips :: (MonadIO m, IsRecentChooser o) => o -> Bool -> m ()
setRecentChooserShowTips obj val = liftIO $ setObjectPropertyBool obj "show-tips" val

constructRecentChooserShowTips :: (IsRecentChooser o) => Bool -> IO (GValueConstruct o)
constructRecentChooserShowTips val = constructObjectPropertyBool "show-tips" val

data RecentChooserShowTipsPropertyInfo
instance AttrInfo RecentChooserShowTipsPropertyInfo where
    type AttrAllowedOps RecentChooserShowTipsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserShowTipsPropertyInfo = (~) Bool
    type AttrBaseTypeConstraint RecentChooserShowTipsPropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserShowTipsPropertyInfo = Bool
    type AttrLabel RecentChooserShowTipsPropertyInfo = "show-tips"
    type AttrOrigin RecentChooserShowTipsPropertyInfo = RecentChooser
    attrGet _ = getRecentChooserShowTips
    attrSet _ = setRecentChooserShowTips
    attrConstruct _ = constructRecentChooserShowTips
    attrClear _ = undefined

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

getRecentChooserSortType :: (MonadIO m, IsRecentChooser o) => o -> m Gtk.Enums.RecentSortType
getRecentChooserSortType obj = liftIO $ getObjectPropertyEnum obj "sort-type"

setRecentChooserSortType :: (MonadIO m, IsRecentChooser o) => o -> Gtk.Enums.RecentSortType -> m ()
setRecentChooserSortType obj val = liftIO $ setObjectPropertyEnum obj "sort-type" val

constructRecentChooserSortType :: (IsRecentChooser o) => Gtk.Enums.RecentSortType -> IO (GValueConstruct o)
constructRecentChooserSortType val = constructObjectPropertyEnum "sort-type" val

data RecentChooserSortTypePropertyInfo
instance AttrInfo RecentChooserSortTypePropertyInfo where
    type AttrAllowedOps RecentChooserSortTypePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint RecentChooserSortTypePropertyInfo = (~) Gtk.Enums.RecentSortType
    type AttrBaseTypeConstraint RecentChooserSortTypePropertyInfo = IsRecentChooser
    type AttrGetType RecentChooserSortTypePropertyInfo = Gtk.Enums.RecentSortType
    type AttrLabel RecentChooserSortTypePropertyInfo = "sort-type"
    type AttrOrigin RecentChooserSortTypePropertyInfo = RecentChooser
    attrGet _ = getRecentChooserSortType
    attrSet _ = setRecentChooserSortType
    attrConstruct _ = constructRecentChooserSortType
    attrClear _ = undefined

instance O.HasAttributeList RecentChooser
type instance O.AttributeList RecentChooser = RecentChooserAttributeList
type RecentChooserAttributeList = ('[ '("filter", RecentChooserFilterPropertyInfo), '("limit", RecentChooserLimitPropertyInfo), '("localOnly", RecentChooserLocalOnlyPropertyInfo), '("recentManager", RecentChooserRecentManagerPropertyInfo), '("selectMultiple", RecentChooserSelectMultiplePropertyInfo), '("showIcons", RecentChooserShowIconsPropertyInfo), '("showNotFound", RecentChooserShowNotFoundPropertyInfo), '("showPrivate", RecentChooserShowPrivatePropertyInfo), '("showTips", RecentChooserShowTipsPropertyInfo), '("sortType", RecentChooserSortTypePropertyInfo)] :: [(Symbol, *)])

recentChooserFilter :: AttrLabelProxy "filter"
recentChooserFilter = AttrLabelProxy

recentChooserLimit :: AttrLabelProxy "limit"
recentChooserLimit = AttrLabelProxy

recentChooserLocalOnly :: AttrLabelProxy "localOnly"
recentChooserLocalOnly = AttrLabelProxy

recentChooserRecentManager :: AttrLabelProxy "recentManager"
recentChooserRecentManager = AttrLabelProxy

recentChooserSelectMultiple :: AttrLabelProxy "selectMultiple"
recentChooserSelectMultiple = AttrLabelProxy

recentChooserShowIcons :: AttrLabelProxy "showIcons"
recentChooserShowIcons = AttrLabelProxy

recentChooserShowNotFound :: AttrLabelProxy "showNotFound"
recentChooserShowNotFound = AttrLabelProxy

recentChooserShowPrivate :: AttrLabelProxy "showPrivate"
recentChooserShowPrivate = AttrLabelProxy

recentChooserShowTips :: AttrLabelProxy "showTips"
recentChooserShowTips = AttrLabelProxy

recentChooserSortType :: AttrLabelProxy "sortType"
recentChooserSortType = AttrLabelProxy

data RecentChooserItemActivatedSignalInfo
instance SignalInfo RecentChooserItemActivatedSignalInfo where
    type HaskellCallbackType RecentChooserItemActivatedSignalInfo = RecentChooserItemActivatedCallback
    connectSignal _ = connectRecentChooserItemActivated

data RecentChooserSelectionChangedSignalInfo
instance SignalInfo RecentChooserSelectionChangedSignalInfo where
    type HaskellCallbackType RecentChooserSelectionChangedSignalInfo = RecentChooserSelectionChangedCallback
    connectSignal _ = connectRecentChooserSelectionChanged

type instance O.SignalList RecentChooser = RecentChooserSignalList
type RecentChooserSignalList = ('[ '("itemActivated", RecentChooserItemActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("selectionChanged", RecentChooserSelectionChangedSignalInfo)] :: [(Symbol, *)])

foreign import ccall "gtk_recent_chooser_get_type"
    c_gtk_recent_chooser_get_type :: IO GType

instance GObject RecentChooser where
    gobjectType _ = c_gtk_recent_chooser_get_type
    

class GObject o => IsRecentChooser o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError RecentChooser a) =>
    IsRecentChooser a
#endif
instance IsRecentChooser RecentChooser
instance GObject.Object.IsObject RecentChooser

toRecentChooser :: IsRecentChooser o => o -> IO RecentChooser
toRecentChooser = unsafeCastTo RecentChooser

-- method RecentChooser::add_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "RecentFilter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_add_filter" gtk_recent_chooser_add_filter :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    Ptr Gtk.RecentFilter.RecentFilter ->    -- filter : TInterface (Name {namespace = "Gtk", name = "RecentFilter"})
    IO ()

{- |
Adds /@filter@/ to the list of 'GI.Gtk.Objects.RecentFilter.RecentFilter' objects held by /@chooser@/.

If no previous filter objects were defined, this function will call
'GI.Gtk.Interfaces.RecentChooser.recentChooserSetFilter'.

@since 2.10
-}
recentChooserAddFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> b
    {- ^ /@filter@/: a 'GI.Gtk.Objects.RecentFilter.RecentFilter' -}
    -> m ()
recentChooserAddFilter chooser filter = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    filter' <- unsafeManagedPtrCastPtr filter
    gtk_recent_chooser_add_filter chooser' filter'
    touchManagedPtr chooser
    touchManagedPtr filter
    return ()

data RecentChooserAddFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) => O.MethodInfo RecentChooserAddFilterMethodInfo a signature where
    overloadedMethod _ = recentChooserAddFilter

-- method RecentChooser::get_current_item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "RecentInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_current_item" gtk_recent_chooser_get_current_item :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO (Ptr Gtk.RecentInfo.RecentInfo)

{- |
Gets the 'GI.Gtk.Structs.RecentInfo.RecentInfo' currently selected by /@chooser@/.

@since 2.10
-}
recentChooserGetCurrentItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Gtk.RecentInfo.RecentInfo
    {- ^ __Returns:__ a 'GI.Gtk.Structs.RecentInfo.RecentInfo'.  Use 'GI.Gtk.Structs.RecentInfo.recentInfoUnref' when
  when you have finished using it. -}
recentChooserGetCurrentItem chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_current_item chooser'
    checkUnexpectedReturnNULL "recentChooserGetCurrentItem" result
    result' <- (wrapBoxed Gtk.RecentInfo.RecentInfo) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetCurrentItemMethodInfo
instance (signature ~ (m Gtk.RecentInfo.RecentInfo), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetCurrentItemMethodInfo a signature where
    overloadedMethod _ = recentChooserGetCurrentItem

-- method RecentChooser::get_current_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_current_uri" gtk_recent_chooser_get_current_uri :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CString

{- |
Gets the URI currently selected by /@chooser@/.

@since 2.10
-}
recentChooserGetCurrentUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m T.Text
    {- ^ __Returns:__ a newly allocated string holding a URI. -}
recentChooserGetCurrentUri chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_current_uri chooser'
    checkUnexpectedReturnNULL "recentChooserGetCurrentUri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr chooser
    return result'

data RecentChooserGetCurrentUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetCurrentUriMethodInfo a signature where
    overloadedMethod _ = recentChooserGetCurrentUri

-- method RecentChooser::get_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "RecentFilter"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_filter" gtk_recent_chooser_get_filter :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO (Ptr Gtk.RecentFilter.RecentFilter)

{- |
Gets the 'GI.Gtk.Objects.RecentFilter.RecentFilter' object currently used by /@chooser@/ to affect
the display of the recently used resources.

@since 2.10
-}
recentChooserGetFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Gtk.RecentFilter.RecentFilter
    {- ^ __Returns:__ a 'GI.Gtk.Objects.RecentFilter.RecentFilter' object. -}
recentChooserGetFilter chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_filter chooser'
    checkUnexpectedReturnNULL "recentChooserGetFilter" result
    result' <- (newObject Gtk.RecentFilter.RecentFilter) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetFilterMethodInfo
instance (signature ~ (m Gtk.RecentFilter.RecentFilter), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetFilterMethodInfo a signature where
    overloadedMethod _ = recentChooserGetFilter

-- method RecentChooser::get_items
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TGList (TInterface (Name {namespace = "Gtk", name = "RecentInfo"})))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_items" gtk_recent_chooser_get_items :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO (Ptr (GList (Ptr Gtk.RecentInfo.RecentInfo)))

{- |
Gets the list of recently used resources in form of 'GI.Gtk.Structs.RecentInfo.RecentInfo' objects.

The return value of this function is affected by the “sort-type” and
“limit” properties of /@chooser@/.

@since 2.10
-}
recentChooserGetItems ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m [Gtk.RecentInfo.RecentInfo]
    {- ^ __Returns:__ A newly allocated
  list of 'GI.Gtk.Structs.RecentInfo.RecentInfo' objects.  You should
  use 'GI.Gtk.Structs.RecentInfo.recentInfoUnref' on every item of the list, and then free
  the list itself using @/g_list_free()/@. -}
recentChooserGetItems chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_items chooser'
    result' <- unpackGList result
    result'' <- mapM (wrapBoxed Gtk.RecentInfo.RecentInfo) result'
    g_list_free result
    touchManagedPtr chooser
    return result''

data RecentChooserGetItemsMethodInfo
instance (signature ~ (m [Gtk.RecentInfo.RecentInfo]), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetItemsMethodInfo a signature where
    overloadedMethod _ = recentChooserGetItems

-- method RecentChooser::get_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_limit" gtk_recent_chooser_get_limit :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO Int32

{- |
Gets the number of items returned by 'GI.Gtk.Interfaces.RecentChooser.recentChooserGetItems'
and 'GI.Gtk.Interfaces.RecentChooser.recentChooserGetUris'.

@since 2.10
-}
recentChooserGetLimit ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Int32
    {- ^ __Returns:__ A positive integer, or -1 meaning that all items are
  returned. -}
recentChooserGetLimit chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_limit chooser'
    touchManagedPtr chooser
    return result

data RecentChooserGetLimitMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetLimitMethodInfo a signature where
    overloadedMethod _ = recentChooserGetLimit

-- method RecentChooser::get_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_local_only" gtk_recent_chooser_get_local_only :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Gets whether only local resources should be shown in the recently used
resources selector.  See 'GI.Gtk.Interfaces.RecentChooser.recentChooserSetLocalOnly'

@since 2.10
-}
recentChooserGetLocalOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if only local resources should be shown. -}
recentChooserGetLocalOnly chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_local_only chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetLocalOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetLocalOnlyMethodInfo a signature where
    overloadedMethod _ = recentChooserGetLocalOnly

-- method RecentChooser::get_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_select_multiple" gtk_recent_chooser_get_select_multiple :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Gets whether /@chooser@/ can select multiple items.

@since 2.10
-}
recentChooserGetSelectMultiple ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@chooser@/ can select more than one item. -}
recentChooserGetSelectMultiple chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_select_multiple chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetSelectMultipleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetSelectMultipleMethodInfo a signature where
    overloadedMethod _ = recentChooserGetSelectMultiple

-- method RecentChooser::get_show_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_show_icons" gtk_recent_chooser_get_show_icons :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Retrieves whether /@chooser@/ should show an icon near the resource.

@since 2.10
-}
recentChooserGetShowIcons ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the icons should be displayed, 'False' otherwise. -}
recentChooserGetShowIcons chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_show_icons chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetShowIconsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetShowIconsMethodInfo a signature where
    overloadedMethod _ = recentChooserGetShowIcons

-- method RecentChooser::get_show_not_found
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_show_not_found" gtk_recent_chooser_get_show_not_found :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Retrieves whether /@chooser@/ should show the recently used resources that
were not found.

@since 2.10
-}
recentChooserGetShowNotFound ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the resources not found should be displayed, and
  'False' otheriwse. -}
recentChooserGetShowNotFound chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_show_not_found chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetShowNotFoundMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetShowNotFoundMethodInfo a signature where
    overloadedMethod _ = recentChooserGetShowNotFound

-- method RecentChooser::get_show_private
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_show_private" gtk_recent_chooser_get_show_private :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Returns whether /@chooser@/ should display recently used resources
registered as private.

@since 2.10
-}
recentChooserGetShowPrivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the recent chooser should show private items,
  'False' otherwise. -}
recentChooserGetShowPrivate chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_show_private chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetShowPrivateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetShowPrivateMethodInfo a signature where
    overloadedMethod _ = recentChooserGetShowPrivate

-- method RecentChooser::get_show_tips
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", 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_recent_chooser_get_show_tips" gtk_recent_chooser_get_show_tips :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CInt

{- |
Gets whether /@chooser@/ should display tooltips containing the full path
of a recently user resource.

@since 2.10
-}
recentChooserGetShowTips ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if the recent chooser should show tooltips,
  'False' otherwise. -}
recentChooserGetShowTips chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_show_tips chooser'
    let result' = (/= 0) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetShowTipsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetShowTipsMethodInfo a signature where
    overloadedMethod _ = recentChooserGetShowTips

-- method RecentChooser::get_sort_type
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "RecentSortType"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_sort_type" gtk_recent_chooser_get_sort_type :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO CUInt

{- |
Gets the value set by 'GI.Gtk.Interfaces.RecentChooser.recentChooserSetSortType'.

@since 2.10
-}
recentChooserGetSortType ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m Gtk.Enums.RecentSortType
    {- ^ __Returns:__ the sorting order of the /@chooser@/. -}
recentChooserGetSortType chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_get_sort_type chooser'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr chooser
    return result'

data RecentChooserGetSortTypeMethodInfo
instance (signature ~ (m Gtk.Enums.RecentSortType), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetSortTypeMethodInfo a signature where
    overloadedMethod _ = recentChooserGetSortType

-- method RecentChooser::get_uris
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "return location for a the length of the\n    URI list, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Just (TCArray True (-1) 1 (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_get_uris" gtk_recent_chooser_get_uris :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    IO (Ptr CString)

{- |
Gets the URI of the recently used resources.

The return value of this function is affected by the “sort-type” and “limit”
properties of /@chooser@/.

Since the returned array is 'Nothing' terminated, /@length@/ may be 'Nothing'.

@since 2.10
-}
recentChooserGetUris ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m ([T.Text],Word64)
    {- ^ __Returns:__ 
    A newly allocated, 'Nothing'-terminated array of strings. Use
    'GI.GLib.Functions.strfreev' to free it. -}
recentChooserGetUris chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    length_ <- allocMem :: IO (Ptr Word64)
    result <- gtk_recent_chooser_get_uris chooser' length_
    checkUnexpectedReturnNULL "recentChooserGetUris" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    length_' <- peek length_
    touchManagedPtr chooser
    freeMem length_
    return (result', length_')

data RecentChooserGetUrisMethodInfo
instance (signature ~ (m ([T.Text],Word64)), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserGetUrisMethodInfo a signature where
    overloadedMethod _ = recentChooserGetUris

-- method RecentChooser::list_filters
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TGSList (TInterface (Name {namespace = "Gtk", name = "RecentFilter"})))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_list_filters" gtk_recent_chooser_list_filters :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO (Ptr (GSList (Ptr Gtk.RecentFilter.RecentFilter)))

{- |
Gets the 'GI.Gtk.Objects.RecentFilter.RecentFilter' objects held by /@chooser@/.

@since 2.10
-}
recentChooserListFilters ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m [Gtk.RecentFilter.RecentFilter]
    {- ^ __Returns:__ A singly linked list
  of 'GI.Gtk.Objects.RecentFilter.RecentFilter' objects.  You
  should just free the returned list using @/g_slist_free()/@. -}
recentChooserListFilters chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    result <- gtk_recent_chooser_list_filters chooser'
    result' <- unpackGSList result
    result'' <- mapM (newObject Gtk.RecentFilter.RecentFilter) result'
    g_slist_free result
    touchManagedPtr chooser
    return result''

data RecentChooserListFiltersMethodInfo
instance (signature ~ (m [Gtk.RecentFilter.RecentFilter]), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserListFiltersMethodInfo a signature where
    overloadedMethod _ = recentChooserListFilters

-- method RecentChooser::remove_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "RecentFilter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_remove_filter" gtk_recent_chooser_remove_filter :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    Ptr Gtk.RecentFilter.RecentFilter ->    -- filter : TInterface (Name {namespace = "Gtk", name = "RecentFilter"})
    IO ()

{- |
Removes /@filter@/ from the list of 'GI.Gtk.Objects.RecentFilter.RecentFilter' objects held by /@chooser@/.

@since 2.10
-}
recentChooserRemoveFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> b
    {- ^ /@filter@/: a 'GI.Gtk.Objects.RecentFilter.RecentFilter' -}
    -> m ()
recentChooserRemoveFilter chooser filter = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    filter' <- unsafeManagedPtrCastPtr filter
    gtk_recent_chooser_remove_filter chooser' filter'
    touchManagedPtr chooser
    touchManagedPtr filter
    return ()

data RecentChooserRemoveFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) => O.MethodInfo RecentChooserRemoveFilterMethodInfo a signature where
    overloadedMethod _ = recentChooserRemoveFilter

-- method RecentChooser::select_all
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_select_all" gtk_recent_chooser_select_all :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO ()

{- |
Selects all the items inside /@chooser@/, if the /@chooser@/ supports
multiple selection.

@since 2.10
-}
recentChooserSelectAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m ()
recentChooserSelectAll chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    gtk_recent_chooser_select_all chooser'
    touchManagedPtr chooser
    return ()

data RecentChooserSelectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSelectAllMethodInfo a signature where
    overloadedMethod _ = recentChooserSelectAll

-- method RecentChooser::select_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a URI", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_chooser_select_uri" gtk_recent_chooser_select_uri :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{- |
Selects /@uri@/ inside /@chooser@/.

@since 2.10
-}
recentChooserSelectUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> T.Text
    {- ^ /@uri@/: a URI -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
recentChooserSelectUri chooser uri = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_recent_chooser_select_uri chooser' uri'
        touchManagedPtr chooser
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

data RecentChooserSelectUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSelectUriMethodInfo a signature where
    overloadedMethod _ = recentChooserSelectUri

-- method RecentChooser::set_current_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a URI", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_current_uri" gtk_recent_chooser_set_current_uri :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{- |
Sets /@uri@/ as the current URI for /@chooser@/.

@since 2.10
-}
recentChooserSetCurrentUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> T.Text
    {- ^ /@uri@/: a URI -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
recentChooserSetCurrentUri chooser uri = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    uri' <- textToCString uri
    onException (do
        _ <- propagateGError $ gtk_recent_chooser_set_current_uri chooser' uri'
        touchManagedPtr chooser
        freeMem uri'
        return ()
     ) (do
        freeMem uri'
     )

data RecentChooserSetCurrentUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetCurrentUriMethodInfo a signature where
    overloadedMethod _ = recentChooserSetCurrentUri

-- method RecentChooser::set_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "RecentFilter"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GtkRecentFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_filter" gtk_recent_chooser_set_filter :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    Ptr Gtk.RecentFilter.RecentFilter ->    -- filter : TInterface (Name {namespace = "Gtk", name = "RecentFilter"})
    IO ()

{- |
Sets /@filter@/ as the current 'GI.Gtk.Objects.RecentFilter.RecentFilter' object used by /@chooser@/
to affect the displayed recently used resources.

@since 2.10
-}
recentChooserSetFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Maybe (b)
    {- ^ /@filter@/: a 'GI.Gtk.Objects.RecentFilter.RecentFilter' -}
    -> m ()
recentChooserSetFilter chooser filter = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    maybeFilter <- case filter of
        Nothing -> return nullPtr
        Just jFilter -> do
            jFilter' <- unsafeManagedPtrCastPtr jFilter
            return jFilter'
    gtk_recent_chooser_set_filter chooser' maybeFilter
    touchManagedPtr chooser
    whenJust filter touchManagedPtr
    return ()

data RecentChooserSetFilterMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsRecentChooser a, Gtk.RecentFilter.IsRecentFilter b) => O.MethodInfo RecentChooserSetFilterMethodInfo a signature where
    overloadedMethod _ = recentChooserSetFilter

-- method RecentChooser::set_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "limit", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a positive integer, or -1 for all items", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_limit" gtk_recent_chooser_set_limit :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    Int32 ->                                -- limit : TBasicType TInt
    IO ()

{- |
Sets the number of items that should be returned by
'GI.Gtk.Interfaces.RecentChooser.recentChooserGetItems' and 'GI.Gtk.Interfaces.RecentChooser.recentChooserGetUris'.

@since 2.10
-}
recentChooserSetLimit ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Int32
    {- ^ /@limit@/: a positive integer, or -1 for all items -}
    -> m ()
recentChooserSetLimit chooser limit = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    gtk_recent_chooser_set_limit chooser' limit
    touchManagedPtr chooser
    return ()

data RecentChooserSetLimitMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetLimitMethodInfo a signature where
    overloadedMethod _ = recentChooserSetLimit

-- method RecentChooser::set_local_only
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if only local files can be shown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_local_only" gtk_recent_chooser_set_local_only :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- local_only : TBasicType TBoolean
    IO ()

{- |
Sets whether only local resources, that is resources using the file:\/\/ URI
scheme, should be shown in the recently used resources selector.  If
/@localOnly@/ is 'True' (the default) then the shown resources are guaranteed
to be accessible through the operating system native file system.

@since 2.10
-}
recentChooserSetLocalOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@localOnly@/: 'True' if only local files can be shown -}
    -> m ()
recentChooserSetLocalOnly chooser localOnly = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let localOnly' = (fromIntegral . fromEnum) localOnly
    gtk_recent_chooser_set_local_only chooser' localOnly'
    touchManagedPtr chooser
    return ()

data RecentChooserSetLocalOnlyMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetLocalOnlyMethodInfo a signature where
    overloadedMethod _ = recentChooserSetLocalOnly

-- method RecentChooser::set_select_multiple
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if @chooser can select more than one item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_select_multiple" gtk_recent_chooser_set_select_multiple :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- select_multiple : TBasicType TBoolean
    IO ()

{- |
Sets whether /@chooser@/ can select multiple items.

@since 2.10
-}
recentChooserSetSelectMultiple ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@selectMultiple@/: 'True' if /@chooser@/ can select more than one item -}
    -> m ()
recentChooserSetSelectMultiple chooser selectMultiple = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let selectMultiple' = (fromIntegral . fromEnum) selectMultiple
    gtk_recent_chooser_set_select_multiple chooser' selectMultiple'
    touchManagedPtr chooser
    return ()

data RecentChooserSetSelectMultipleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetSelectMultipleMethodInfo a signature where
    overloadedMethod _ = recentChooserSetSelectMultiple

-- method RecentChooser::set_show_icons
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show_icons", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to show an icon near the resource", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_icons" gtk_recent_chooser_set_show_icons :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- show_icons : TBasicType TBoolean
    IO ()

{- |
Sets whether /@chooser@/ should show an icon near the resource when
displaying it.

@since 2.10
-}
recentChooserSetShowIcons ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@showIcons@/: whether to show an icon near the resource -}
    -> m ()
recentChooserSetShowIcons chooser showIcons = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let showIcons' = (fromIntegral . fromEnum) showIcons
    gtk_recent_chooser_set_show_icons chooser' showIcons'
    touchManagedPtr chooser
    return ()

data RecentChooserSetShowIconsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetShowIconsMethodInfo a signature where
    overloadedMethod _ = recentChooserSetShowIcons

-- method RecentChooser::set_show_not_found
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show_not_found", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to show the local items we didn\8217t find", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_not_found" gtk_recent_chooser_set_show_not_found :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- show_not_found : TBasicType TBoolean
    IO ()

{- |
Sets whether /@chooser@/ should display the recently used resources that
it didn’t find.  This only applies to local resources.

@since 2.10
-}
recentChooserSetShowNotFound ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@showNotFound@/: whether to show the local items we didn’t find -}
    -> m ()
recentChooserSetShowNotFound chooser showNotFound = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let showNotFound' = (fromIntegral . fromEnum) showNotFound
    gtk_recent_chooser_set_show_not_found chooser' showNotFound'
    touchManagedPtr chooser
    return ()

data RecentChooserSetShowNotFoundMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetShowNotFoundMethodInfo a signature where
    overloadedMethod _ = recentChooserSetShowNotFound

-- method RecentChooser::set_show_private
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show_private", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE to show private items, %FALSE otherwise", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_private" gtk_recent_chooser_set_show_private :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- show_private : TBasicType TBoolean
    IO ()

{- |
Whether to show recently used resources marked registered as private.

@since 2.10
-}
recentChooserSetShowPrivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@showPrivate@/: 'True' to show private items, 'False' otherwise -}
    -> m ()
recentChooserSetShowPrivate chooser showPrivate = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let showPrivate' = (fromIntegral . fromEnum) showPrivate
    gtk_recent_chooser_set_show_private chooser' showPrivate'
    touchManagedPtr chooser
    return ()

data RecentChooserSetShowPrivateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetShowPrivateMethodInfo a signature where
    overloadedMethod _ = recentChooserSetShowPrivate

-- method RecentChooser::set_show_tips
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show_tips", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if tooltips should be shown", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_show_tips" gtk_recent_chooser_set_show_tips :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CInt ->                                 -- show_tips : TBasicType TBoolean
    IO ()

{- |
Sets whether to show a tooltips containing the full path of each
recently used resource in a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' widget.

@since 2.10
-}
recentChooserSetShowTips ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Bool
    {- ^ /@showTips@/: 'True' if tooltips should be shown -}
    -> m ()
recentChooserSetShowTips chooser showTips = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let showTips' = (fromIntegral . fromEnum) showTips
    gtk_recent_chooser_set_show_tips chooser' showTips'
    touchManagedPtr chooser
    return ()

data RecentChooserSetShowTipsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetShowTipsMethodInfo a signature where
    overloadedMethod _ = recentChooserSetShowTips

-- method RecentChooser::set_sort_func
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sort_func", argType = TInterface (Name {namespace = "Gtk", name = "RecentSortFunc"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the comparison function", sinceVersion = Nothing}, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sort_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user data to pass to @sort_func, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "data_destroy", argType = TInterface (Name {namespace = "GLib", name = "DestroyNotify"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "destroy notifier for @sort_data, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_sort_func" gtk_recent_chooser_set_sort_func :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    FunPtr Gtk.Callbacks.C_RecentSortFunc -> -- sort_func : TInterface (Name {namespace = "Gtk", name = "RecentSortFunc"})
    Ptr () ->                               -- sort_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- data_destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO ()

{- |
Sets the comparison function used when sorting to be /@sortFunc@/.  If
the /@chooser@/ has the sort type set to @/GTK_RECENT_SORT_CUSTOM/@ then
the chooser will sort using this function.

To the comparison function will be passed two 'GI.Gtk.Structs.RecentInfo.RecentInfo' structs and
/@sortData@/;  /@sortFunc@/ should return a positive integer if the first
item comes before the second, zero if the two items are equal and
a negative integer if the first item comes after the second.

@since 2.10
-}
recentChooserSetSortFunc ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Gtk.Callbacks.RecentSortFunc
    {- ^ /@sortFunc@/: the comparison function -}
    -> m ()
recentChooserSetSortFunc chooser sortFunc = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    sortFunc' <- Gtk.Callbacks.mk_RecentSortFunc (Gtk.Callbacks.wrap_RecentSortFunc Nothing (Gtk.Callbacks.drop_closures_RecentSortFunc sortFunc))
    let sortData = castFunPtrToPtr sortFunc'
    let dataDestroy = safeFreeFunPtrPtr
    gtk_recent_chooser_set_sort_func chooser' sortFunc' sortData dataDestroy
    touchManagedPtr chooser
    return ()

data RecentChooserSetSortFuncMethodInfo
instance (signature ~ (Gtk.Callbacks.RecentSortFunc -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetSortFuncMethodInfo a signature where
    overloadedMethod _ = recentChooserSetSortFunc

-- method RecentChooser::set_sort_type
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sort_type", argType = TInterface (Name {namespace = "Gtk", name = "RecentSortType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "sort order that the chooser should use", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_set_sort_type" gtk_recent_chooser_set_sort_type :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CUInt ->                                -- sort_type : TInterface (Name {namespace = "Gtk", name = "RecentSortType"})
    IO ()

{- |
Changes the sorting order of the recently used resources list displayed by
/@chooser@/.

@since 2.10
-}
recentChooserSetSortType ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> Gtk.Enums.RecentSortType
    {- ^ /@sortType@/: sort order that the chooser should use -}
    -> m ()
recentChooserSetSortType chooser sortType = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    let sortType' = (fromIntegral . fromEnum) sortType
    gtk_recent_chooser_set_sort_type chooser' sortType'
    touchManagedPtr chooser
    return ()

data RecentChooserSetSortTypeMethodInfo
instance (signature ~ (Gtk.Enums.RecentSortType -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserSetSortTypeMethodInfo a signature where
    overloadedMethod _ = recentChooserSetSortType

-- method RecentChooser::unselect_all
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_unselect_all" gtk_recent_chooser_unselect_all :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    IO ()

{- |
Unselects all the items inside /@chooser@/.

@since 2.10
-}
recentChooserUnselectAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> m ()
recentChooserUnselectAll chooser = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    gtk_recent_chooser_unselect_all chooser'
    touchManagedPtr chooser
    return ()

data RecentChooserUnselectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserUnselectAllMethodInfo a signature where
    overloadedMethod _ = recentChooserUnselectAll

-- method RecentChooser::unselect_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "RecentChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkRecentChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a URI", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_recent_chooser_unselect_uri" gtk_recent_chooser_unselect_uri :: 
    Ptr RecentChooser ->                    -- chooser : TInterface (Name {namespace = "Gtk", name = "RecentChooser"})
    CString ->                              -- uri : TBasicType TUTF8
    IO ()

{- |
Unselects /@uri@/ inside /@chooser@/.

@since 2.10
-}
recentChooserUnselectUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsRecentChooser a) =>
    a
    {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.RecentChooser.RecentChooser' -}
    -> T.Text
    {- ^ /@uri@/: a URI -}
    -> m ()
recentChooserUnselectUri chooser uri = liftIO $ do
    chooser' <- unsafeManagedPtrCastPtr chooser
    uri' <- textToCString uri
    gtk_recent_chooser_unselect_uri chooser' uri'
    touchManagedPtr chooser
    freeMem uri'
    return ()

data RecentChooserUnselectUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsRecentChooser a) => O.MethodInfo RecentChooserUnselectUriMethodInfo a signature where
    overloadedMethod _ = recentChooserUnselectUri