{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Gtk.Interfaces.FileChooser.FileChooser' is an interface that can be implemented by file
-- selection widgets.  In GTK+, the main objects that implement this
-- interface are t'GI.Gtk.Objects.FileChooserWidget.FileChooserWidget', t'GI.Gtk.Objects.FileChooserDialog.FileChooserDialog', and
-- t'GI.Gtk.Objects.FileChooserButton.FileChooserButton'.  You do not need to write an object that
-- implements the t'GI.Gtk.Interfaces.FileChooser.FileChooser' interface unless you are trying to
-- adapt an existing file selector to expose a standard programming
-- interface.
-- 
-- t'GI.Gtk.Interfaces.FileChooser.FileChooser' allows for shortcuts to various places in the filesystem.
-- In the default implementation these are displayed in the left pane. It
-- may be a bit confusing at first that these shortcuts come from various
-- sources and in various flavours, so lets explain the terminology here:
-- 
-- * Bookmarks: are created by the user, by dragging folders from the
-- right pane to the left pane, or by using the “Add”. Bookmarks
-- can be renamed and deleted by the user.
-- * Shortcuts: can be provided by the application. For example, a Paint
-- program may want to add a shortcut for a Clipart folder. Shortcuts
-- cannot be modified by the user.
-- * Volumes: are provided by the underlying filesystem abstraction. They are
-- the “roots” of the filesystem.
-- 
-- 
-- = File Names and Encodings
-- 
-- When the user is finished selecting files in a
-- t'GI.Gtk.Interfaces.FileChooser.FileChooser', your program can get the selected names
-- either as filenames or as URIs.  For URIs, the normal escaping
-- rules are applied if the URI contains non-ASCII characters.
-- However, filenames are always returned in
-- the character set specified by the
-- @G_FILENAME_ENCODING@ environment variable.
-- Please see the GLib documentation for more details about this
-- variable.
-- 
-- This means that while you can pass the result of
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilename' to @/open()/@ or @/fopen()/@,
-- you may not be able to directly set it as the text of a
-- t'GI.Gtk.Objects.Label.Label' widget unless you convert it first to UTF-8,
-- which all GTK+ widgets expect. You should use 'GI.GLib.Functions.filenameToUtf8'
-- to convert filenames into strings that can be passed to GTK+
-- widgets.
-- 
-- = Adding a Preview Widget
-- 
-- You can add a custom preview widget to a file chooser and then
-- get notification about when the preview needs to be updated.
-- To install a preview widget, use
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'.  Then, connect to the
-- [updatePreview]("GI.Gtk.Interfaces.FileChooser#signal:updatePreview") signal to get notified when
-- you need to update the contents of the preview.
-- 
-- Your callback should use
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewFilename' to see what needs
-- previewing.  Once you have generated the preview for the
-- corresponding file, you must call
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive' with a boolean
-- flag that indicates whether your callback could successfully
-- generate a preview.
-- 
-- ## Example: Using a Preview Widget ## {@/gtkfilechooser/@-preview}
-- 
-- === /C code/
-- >
-- >{
-- >  GtkImage *preview;
-- >
-- >  ...
-- >
-- >  preview = gtk_image_new ();
-- >
-- >  gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
-- >  g_signal_connect (my_file_chooser, "update-preview",
-- >		    G_CALLBACK (update_preview_cb), preview);
-- >}
-- >
-- >static void
-- >update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
-- >{
-- >  GtkWidget *preview;
-- >  char *filename;
-- >  GdkPixbuf *pixbuf;
-- >  gboolean have_preview;
-- >
-- >  preview = GTK_WIDGET (data);
-- >  filename = gtk_file_chooser_get_preview_filename (file_chooser);
-- >
-- >  pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
-- >  have_preview = (pixbuf != NULL);
-- >  g_free (filename);
-- >
-- >  gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
-- >  if (pixbuf)
-- >    g_object_unref (pixbuf);
-- >
-- >  gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
-- >}
-- 
-- 
-- = Adding Extra Widgets
-- 
-- You can add extra widgets to a file chooser to provide options
-- that are not present in the default design.  For example, you
-- can add a toggle button to give the user the option to open a
-- file in read-only mode.  You can use
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget' to insert additional
-- widgets in a file chooser.
-- 
-- An example for adding extra widgets:
-- 
-- === /C code/
-- >
-- >
-- >  GtkWidget *toggle;
-- >
-- >  ...
-- >
-- >  toggle = gtk_check_button_new_with_label ("Open file read-only");
-- >  gtk_widget_show (toggle);
-- >  gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
-- >}
-- 
-- 
-- If you want to set more than one extra widget in the file
-- chooser, you can a container such as a t'GI.Gtk.Objects.Box.Box' or a t'GI.Gtk.Objects.Grid.Grid'
-- and include your widgets in it.  Then, set the container as
-- the whole extra widget.

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

module GI.Gtk.Interfaces.FileChooser
    ( 

-- * Exported types
    FileChooser(..)                         ,
    noFileChooser                           ,
    IsFileChooser                           ,
    toFileChooser                           ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveFileChooserMethod                ,
#endif


-- ** addChoice #method:addChoice#

#if defined(ENABLE_OVERLOADING)
    FileChooserAddChoiceMethodInfo          ,
#endif
    fileChooserAddChoice                    ,


-- ** addFilter #method:addFilter#

#if defined(ENABLE_OVERLOADING)
    FileChooserAddFilterMethodInfo          ,
#endif
    fileChooserAddFilter                    ,


-- ** addShortcutFolder #method:addShortcutFolder#

#if defined(ENABLE_OVERLOADING)
    FileChooserAddShortcutFolderMethodInfo  ,
#endif
    fileChooserAddShortcutFolder            ,


-- ** addShortcutFolderUri #method:addShortcutFolderUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserAddShortcutFolderUriMethodInfo,
#endif
    fileChooserAddShortcutFolderUri         ,


-- ** getAction #method:getAction#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetActionMethodInfo          ,
#endif
    fileChooserGetAction                    ,


-- ** getChoice #method:getChoice#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetChoiceMethodInfo          ,
#endif
    fileChooserGetChoice                    ,


-- ** getCreateFolders #method:getCreateFolders#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetCreateFoldersMethodInfo   ,
#endif
    fileChooserGetCreateFolders             ,


-- ** getCurrentFolder #method:getCurrentFolder#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetCurrentFolderMethodInfo   ,
#endif
    fileChooserGetCurrentFolder             ,


-- ** getCurrentFolderFile #method:getCurrentFolderFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetCurrentFolderFileMethodInfo,
#endif
    fileChooserGetCurrentFolderFile         ,


-- ** getCurrentFolderUri #method:getCurrentFolderUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetCurrentFolderUriMethodInfo,
#endif
    fileChooserGetCurrentFolderUri          ,


-- ** getCurrentName #method:getCurrentName#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetCurrentNameMethodInfo     ,
#endif
    fileChooserGetCurrentName               ,


-- ** getDoOverwriteConfirmation #method:getDoOverwriteConfirmation#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetDoOverwriteConfirmationMethodInfo,
#endif
    fileChooserGetDoOverwriteConfirmation   ,


-- ** getExtraWidget #method:getExtraWidget#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetExtraWidgetMethodInfo     ,
#endif
    fileChooserGetExtraWidget               ,


-- ** getFile #method:getFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetFileMethodInfo            ,
#endif
    fileChooserGetFile                      ,


-- ** getFilename #method:getFilename#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetFilenameMethodInfo        ,
#endif
    fileChooserGetFilename                  ,


-- ** getFilenames #method:getFilenames#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetFilenamesMethodInfo       ,
#endif
    fileChooserGetFilenames                 ,


-- ** getFiles #method:getFiles#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetFilesMethodInfo           ,
#endif
    fileChooserGetFiles                     ,


-- ** getFilter #method:getFilter#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetFilterMethodInfo          ,
#endif
    fileChooserGetFilter                    ,


-- ** getLocalOnly #method:getLocalOnly#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetLocalOnlyMethodInfo       ,
#endif
    fileChooserGetLocalOnly                 ,


-- ** getPreviewFile #method:getPreviewFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetPreviewFileMethodInfo     ,
#endif
    fileChooserGetPreviewFile               ,


-- ** getPreviewFilename #method:getPreviewFilename#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetPreviewFilenameMethodInfo ,
#endif
    fileChooserGetPreviewFilename           ,


-- ** getPreviewUri #method:getPreviewUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetPreviewUriMethodInfo      ,
#endif
    fileChooserGetPreviewUri                ,


-- ** getPreviewWidget #method:getPreviewWidget#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetPreviewWidgetMethodInfo   ,
#endif
    fileChooserGetPreviewWidget             ,


-- ** getPreviewWidgetActive #method:getPreviewWidgetActive#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetPreviewWidgetActiveMethodInfo,
#endif
    fileChooserGetPreviewWidgetActive       ,


-- ** getSelectMultiple #method:getSelectMultiple#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetSelectMultipleMethodInfo  ,
#endif
    fileChooserGetSelectMultiple            ,


-- ** getShowHidden #method:getShowHidden#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetShowHiddenMethodInfo      ,
#endif
    fileChooserGetShowHidden                ,


-- ** getUri #method:getUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetUriMethodInfo             ,
#endif
    fileChooserGetUri                       ,


-- ** getUris #method:getUris#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetUrisMethodInfo            ,
#endif
    fileChooserGetUris                      ,


-- ** getUsePreviewLabel #method:getUsePreviewLabel#

#if defined(ENABLE_OVERLOADING)
    FileChooserGetUsePreviewLabelMethodInfo ,
#endif
    fileChooserGetUsePreviewLabel           ,


-- ** listFilters #method:listFilters#

#if defined(ENABLE_OVERLOADING)
    FileChooserListFiltersMethodInfo        ,
#endif
    fileChooserListFilters                  ,


-- ** listShortcutFolderUris #method:listShortcutFolderUris#

#if defined(ENABLE_OVERLOADING)
    FileChooserListShortcutFolderUrisMethodInfo,
#endif
    fileChooserListShortcutFolderUris       ,


-- ** listShortcutFolders #method:listShortcutFolders#

#if defined(ENABLE_OVERLOADING)
    FileChooserListShortcutFoldersMethodInfo,
#endif
    fileChooserListShortcutFolders          ,


-- ** removeChoice #method:removeChoice#

#if defined(ENABLE_OVERLOADING)
    FileChooserRemoveChoiceMethodInfo       ,
#endif
    fileChooserRemoveChoice                 ,


-- ** removeFilter #method:removeFilter#

#if defined(ENABLE_OVERLOADING)
    FileChooserRemoveFilterMethodInfo       ,
#endif
    fileChooserRemoveFilter                 ,


-- ** removeShortcutFolder #method:removeShortcutFolder#

#if defined(ENABLE_OVERLOADING)
    FileChooserRemoveShortcutFolderMethodInfo,
#endif
    fileChooserRemoveShortcutFolder         ,


-- ** removeShortcutFolderUri #method:removeShortcutFolderUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserRemoveShortcutFolderUriMethodInfo,
#endif
    fileChooserRemoveShortcutFolderUri      ,


-- ** selectAll #method:selectAll#

#if defined(ENABLE_OVERLOADING)
    FileChooserSelectAllMethodInfo          ,
#endif
    fileChooserSelectAll                    ,


-- ** selectFile #method:selectFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserSelectFileMethodInfo         ,
#endif
    fileChooserSelectFile                   ,


-- ** selectFilename #method:selectFilename#

#if defined(ENABLE_OVERLOADING)
    FileChooserSelectFilenameMethodInfo     ,
#endif
    fileChooserSelectFilename               ,


-- ** selectUri #method:selectUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserSelectUriMethodInfo          ,
#endif
    fileChooserSelectUri                    ,


-- ** setAction #method:setAction#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetActionMethodInfo          ,
#endif
    fileChooserSetAction                    ,


-- ** setChoice #method:setChoice#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetChoiceMethodInfo          ,
#endif
    fileChooserSetChoice                    ,


-- ** setCreateFolders #method:setCreateFolders#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetCreateFoldersMethodInfo   ,
#endif
    fileChooserSetCreateFolders             ,


-- ** setCurrentFolder #method:setCurrentFolder#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetCurrentFolderMethodInfo   ,
#endif
    fileChooserSetCurrentFolder             ,


-- ** setCurrentFolderFile #method:setCurrentFolderFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetCurrentFolderFileMethodInfo,
#endif
    fileChooserSetCurrentFolderFile         ,


-- ** setCurrentFolderUri #method:setCurrentFolderUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetCurrentFolderUriMethodInfo,
#endif
    fileChooserSetCurrentFolderUri          ,


-- ** setCurrentName #method:setCurrentName#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetCurrentNameMethodInfo     ,
#endif
    fileChooserSetCurrentName               ,


-- ** setDoOverwriteConfirmation #method:setDoOverwriteConfirmation#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetDoOverwriteConfirmationMethodInfo,
#endif
    fileChooserSetDoOverwriteConfirmation   ,


-- ** setExtraWidget #method:setExtraWidget#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetExtraWidgetMethodInfo     ,
#endif
    fileChooserSetExtraWidget               ,


-- ** setFile #method:setFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetFileMethodInfo            ,
#endif
    fileChooserSetFile                      ,


-- ** setFilename #method:setFilename#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetFilenameMethodInfo        ,
#endif
    fileChooserSetFilename                  ,


-- ** setFilter #method:setFilter#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetFilterMethodInfo          ,
#endif
    fileChooserSetFilter                    ,


-- ** setLocalOnly #method:setLocalOnly#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetLocalOnlyMethodInfo       ,
#endif
    fileChooserSetLocalOnly                 ,


-- ** setPreviewWidget #method:setPreviewWidget#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetPreviewWidgetMethodInfo   ,
#endif
    fileChooserSetPreviewWidget             ,


-- ** setPreviewWidgetActive #method:setPreviewWidgetActive#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetPreviewWidgetActiveMethodInfo,
#endif
    fileChooserSetPreviewWidgetActive       ,


-- ** setSelectMultiple #method:setSelectMultiple#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetSelectMultipleMethodInfo  ,
#endif
    fileChooserSetSelectMultiple            ,


-- ** setShowHidden #method:setShowHidden#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetShowHiddenMethodInfo      ,
#endif
    fileChooserSetShowHidden                ,


-- ** setUri #method:setUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetUriMethodInfo             ,
#endif
    fileChooserSetUri                       ,


-- ** setUsePreviewLabel #method:setUsePreviewLabel#

#if defined(ENABLE_OVERLOADING)
    FileChooserSetUsePreviewLabelMethodInfo ,
#endif
    fileChooserSetUsePreviewLabel           ,


-- ** unselectAll #method:unselectAll#

#if defined(ENABLE_OVERLOADING)
    FileChooserUnselectAllMethodInfo        ,
#endif
    fileChooserUnselectAll                  ,


-- ** unselectFile #method:unselectFile#

#if defined(ENABLE_OVERLOADING)
    FileChooserUnselectFileMethodInfo       ,
#endif
    fileChooserUnselectFile                 ,


-- ** unselectFilename #method:unselectFilename#

#if defined(ENABLE_OVERLOADING)
    FileChooserUnselectFilenameMethodInfo   ,
#endif
    fileChooserUnselectFilename             ,


-- ** unselectUri #method:unselectUri#

#if defined(ENABLE_OVERLOADING)
    FileChooserUnselectUriMethodInfo        ,
#endif
    fileChooserUnselectUri                  ,




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

#if defined(ENABLE_OVERLOADING)
    FileChooserActionPropertyInfo           ,
#endif
    constructFileChooserAction              ,
#if defined(ENABLE_OVERLOADING)
    fileChooserAction                       ,
#endif
    getFileChooserAction                    ,
    setFileChooserAction                    ,


-- ** createFolders #attr:createFolders#
-- | Whether a file chooser not in 'GI.Gtk.Enums.FileChooserActionOpen' mode
-- will offer the user to create new folders.
-- 
-- /Since: 2.18/

#if defined(ENABLE_OVERLOADING)
    FileChooserCreateFoldersPropertyInfo    ,
#endif
    constructFileChooserCreateFolders       ,
#if defined(ENABLE_OVERLOADING)
    fileChooserCreateFolders                ,
#endif
    getFileChooserCreateFolders             ,
    setFileChooserCreateFolders             ,


-- ** doOverwriteConfirmation #attr:doOverwriteConfirmation#
-- | Whether a file chooser in 'GI.Gtk.Enums.FileChooserActionSave' mode
-- will present an overwrite confirmation dialog if the user
-- selects a file name that already exists.
-- 
-- /Since: 2.8/

#if defined(ENABLE_OVERLOADING)
    FileChooserDoOverwriteConfirmationPropertyInfo,
#endif
    constructFileChooserDoOverwriteConfirmation,
#if defined(ENABLE_OVERLOADING)
    fileChooserDoOverwriteConfirmation      ,
#endif
    getFileChooserDoOverwriteConfirmation   ,
    setFileChooserDoOverwriteConfirmation   ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserExtraWidgetPropertyInfo      ,
#endif
    constructFileChooserExtraWidget         ,
#if defined(ENABLE_OVERLOADING)
    fileChooserExtraWidget                  ,
#endif
    getFileChooserExtraWidget               ,
    setFileChooserExtraWidget               ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserFilterPropertyInfo           ,
#endif
    constructFileChooserFilter              ,
#if defined(ENABLE_OVERLOADING)
    fileChooserFilter                       ,
#endif
    getFileChooserFilter                    ,
    setFileChooserFilter                    ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserLocalOnlyPropertyInfo        ,
#endif
    constructFileChooserLocalOnly           ,
#if defined(ENABLE_OVERLOADING)
    fileChooserLocalOnly                    ,
#endif
    getFileChooserLocalOnly                 ,
    setFileChooserLocalOnly                 ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserPreviewWidgetPropertyInfo    ,
#endif
    constructFileChooserPreviewWidget       ,
#if defined(ENABLE_OVERLOADING)
    fileChooserPreviewWidget                ,
#endif
    getFileChooserPreviewWidget             ,
    setFileChooserPreviewWidget             ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserPreviewWidgetActivePropertyInfo,
#endif
    constructFileChooserPreviewWidgetActive ,
#if defined(ENABLE_OVERLOADING)
    fileChooserPreviewWidgetActive          ,
#endif
    getFileChooserPreviewWidgetActive       ,
    setFileChooserPreviewWidgetActive       ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserSelectMultiplePropertyInfo   ,
#endif
    constructFileChooserSelectMultiple      ,
#if defined(ENABLE_OVERLOADING)
    fileChooserSelectMultiple               ,
#endif
    getFileChooserSelectMultiple            ,
    setFileChooserSelectMultiple            ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserShowHiddenPropertyInfo       ,
#endif
    constructFileChooserShowHidden          ,
#if defined(ENABLE_OVERLOADING)
    fileChooserShowHidden                   ,
#endif
    getFileChooserShowHidden                ,
    setFileChooserShowHidden                ,


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

#if defined(ENABLE_OVERLOADING)
    FileChooserUsePreviewLabelPropertyInfo  ,
#endif
    constructFileChooserUsePreviewLabel     ,
#if defined(ENABLE_OVERLOADING)
    fileChooserUsePreviewLabel              ,
#endif
    getFileChooserUsePreviewLabel           ,
    setFileChooserUsePreviewLabel           ,




 -- * Signals
-- ** confirmOverwrite #signal:confirmOverwrite#

    C_FileChooserConfirmOverwriteCallback   ,
    FileChooserConfirmOverwriteCallback     ,
#if defined(ENABLE_OVERLOADING)
    FileChooserConfirmOverwriteSignalInfo   ,
#endif
    afterFileChooserConfirmOverwrite        ,
    genClosure_FileChooserConfirmOverwrite  ,
    mk_FileChooserConfirmOverwriteCallback  ,
    noFileChooserConfirmOverwriteCallback   ,
    onFileChooserConfirmOverwrite           ,
    wrap_FileChooserConfirmOverwriteCallback,


-- ** currentFolderChanged #signal:currentFolderChanged#

    C_FileChooserCurrentFolderChangedCallback,
    FileChooserCurrentFolderChangedCallback ,
#if defined(ENABLE_OVERLOADING)
    FileChooserCurrentFolderChangedSignalInfo,
#endif
    afterFileChooserCurrentFolderChanged    ,
    genClosure_FileChooserCurrentFolderChanged,
    mk_FileChooserCurrentFolderChangedCallback,
    noFileChooserCurrentFolderChangedCallback,
    onFileChooserCurrentFolderChanged       ,
    wrap_FileChooserCurrentFolderChangedCallback,


-- ** fileActivated #signal:fileActivated#

    C_FileChooserFileActivatedCallback      ,
    FileChooserFileActivatedCallback        ,
#if defined(ENABLE_OVERLOADING)
    FileChooserFileActivatedSignalInfo      ,
#endif
    afterFileChooserFileActivated           ,
    genClosure_FileChooserFileActivated     ,
    mk_FileChooserFileActivatedCallback     ,
    noFileChooserFileActivatedCallback      ,
    onFileChooserFileActivated              ,
    wrap_FileChooserFileActivatedCallback   ,


-- ** selectionChanged #signal:selectionChanged#

    C_FileChooserSelectionChangedCallback   ,
    FileChooserSelectionChangedCallback     ,
#if defined(ENABLE_OVERLOADING)
    FileChooserSelectionChangedSignalInfo   ,
#endif
    afterFileChooserSelectionChanged        ,
    genClosure_FileChooserSelectionChanged  ,
    mk_FileChooserSelectionChangedCallback  ,
    noFileChooserSelectionChangedCallback   ,
    onFileChooserSelectionChanged           ,
    wrap_FileChooserSelectionChangedCallback,


-- ** updatePreview #signal:updatePreview#

    C_FileChooserUpdatePreviewCallback      ,
    FileChooserUpdatePreviewCallback        ,
#if defined(ENABLE_OVERLOADING)
    FileChooserUpdatePreviewSignalInfo      ,
#endif
    afterFileChooserUpdatePreview           ,
    genClosure_FileChooserUpdatePreview     ,
    mk_FileChooserUpdatePreviewCallback     ,
    noFileChooserUpdatePreviewCallback      ,
    onFileChooserUpdatePreview              ,
    wrap_FileChooserUpdatePreviewCallback   ,




    ) where

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

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

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.FileFilter as Gtk.FileFilter
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- interface FileChooser 
-- | Memory-managed wrapper type.
newtype FileChooser = FileChooser (ManagedPtr FileChooser)
    deriving (FileChooser -> FileChooser -> Bool
(FileChooser -> FileChooser -> Bool)
-> (FileChooser -> FileChooser -> Bool) -> Eq FileChooser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileChooser -> FileChooser -> Bool
$c/= :: FileChooser -> FileChooser -> Bool
== :: FileChooser -> FileChooser -> Bool
$c== :: FileChooser -> FileChooser -> Bool
Eq)
-- | A convenience alias for `Nothing` :: `Maybe` `FileChooser`.
noFileChooser :: Maybe FileChooser
noFileChooser :: Maybe FileChooser
noFileChooser = Maybe FileChooser
forall a. Maybe a
Nothing

-- signal FileChooser::confirm-overwrite
-- | This signal gets emitted whenever it is appropriate to present a
-- confirmation dialog when the user has selected a file name that
-- already exists.  The signal only gets emitted when the file
-- chooser is in 'GI.Gtk.Enums.FileChooserActionSave' mode.
-- 
-- Most applications just need to turn on the
-- t'GI.Gtk.Interfaces.FileChooser.FileChooser':@/do-overwrite-confirmation/@ property (or call the
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetDoOverwriteConfirmation' function), and
-- they will automatically get a stock confirmation dialog.
-- Applications which need to customize this behavior should do
-- that, and also connect to the [confirmOverwrite]("GI.Gtk.Interfaces.FileChooser#signal:confirmOverwrite")
-- signal.
-- 
-- A signal handler for this signal must return a
-- t'GI.Gtk.Enums.FileChooserConfirmation' value, which indicates the action to
-- take.  If the handler determines that the user wants to select a
-- different filename, it should return
-- 'GI.Gtk.Enums.FileChooserConfirmationSelectAgain'.  If it determines
-- that the user is satisfied with his choice of file name, it
-- should return 'GI.Gtk.Enums.FileChooserConfirmationAcceptFilename'.
-- On the other hand, if it determines that the stock confirmation
-- dialog should be used, it should return
-- 'GI.Gtk.Enums.FileChooserConfirmationConfirm'. The following example
-- illustrates this.
-- 
-- ## Custom confirmation ## {@/gtkfilechooser/@-confirmation}
-- 
-- 
-- === /C code/
-- >
-- >static GtkFileChooserConfirmation
-- >confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
-- >{
-- >  char *uri;
-- >
-- >  uri = gtk_file_chooser_get_uri (chooser);
-- >
-- >  if (is_uri_read_only (uri))
-- >    {
-- >      if (user_wants_to_replace_read_only_file (uri))
-- >        return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME;
-- >      else
-- >        return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN;
-- >    } else
-- >      return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog
-- >}
-- >
-- >...
-- >
-- >chooser = gtk_file_chooser_dialog_new (...);
-- >
-- >gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
-- >g_signal_connect (chooser, "confirm-overwrite",
-- >                  G_CALLBACK (confirm_overwrite_callback), NULL);
-- >
-- >if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT)
-- >        save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
-- >
-- >gtk_widget_destroy (chooser);
-- 
-- 
-- /Since: 2.8/
type FileChooserConfirmOverwriteCallback =
    IO Gtk.Enums.FileChooserConfirmation
    -- ^ __Returns:__ a t'GI.Gtk.Enums.FileChooserConfirmation' value that indicates which
    --  action to take after emitting the signal.

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileChooserConfirmOverwriteCallback`@.
noFileChooserConfirmOverwriteCallback :: Maybe FileChooserConfirmOverwriteCallback
noFileChooserConfirmOverwriteCallback :: Maybe FileChooserConfirmOverwriteCallback
noFileChooserConfirmOverwriteCallback = Maybe FileChooserConfirmOverwriteCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_FileChooserConfirmOverwrite :: MonadIO m => FileChooserConfirmOverwriteCallback -> m (GClosure C_FileChooserConfirmOverwriteCallback)
genClosure_FileChooserConfirmOverwrite :: FileChooserConfirmOverwriteCallback
-> m (GClosure C_FileChooserConfirmOverwriteCallback)
genClosure_FileChooserConfirmOverwrite cb :: FileChooserConfirmOverwriteCallback
cb = IO (GClosure C_FileChooserConfirmOverwriteCallback)
-> m (GClosure C_FileChooserConfirmOverwriteCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileChooserConfirmOverwriteCallback)
 -> m (GClosure C_FileChooserConfirmOverwriteCallback))
-> IO (GClosure C_FileChooserConfirmOverwriteCallback)
-> m (GClosure C_FileChooserConfirmOverwriteCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserConfirmOverwriteCallback
cb' = FileChooserConfirmOverwriteCallback
-> C_FileChooserConfirmOverwriteCallback
wrap_FileChooserConfirmOverwriteCallback FileChooserConfirmOverwriteCallback
cb
    C_FileChooserConfirmOverwriteCallback
-> IO (FunPtr C_FileChooserConfirmOverwriteCallback)
mk_FileChooserConfirmOverwriteCallback C_FileChooserConfirmOverwriteCallback
cb' IO (FunPtr C_FileChooserConfirmOverwriteCallback)
-> (FunPtr C_FileChooserConfirmOverwriteCallback
    -> IO (GClosure C_FileChooserConfirmOverwriteCallback))
-> IO (GClosure C_FileChooserConfirmOverwriteCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileChooserConfirmOverwriteCallback
-> IO (GClosure C_FileChooserConfirmOverwriteCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileChooserConfirmOverwriteCallback` into a `C_FileChooserConfirmOverwriteCallback`.
wrap_FileChooserConfirmOverwriteCallback ::
    FileChooserConfirmOverwriteCallback ->
    C_FileChooserConfirmOverwriteCallback
wrap_FileChooserConfirmOverwriteCallback :: FileChooserConfirmOverwriteCallback
-> C_FileChooserConfirmOverwriteCallback
wrap_FileChooserConfirmOverwriteCallback _cb :: FileChooserConfirmOverwriteCallback
_cb _ _ = do
    FileChooserConfirmation
result <- FileChooserConfirmOverwriteCallback
_cb 
    let result' :: CUInt
result' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FileChooserConfirmation -> Int)
-> FileChooserConfirmation
-> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileChooserConfirmation -> Int
forall a. Enum a => a -> Int
fromEnum) FileChooserConfirmation
result
    CUInt -> IO CUInt
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'


-- | Connect a signal handler for the [confirmOverwrite](#signal:confirmOverwrite) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' fileChooser #confirmOverwrite callback
-- @
-- 
-- 
onFileChooserConfirmOverwrite :: (IsFileChooser a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
onFileChooserConfirmOverwrite :: a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
onFileChooserConfirmOverwrite obj :: a
obj cb :: FileChooserConfirmOverwriteCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserConfirmOverwriteCallback
cb' = FileChooserConfirmOverwriteCallback
-> C_FileChooserConfirmOverwriteCallback
wrap_FileChooserConfirmOverwriteCallback FileChooserConfirmOverwriteCallback
cb
    FunPtr C_FileChooserConfirmOverwriteCallback
cb'' <- C_FileChooserConfirmOverwriteCallback
-> IO (FunPtr C_FileChooserConfirmOverwriteCallback)
mk_FileChooserConfirmOverwriteCallback C_FileChooserConfirmOverwriteCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserConfirmOverwriteCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "confirm-overwrite" FunPtr C_FileChooserConfirmOverwriteCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [confirmOverwrite](#signal:confirmOverwrite) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' fileChooser #confirmOverwrite callback
-- @
-- 
-- 
afterFileChooserConfirmOverwrite :: (IsFileChooser a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
afterFileChooserConfirmOverwrite :: a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
afterFileChooserConfirmOverwrite obj :: a
obj cb :: FileChooserConfirmOverwriteCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserConfirmOverwriteCallback
cb' = FileChooserConfirmOverwriteCallback
-> C_FileChooserConfirmOverwriteCallback
wrap_FileChooserConfirmOverwriteCallback FileChooserConfirmOverwriteCallback
cb
    FunPtr C_FileChooserConfirmOverwriteCallback
cb'' <- C_FileChooserConfirmOverwriteCallback
-> IO (FunPtr C_FileChooserConfirmOverwriteCallback)
mk_FileChooserConfirmOverwriteCallback C_FileChooserConfirmOverwriteCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserConfirmOverwriteCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "confirm-overwrite" FunPtr C_FileChooserConfirmOverwriteCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data FileChooserConfirmOverwriteSignalInfo
instance SignalInfo FileChooserConfirmOverwriteSignalInfo where
    type HaskellCallbackType FileChooserConfirmOverwriteSignalInfo = FileChooserConfirmOverwriteCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_FileChooserConfirmOverwriteCallback cb
        cb'' <- mk_FileChooserConfirmOverwriteCallback cb'
        connectSignalFunPtr obj "confirm-overwrite" cb'' connectMode detail

#endif

-- signal FileChooser::current-folder-changed
-- | This signal is emitted when the current folder in a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
-- changes.  This can happen due to the user performing some action that
-- changes folders, such as selecting a bookmark or visiting a folder on the
-- file list.  It can also happen as a result of calling a function to
-- explicitly change the current folder in a file chooser.
-- 
-- Normally you do not need to connect to this signal, unless you need to keep
-- track of which folder a file chooser is showing.
-- 
-- See also:  'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolder',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetCurrentFolder',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetCurrentFolderUri'.
type FileChooserCurrentFolderChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileChooserCurrentFolderChangedCallback`@.
noFileChooserCurrentFolderChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserCurrentFolderChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserCurrentFolderChangedCallback = Maybe FileChooserCurrentFolderChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_FileChooserCurrentFolderChanged :: MonadIO m => FileChooserCurrentFolderChangedCallback -> m (GClosure C_FileChooserCurrentFolderChangedCallback)
genClosure_FileChooserCurrentFolderChanged :: FileChooserCurrentFolderChangedCallback
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
genClosure_FileChooserCurrentFolderChanged cb :: FileChooserCurrentFolderChangedCallback
cb = IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileChooserCurrentFolderChangedCallback)
 -> m (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserCurrentFolderChangedCallback FileChooserCurrentFolderChangedCallback
cb
    C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserCurrentFolderChangedCallback C_FileChooserCurrentFolderChangedCallback
cb' IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
-> (FunPtr C_FileChooserCurrentFolderChangedCallback
    -> IO (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileChooserCurrentFolderChangedCallback
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileChooserCurrentFolderChangedCallback` into a `C_FileChooserCurrentFolderChangedCallback`.
wrap_FileChooserCurrentFolderChangedCallback ::
    FileChooserCurrentFolderChangedCallback ->
    C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserCurrentFolderChangedCallback :: FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserCurrentFolderChangedCallback _cb :: FileChooserCurrentFolderChangedCallback
_cb _ _ = do
    FileChooserCurrentFolderChangedCallback
_cb 


-- | Connect a signal handler for the [currentFolderChanged](#signal:currentFolderChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' fileChooser #currentFolderChanged callback
-- @
-- 
-- 
onFileChooserCurrentFolderChanged :: (IsFileChooser a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserCurrentFolderChanged :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserCurrentFolderChanged obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserCurrentFolderChangedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserCurrentFolderChangedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "current-folder-changed" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [currentFolderChanged](#signal:currentFolderChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' fileChooser #currentFolderChanged callback
-- @
-- 
-- 
afterFileChooserCurrentFolderChanged :: (IsFileChooser a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserCurrentFolderChanged :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserCurrentFolderChanged obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserCurrentFolderChangedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserCurrentFolderChangedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "current-folder-changed" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data FileChooserCurrentFolderChangedSignalInfo
instance SignalInfo FileChooserCurrentFolderChangedSignalInfo where
    type HaskellCallbackType FileChooserCurrentFolderChangedSignalInfo = FileChooserCurrentFolderChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_FileChooserCurrentFolderChangedCallback cb
        cb'' <- mk_FileChooserCurrentFolderChangedCallback cb'
        connectSignalFunPtr obj "current-folder-changed" cb'' connectMode detail

#endif

-- signal FileChooser::file-activated
-- | This signal is emitted when the user \"activates\" a file in the file
-- chooser.  This can happen by double-clicking on a file in the file list, or
-- by pressing @Enter@.
-- 
-- Normally you do not need to connect to this signal.  It is used internally
-- by t'GI.Gtk.Objects.FileChooserDialog.FileChooserDialog' to know when to activate the default button in the
-- dialog.
-- 
-- See also: 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilename',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilenames', 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris'.
type FileChooserFileActivatedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileChooserFileActivatedCallback`@.
noFileChooserFileActivatedCallback :: Maybe FileChooserFileActivatedCallback
noFileChooserFileActivatedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserFileActivatedCallback = Maybe FileChooserCurrentFolderChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_FileChooserFileActivated :: MonadIO m => FileChooserFileActivatedCallback -> m (GClosure C_FileChooserFileActivatedCallback)
genClosure_FileChooserFileActivated :: FileChooserCurrentFolderChangedCallback
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
genClosure_FileChooserFileActivated cb :: FileChooserCurrentFolderChangedCallback
cb = IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileChooserCurrentFolderChangedCallback)
 -> m (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserFileActivatedCallback FileChooserCurrentFolderChangedCallback
cb
    C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserFileActivatedCallback C_FileChooserCurrentFolderChangedCallback
cb' IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
-> (FunPtr C_FileChooserCurrentFolderChangedCallback
    -> IO (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileChooserCurrentFolderChangedCallback
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileChooserFileActivatedCallback` into a `C_FileChooserFileActivatedCallback`.
wrap_FileChooserFileActivatedCallback ::
    FileChooserFileActivatedCallback ->
    C_FileChooserFileActivatedCallback
wrap_FileChooserFileActivatedCallback :: FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserFileActivatedCallback _cb :: FileChooserCurrentFolderChangedCallback
_cb _ _ = do
    FileChooserCurrentFolderChangedCallback
_cb 


-- | Connect a signal handler for the [fileActivated](#signal:fileActivated) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' fileChooser #fileActivated callback
-- @
-- 
-- 
onFileChooserFileActivated :: (IsFileChooser a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
onFileChooserFileActivated :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserFileActivated obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserFileActivatedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserFileActivatedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "file-activated" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [fileActivated](#signal:fileActivated) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' fileChooser #fileActivated callback
-- @
-- 
-- 
afterFileChooserFileActivated :: (IsFileChooser a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
afterFileChooserFileActivated :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserFileActivated obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserFileActivatedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserFileActivatedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "file-activated" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data FileChooserFileActivatedSignalInfo
instance SignalInfo FileChooserFileActivatedSignalInfo where
    type HaskellCallbackType FileChooserFileActivatedSignalInfo = FileChooserFileActivatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_FileChooserFileActivatedCallback cb
        cb'' <- mk_FileChooserFileActivatedCallback cb'
        connectSignalFunPtr obj "file-activated" cb'' connectMode detail

#endif

-- signal FileChooser::selection-changed
-- | This signal is emitted when there is a change in the set of selected files
-- in a t'GI.Gtk.Interfaces.FileChooser.FileChooser'.  This can happen when the user modifies the selection
-- with the mouse or the keyboard, or when explicitly calling functions to
-- change the selection.
-- 
-- Normally you do not need to connect to this signal, as it is easier to wait
-- for the file chooser to finish running, and then to get the list of
-- selected files using the functions mentioned below.
-- 
-- See also: 'GI.Gtk.Interfaces.FileChooser.fileChooserSelectFilename',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserUnselectFilename', 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilename',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilenames', 'GI.Gtk.Interfaces.FileChooser.fileChooserSelectUri',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserUnselectUri', 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris'.
type FileChooserSelectionChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileChooserSelectionChangedCallback`@.
noFileChooserSelectionChangedCallback :: Maybe FileChooserSelectionChangedCallback
noFileChooserSelectionChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserSelectionChangedCallback = Maybe FileChooserCurrentFolderChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_FileChooserSelectionChanged :: MonadIO m => FileChooserSelectionChangedCallback -> m (GClosure C_FileChooserSelectionChangedCallback)
genClosure_FileChooserSelectionChanged :: FileChooserCurrentFolderChangedCallback
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
genClosure_FileChooserSelectionChanged cb :: FileChooserCurrentFolderChangedCallback
cb = IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileChooserCurrentFolderChangedCallback)
 -> m (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserSelectionChangedCallback FileChooserCurrentFolderChangedCallback
cb
    C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserSelectionChangedCallback C_FileChooserCurrentFolderChangedCallback
cb' IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
-> (FunPtr C_FileChooserCurrentFolderChangedCallback
    -> IO (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileChooserCurrentFolderChangedCallback
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileChooserSelectionChangedCallback` into a `C_FileChooserSelectionChangedCallback`.
wrap_FileChooserSelectionChangedCallback ::
    FileChooserSelectionChangedCallback ->
    C_FileChooserSelectionChangedCallback
wrap_FileChooserSelectionChangedCallback :: FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserSelectionChangedCallback _cb :: FileChooserCurrentFolderChangedCallback
_cb _ _ = do
    FileChooserCurrentFolderChangedCallback
_cb 


-- | Connect a signal handler for the [selectionChanged](#signal:selectionChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' fileChooser #selectionChanged callback
-- @
-- 
-- 
onFileChooserSelectionChanged :: (IsFileChooser a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
onFileChooserSelectionChanged :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserSelectionChanged obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserSelectionChangedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserSelectionChangedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "selection-changed" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionChanged](#signal:selectionChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' fileChooser #selectionChanged callback
-- @
-- 
-- 
afterFileChooserSelectionChanged :: (IsFileChooser a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
afterFileChooserSelectionChanged :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserSelectionChanged obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserSelectionChangedCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserSelectionChangedCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "selection-changed" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data FileChooserSelectionChangedSignalInfo
instance SignalInfo FileChooserSelectionChangedSignalInfo where
    type HaskellCallbackType FileChooserSelectionChangedSignalInfo = FileChooserSelectionChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_FileChooserSelectionChangedCallback cb
        cb'' <- mk_FileChooserSelectionChangedCallback cb'
        connectSignalFunPtr obj "selection-changed" cb'' connectMode detail

#endif

-- signal FileChooser::update-preview
-- | This signal is emitted when the preview in a file chooser should be
-- regenerated.  For example, this can happen when the currently selected file
-- changes.  You should use this signal if you want your file chooser to have
-- a preview widget.
-- 
-- Once you have installed a preview widget with
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget', you should update it when this
-- signal is emitted.  You can use the functions
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewFilename' or
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewUri' to get the name of the file to preview.
-- Your widget may not be able to preview all kinds of files; your callback
-- must call 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive' to inform the file
-- chooser about whether the preview was generated successfully or not.
-- 
-- Please see the example code in
-- [Using a Preview Widget][gtkfilechooser-preview].
-- 
-- See also: 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetUsePreviewLabel',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewFilename',
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewUri'.
type FileChooserUpdatePreviewCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `FileChooserUpdatePreviewCallback`@.
noFileChooserUpdatePreviewCallback :: Maybe FileChooserUpdatePreviewCallback
noFileChooserUpdatePreviewCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserUpdatePreviewCallback = Maybe FileChooserCurrentFolderChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_FileChooserUpdatePreview :: MonadIO m => FileChooserUpdatePreviewCallback -> m (GClosure C_FileChooserUpdatePreviewCallback)
genClosure_FileChooserUpdatePreview :: FileChooserCurrentFolderChangedCallback
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
genClosure_FileChooserUpdatePreview cb :: FileChooserCurrentFolderChangedCallback
cb = IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FileChooserCurrentFolderChangedCallback)
 -> m (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
-> m (GClosure C_FileChooserCurrentFolderChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserUpdatePreviewCallback FileChooserCurrentFolderChangedCallback
cb
    C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserUpdatePreviewCallback C_FileChooserCurrentFolderChangedCallback
cb' IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
-> (FunPtr C_FileChooserCurrentFolderChangedCallback
    -> IO (GClosure C_FileChooserCurrentFolderChangedCallback))
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FileChooserCurrentFolderChangedCallback
-> IO (GClosure C_FileChooserCurrentFolderChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `FileChooserUpdatePreviewCallback` into a `C_FileChooserUpdatePreviewCallback`.
wrap_FileChooserUpdatePreviewCallback ::
    FileChooserUpdatePreviewCallback ->
    C_FileChooserUpdatePreviewCallback
wrap_FileChooserUpdatePreviewCallback :: FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserUpdatePreviewCallback _cb :: FileChooserCurrentFolderChangedCallback
_cb _ _ = do
    FileChooserCurrentFolderChangedCallback
_cb 


-- | Connect a signal handler for the [updatePreview](#signal:updatePreview) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' fileChooser #updatePreview callback
-- @
-- 
-- 
onFileChooserUpdatePreview :: (IsFileChooser a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
onFileChooserUpdatePreview :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserUpdatePreview obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserUpdatePreviewCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserUpdatePreviewCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "update-preview" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [updatePreview](#signal:updatePreview) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' fileChooser #updatePreview callback
-- @
-- 
-- 
afterFileChooserUpdatePreview :: (IsFileChooser a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
afterFileChooserUpdatePreview :: a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserUpdatePreview obj :: a
obj cb :: FileChooserCurrentFolderChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_FileChooserCurrentFolderChangedCallback
cb' = FileChooserCurrentFolderChangedCallback
-> C_FileChooserCurrentFolderChangedCallback
wrap_FileChooserUpdatePreviewCallback FileChooserCurrentFolderChangedCallback
cb
    FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' <- C_FileChooserCurrentFolderChangedCallback
-> IO (FunPtr C_FileChooserCurrentFolderChangedCallback)
mk_FileChooserUpdatePreviewCallback C_FileChooserCurrentFolderChangedCallback
cb'
    a
-> Text
-> FunPtr C_FileChooserCurrentFolderChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "update-preview" FunPtr C_FileChooserCurrentFolderChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data FileChooserUpdatePreviewSignalInfo
instance SignalInfo FileChooserUpdatePreviewSignalInfo where
    type HaskellCallbackType FileChooserUpdatePreviewSignalInfo = FileChooserUpdatePreviewCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_FileChooserUpdatePreviewCallback cb
        cb'' <- mk_FileChooserUpdatePreviewCallback cb'
        connectSignalFunPtr obj "update-preview" cb'' connectMode detail

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FileChooser = FileChooserSignalList
type FileChooserSignalList = ('[ '("confirmOverwrite", FileChooserConfirmOverwriteSignalInfo), '("currentFolderChanged", FileChooserCurrentFolderChangedSignalInfo), '("fileActivated", FileChooserFileActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("selectionChanged", FileChooserSelectionChangedSignalInfo), '("updatePreview", FileChooserUpdatePreviewSignalInfo)] :: [(Symbol, *)])

#endif

foreign import ccall "gtk_file_chooser_get_type"
    c_gtk_file_chooser_get_type :: IO GType

instance GObject FileChooser where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_file_chooser_get_type
    

-- | Convert 'FileChooser' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue FileChooser where
    toGValue :: FileChooser -> IO GValue
toGValue o :: FileChooser
o = do
        GType
gtype <- IO GType
c_gtk_file_chooser_get_type
        FileChooser -> (Ptr FileChooser -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileChooser
o (GType
-> (GValue
    -> Ptr FileChooser -> FileChooserCurrentFolderChangedCallback)
-> Ptr FileChooser
-> IO GValue
forall a.
GType
-> (GValue -> a -> FileChooserCurrentFolderChangedCallback)
-> a
-> IO GValue
B.GValue.buildGValue GType
gtype GValue
-> Ptr FileChooser -> FileChooserCurrentFolderChangedCallback
forall a.
GObject a =>
GValue -> Ptr a -> FileChooserCurrentFolderChangedCallback
B.GValue.set_object)
        
    fromGValue :: GValue -> IO FileChooser
fromGValue gv :: GValue
gv = do
        Ptr FileChooser
ptr <- GValue -> IO (Ptr FileChooser)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FileChooser)
        (ManagedPtr FileChooser -> FileChooser)
-> Ptr FileChooser -> IO FileChooser
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FileChooser -> FileChooser
FileChooser Ptr FileChooser
ptr
        
    

-- | Type class for types which can be safely cast to `FileChooser`, for instance with `toFileChooser`.
class (GObject o, O.IsDescendantOf FileChooser o) => IsFileChooser o
instance (GObject o, O.IsDescendantOf FileChooser o) => IsFileChooser o

instance O.HasParentTypes FileChooser
type instance O.ParentTypes FileChooser = '[GObject.Object.Object]

-- | Cast to `FileChooser`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toFileChooser :: (MonadIO m, IsFileChooser o) => o -> m FileChooser
toFileChooser :: o -> m FileChooser
toFileChooser = IO FileChooser -> m FileChooser
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileChooser -> m FileChooser)
-> (o -> IO FileChooser) -> o -> m FileChooser
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FileChooser -> FileChooser) -> o -> IO FileChooser
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr FileChooser -> FileChooser
FileChooser

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@action@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserAction :: (IsFileChooser o) => Gtk.Enums.FileChooserAction -> IO (GValueConstruct o)
constructFileChooserAction :: FileChooserAction -> IO (GValueConstruct o)
constructFileChooserAction val :: FileChooserAction
val = String -> FileChooserAction -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "action" FileChooserAction
val

#if defined(ENABLE_OVERLOADING)
data FileChooserActionPropertyInfo
instance AttrInfo FileChooserActionPropertyInfo where
    type AttrAllowedOps FileChooserActionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserActionPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserActionPropertyInfo = (~) Gtk.Enums.FileChooserAction
    type AttrTransferTypeConstraint FileChooserActionPropertyInfo = (~) Gtk.Enums.FileChooserAction
    type AttrTransferType FileChooserActionPropertyInfo = Gtk.Enums.FileChooserAction
    type AttrGetType FileChooserActionPropertyInfo = Gtk.Enums.FileChooserAction
    type AttrLabel FileChooserActionPropertyInfo = "action"
    type AttrOrigin FileChooserActionPropertyInfo = FileChooser
    attrGet = getFileChooserAction
    attrSet = setFileChooserAction
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserAction
    attrClear = undefined
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@create-folders@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserCreateFolders :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserCreateFolders :: Bool -> IO (GValueConstruct o)
constructFileChooserCreateFolders val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "create-folders" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserCreateFoldersPropertyInfo
instance AttrInfo FileChooserCreateFoldersPropertyInfo where
    type AttrAllowedOps FileChooserCreateFoldersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserCreateFoldersPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool
    type AttrTransferType FileChooserCreateFoldersPropertyInfo = Bool
    type AttrGetType FileChooserCreateFoldersPropertyInfo = Bool
    type AttrLabel FileChooserCreateFoldersPropertyInfo = "create-folders"
    type AttrOrigin FileChooserCreateFoldersPropertyInfo = FileChooser
    attrGet = getFileChooserCreateFolders
    attrSet = setFileChooserCreateFolders
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserCreateFolders
    attrClear = undefined
#endif

-- VVV Prop "do-overwrite-confirmation"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

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

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

-- | Construct a `GValueConstruct` with valid value for the “@do-overwrite-confirmation@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserDoOverwriteConfirmation :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserDoOverwriteConfirmation :: Bool -> IO (GValueConstruct o)
constructFileChooserDoOverwriteConfirmation val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "do-overwrite-confirmation" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserDoOverwriteConfirmationPropertyInfo
instance AttrInfo FileChooserDoOverwriteConfirmationPropertyInfo where
    type AttrAllowedOps FileChooserDoOverwriteConfirmationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool
    type AttrTransferType FileChooserDoOverwriteConfirmationPropertyInfo = Bool
    type AttrGetType FileChooserDoOverwriteConfirmationPropertyInfo = Bool
    type AttrLabel FileChooserDoOverwriteConfirmationPropertyInfo = "do-overwrite-confirmation"
    type AttrOrigin FileChooserDoOverwriteConfirmationPropertyInfo = FileChooser
    attrGet = getFileChooserDoOverwriteConfirmation
    attrSet = setFileChooserDoOverwriteConfirmation
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserDoOverwriteConfirmation
    attrClear = undefined
#endif

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

-- | Get the value of the “@extra-widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' fileChooser #extraWidget
-- @
getFileChooserExtraWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget)
getFileChooserExtraWidget :: o -> m (Maybe Widget)
getFileChooserExtraWidget obj :: o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "extra-widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget

-- | Set the value of the “@extra-widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' fileChooser [ #extraWidget 'Data.GI.Base.Attributes.:=' value ]
-- @
setFileChooserExtraWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setFileChooserExtraWidget :: o -> a -> m ()
setFileChooserExtraWidget obj :: o
obj val :: a
val = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> FileChooserCurrentFolderChangedCallback
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> FileChooserCurrentFolderChangedCallback
B.Properties.setObjectPropertyObject o
obj "extra-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@extra-widget@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserExtraWidget :: (IsFileChooser o, Gtk.Widget.IsWidget a) => a -> IO (GValueConstruct o)
constructFileChooserExtraWidget :: a -> IO (GValueConstruct o)
constructFileChooserExtraWidget val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "extra-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data FileChooserExtraWidgetPropertyInfo
instance AttrInfo FileChooserExtraWidgetPropertyInfo where
    type AttrAllowedOps FileChooserExtraWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserExtraWidgetPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserExtraWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferTypeConstraint FileChooserExtraWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferType FileChooserExtraWidgetPropertyInfo = Gtk.Widget.Widget
    type AttrGetType FileChooserExtraWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
    type AttrLabel FileChooserExtraWidgetPropertyInfo = "extra-widget"
    type AttrOrigin FileChooserExtraWidgetPropertyInfo = FileChooser
    attrGet = getFileChooserExtraWidget
    attrSet = setFileChooserExtraWidget
    attrTransfer _ v = do
        unsafeCastTo Gtk.Widget.Widget v
    attrConstruct = constructFileChooserExtraWidget
    attrClear = undefined
#endif

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

-- | Get the value of the “@filter@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' fileChooser #filter
-- @
getFileChooserFilter :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.FileFilter.FileFilter)
getFileChooserFilter :: o -> m (Maybe FileFilter)
getFileChooserFilter obj :: o
obj = IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FileFilter) -> m (Maybe FileFilter))
-> IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr FileFilter -> FileFilter)
-> IO (Maybe FileFilter)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "filter" ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter

-- | Set the value of the “@filter@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' fileChooser [ #filter 'Data.GI.Base.Attributes.:=' value ]
-- @
setFileChooserFilter :: (MonadIO m, IsFileChooser o, Gtk.FileFilter.IsFileFilter a) => o -> a -> m ()
setFileChooserFilter :: o -> a -> m ()
setFileChooserFilter obj :: o
obj val :: a
val = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> FileChooserCurrentFolderChangedCallback
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> FileChooserCurrentFolderChangedCallback
B.Properties.setObjectPropertyObject o
obj "filter" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@filter@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserFilter :: (IsFileChooser o, Gtk.FileFilter.IsFileFilter a) => a -> IO (GValueConstruct o)
constructFileChooserFilter :: a -> IO (GValueConstruct o)
constructFileChooserFilter val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "filter" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data FileChooserFilterPropertyInfo
instance AttrInfo FileChooserFilterPropertyInfo where
    type AttrAllowedOps FileChooserFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserFilterPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserFilterPropertyInfo = Gtk.FileFilter.IsFileFilter
    type AttrTransferTypeConstraint FileChooserFilterPropertyInfo = Gtk.FileFilter.IsFileFilter
    type AttrTransferType FileChooserFilterPropertyInfo = Gtk.FileFilter.FileFilter
    type AttrGetType FileChooserFilterPropertyInfo = (Maybe Gtk.FileFilter.FileFilter)
    type AttrLabel FileChooserFilterPropertyInfo = "filter"
    type AttrOrigin FileChooserFilterPropertyInfo = FileChooser
    attrGet = getFileChooserFilter
    attrSet = setFileChooserFilter
    attrTransfer _ v = do
        unsafeCastTo Gtk.FileFilter.FileFilter v
    attrConstruct = constructFileChooserFilter
    attrClear = undefined
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@local-only@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserLocalOnly :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserLocalOnly :: Bool -> IO (GValueConstruct o)
constructFileChooserLocalOnly val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "local-only" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserLocalOnlyPropertyInfo
instance AttrInfo FileChooserLocalOnlyPropertyInfo where
    type AttrAllowedOps FileChooserLocalOnlyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserLocalOnlyPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool
    type AttrTransferType FileChooserLocalOnlyPropertyInfo = Bool
    type AttrGetType FileChooserLocalOnlyPropertyInfo = Bool
    type AttrLabel FileChooserLocalOnlyPropertyInfo = "local-only"
    type AttrOrigin FileChooserLocalOnlyPropertyInfo = FileChooser
    attrGet = getFileChooserLocalOnly
    attrSet = setFileChooserLocalOnly
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserLocalOnly
    attrClear = undefined
#endif

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

-- | Get the value of the “@preview-widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' fileChooser #previewWidget
-- @
getFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget)
getFileChooserPreviewWidget :: o -> m (Maybe Widget)
getFileChooserPreviewWidget obj :: o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "preview-widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget

-- | Set the value of the “@preview-widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' fileChooser [ #previewWidget 'Data.GI.Base.Attributes.:=' value ]
-- @
setFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setFileChooserPreviewWidget :: o -> a -> m ()
setFileChooserPreviewWidget obj :: o
obj val :: a
val = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> FileChooserCurrentFolderChangedCallback
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> FileChooserCurrentFolderChangedCallback
B.Properties.setObjectPropertyObject o
obj "preview-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@preview-widget@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserPreviewWidget :: (IsFileChooser o, Gtk.Widget.IsWidget a) => a -> IO (GValueConstruct o)
constructFileChooserPreviewWidget :: a -> IO (GValueConstruct o)
constructFileChooserPreviewWidget val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "preview-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data FileChooserPreviewWidgetPropertyInfo
instance AttrInfo FileChooserPreviewWidgetPropertyInfo where
    type AttrAllowedOps FileChooserPreviewWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserPreviewWidgetPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferTypeConstraint FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferType FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.Widget
    type AttrGetType FileChooserPreviewWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
    type AttrLabel FileChooserPreviewWidgetPropertyInfo = "preview-widget"
    type AttrOrigin FileChooserPreviewWidgetPropertyInfo = FileChooser
    attrGet = getFileChooserPreviewWidget
    attrSet = setFileChooserPreviewWidget
    attrTransfer _ v = do
        unsafeCastTo Gtk.Widget.Widget v
    attrConstruct = constructFileChooserPreviewWidget
    attrClear = undefined
#endif

-- VVV Prop "preview-widget-active"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

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

-- | Set the value of the “@preview-widget-active@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' fileChooser [ #previewWidgetActive 'Data.GI.Base.Attributes.:=' value ]
-- @
setFileChooserPreviewWidgetActive :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserPreviewWidgetActive :: o -> Bool -> m ()
setFileChooserPreviewWidgetActive obj :: o
obj val :: Bool
val = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> FileChooserCurrentFolderChangedCallback
forall a.
GObject a =>
a -> String -> Bool -> FileChooserCurrentFolderChangedCallback
B.Properties.setObjectPropertyBool o
obj "preview-widget-active" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@preview-widget-active@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserPreviewWidgetActive :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserPreviewWidgetActive :: Bool -> IO (GValueConstruct o)
constructFileChooserPreviewWidgetActive val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "preview-widget-active" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserPreviewWidgetActivePropertyInfo
instance AttrInfo FileChooserPreviewWidgetActivePropertyInfo where
    type AttrAllowedOps FileChooserPreviewWidgetActivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool
    type AttrTransferType FileChooserPreviewWidgetActivePropertyInfo = Bool
    type AttrGetType FileChooserPreviewWidgetActivePropertyInfo = Bool
    type AttrLabel FileChooserPreviewWidgetActivePropertyInfo = "preview-widget-active"
    type AttrOrigin FileChooserPreviewWidgetActivePropertyInfo = FileChooser
    attrGet = getFileChooserPreviewWidgetActive
    attrSet = setFileChooserPreviewWidgetActive
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserPreviewWidgetActive
    attrClear = undefined
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@select-multiple@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserSelectMultiple :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserSelectMultiple :: Bool -> IO (GValueConstruct o)
constructFileChooserSelectMultiple val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "select-multiple" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserSelectMultiplePropertyInfo
instance AttrInfo FileChooserSelectMultiplePropertyInfo where
    type AttrAllowedOps FileChooserSelectMultiplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserSelectMultiplePropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool
    type AttrTransferType FileChooserSelectMultiplePropertyInfo = Bool
    type AttrGetType FileChooserSelectMultiplePropertyInfo = Bool
    type AttrLabel FileChooserSelectMultiplePropertyInfo = "select-multiple"
    type AttrOrigin FileChooserSelectMultiplePropertyInfo = FileChooser
    attrGet = getFileChooserSelectMultiple
    attrSet = setFileChooserSelectMultiple
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserSelectMultiple
    attrClear = undefined
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@show-hidden@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserShowHidden :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserShowHidden :: Bool -> IO (GValueConstruct o)
constructFileChooserShowHidden val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "show-hidden" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserShowHiddenPropertyInfo
instance AttrInfo FileChooserShowHiddenPropertyInfo where
    type AttrAllowedOps FileChooserShowHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserShowHiddenPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool
    type AttrTransferType FileChooserShowHiddenPropertyInfo = Bool
    type AttrGetType FileChooserShowHiddenPropertyInfo = Bool
    type AttrLabel FileChooserShowHiddenPropertyInfo = "show-hidden"
    type AttrOrigin FileChooserShowHiddenPropertyInfo = FileChooser
    attrGet = getFileChooserShowHidden
    attrSet = setFileChooserShowHidden
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserShowHidden
    attrClear = undefined
#endif

-- VVV Prop "use-preview-label"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

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

-- | Set the value of the “@use-preview-label@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' fileChooser [ #usePreviewLabel 'Data.GI.Base.Attributes.:=' value ]
-- @
setFileChooserUsePreviewLabel :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserUsePreviewLabel :: o -> Bool -> m ()
setFileChooserUsePreviewLabel obj :: o
obj val :: Bool
val = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> FileChooserCurrentFolderChangedCallback
forall a.
GObject a =>
a -> String -> Bool -> FileChooserCurrentFolderChangedCallback
B.Properties.setObjectPropertyBool o
obj "use-preview-label" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@use-preview-label@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructFileChooserUsePreviewLabel :: (IsFileChooser o) => Bool -> IO (GValueConstruct o)
constructFileChooserUsePreviewLabel :: Bool -> IO (GValueConstruct o)
constructFileChooserUsePreviewLabel val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "use-preview-label" Bool
val

#if defined(ENABLE_OVERLOADING)
data FileChooserUsePreviewLabelPropertyInfo
instance AttrInfo FileChooserUsePreviewLabelPropertyInfo where
    type AttrAllowedOps FileChooserUsePreviewLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint FileChooserUsePreviewLabelPropertyInfo = IsFileChooser
    type AttrSetTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool
    type AttrTransferType FileChooserUsePreviewLabelPropertyInfo = Bool
    type AttrGetType FileChooserUsePreviewLabelPropertyInfo = Bool
    type AttrLabel FileChooserUsePreviewLabelPropertyInfo = "use-preview-label"
    type AttrOrigin FileChooserUsePreviewLabelPropertyInfo = FileChooser
    attrGet = getFileChooserUsePreviewLabel
    attrSet = setFileChooserUsePreviewLabel
    attrTransfer _ v = do
        return v
    attrConstruct = constructFileChooserUsePreviewLabel
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileChooser
type instance O.AttributeList FileChooser = FileChooserAttributeList
type FileChooserAttributeList = ('[ '("action", FileChooserActionPropertyInfo), '("createFolders", FileChooserCreateFoldersPropertyInfo), '("doOverwriteConfirmation", FileChooserDoOverwriteConfirmationPropertyInfo), '("extraWidget", FileChooserExtraWidgetPropertyInfo), '("filter", FileChooserFilterPropertyInfo), '("localOnly", FileChooserLocalOnlyPropertyInfo), '("previewWidget", FileChooserPreviewWidgetPropertyInfo), '("previewWidgetActive", FileChooserPreviewWidgetActivePropertyInfo), '("selectMultiple", FileChooserSelectMultiplePropertyInfo), '("showHidden", FileChooserShowHiddenPropertyInfo), '("usePreviewLabel", FileChooserUsePreviewLabelPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
fileChooserAction :: AttrLabelProxy "action"
fileChooserAction = AttrLabelProxy

fileChooserCreateFolders :: AttrLabelProxy "createFolders"
fileChooserCreateFolders = AttrLabelProxy

fileChooserDoOverwriteConfirmation :: AttrLabelProxy "doOverwriteConfirmation"
fileChooserDoOverwriteConfirmation = AttrLabelProxy

fileChooserExtraWidget :: AttrLabelProxy "extraWidget"
fileChooserExtraWidget = AttrLabelProxy

fileChooserFilter :: AttrLabelProxy "filter"
fileChooserFilter = AttrLabelProxy

fileChooserLocalOnly :: AttrLabelProxy "localOnly"
fileChooserLocalOnly = AttrLabelProxy

fileChooserPreviewWidget :: AttrLabelProxy "previewWidget"
fileChooserPreviewWidget = AttrLabelProxy

fileChooserPreviewWidgetActive :: AttrLabelProxy "previewWidgetActive"
fileChooserPreviewWidgetActive = AttrLabelProxy

fileChooserSelectMultiple :: AttrLabelProxy "selectMultiple"
fileChooserSelectMultiple = AttrLabelProxy

fileChooserShowHidden :: AttrLabelProxy "showHidden"
fileChooserShowHidden = AttrLabelProxy

fileChooserUsePreviewLabel :: AttrLabelProxy "usePreviewLabel"
fileChooserUsePreviewLabel = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveFileChooserMethod (t :: Symbol) (o :: *) :: * where
    ResolveFileChooserMethod "addChoice" o = FileChooserAddChoiceMethodInfo
    ResolveFileChooserMethod "addFilter" o = FileChooserAddFilterMethodInfo
    ResolveFileChooserMethod "addShortcutFolder" o = FileChooserAddShortcutFolderMethodInfo
    ResolveFileChooserMethod "addShortcutFolderUri" o = FileChooserAddShortcutFolderUriMethodInfo
    ResolveFileChooserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveFileChooserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveFileChooserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveFileChooserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveFileChooserMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveFileChooserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveFileChooserMethod "listFilters" o = FileChooserListFiltersMethodInfo
    ResolveFileChooserMethod "listShortcutFolderUris" o = FileChooserListShortcutFolderUrisMethodInfo
    ResolveFileChooserMethod "listShortcutFolders" o = FileChooserListShortcutFoldersMethodInfo
    ResolveFileChooserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveFileChooserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveFileChooserMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveFileChooserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveFileChooserMethod "removeChoice" o = FileChooserRemoveChoiceMethodInfo
    ResolveFileChooserMethod "removeFilter" o = FileChooserRemoveFilterMethodInfo
    ResolveFileChooserMethod "removeShortcutFolder" o = FileChooserRemoveShortcutFolderMethodInfo
    ResolveFileChooserMethod "removeShortcutFolderUri" o = FileChooserRemoveShortcutFolderUriMethodInfo
    ResolveFileChooserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveFileChooserMethod "selectAll" o = FileChooserSelectAllMethodInfo
    ResolveFileChooserMethod "selectFile" o = FileChooserSelectFileMethodInfo
    ResolveFileChooserMethod "selectFilename" o = FileChooserSelectFilenameMethodInfo
    ResolveFileChooserMethod "selectUri" o = FileChooserSelectUriMethodInfo
    ResolveFileChooserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveFileChooserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveFileChooserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveFileChooserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveFileChooserMethod "unselectAll" o = FileChooserUnselectAllMethodInfo
    ResolveFileChooserMethod "unselectFile" o = FileChooserUnselectFileMethodInfo
    ResolveFileChooserMethod "unselectFilename" o = FileChooserUnselectFilenameMethodInfo
    ResolveFileChooserMethod "unselectUri" o = FileChooserUnselectUriMethodInfo
    ResolveFileChooserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveFileChooserMethod "getAction" o = FileChooserGetActionMethodInfo
    ResolveFileChooserMethod "getChoice" o = FileChooserGetChoiceMethodInfo
    ResolveFileChooserMethod "getCreateFolders" o = FileChooserGetCreateFoldersMethodInfo
    ResolveFileChooserMethod "getCurrentFolder" o = FileChooserGetCurrentFolderMethodInfo
    ResolveFileChooserMethod "getCurrentFolderFile" o = FileChooserGetCurrentFolderFileMethodInfo
    ResolveFileChooserMethod "getCurrentFolderUri" o = FileChooserGetCurrentFolderUriMethodInfo
    ResolveFileChooserMethod "getCurrentName" o = FileChooserGetCurrentNameMethodInfo
    ResolveFileChooserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveFileChooserMethod "getDoOverwriteConfirmation" o = FileChooserGetDoOverwriteConfirmationMethodInfo
    ResolveFileChooserMethod "getExtraWidget" o = FileChooserGetExtraWidgetMethodInfo
    ResolveFileChooserMethod "getFile" o = FileChooserGetFileMethodInfo
    ResolveFileChooserMethod "getFilename" o = FileChooserGetFilenameMethodInfo
    ResolveFileChooserMethod "getFilenames" o = FileChooserGetFilenamesMethodInfo
    ResolveFileChooserMethod "getFiles" o = FileChooserGetFilesMethodInfo
    ResolveFileChooserMethod "getFilter" o = FileChooserGetFilterMethodInfo
    ResolveFileChooserMethod "getLocalOnly" o = FileChooserGetLocalOnlyMethodInfo
    ResolveFileChooserMethod "getPreviewFile" o = FileChooserGetPreviewFileMethodInfo
    ResolveFileChooserMethod "getPreviewFilename" o = FileChooserGetPreviewFilenameMethodInfo
    ResolveFileChooserMethod "getPreviewUri" o = FileChooserGetPreviewUriMethodInfo
    ResolveFileChooserMethod "getPreviewWidget" o = FileChooserGetPreviewWidgetMethodInfo
    ResolveFileChooserMethod "getPreviewWidgetActive" o = FileChooserGetPreviewWidgetActiveMethodInfo
    ResolveFileChooserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveFileChooserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveFileChooserMethod "getSelectMultiple" o = FileChooserGetSelectMultipleMethodInfo
    ResolveFileChooserMethod "getShowHidden" o = FileChooserGetShowHiddenMethodInfo
    ResolveFileChooserMethod "getUri" o = FileChooserGetUriMethodInfo
    ResolveFileChooserMethod "getUris" o = FileChooserGetUrisMethodInfo
    ResolveFileChooserMethod "getUsePreviewLabel" o = FileChooserGetUsePreviewLabelMethodInfo
    ResolveFileChooserMethod "setAction" o = FileChooserSetActionMethodInfo
    ResolveFileChooserMethod "setChoice" o = FileChooserSetChoiceMethodInfo
    ResolveFileChooserMethod "setCreateFolders" o = FileChooserSetCreateFoldersMethodInfo
    ResolveFileChooserMethod "setCurrentFolder" o = FileChooserSetCurrentFolderMethodInfo
    ResolveFileChooserMethod "setCurrentFolderFile" o = FileChooserSetCurrentFolderFileMethodInfo
    ResolveFileChooserMethod "setCurrentFolderUri" o = FileChooserSetCurrentFolderUriMethodInfo
    ResolveFileChooserMethod "setCurrentName" o = FileChooserSetCurrentNameMethodInfo
    ResolveFileChooserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveFileChooserMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveFileChooserMethod "setDoOverwriteConfirmation" o = FileChooserSetDoOverwriteConfirmationMethodInfo
    ResolveFileChooserMethod "setExtraWidget" o = FileChooserSetExtraWidgetMethodInfo
    ResolveFileChooserMethod "setFile" o = FileChooserSetFileMethodInfo
    ResolveFileChooserMethod "setFilename" o = FileChooserSetFilenameMethodInfo
    ResolveFileChooserMethod "setFilter" o = FileChooserSetFilterMethodInfo
    ResolveFileChooserMethod "setLocalOnly" o = FileChooserSetLocalOnlyMethodInfo
    ResolveFileChooserMethod "setPreviewWidget" o = FileChooserSetPreviewWidgetMethodInfo
    ResolveFileChooserMethod "setPreviewWidgetActive" o = FileChooserSetPreviewWidgetActiveMethodInfo
    ResolveFileChooserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveFileChooserMethod "setSelectMultiple" o = FileChooserSetSelectMultipleMethodInfo
    ResolveFileChooserMethod "setShowHidden" o = FileChooserSetShowHiddenMethodInfo
    ResolveFileChooserMethod "setUri" o = FileChooserSetUriMethodInfo
    ResolveFileChooserMethod "setUsePreviewLabel" o = FileChooserSetUsePreviewLabelMethodInfo
    ResolveFileChooserMethod l o = O.MethodResolutionFailed l o

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

#endif

-- method FileChooser::add_choice
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "id for the added choice"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "label"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "user-visible label for the added choice"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "options"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "ids for the options of the choice, or %NULL for a boolean choice"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "option_labels"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "user-visible labels for the options, must be the same length as @options"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_file_chooser_add_choice" gtk_file_chooser_add_choice :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    CString ->                              -- id : TBasicType TUTF8
    CString ->                              -- label : TBasicType TUTF8
    Ptr CString ->                          -- options : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr CString ->                          -- option_labels : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()

-- | Adds a \'choice\' to the file chooser. This is typically implemented
-- as a combobox or, for boolean choices, as a checkbutton. You can select
-- a value using 'GI.Gtk.Interfaces.FileChooser.fileChooserSetChoice' before the dialog is shown,
-- and you can obtain the user-selected value in the [response](#signal:response) signal handler
-- using 'GI.Gtk.Interfaces.FileChooser.fileChooserGetChoice'.
-- 
-- Compare 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget'.
-- 
-- /Since: 3.22/
fileChooserAddChoice ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> T.Text
    -- ^ /@id@/: id for the added choice
    -> T.Text
    -- ^ /@label@/: user-visible label for the added choice
    -> Maybe ([T.Text])
    -- ^ /@options@/: ids for the options of the choice, or 'P.Nothing' for a boolean choice
    -> Maybe ([T.Text])
    -- ^ /@optionLabels@/: user-visible labels for the options, must be the same length as /@options@/
    -> m ()
fileChooserAddChoice :: a -> Text -> Text -> Maybe [Text] -> Maybe [Text] -> m ()
fileChooserAddChoice chooser :: a
chooser id :: Text
id label :: Text
label options :: Maybe [Text]
options optionLabels :: Maybe [Text]
optionLabels = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
id' <- Text -> IO CString
textToCString Text
id
    CString
label' <- Text -> IO CString
textToCString Text
label
    Ptr CString
maybeOptions <- case Maybe [Text]
options of
        Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
        Just jOptions :: [Text]
jOptions -> do
            Ptr CString
jOptions' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOptions
            Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOptions'
    Ptr CString
maybeOptionLabels <- case Maybe [Text]
optionLabels of
        Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
        Just jOptionLabels :: [Text]
jOptionLabels -> do
            Ptr CString
jOptionLabels' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOptionLabels
            Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOptionLabels'
    Ptr FileChooser
-> CString
-> CString
-> Ptr CString
-> Ptr CString
-> FileChooserCurrentFolderChangedCallback
gtk_file_chooser_add_choice Ptr FileChooser
chooser' CString
id' CString
label' Ptr CString
maybeOptions Ptr CString
maybeOptionLabels
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
id'
    CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
label'
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr CString -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (Ptr a) -> FileChooserCurrentFolderChangedCallback
mapZeroTerminatedCArray CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr CString
maybeOptions
    Ptr CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr CString
maybeOptions
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr CString -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (Ptr a) -> FileChooserCurrentFolderChangedCallback
mapZeroTerminatedCArray CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr CString
maybeOptionLabels
    Ptr CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr CString
maybeOptionLabels
    () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data FileChooserAddChoiceMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe ([T.Text]) -> Maybe ([T.Text]) -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddChoiceMethodInfo a signature where
    overloadedMethod = fileChooserAddChoice

#endif

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

foreign import ccall "gtk_file_chooser_add_filter" gtk_file_chooser_add_filter :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    Ptr Gtk.FileFilter.FileFilter ->        -- filter : TInterface (Name {namespace = "Gtk", name = "FileFilter"})
    IO ()

-- | Adds /@filter@/ to the list of filters that the user can select between.
-- When a filter is selected, only files that are passed by that
-- filter are displayed.
-- 
-- Note that the /@chooser@/ takes ownership of the filter, so you have to
-- ref and sink it if you want to keep a reference.
-- 
-- /Since: 2.4/
fileChooserAddFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> b
    -- ^ /@filter@/: a t'GI.Gtk.Objects.FileFilter.FileFilter'
    -> m ()
fileChooserAddFilter :: a -> b -> m ()
fileChooserAddFilter chooser :: a
chooser filter :: b
filter = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr FileFilter
filter' <- b -> IO (Ptr FileFilter)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
filter
    Ptr FileChooser
-> Ptr FileFilter -> FileChooserCurrentFolderChangedCallback
gtk_file_chooser_add_filter Ptr FileChooser
chooser' Ptr FileFilter
filter'
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    b -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr b
filter
    () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data FileChooserAddFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserAddFilterMethodInfo a signature where
    overloadedMethod = fileChooserAddFilter

#endif

-- method FileChooser::add_shortcut_folder
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "folder"
--           , argType = TBasicType TFileName
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "filename of the folder to add"
--                 , 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_file_chooser_add_shortcut_folder" gtk_file_chooser_add_shortcut_folder :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    CString ->                              -- folder : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Adds a folder to be displayed with the shortcut folders in a file chooser.
-- Note that shortcut folders do not get saved, as they are provided by the
-- application.  For example, you can use this to add a
-- “\/usr\/share\/mydrawprogram\/Clipart” folder to the volume list.
-- 
-- /Since: 2.4/
fileChooserAddShortcutFolder ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> [Char]
    -- ^ /@folder@/: filename of the folder to add
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
fileChooserAddShortcutFolder :: a -> String -> m ()
fileChooserAddShortcutFolder chooser :: a
chooser folder :: String
folder = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
folder' <- String -> IO CString
stringToCString String
folder
    FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_add_shortcut_folder Ptr FileChooser
chooser' CString
folder'
        a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
folder'
        () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
folder'
     )

#if defined(ENABLE_OVERLOADING)
data FileChooserAddShortcutFolderMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderMethodInfo a signature where
    overloadedMethod = fileChooserAddShortcutFolder

#endif

-- method FileChooser::add_shortcut_folder_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , 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 "URI of the folder to add"
--                 , 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_file_chooser_add_shortcut_folder_uri" gtk_file_chooser_add_shortcut_folder_uri :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    CString ->                              -- uri : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Adds a folder URI to be displayed with the shortcut folders in a file
-- chooser.  Note that shortcut folders do not get saved, as they are provided
-- by the application.  For example, you can use this to add a
-- “file:\/\/\/usr\/share\/mydrawprogram\/Clipart” folder to the volume list.
-- 
-- /Since: 2.4/
fileChooserAddShortcutFolderUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> T.Text
    -- ^ /@uri@/: URI of the folder to add
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
fileChooserAddShortcutFolderUri :: a -> Text -> m ()
fileChooserAddShortcutFolderUri chooser :: a
chooser uri :: Text
uri = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
uri' <- Text -> IO CString
textToCString Text
uri
    FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_add_shortcut_folder_uri Ptr FileChooser
chooser' CString
uri'
        a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
uri'
        () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
uri'
     )

#if defined(ENABLE_OVERLOADING)
data FileChooserAddShortcutFolderUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderUriMethodInfo a signature where
    overloadedMethod = fileChooserAddShortcutFolderUri

#endif

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

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

-- | Gets the type of operation that the file chooser is performing; see
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetAction'.
-- 
-- /Since: 2.4/
fileChooserGetAction ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Gtk.Enums.FileChooserAction
    -- ^ __Returns:__ the action that the file selector is performing
fileChooserGetAction :: a -> m FileChooserAction
fileChooserGetAction chooser :: a
chooser = IO FileChooserAction -> m FileChooserAction
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileChooserAction -> m FileChooserAction)
-> IO FileChooserAction -> m FileChooserAction
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CUInt
result <- Ptr FileChooser -> IO CUInt
gtk_file_chooser_get_action Ptr FileChooser
chooser'
    let result' :: FileChooserAction
result' = (Int -> FileChooserAction
forall a. Enum a => Int -> a
toEnum (Int -> FileChooserAction)
-> (CUInt -> Int) -> CUInt -> FileChooserAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    FileChooserAction -> IO FileChooserAction
forall (m :: * -> *) a. Monad m => a -> m a
return FileChooserAction
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetActionMethodInfo
instance (signature ~ (m Gtk.Enums.FileChooserAction), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetActionMethodInfo a signature where
    overloadedMethod = fileChooserGetAction

#endif

-- method FileChooser::get_choice
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the ID of the choice to get"
--                 , 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_file_chooser_get_choice" gtk_file_chooser_get_choice :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    CString ->                              -- id : TBasicType TUTF8
    IO CString

-- | Gets the currently selected option in the \'choice\' with the given ID.
-- 
-- /Since: 3.22/
fileChooserGetChoice ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> T.Text
    -- ^ /@id@/: the ID of the choice to get
    -> m T.Text
    -- ^ __Returns:__ the ID of the currenly selected option
fileChooserGetChoice :: a -> Text -> m Text
fileChooserGetChoice chooser :: a
chooser id :: Text
id = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
id' <- Text -> IO CString
textToCString Text
id
    CString
result <- Ptr FileChooser -> CString -> IO CString
gtk_file_chooser_get_choice Ptr FileChooser
chooser' CString
id'
    Text -> CString -> FileChooserCurrentFolderChangedCallback
forall a.
HasCallStack =>
Text -> Ptr a -> FileChooserCurrentFolderChangedCallback
checkUnexpectedReturnNULL "fileChooserGetChoice" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
id'
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetChoiceMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetChoiceMethodInfo a signature where
    overloadedMethod = fileChooserGetChoice

#endif

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

-- | Gets whether file choser will offer to create new folders.
-- See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCreateFolders'.
-- 
-- /Since: 2.18/
fileChooserGetCreateFolders ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the Create Folder button should be displayed.
fileChooserGetCreateFolders :: a -> m Bool
fileChooserGetCreateFolders chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_create_folders Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetCreateFoldersMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCreateFoldersMethodInfo a signature where
    overloadedMethod = fileChooserGetCreateFolders

#endif

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

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

-- | Gets the current folder of /@chooser@/ as a local filename.
-- See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolder'.
-- 
-- Note that this is the folder that the file chooser is currently displaying
-- (e.g. \"\/home\/username\/Documents\"), which is not the same
-- as the currently-selected folder if the chooser is in
-- 'GI.Gtk.Enums.FileChooserActionSelectFolder' mode
-- (e.g. \"\/home\/username\/Documents\/selected-folder\/\".  To get the
-- currently-selected folder in that mode, use 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri' as the
-- usual way to get the selection.
-- 
-- /Since: 2.4/
fileChooserGetCurrentFolder ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe [Char])
    -- ^ __Returns:__ the full path of the current
    -- folder, or 'P.Nothing' if the current path cannot be represented as a local
    -- filename.  Free with 'GI.GLib.Functions.free'.  This function will also return
    -- 'P.Nothing' if the file chooser was unable to load the last folder that
    -- was requested from it; for example, as would be for calling
    -- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolder' on a nonexistent folder.
fileChooserGetCurrentFolder :: a -> m (Maybe String)
fileChooserGetCurrentFolder chooser :: a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder Ptr FileChooser
chooser'
    Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderMethodInfo a signature where
    overloadedMethod = fileChooserGetCurrentFolder

#endif

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

foreign import ccall "gtk_file_chooser_get_current_folder_file" gtk_file_chooser_get_current_folder_file :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gio.File.File)

-- | Gets the current folder of /@chooser@/ as t'GI.Gio.Interfaces.File.File'.
-- See 'GI.Gtk.Interfaces.FileChooser.fileChooserGetCurrentFolderUri'.
-- 
-- /Since: 2.14/
fileChooserGetCurrentFolderFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Gio.File.File
    -- ^ __Returns:__ the t'GI.Gio.Interfaces.File.File' for the current folder.
fileChooserGetCurrentFolderFile :: a -> m File
fileChooserGetCurrentFolderFile chooser :: a
chooser = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_current_folder_file Ptr FileChooser
chooser'
    Text -> Ptr File -> FileChooserCurrentFolderChangedCallback
forall a.
HasCallStack =>
Text -> Ptr a -> FileChooserCurrentFolderChangedCallback
checkUnexpectedReturnNULL "fileChooserGetCurrentFolderFile" Ptr File
result
    File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderFileMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderFileMethodInfo a signature where
    overloadedMethod = fileChooserGetCurrentFolderFile

#endif

-- method FileChooser::get_current_folder_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , 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_file_chooser_get_current_folder_uri" gtk_file_chooser_get_current_folder_uri :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO CString

-- | Gets the current folder of /@chooser@/ as an URI.
-- See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri'.
-- 
-- Note that this is the folder that the file chooser is currently displaying
-- (e.g. \"file:\/\/\/home\/username\/Documents\"), which is not the same
-- as the currently-selected folder if the chooser is in
-- 'GI.Gtk.Enums.FileChooserActionSelectFolder' mode
-- (e.g. \"file:\/\/\/home\/username\/Documents\/selected-folder\/\".  To get the
-- currently-selected folder in that mode, use 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri' as the
-- usual way to get the selection.
-- 
-- /Since: 2.4/
fileChooserGetCurrentFolderUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the URI for the current folder.
    -- Free with 'GI.GLib.Functions.free'.  This function will also return 'P.Nothing' if the file chooser
    -- was unable to load the last folder that was requested from it; for example,
    -- as would be for calling 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri' on a
    -- nonexistent folder.
fileChooserGetCurrentFolderUri :: a -> m (Maybe Text)
fileChooserGetCurrentFolderUri chooser :: a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder_uri Ptr FileChooser
chooser'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderUriMethodInfo a signature where
    overloadedMethod = fileChooserGetCurrentFolderUri

#endif

-- method FileChooser::get_current_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , 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_file_chooser_get_current_name" gtk_file_chooser_get_current_name :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO CString

-- | Gets the current name in the file selector, as entered by the user in the
-- text entry for “Name”.
-- 
-- This is meant to be used in save dialogs, to get the currently typed filename
-- when the file itself does not exist yet.  For example, an application that
-- adds a custom extra widget to the file chooser for “file format” may want to
-- change the extension of the typed filename based on the chosen format, say,
-- from “.jpg” to “.png”.
-- 
-- /Since: 3.10/
fileChooserGetCurrentName ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m T.Text
    -- ^ __Returns:__ The raw text from the file chooser’s “Name” entry.  Free this with
    -- 'GI.GLib.Functions.free'.  Note that this string is not a full pathname or URI; it is
    -- whatever the contents of the entry are.  Note also that this string is in
    -- UTF-8 encoding, which is not necessarily the system’s encoding for filenames.
fileChooserGetCurrentName :: a -> m Text
fileChooserGetCurrentName chooser :: a
chooser = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_name Ptr FileChooser
chooser'
    Text -> CString -> FileChooserCurrentFolderChangedCallback
forall a.
HasCallStack =>
Text -> Ptr a -> FileChooserCurrentFolderChangedCallback
checkUnexpectedReturnNULL "fileChooserGetCurrentName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentNameMethodInfo a signature where
    overloadedMethod = fileChooserGetCurrentName

#endif

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

-- | Queries whether a file chooser is set to confirm for overwriting when the user
-- types a file name that already exists.
-- 
-- /Since: 2.8/
fileChooserGetDoOverwriteConfirmation ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the file chooser will present a confirmation dialog;
    -- 'P.False' otherwise.
fileChooserGetDoOverwriteConfirmation :: a -> m Bool
fileChooserGetDoOverwriteConfirmation chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_do_overwrite_confirmation Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetDoOverwriteConfirmationMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetDoOverwriteConfirmationMethodInfo a signature where
    overloadedMethod = fileChooserGetDoOverwriteConfirmation

#endif

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

foreign import ccall "gtk_file_chooser_get_extra_widget" gtk_file_chooser_get_extra_widget :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gtk.Widget.Widget)

-- | Gets the current extra widget; see
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget'.
-- 
-- /Since: 2.4/
fileChooserGetExtraWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the current extra widget, or 'P.Nothing'
fileChooserGetExtraWidget :: a -> m (Maybe Widget)
fileChooserGetExtraWidget chooser :: a
chooser = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr Widget
result <- Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_extra_widget Ptr FileChooser
chooser'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetExtraWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetExtraWidgetMethodInfo a signature where
    overloadedMethod = fileChooserGetExtraWidget

#endif

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

foreign import ccall "gtk_file_chooser_get_file" gtk_file_chooser_get_file :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gio.File.File)

-- | Gets the t'GI.Gio.Interfaces.File.File' for the currently selected file in
-- the file selector. If multiple files are selected,
-- one of the files will be returned at random.
-- 
-- If the file chooser is in folder mode, this function returns the selected
-- folder.
-- 
-- /Since: 2.14/
fileChooserGetFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Gio.File.File
    -- ^ __Returns:__ a selected t'GI.Gio.Interfaces.File.File'. You own the returned file;
    --     use 'GI.GObject.Objects.Object.objectUnref' to release it.
fileChooserGetFile :: a -> m File
fileChooserGetFile chooser :: a
chooser = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_file Ptr FileChooser
chooser'
    Text -> Ptr File -> FileChooserCurrentFolderChangedCallback
forall a.
HasCallStack =>
Text -> Ptr a -> FileChooserCurrentFolderChangedCallback
checkUnexpectedReturnNULL "fileChooserGetFile" Ptr File
result
    File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetFileMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFileMethodInfo a signature where
    overloadedMethod = fileChooserGetFile

#endif

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

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

-- | Gets the filename for the currently selected file in
-- the file selector. The filename is returned as an absolute path. If
-- multiple files are selected, one of the filenames will be returned at
-- random.
-- 
-- If the file chooser is in folder mode, this function returns the selected
-- folder.
-- 
-- /Since: 2.4/
fileChooserGetFilename ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe [Char])
    -- ^ __Returns:__ The currently selected filename,
    --  or 'P.Nothing' if no file is selected, or the selected file can\'t
    --  be represented with a local filename. Free with 'GI.GLib.Functions.free'.
fileChooserGetFilename :: a -> m (Maybe String)
fileChooserGetFilename chooser :: a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_filename Ptr FileChooser
chooser'
    Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilenameMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenameMethodInfo a signature where
    overloadedMethod = fileChooserGetFilename

#endif

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

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

-- | Lists all the selected files and subfolders in the current folder of
-- /@chooser@/. The returned names are full absolute paths. If files in the current
-- folder cannot be represented as local filenames they will be ignored. (See
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris')
-- 
-- /Since: 2.4/
fileChooserGetFilenames ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [[Char]]
    -- ^ __Returns:__ a t'GI.GLib.Structs.SList.SList'
    --    containing the filenames of all selected files and subfolders in
    --    the current folder. Free the returned list with @/g_slist_free()/@,
    --    and the filenames with 'GI.GLib.Functions.free'.
fileChooserGetFilenames :: a -> m [String]
fileChooserGetFilenames chooser :: a
chooser = IO [String] -> m [String]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [String] -> m [String]) -> IO [String] -> m [String]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_get_filenames Ptr FileChooser
chooser'
    [CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
    [String]
result'' <- (CString -> IO String) -> [CString] -> IO [String]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO String
CString -> IO String
cstringToString [CString]
result'
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (GSList (Ptr a)) -> FileChooserCurrentFolderChangedCallback
mapGSList CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr (GSList CString)
result
    Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList CString)
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [String] -> IO [String]
forall (m :: * -> *) a. Monad m => a -> m a
return [String]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilenamesMethodInfo
instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenamesMethodInfo a signature where
    overloadedMethod = fileChooserGetFilenames

#endif

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

foreign import ccall "gtk_file_chooser_get_files" gtk_file_chooser_get_files :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr (GSList (Ptr Gio.File.File)))

-- | Lists all the selected files and subfolders in the current folder of /@chooser@/
-- as t'GI.Gio.Interfaces.File.File'. An internal function, see 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris'.
-- 
-- /Since: 2.14/
fileChooserGetFiles ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [Gio.File.File]
    -- ^ __Returns:__ a t'GI.GLib.Structs.SList.SList'
    --   containing a t'GI.Gio.Interfaces.File.File' for each selected file and subfolder in the
    --   current folder.  Free the returned list with @/g_slist_free()/@, and
    --   the files with 'GI.GObject.Objects.Object.objectUnref'.
fileChooserGetFiles :: a -> m [File]
fileChooserGetFiles chooser :: a
chooser = IO [File] -> m [File]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [File] -> m [File]) -> IO [File] -> m [File]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList (Ptr File))
result <- Ptr FileChooser -> IO (Ptr (GSList (Ptr File)))
gtk_file_chooser_get_files Ptr FileChooser
chooser'
    [Ptr File]
result' <- Ptr (GSList (Ptr File)) -> IO [Ptr File]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr File))
result
    [File]
result'' <- (Ptr File -> IO File) -> [Ptr File] -> IO [File]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) [Ptr File]
result'
    Ptr (GSList (Ptr File)) -> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList (Ptr File))
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [File] -> IO [File]
forall (m :: * -> *) a. Monad m => a -> m a
return [File]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilesMethodInfo
instance (signature ~ (m [Gio.File.File]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilesMethodInfo a signature where
    overloadedMethod = fileChooserGetFiles

#endif

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

foreign import ccall "gtk_file_chooser_get_filter" gtk_file_chooser_get_filter :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gtk.FileFilter.FileFilter)

-- | Gets the current filter; see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetFilter'.
-- 
-- /Since: 2.4/
fileChooserGetFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe Gtk.FileFilter.FileFilter)
    -- ^ __Returns:__ the current filter, or 'P.Nothing'
fileChooserGetFilter :: a -> m (Maybe FileFilter)
fileChooserGetFilter chooser :: a
chooser = IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FileFilter) -> m (Maybe FileFilter))
-> IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr FileFilter
result <- Ptr FileChooser -> IO (Ptr FileFilter)
gtk_file_chooser_get_filter Ptr FileChooser
chooser'
    Maybe FileFilter
maybeResult <- Ptr FileFilter
-> (Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FileFilter
result ((Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter))
-> (Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr FileFilter
result' -> do
        FileFilter
result'' <- ((ManagedPtr FileFilter -> FileFilter)
-> Ptr FileFilter -> IO FileFilter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter) Ptr FileFilter
result'
        FileFilter -> IO FileFilter
forall (m :: * -> *) a. Monad m => a -> m a
return FileFilter
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe FileFilter -> IO (Maybe FileFilter)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileFilter
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilterMethodInfo
instance (signature ~ (m (Maybe Gtk.FileFilter.FileFilter)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilterMethodInfo a signature where
    overloadedMethod = fileChooserGetFilter

#endif

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

-- | Gets whether only local files can be selected in the
-- file selector. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetLocalOnly'
-- 
-- /Since: 2.4/
fileChooserGetLocalOnly ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if only local files can be selected.
fileChooserGetLocalOnly :: a -> m Bool
fileChooserGetLocalOnly chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_local_only Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetLocalOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetLocalOnlyMethodInfo a signature where
    overloadedMethod = fileChooserGetLocalOnly

#endif

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

foreign import ccall "gtk_file_chooser_get_preview_file" gtk_file_chooser_get_preview_file :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gio.File.File)

-- | Gets the t'GI.Gio.Interfaces.File.File' that should be previewed in a custom preview
-- Internal function, see 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewUri'.
-- 
-- /Since: 2.14/
fileChooserGetPreviewFile ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe Gio.File.File)
    -- ^ __Returns:__ the t'GI.Gio.Interfaces.File.File' for the file to preview,
    --     or 'P.Nothing' if no file is selected. Free with 'GI.GObject.Objects.Object.objectUnref'.
fileChooserGetPreviewFile :: a -> m (Maybe File)
fileChooserGetPreviewFile chooser :: a
chooser = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_preview_file Ptr FileChooser
chooser'
    Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr File
result' -> do
        File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
        File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewFileMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFileMethodInfo a signature where
    overloadedMethod = fileChooserGetPreviewFile

#endif

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

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

-- | Gets the filename that should be previewed in a custom preview
-- widget. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'.
-- 
-- /Since: 2.4/
fileChooserGetPreviewFilename ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe [Char])
    -- ^ __Returns:__ the filename to preview, or 'P.Nothing' if
    --  no file is selected, or if the selected file cannot be represented
    --  as a local filename. Free with 'GI.GLib.Functions.free'
fileChooserGetPreviewFilename :: a -> m (Maybe String)
fileChooserGetPreviewFilename chooser :: a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_filename Ptr FileChooser
chooser'
    Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewFilenameMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFilenameMethodInfo a signature where
    overloadedMethod = fileChooserGetPreviewFilename

#endif

-- method FileChooser::get_preview_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , 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_file_chooser_get_preview_uri" gtk_file_chooser_get_preview_uri :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO CString

-- | Gets the URI that should be previewed in a custom preview
-- widget. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'.
-- 
-- /Since: 2.4/
fileChooserGetPreviewUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the URI for the file to preview,
    --     or 'P.Nothing' if no file is selected. Free with 'GI.GLib.Functions.free'.
fileChooserGetPreviewUri :: a -> m (Maybe Text)
fileChooserGetPreviewUri chooser :: a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_uri Ptr FileChooser
chooser'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewUriMethodInfo a signature where
    overloadedMethod = fileChooserGetPreviewUri

#endif

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

foreign import ccall "gtk_file_chooser_get_preview_widget" gtk_file_chooser_get_preview_widget :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr Gtk.Widget.Widget)

-- | Gets the current preview widget; see
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'.
-- 
-- /Since: 2.4/
fileChooserGetPreviewWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the current preview widget, or 'P.Nothing'
fileChooserGetPreviewWidget :: a -> m (Maybe Widget)
fileChooserGetPreviewWidget chooser :: a
chooser = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr Widget
result <- Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_preview_widget Ptr FileChooser
chooser'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetMethodInfo a signature where
    overloadedMethod = fileChooserGetPreviewWidget

#endif

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

-- | Gets whether the preview widget set by 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'
-- should be shown for the current filename. See
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive'.
-- 
-- /Since: 2.4/
fileChooserGetPreviewWidgetActive ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the preview widget is active for the current filename.
fileChooserGetPreviewWidgetActive :: a -> m Bool
fileChooserGetPreviewWidgetActive chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_preview_widget_active Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewWidgetActiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetActiveMethodInfo a signature where
    overloadedMethod = fileChooserGetPreviewWidgetActive

#endif

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

-- | Gets whether multiple files can be selected in the file
-- selector. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetSelectMultiple'.
-- 
-- /Since: 2.4/
fileChooserGetSelectMultiple ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if multiple files can be selected.
fileChooserGetSelectMultiple :: a -> m Bool
fileChooserGetSelectMultiple chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_select_multiple Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetSelectMultipleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetSelectMultipleMethodInfo a signature where
    overloadedMethod = fileChooserGetSelectMultiple

#endif

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

-- | Gets whether hidden files and folders are displayed in the file selector.
-- See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetShowHidden'.
-- 
-- /Since: 2.6/
fileChooserGetShowHidden ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if hidden files and folders are displayed.
fileChooserGetShowHidden :: a -> m Bool
fileChooserGetShowHidden chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_show_hidden Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetShowHiddenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetShowHiddenMethodInfo a signature where
    overloadedMethod = fileChooserGetShowHidden

#endif

-- method FileChooser::get_uri
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , 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_file_chooser_get_uri" gtk_file_chooser_get_uri :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO CString

-- | Gets the URI for the currently selected file in
-- the file selector. If multiple files are selected,
-- one of the filenames will be returned at random.
-- 
-- If the file chooser is in folder mode, this function returns the selected
-- folder.
-- 
-- /Since: 2.4/
fileChooserGetUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ The currently selected URI, or 'P.Nothing'
    --    if no file is selected. If 'GI.Gtk.Interfaces.FileChooser.fileChooserSetLocalOnly' is set to
    --    'P.True' (the default) a local URI will be returned for any FUSE locations.
    --    Free with 'GI.GLib.Functions.free'
fileChooserGetUri :: a -> m (Maybe Text)
fileChooserGetUri chooser :: a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_uri Ptr FileChooser
chooser'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data FileChooserGetUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUriMethodInfo a signature where
    overloadedMethod = fileChooserGetUri

#endif

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

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

-- | Lists all the selected files and subfolders in the current folder of
-- /@chooser@/. The returned names are full absolute URIs.
-- 
-- /Since: 2.4/
fileChooserGetUris ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [T.Text]
    -- ^ __Returns:__ a t'GI.GLib.Structs.SList.SList' containing the URIs of all selected
    --   files and subfolders in the current folder. Free the returned list
    --   with @/g_slist_free()/@, and the filenames with 'GI.GLib.Functions.free'.
fileChooserGetUris :: a -> m [Text]
fileChooserGetUris chooser :: a
chooser = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_get_uris Ptr FileChooser
chooser'
    [CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
    [Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (GSList (Ptr a)) -> FileChooserCurrentFolderChangedCallback
mapGSList CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr (GSList CString)
result
    Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList CString)
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserGetUrisMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUrisMethodInfo a signature where
    overloadedMethod = fileChooserGetUris

#endif

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

-- | Gets whether a stock label should be drawn with the name of the previewed
-- file.  See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetUsePreviewLabel'.
fileChooserGetUsePreviewLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the file chooser is set to display a label with the
    -- name of the previewed file, 'P.False' otherwise.
fileChooserGetUsePreviewLabel :: a -> m Bool
fileChooserGetUsePreviewLabel chooser :: a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_use_preview_label Ptr FileChooser
chooser'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data FileChooserGetUsePreviewLabelMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUsePreviewLabelMethodInfo a signature where
    overloadedMethod = fileChooserGetUsePreviewLabel

#endif

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

foreign import ccall "gtk_file_chooser_list_filters" gtk_file_chooser_list_filters :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    IO (Ptr (GSList (Ptr Gtk.FileFilter.FileFilter)))

-- | Lists the current set of user-selectable filters; see
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserAddFilter', 'GI.Gtk.Interfaces.FileChooser.fileChooserRemoveFilter'.
-- 
-- /Since: 2.4/
fileChooserListFilters ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [Gtk.FileFilter.FileFilter]
    -- ^ __Returns:__ a
    --  t'GI.GLib.Structs.SList.SList' containing the current set of user selectable filters. The
    --  contents of the list are owned by GTK+, but you must free the list
    --  itself with @/g_slist_free()/@ when you are done with it.
fileChooserListFilters :: a -> m [FileFilter]
fileChooserListFilters chooser :: a
chooser = IO [FileFilter] -> m [FileFilter]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [FileFilter] -> m [FileFilter])
-> IO [FileFilter] -> m [FileFilter]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList (Ptr FileFilter))
result <- Ptr FileChooser -> IO (Ptr (GSList (Ptr FileFilter)))
gtk_file_chooser_list_filters Ptr FileChooser
chooser'
    [Ptr FileFilter]
result' <- Ptr (GSList (Ptr FileFilter)) -> IO [Ptr FileFilter]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr FileFilter))
result
    [FileFilter]
result'' <- (Ptr FileFilter -> IO FileFilter)
-> [Ptr FileFilter] -> IO [FileFilter]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr FileFilter -> FileFilter)
-> Ptr FileFilter -> IO FileFilter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter) [Ptr FileFilter]
result'
    Ptr (GSList (Ptr FileFilter))
-> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList (Ptr FileFilter))
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [FileFilter] -> IO [FileFilter]
forall (m :: * -> *) a. Monad m => a -> m a
return [FileFilter]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserListFiltersMethodInfo
instance (signature ~ (m [Gtk.FileFilter.FileFilter]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListFiltersMethodInfo a signature where
    overloadedMethod = fileChooserListFilters

#endif

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

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

-- | Queries the list of shortcut folders in the file chooser, as set by
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserAddShortcutFolderUri'.
-- 
-- /Since: 2.4/
fileChooserListShortcutFolderUris ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [T.Text]
    -- ^ __Returns:__ A list of
    -- folder URIs, or 'P.Nothing' if there are no shortcut folders.  Free the
    -- returned list with @/g_slist_free()/@, and the URIs with 'GI.GLib.Functions.free'.
fileChooserListShortcutFolderUris :: a -> m [Text]
fileChooserListShortcutFolderUris chooser :: a
chooser = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_list_shortcut_folder_uris Ptr FileChooser
chooser'
    [CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
    [Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (GSList (Ptr a)) -> FileChooserCurrentFolderChangedCallback
mapGSList CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr (GSList CString)
result
    Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList CString)
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserListShortcutFolderUrisMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFolderUrisMethodInfo a signature where
    overloadedMethod = fileChooserListShortcutFolderUris

#endif

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

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

-- | Queries the list of shortcut folders in the file chooser, as set by
-- 'GI.Gtk.Interfaces.FileChooser.fileChooserAddShortcutFolder'.
-- 
-- /Since: 2.4/
fileChooserListShortcutFolders ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> m [[Char]]
    -- ^ __Returns:__ A list
    -- of folder filenames, or 'P.Nothing' if there are no shortcut folders.
    -- Free the returned list with @/g_slist_free()/@, and the filenames with
    -- 'GI.GLib.Functions.free'.
fileChooserListShortcutFolders :: a -> m [String]
fileChooserListShortcutFolders chooser :: a
chooser = IO [String] -> m [String]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [String] -> m [String]) -> IO [String] -> m [String]
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_list_shortcut_folders Ptr FileChooser
chooser'
    [CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
    [String]
result'' <- (CString -> IO String) -> [CString] -> IO [String]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO String
CString -> IO String
cstringToString [CString]
result'
    (CString -> FileChooserCurrentFolderChangedCallback)
-> Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a b.
(Ptr a -> IO b)
-> Ptr (GSList (Ptr a)) -> FileChooserCurrentFolderChangedCallback
mapGSList CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem Ptr (GSList CString)
result
    Ptr (GSList CString) -> FileChooserCurrentFolderChangedCallback
forall a. Ptr (GSList a) -> FileChooserCurrentFolderChangedCallback
g_slist_free Ptr (GSList CString)
result
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    [String] -> IO [String]
forall (m :: * -> *) a. Monad m => a -> m a
return [String]
result''

#if defined(ENABLE_OVERLOADING)
data FileChooserListShortcutFoldersMethodInfo
instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFoldersMethodInfo a signature where
    overloadedMethod = fileChooserListShortcutFolders

#endif

-- method FileChooser::remove_choice
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the ID of the choice to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Removes a \'choice\' that has been added with 'GI.Gtk.Interfaces.FileChooser.fileChooserAddChoice'.
-- 
-- /Since: 3.22/
fileChooserRemoveChoice ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> T.Text
    -- ^ /@id@/: the ID of the choice to remove
    -> m ()
fileChooserRemoveChoice :: a -> Text -> m ()
fileChooserRemoveChoice chooser :: a
chooser id :: Text
id = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
id' <- Text -> IO CString
textToCString Text
id
    Ptr FileChooser
-> CString -> FileChooserCurrentFolderChangedCallback
gtk_file_chooser_remove_choice Ptr FileChooser
chooser' CString
id'
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
id'
    () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveChoiceMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveChoiceMethodInfo a signature where
    overloadedMethod = fileChooserRemoveChoice

#endif

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

foreign import ccall "gtk_file_chooser_remove_filter" gtk_file_chooser_remove_filter :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    Ptr Gtk.FileFilter.FileFilter ->        -- filter : TInterface (Name {namespace = "Gtk", name = "FileFilter"})
    IO ()

-- | Removes /@filter@/ from the list of filters that the user can select between.
-- 
-- /Since: 2.4/
fileChooserRemoveFilter ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> b
    -- ^ /@filter@/: a t'GI.Gtk.Objects.FileFilter.FileFilter'
    -> m ()
fileChooserRemoveFilter :: a -> b -> m ()
fileChooserRemoveFilter chooser :: a
chooser filter :: b
filter = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    Ptr FileFilter
filter' <- b -> IO (Ptr FileFilter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
filter
    Ptr FileChooser
-> Ptr FileFilter -> FileChooserCurrentFolderChangedCallback
gtk_file_chooser_remove_filter Ptr FileChooser
chooser' Ptr FileFilter
filter'
    a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
    b -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr b
filter
    () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserRemoveFilterMethodInfo a signature where
    overloadedMethod = fileChooserRemoveFilter

#endif

-- method FileChooser::remove_shortcut_folder
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "chooser"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "FileChooser" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkFileChooser" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "folder"
--           , argType = TBasicType TFileName
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "filename of the folder to remove"
--                 , 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_file_chooser_remove_shortcut_folder" gtk_file_chooser_remove_shortcut_folder :: 
    Ptr FileChooser ->                      -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"})
    CString ->                              -- folder : TBasicType TFileName
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Removes a folder from a file chooser’s list of shortcut folders.
-- 
-- /Since: 2.4/
fileChooserRemoveShortcutFolder ::
    (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
    a
    -- ^ /@chooser@/: a t'GI.Gtk.Interfaces.FileChooser.FileChooser'
    -> [Char]
    -- ^ /@folder@/: filename of the folder to remove
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
fileChooserRemoveShortcutFolder :: a -> String -> m ()
fileChooserRemoveShortcutFolder chooser :: a
chooser folder :: String
folder = FileChooserCurrentFolderChangedCallback -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (FileChooserCurrentFolderChangedCallback -> m ())
-> FileChooserCurrentFolderChangedCallback -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
    CString
folder' <- String -> IO CString
stringToCString String
folder
    FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
-> FileChooserCurrentFolderChangedCallback
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_remove_shortcut_folder Ptr FileChooser
chooser' CString
folder'
        a -> FileChooserCurrentFolderChangedCallback
forall a.
ManagedPtrNewtype a =>
a -> FileChooserCurrentFolderChangedCallback
touchManagedPtr a
chooser
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
folder'
        () -> FileChooserCurrentFolderChangedCallback
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        CString -> FileChooserCurrentFolderChangedCallback
forall a. Ptr a -> FileChooserCurrentFolderChangedCallback
freeMem CString
folder'
     )

#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveShortcutFolderMethodInfo
instance (signature ~