    {-# LINE 2 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Interface FileChooser
    --
    -- Author : Duncan Coutts
    --
    -- Created: 24 April 2004
    --
    -- Copyright (C) 2004-2005 Duncan Coutts
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- File chooser interface used by 'FileChooserWidget' and
    -- 'FileChooserDialog'
    --
    -- * Module available since Gtk+ version 2.4
    --
    module Graphics.UI.Gtk.Selectors.FileChooser (
    -- * Detail
    --
    -- | 'FileChooser' is an interface that can be implemented by file selection
    -- widgets. In Gtk+, the main objects that implement this interface are
    -- 'FileChooserWidget', 'FileChooserDialog', and 'FileChooserButton'. You do
    -- not need to write an object that implements the 'FileChooser' interface
    -- unless you are trying to adapt an existing file selector to expose a
    -- standard programming interface.
    --
    -- '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:

    -- ** File Names and Encodings
    --
    -- | When the user is finished selecting files in a '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.

    -- ** 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 'fileChooserSetPreviewWidget'. Then, connect to the
    -- updatePreview signal to get notified when you need to update
    -- the contents of the preview.
    --
    -- Your callback should use 'fileChooserGetPreviewFilename' to see what
    -- needs previewing. Once you have generated the preview for the corresponding
    -- file, you must call 'fileChooserSetPreviewWidgetActive' with a boolean flag
    -- that indicates whether your callback could successfully generate a 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
    -- 'fileChooserSetExtraWidget' to insert additional widgets in a file chooser.

    -- ** Key Bindings
    --
    -- | Internally, Gtk+ implements a file chooser's graphical user interface
    -- with the private GtkFileChooserDefaultClass. This widget has several key
    -- bindings and their associated signals. This section describes the available
    -- key binding signals.
    --
    -- * GtkFileChooser key binding example
    --
    -- The default keys that activate the 'keyBinding' signals in
    -- GtkFileChooserDefaultClass are as follows:
    --
    -- [Signal name] Key
    --
    -- [location-popup] Control-L
    --
    -- [up-folder] Alt-Up
    --
    -- [down-folder] Alt-Down
    --
    -- [home-folder] Alt-Home
    --
    -- To change these defaults to something else, you could include the
    -- following fragment in your .gtkrc-2.0 file:
    --
    -- > binding "my-own-gtkfilechooser-bindings" {
    -- > bind "AltShiftl" {
    -- > "location-popup" ()
    -- > }
    -- > bind "AltShiftUp" {
    -- > "up-folder" ()
    -- > }
    -- > bind "AltShiftDown" {
    -- > "down-folder" ()
    -- > }
    -- > bind "AltShiftHome" {
    -- > "home-folder-folder" ()
    -- > }
    -- > }
    -- >
    -- > class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
    -- >
    --

    -- * Class Hierarchy
    -- |
    -- @
    -- | GInterface
    -- | +----FileChooser
    -- @

    -- * Types
      FileChooser,
      FileChooserClass,
      castToFileChooser, gTypeFileChooser,
      toFileChooser,
      FileChooserAction(..),
      FileChooserError(..),

      FileChooserConfirmation(..),

    -- * Methods
      fileChooserSetAction,
      fileChooserGetAction,
      fileChooserSetLocalOnly,
      fileChooserGetLocalOnly,
      fileChooserSetSelectMultiple,
      fileChooserGetSelectMultiple,
      fileChooserSetCurrentName,
      fileChooserGetFilename,
      fileChooserSetFilename,
      fileChooserSelectFilename,
      fileChooserUnselectFilename,
      fileChooserSelectAll,
      fileChooserUnselectAll,
      fileChooserGetFilenames,
      fileChooserSetCurrentFolder,
      fileChooserGetCurrentFolder,
      fileChooserGetURI,
      fileChooserSetURI,
      fileChooserSelectURI,
      fileChooserUnselectURI,
      fileChooserGetURIs,
      fileChooserSetCurrentFolderURI,
      fileChooserGetCurrentFolderURI,
      fileChooserSetPreviewWidget,
      fileChooserGetPreviewWidget,
      fileChooserSetPreviewWidgetActive,
      fileChooserGetPreviewWidgetActive,
      fileChooserSetUsePreviewLabel,
      fileChooserGetUsePreviewLabel,
      fileChooserGetPreviewFilename,
      fileChooserGetPreviewURI,
      fileChooserSetExtraWidget,
      fileChooserGetExtraWidget,
      fileChooserAddFilter,
      fileChooserRemoveFilter,
      fileChooserListFilters,
      fileChooserSetFilter,
      fileChooserGetFilter,
      fileChooserAddShortcutFolder,
      fileChooserRemoveShortcutFolder,
      fileChooserListShortcutFolders,
      fileChooserAddShortcutFolderURI,
      fileChooserRemoveShortcutFolderURI,
      fileChooserListShortcutFolderURIs,
      fileChooserErrorDomain,

      fileChooserSetShowHidden,
      fileChooserGetShowHidden,

      fileChooserSetDoOverwriteConfirmation,
      fileChooserGetDoOverwriteConfirmation,

    -- * Attributes
      fileChooserUsePreviewLabel,

      fileChooserShowHidden,

      fileChooserSelectMultiple,
      fileChooserPreviewWidgetActive,
      fileChooserPreviewWidget,
      fileChooserLocalOnly,
      fileChooserFilter,
      fileChooserExtraWidget,

      fileChooserDoOverwriteConfirmation,

      fileChooserAction,

    -- * Signals
      currentFolderChanged,
      fileActivated,
      fileSelectionChanged,
      updatePreview,

      confirmOverwrite,
    {-# LINE 234 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
      ) where

    import Control.Monad (liftM)

    import System.Glib.FFI
    import System.Glib.UTFString
    import System.Glib.Attributes
    import Graphics.UI.Gtk.Types
    {-# LINE 242 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
    import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
    import Graphics.UI.Gtk.Signals
    import System.Glib.GList
    {-# LINE 245 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
    import System.Glib.GError (propagateGError, GErrorDomain, GErrorClass(..))

    {-# LINE 248 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

    -- | Describes whether a 'FileChooser' is being used to open existing files
    -- or to save to a possibly new file.
    data FileChooserAction = FileChooserActionOpen
                           | FileChooserActionSave
                           | FileChooserActionSelectFolder
                           | FileChooserActionCreateFolder
                           deriving (Int -> FileChooserAction
    FileChooserAction -> Int
    FileChooserAction -> [FileChooserAction]
    FileChooserAction -> FileChooserAction
    FileChooserAction -> FileChooserAction -> [FileChooserAction]
    FileChooserAction
    -> FileChooserAction -> FileChooserAction -> [FileChooserAction]
    (FileChooserAction -> FileChooserAction)
    -> (FileChooserAction -> FileChooserAction)
    -> (Int -> FileChooserAction)
    -> (FileChooserAction -> Int)
    -> (FileChooserAction -> [FileChooserAction])
    -> (FileChooserAction -> FileChooserAction -> [FileChooserAction])
    -> (FileChooserAction -> FileChooserAction -> [FileChooserAction])
    -> (FileChooserAction
        -> FileChooserAction -> FileChooserAction -> [FileChooserAction])
    -> Enum FileChooserAction
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: FileChooserAction -> FileChooserAction
    succ :: FileChooserAction -> FileChooserAction
    $cpred :: FileChooserAction -> FileChooserAction
    pred :: FileChooserAction -> FileChooserAction
    $ctoEnum :: Int -> FileChooserAction
    toEnum :: Int -> FileChooserAction
    $cfromEnum :: FileChooserAction -> Int
    fromEnum :: FileChooserAction -> Int
    $cenumFrom :: FileChooserAction -> [FileChooserAction]
    enumFrom :: FileChooserAction -> [FileChooserAction]
    $cenumFromThen :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
    enumFromThen :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
    $cenumFromTo :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
    enumFromTo :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
    $cenumFromThenTo :: FileChooserAction
    -> FileChooserAction -> FileChooserAction -> [FileChooserAction]
    enumFromThenTo :: FileChooserAction
    -> FileChooserAction -> FileChooserAction -> [FileChooserAction]
    Enum)

    {-# LINE 254 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

    -- | These identify the various errors that can occur while calling
    -- 'FileChooser' functions.
    data FileChooserError = FileChooserErrorNonexistent
                          | FileChooserErrorBadFilename
                          | FileChooserErrorAlreadyExists
                          | FileChooserErrorIncompleteHostname
                          deriving (Enum)

    {-# LINE 258 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

    -- | Used as a return value of handlers for the 'onConfirmOverwrite'
    -- signal of a 'FileChooser'.
    --
    -- * This value determines whether the file chooser will present the stock
    -- confirmation dialog, accept the user's choice of a filename, or let
    -- the user choose another filename.
    --
    -- Since Gtk 2.8.
    --
    data FileChooserConfirmation = FileChooserConfirmationConfirm
                                 | FileChooserConfirmationAcceptFilename
                                 | FileChooserConfirmationSelectAgain
                                 deriving (Int -> FileChooserConfirmation
    FileChooserConfirmation -> Int
    FileChooserConfirmation -> [FileChooserConfirmation]
    FileChooserConfirmation -> FileChooserConfirmation
    FileChooserConfirmation
    -> FileChooserConfirmation -> [FileChooserConfirmation]
    FileChooserConfirmation
    -> FileChooserConfirmation
    -> FileChooserConfirmation
    -> [FileChooserConfirmation]
    (FileChooserConfirmation -> FileChooserConfirmation)
    -> (FileChooserConfirmation -> FileChooserConfirmation)
    -> (Int -> FileChooserConfirmation)
    -> (FileChooserConfirmation -> Int)
    -> (FileChooserConfirmation -> [FileChooserConfirmation])
    -> (FileChooserConfirmation
        -> FileChooserConfirmation -> [FileChooserConfirmation])
    -> (FileChooserConfirmation
        -> FileChooserConfirmation -> [FileChooserConfirmation])
    -> (FileChooserConfirmation
        -> FileChooserConfirmation
        -> FileChooserConfirmation
        -> [FileChooserConfirmation])
    -> Enum FileChooserConfirmation
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: FileChooserConfirmation -> FileChooserConfirmation
    succ :: FileChooserConfirmation -> FileChooserConfirmation
    $cpred :: FileChooserConfirmation -> FileChooserConfirmation
    pred :: FileChooserConfirmation -> FileChooserConfirmation
    $ctoEnum :: Int -> FileChooserConfirmation
    toEnum :: Int -> FileChooserConfirmation
    $cfromEnum :: FileChooserConfirmation -> Int
    fromEnum :: FileChooserConfirmation -> Int
    $cenumFrom :: FileChooserConfirmation -> [FileChooserConfirmation]
    enumFrom :: FileChooserConfirmation -> [FileChooserConfirmation]
    $cenumFromThen :: FileChooserConfirmation
    -> FileChooserConfirmation -> [FileChooserConfirmation]
    enumFromThen :: FileChooserConfirmation
    -> FileChooserConfirmation -> [FileChooserConfirmation]
    $cenumFromTo :: FileChooserConfirmation
    -> FileChooserConfirmation -> [FileChooserConfirmation]
    enumFromTo :: FileChooserConfirmation
    -> FileChooserConfirmation -> [FileChooserConfirmation]
    $cenumFromThenTo :: FileChooserConfirmation
    -> FileChooserConfirmation
    -> FileChooserConfirmation
    -> [FileChooserConfirmation]
    enumFromThenTo :: FileChooserConfirmation
    -> FileChooserConfirmation
    -> FileChooserConfirmation
    -> [FileChooserConfirmation]
    Enum)

    {-# LINE 271 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

    --------------------
    -- Methods

    fileChooserErrorDomain :: GErrorDomain
    fileChooserErrorDomain :: GErrorDomain
    fileChooserErrorDomain = IO GErrorDomain -> GErrorDomain
    forall a. IO a -> a
    unsafePerformIO IO GErrorDomain
    gtk_file_chooser_error_quark
    {-# LINE 278 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

    instance GErrorClass FileChooserError where
      gerrorDomain :: FileChooserError -> GErrorDomain
    gerrorDomain FileChooserError
    _ = GErrorDomain
    fileChooserErrorDomain

    -- | Sets the type of operation that the chooser is performing; the user
    -- interface is adapted to suit the selected action. For example, an option to
    -- create a new folder might be shown if the action is 'FileChooserActionSave'
    -- but not if the action is 'FileChooserActionOpen'.
    --
    fileChooserSetAction :: FileChooserClass self => self
     -> FileChooserAction -- ^ @action@ - the action that the file selector is
                          -- performing
     -> IO ()
    fileChooserSetAction :: forall self.
    FileChooserClass self =>
    self -> FileChooserAction -> IO ()
    fileChooserSetAction self
    self FileChooserAction
    action =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_action Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 293 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        ((Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt)
    -> (FileChooserAction -> Int) -> FileChooserAction -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . FileChooserAction -> Int
    forall a. Enum a => a -> Int
    fromEnum) FileChooserAction
    action)

    -- | Gets the type of operation that the file chooser is performing; see
    -- 'fileChooserSetAction'.
    --
    fileChooserGetAction :: FileChooserClass self => self -> IO FileChooserAction
    fileChooserGetAction :: forall self. FileChooserClass self => self -> IO FileChooserAction
    fileChooserGetAction self
    self =
      (CInt -> FileChooserAction) -> IO CInt -> IO FileChooserAction
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> FileChooserAction
    forall a. Enum a => Int -> a
    toEnum (Int -> FileChooserAction)
    -> (CInt -> Int) -> CInt -> FileChooserAction
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO FileChooserAction)
    -> IO CInt -> IO FileChooserAction
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_action Ptr FileChooser
    argPtr1)
    {-# LINE 303 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets whether only local files can be selected in the file selector. If
    -- @localOnly@ is @True@ (the default), then the selected file are files are
    -- guaranteed to be accessible through the operating systems native file file
    -- system and therefore the application only needs to worry about the filename
    -- functions in 'FileChooser', like 'fileChooserGetFilename', rather than the
    -- URI functions like 'fileChooserGetURI',
    --
    fileChooserSetLocalOnly :: FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetLocalOnly :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetLocalOnly self
    self Bool
    localOnly =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_local_only Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 315 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    localOnly)

    -- | Gets whether only local files can be selected in the file selector. See
    -- 'fileChooserSetLocalOnly'
    --
    fileChooserGetLocalOnly :: FileChooserClass self => self -> IO Bool
    fileChooserGetLocalOnly :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetLocalOnly self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_local_only Ptr FileChooser
    argPtr1)
    {-# LINE 325 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets whether multiple files can be selected in the file selector. This is
    -- only relevant if the action is set to be 'FileChooserActionOpen' or
    -- 'FileChooserActionSave'. It cannot be set with either of the folder actions.
    --
    fileChooserSetSelectMultiple :: FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetSelectMultiple :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetSelectMultiple self
    self Bool
    selectMultiple =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_select_multiple Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 334 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    selectMultiple)

    -- | Gets whether multiple files can be selected in the file selector. See
    -- 'fileChooserSetSelectMultiple'.
    --
    fileChooserGetSelectMultiple :: FileChooserClass self => self -> IO Bool
    fileChooserGetSelectMultiple :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetSelectMultiple self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_select_multiple Ptr FileChooser
    argPtr1)
    {-# LINE 344 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets the current name in the file selector, as if entered by the user.
    -- Note that the name passed in here is a Unicode string rather than a filename.
    -- This function is meant for such uses as a suggested name in a \"Save As...\"
    -- dialog.
    --
    -- If you want to preselect a particular existing file, you should use
    -- 'fileChooserSetFilename' or 'fileChooserSetURI' instead. Please see the
    -- documentation for those functions for an example of using
    -- 'fileChooserSetCurrentName' as well.
    --
    fileChooserSetCurrentName :: (FileChooserClass self, GlibFilePath fp) => self
     -> fp -- ^ @name@ - the filename to use, as a Unicode string
     -> IO ()
    fileChooserSetCurrentName :: forall self fp.
    (FileChooserClass self, GlibFilePath fp) =>
    self -> fp -> IO ()
    fileChooserSetCurrentName self
    self fp
    name =
      fp -> (CString -> IO ()) -> IO ()
    forall a. fp -> (CString -> IO a) -> IO a
    forall fp a. GlibFilePath fp => fp -> (CString -> IO a) -> IO a
    withUTFFilePath fp
    name ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    namePtr ->
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO ()
    gtk_file_chooser_set_current_name Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 362 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    namePtr

    -- | Gets the filename 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.
    --
    fileChooserGetFilename :: (FileChooserClass self, GlibFilePath fp) => self
     -> IO (Maybe fp) -- ^ returns The currently selected filename, or
                            -- @Nothing@ if no file is selected, or the selected
                            -- file can't be represented with a local filename.
    fileChooserGetFilename :: forall self fp.
    (FileChooserClass self, GlibFilePath fp) =>
    self -> IO (Maybe fp)
    fileChooserGetFilename self
    self =

      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_filename Ptr FileChooser
    argPtr1)
    {-# LINE 381 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
      IO CString -> (CString -> IO (Maybe fp)) -> IO (Maybe fp)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO fp) -> CString -> IO (Maybe fp)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO fp
    forall fp. GlibFilePath fp => CString -> IO fp
    peekUTFFilePath

    -- | Sets @filename@ as the current filename for the file chooser, by changing
    -- to the file's parent folder and actually selecting the file in list. If the
    -- @chooser@ is in 'FileChooserActionSave' mode, the file's base name will also
    -- appear in the dialog's file name entry.
    --
    -- If the file name isn't in the current folder of @chooser@, then the
    -- current folder of @chooser@ will be changed to the folder containing
    -- @filename@. This is equivalent to a sequence of 'fileChooserUnselectAll'
    -- followed by 'fileChooserSelectFilename'.
    --
    -- Note that the file must exist, or nothing will be done except for the
    -- directory change.
    --
    -- If you are implementing a File\/Save As... dialog, you should use this
    -- function if you already have a file name to which the user may save; for
    -- example, when the user opens an existing file and then does File\/Save As...
    -- on it. If you don't have a file name already — for example, if the user
    -- just created a new file and is saving it for the first time, do not call
    -- this function. Instead, use something similar to this:
    --
    -- > if documentIsNew
    -- > then do -- the user just created a new document
    -- > fileChooserSetCurrentFolder chooser defaultFolderForSaving
    -- > fileChooserSetCurrentName chooser "Untitled document"
    -- > else do --the user edited an existing document
    -- > fileChooserSetFilename chooser existingFilename
    --
    fileChooserSetFilename :: FileChooserClass self => self
     -> FilePath -- ^ @filename@ - the filename to set as current
     -> IO Bool -- ^ returns @True@ if both the folder could be changed and the
                 -- file was selected successfully, @False@ otherwise.
    fileChooserSetFilename :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSetFilename self
    self FilePath
    filename =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    filename ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    filenamePtr ->

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_set_filename Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 423 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    filenamePtr

    -- | Selects a filename. If the file name isn't in the current folder of
    -- the chooser, then the current folder of the chooser will be changed to the
    -- folder containing @filename@.
    --
    fileChooserSelectFilename :: FileChooserClass self => self
     -> FilePath -- ^ @filename@ - the filename to select
     -> IO Bool -- ^ returns @True@ if both the folder could be changed and the
                 -- file was selected successfully, @False@ otherwise.
    fileChooserSelectFilename :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSelectFilename self
    self FilePath
    filename =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    filename ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    filenamePtr ->

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_select_filename Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 442 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    filenamePtr

    -- | Unselects a currently selected filename. If the filename is not in the
    -- current directory, does not exist, or is otherwise not currently selected,
    -- does nothing.
    --
    fileChooserUnselectFilename :: FileChooserClass self => self
     -> FilePath -- ^ @filename@ - the filename to unselect
     -> IO ()
    fileChooserUnselectFilename :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserUnselectFilename self
    self FilePath
    filename =
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    filename ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    filenamePtr ->

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO ()
    gtk_file_chooser_unselect_filename Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 459 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    filenamePtr

    -- | Selects all the files in the current folder of a file chooser.
    --
    fileChooserSelectAll :: FileChooserClass self => self -> IO ()
    fileChooserSelectAll :: forall self. FileChooserClass self => self -> IO ()
    fileChooserSelectAll self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO ()
    gtk_file_chooser_select_all Ptr FileChooser
    argPtr1)
    {-# LINE 468 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Unselects all the files in the current folder of a file chooser.
    --
    fileChooserUnselectAll :: FileChooserClass self => self -> IO ()
    fileChooserUnselectAll :: forall self. FileChooserClass self => self -> IO ()
    fileChooserUnselectAll self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO ()
    gtk_file_chooser_unselect_all Ptr FileChooser
    argPtr1)
    {-# LINE 475 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Lists all the selected files and subfolders in the current folder of
    -- the 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 'fileChooserGetURIs')
    --
    fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]
    fileChooserGetFilenames :: forall self. FileChooserClass self => self -> IO [FilePath]
    fileChooserGetFilenames self
    self =

      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr ())
    gtk_file_chooser_get_filenames Ptr FileChooser
    argPtr1)
    {-# LINE 488 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
      IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr () -> IO [FilePath]
    fromStringGSList

    -- | Sets the current folder for the chooser from a local filename. The user
    -- will be shown the full contents of the current folder, plus user interface
    -- elements for navigating to other folders.
    --
    fileChooserSetCurrentFolder :: FileChooserClass self => self
     -> FilePath -- ^ @filename@ - the full path of the new current folder
     -> IO Bool -- ^ returns @True@ if the folder could be changed successfully,
                 -- @False@ otherwise.
    fileChooserSetCurrentFolder :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSetCurrentFolder self
    self FilePath
    filename =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    filename ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    filenamePtr ->

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_set_current_folder Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 507 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    filenamePtr

    -- | Gets the current folder of the chooser as a local filename. See
    -- 'fileChooserSetCurrentFolder'.
    --
    fileChooserGetCurrentFolder :: FileChooserClass self => self
     -> IO (Maybe FilePath) -- ^ returns the full path of the current folder, or
                            -- @Nothing@ if the current path cannot be represented
                            -- as a local filename.
    fileChooserGetCurrentFolder :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
    fileChooserGetCurrentFolder self
    self =

      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_current_folder Ptr FileChooser
    argPtr1)
    {-# LINE 523 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
      IO CString
    -> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO FilePath
    readCString

    -- | 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.
    --
    fileChooserGetURI :: FileChooserClass self => self
     -> IO (Maybe String) -- ^ returns The currently selected URI, or @Nothing@ if
                          -- no file is selected.
    fileChooserGetURI :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
    fileChooserGetURI self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_uri Ptr FileChooser
    argPtr1)
    {-# LINE 539 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      IO CString
    -> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO FilePath
    readCString

    -- | Sets the file referred to by @uri@ as the current file for the file
    -- chooser, by changing to the URI's parent folder and actually selecting the
    -- URI in the list. If the @chooser@ is 'FileChooserActionSave' mode, the URI's
    -- base name will also appear in the dialog's file name entry.
    --
    -- If the URI isn't in the current folder of @chooser@, then the current
    -- folder of @chooser@ will be changed to the folder containing @uri@. This is
    -- equivalent to a sequence of 'fileChooserUnselectAll' followed by
    -- 'fileChooserSelectURI'.
    --
    -- Note that the URI must exist, or nothing will be done except for the
    -- directory change. If you are implementing a File\/Save As... dialog, you
    -- should use this function if you already have a file name to which the user
    -- may save; for example, when the user opens an existing file and then does
    -- File\/Save As... on it. If you don't have a file name already — for
    -- example, if the user just created a new file and is saving it for the first
    -- time, do not call this function. Instead, use something similar to this:
    --
    -- > if documentIsNew
    -- > then do -- the user just created a new document
    -- > fileChooserSetCurrentFolderURI chooser defaultFolderForSaving
    -- > fileChooserSetCurrentName chooser "Untitled document"
    -- > else do --the user edited an existing document
    -- > fileChooserSetURI chooser existingURI
    --
    fileChooserSetURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - the URI to set as current
     -> IO Bool -- ^ returns @True@ if both the folder could be changed and the
                -- URI was selected successfully, @False@ otherwise.
    fileChooserSetURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSetURI self
    self FilePath
    uri =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr ->
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_set_uri Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 575 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr

    -- | Selects the file to by @uri@. If the URI doesn't refer to a file in the
    -- current folder of the chooser, then the current folder of the chooser will
    -- be changed to the folder containing @filename@.
    --
    fileChooserSelectURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - the URI to select
     -> IO Bool -- ^ returns @True@ if both the folder could be changed and the
                -- URI was selected successfully, @False@ otherwise.
    fileChooserSelectURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSelectURI self
    self FilePath
    uri =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr ->
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_select_uri Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 590 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr

    -- | Unselects the file referred to by @uri@. If the file is not in the
    -- current directory, does not exist, or is otherwise not currently selected,
    -- does nothing.
    --
    fileChooserUnselectURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - the URI to unselect
     -> IO ()
    fileChooserUnselectURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserUnselectURI self
    self FilePath
    uri =
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr ->
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO ()
    gtk_file_chooser_unselect_uri Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 603 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr

    -- | Lists all the selected files and subfolders in the current folder of
    -- the chooser. The returned names are full absolute URIs.
    --
    fileChooserGetURIs :: FileChooserClass self => self -> IO [String]
    fileChooserGetURIs :: forall self. FileChooserClass self => self -> IO [FilePath]
    fileChooserGetURIs self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr ())
    gtk_file_chooser_get_uris Ptr FileChooser
    argPtr1)
    {-# LINE 612 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr () -> IO [FilePath]
    fromStringGSList

    -- | Sets the current folder for the chooser from an URI. The user will be
    -- shown the full contents of the current folder, plus user interface elements
    -- for navigating to other folders.
    --
    fileChooserSetCurrentFolderURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - the URI for the new current folder
     -> IO Bool -- ^ returns @True@ if the folder could be changed successfully,
                -- @False@ otherwise.
    fileChooserSetCurrentFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
    fileChooserSetCurrentFolderURI self
    self FilePath
    uri =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      FilePath -> (CString -> IO CInt) -> IO CInt
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr ->
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> IO CInt
    gtk_file_chooser_set_current_folder_uri Ptr FileChooser
    argPtr1 CString
    arg2)
    {-# LINE 627 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr

    -- | Gets the current folder of the chooser as an URI. See
    -- 'fileChooserSetCurrentFolderURI'.
    --
    fileChooserGetCurrentFolderURI :: FileChooserClass self => self
     -> IO String -- ^ returns the URI for the current folder.
    fileChooserGetCurrentFolderURI :: forall self. FileChooserClass self => self -> IO FilePath
    fileChooserGetCurrentFolderURI self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_current_folder_uri Ptr FileChooser
    argPtr1)
    {-# LINE 637 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      IO CString -> (CString -> IO FilePath) -> IO FilePath
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= CString -> IO FilePath
    readCString

    -- | Sets an application-supplied widget to use to display a custom preview of
    -- the currently selected file. To implement a preview, after setting the
    -- preview widget, you connect to the UpdatePreview signal, and call
    -- 'fileChooserGetPreviewFilename' or 'fileChooserGetPreviewURI' on each
    -- change. If you can display a preview of the new file, update your widget and
    -- set the preview active using 'fileChooserSetPreviewWidgetActive'. Otherwise,
    -- set the preview inactive.
    --
    -- When there is no application-supplied preview widget, or the
    -- application-supplied preview widget is not active, the file chooser may
    -- display an internally generated preview of the current file or it may
    -- display no preview at all.
    --
    fileChooserSetPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => self
     -> previewWidget -- ^ @previewWidget@ - widget for displaying preview.
     -> IO ()
    fileChooserSetPreviewWidget :: forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    self -> previewWidget -> IO ()
    fileChooserSetPreviewWidget self
    self previewWidget
    previewWidget =
      (\(FileChooser ForeignPtr FileChooser
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr FileChooser -> Ptr Widget -> IO ()
    gtk_file_chooser_set_preview_widget Ptr FileChooser
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 658 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (previewWidget -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget previewWidget
    previewWidget)

    -- | Gets the current preview widget; see 'fileChooserSetPreviewWidget'.
    --
    fileChooserGetPreviewWidget :: FileChooserClass self => self
     -> IO (Maybe Widget) -- ^ returns the current preview widget, or @Nothing@
    fileChooserGetPreviewWidget :: forall self. FileChooserClass self => self -> IO (Maybe Widget)
    fileChooserGetPreviewWidget self
    self =
      (IO (Ptr Widget) -> IO Widget)
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    -> IO (Ptr Widget) -> IO Widget
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
    mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr Widget)
    gtk_file_chooser_get_preview_widget Ptr FileChooser
    argPtr1)
    {-# LINE 668 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets whether the preview widget set by 'fileChooserSetPreviewWidget'
    -- should be shown for the current filename. When @active@ is set to false, the
    -- file chooser may display an internally generated preview of the current file
    -- or it may display no preview at all. See 'fileChooserSetPreviewWidget' for
    -- more details.
    --
    fileChooserSetPreviewWidgetActive :: FileChooserClass self => self
     -> Bool -- ^ @active@ - whether to display the user-specified preview widget
     -> IO ()
    fileChooserSetPreviewWidgetActive :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetPreviewWidgetActive self
    self Bool
    active =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_preview_widget_active Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 681 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    active)

    -- | Gets whether the preview widget set by 'fileChooserSetPreviewWidget'
    -- should be shown for the current filename. See
    -- 'fileChooserSetPreviewWidgetActive'.
    --
    fileChooserGetPreviewWidgetActive :: FileChooserClass self => self
     -> IO Bool -- ^ returns @True@ if the preview widget is active for the
                -- current filename.
    fileChooserGetPreviewWidgetActive :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetPreviewWidgetActive self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_preview_widget_active Ptr FileChooser
    argPtr1)
    {-# LINE 694 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets whether the file chooser should display a stock label with the name
    -- of the file that is being previewed; the default is @True@. Applications
    -- that want to draw the whole preview area themselves should set this to
    -- @False@ and display the name themselves in their preview widget.
    --
    -- See also: 'fileChooserSetPreviewWidget'
    --
    fileChooserSetUsePreviewLabel :: FileChooserClass self => self
     -> Bool -- ^ @useLabel@ - whether to display a stock label with the name of
              -- the previewed file
     -> IO ()
    fileChooserSetUsePreviewLabel :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetUsePreviewLabel self
    self Bool
    useLabel =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_use_preview_label Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 709 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    useLabel)

    -- | Gets whether a stock label should be drawn with the name of the previewed
    -- file. See 'fileChooserSetUsePreviewLabel'.
    --
    fileChooserGetUsePreviewLabel :: FileChooserClass self => self
     -> IO Bool -- ^ returns @True@ if the file chooser is set to display a label
                -- with the name of the previewed file, @False@ otherwise.
    fileChooserGetUsePreviewLabel :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetUsePreviewLabel self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_use_preview_label Ptr FileChooser
    argPtr1)
    {-# LINE 721 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Gets the filename that should be previewed in a custom preview widget.
    -- See 'fileChooserSetPreviewWidget'.
    --
    fileChooserGetPreviewFilename :: FileChooserClass self => self
     -> IO (Maybe FilePath) -- ^ returns the filename to preview, or @Nothing@ if
                            -- no file is selected, or if the selected file cannot
                            -- be represented as a local filename.
    fileChooserGetPreviewFilename :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
    fileChooserGetPreviewFilename self
    self =

      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_preview_filename Ptr FileChooser
    argPtr1)
    {-# LINE 735 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
      IO CString
    -> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO FilePath
    readCString

    -- | Gets the URI that should be previewed in a custom preview widget. See
    -- 'fileChooserSetPreviewWidget'.
    --
    fileChooserGetPreviewURI :: FileChooserClass self => self
     -> IO (Maybe String) -- ^ returns the URI for the file to preview, or
                          -- @Nothing@ if no file is selected.
    fileChooserGetPreviewURI :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
    fileChooserGetPreviewURI self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
    -> (Ptr FileChooser -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CString
    gtk_file_chooser_get_preview_uri Ptr FileChooser
    argPtr1)
    {-# LINE 747 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      IO CString
    -> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO FilePath
    readCString

    -- | Sets an application-supplied widget to provide extra options to the user.
    --
    fileChooserSetExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => self
     -> extraWidget -- ^ @extraWidget@ - widget for extra options
     -> IO ()
    fileChooserSetExtraWidget :: forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    self -> previewWidget -> IO ()
    fileChooserSetExtraWidget self
    self extraWidget
    extraWidget =
      (\(FileChooser ForeignPtr FileChooser
    arg1) (Widget ForeignPtr Widget
    arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Widget
    arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Widget
    argPtr2 ->Ptr FileChooser -> Ptr Widget -> IO ()
    gtk_file_chooser_set_extra_widget Ptr FileChooser
    argPtr1 Ptr Widget
    argPtr2)
    {-# LINE 757 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (extraWidget -> Widget
    forall o. WidgetClass o => o -> Widget
    toWidget extraWidget
    extraWidget)

    -- | Gets the current preview widget; see 'fileChooserSetExtraWidget'.
    --
    fileChooserGetExtraWidget :: FileChooserClass self => self
     -> IO (Maybe Widget) -- ^ returns the current extra widget, or @Nothing@
    fileChooserGetExtraWidget :: forall self. FileChooserClass self => self -> IO (Maybe Widget)
    fileChooserGetExtraWidget self
    self =
      (IO (Ptr Widget) -> IO Widget)
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    -> IO (Ptr Widget) -> IO Widget
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
    forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
    mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
    -> IO (Ptr Widget) -> IO (Maybe Widget)
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget))
    -> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr Widget)
    gtk_file_chooser_get_extra_widget Ptr FileChooser
    argPtr1)
    {-# LINE 767 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Adds the 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.
    --
    fileChooserAddFilter :: FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserAddFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserAddFilter self
    self FileFilter
    filter =
      (\(FileChooser ForeignPtr FileChooser
    arg1) (FileFilter ForeignPtr FileFilter
    arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileFilter
    arg2 ((Ptr FileFilter -> IO ()) -> IO ())
    -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileFilter
    argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
    gtk_file_chooser_add_filter Ptr FileChooser
    argPtr1 Ptr FileFilter
    argPtr2)
    {-# LINE 776 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        FileFilter
    filter

    -- | Removes the filter from the list of filters that the user can select
    -- between.
    --
    fileChooserRemoveFilter :: FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserRemoveFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserRemoveFilter self
    self FileFilter
    filter =
      (\(FileChooser ForeignPtr FileChooser
    arg1) (FileFilter ForeignPtr FileFilter
    arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileFilter
    arg2 ((Ptr FileFilter -> IO ()) -> IO ())
    -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileFilter
    argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
    gtk_file_chooser_remove_filter Ptr FileChooser
    argPtr1 Ptr FileFilter
    argPtr2)
    {-# LINE 785 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        FileFilter
    filter

    -- | Lists the current set of user-selectable filters; see
    -- 'fileChooserAddFilter', 'fileChooserRemoveFilter'.
    --
    fileChooserListFilters :: FileChooserClass self => self -> IO [FileFilter]
    fileChooserListFilters :: forall self. FileChooserClass self => self -> IO [FileFilter]
    fileChooserListFilters self
    self = do
      filterList <- (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr ())
    gtk_file_chooser_list_filters Ptr FileChooser
    argPtr1)
    {-# LINE 794 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      filterPtrs <- fromGSList filterList
      mapM (makeNewObject mkFileFilter . return) filterPtrs

    -- | Sets the current filter; only the files that pass the filter will be
    -- displayed. If the user-selectable list of filters is non-empty, then the
    -- filter should be one of the filters in that list. Setting the current filter
    -- when the list of filters is empty is useful if you want to restrict the
    -- displayed set of files without letting the user change it.
    --
    fileChooserSetFilter :: FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserSetFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserSetFilter self
    self FileFilter
    filter =
      (\(FileChooser ForeignPtr FileChooser
    arg1) (FileFilter ForeignPtr FileFilter
    arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileFilter
    arg2 ((Ptr FileFilter -> IO ()) -> IO ())
    -> (Ptr FileFilter -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileFilter
    argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
    gtk_file_chooser_set_filter Ptr FileChooser
    argPtr1 Ptr FileFilter
    argPtr2)
    {-# LINE 807 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        FileFilter
    filter

    -- | Gets the current filter; see 'fileChooserSetFilter'.
    --
    fileChooserGetFilter :: FileChooserClass self => self
     -> IO (Maybe FileFilter) -- ^ returns the current filter, or @Nothing@
    fileChooserGetFilter :: forall self. FileChooserClass self => self -> IO (Maybe FileFilter)
    fileChooserGetFilter self
    self =
      (IO (Ptr FileFilter) -> IO FileFilter)
    -> IO (Ptr FileFilter) -> IO (Maybe FileFilter)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
    -> IO (Ptr FileFilter) -> IO FileFilter
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
    forall {a}. (ForeignPtr FileFilter -> FileFilter, FinalizerPtr a)
    mkFileFilter) (IO (Ptr FileFilter) -> IO (Maybe FileFilter))
    -> IO (Ptr FileFilter) -> IO (Maybe FileFilter)
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter))
    -> (Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr FileFilter)
    gtk_file_chooser_get_filter Ptr FileChooser
    argPtr1)
    {-# LINE 817 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | 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.
    --
    -- If the folder can not be added successfully an exception will be thrown.
    --
    fileChooserAddShortcutFolder :: FileChooserClass self => self
     -> FilePath -- ^ @folder@ - filename of the folder to add
     -> IO ()
    fileChooserAddShortcutFolder :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserAddShortcutFolder self
    self FilePath
    folder =
      (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a. (Ptr (Ptr ()) -> IO a) -> IO a
    propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
    -> (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr (Ptr ())
    errorPtr ->
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    folder ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    folderPtr -> do

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 Ptr (Ptr ())
    arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
    gtk_file_chooser_add_shortcut_folder Ptr FileChooser
    argPtr1 CString
    arg2 Ptr (Ptr ())
    arg3)
    {-# LINE 836 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    folderPtr
        Ptr (Ptr ())
    errorPtr
      () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Removes a folder from a file chooser's list of shortcut folders.
    --
    -- If the folder can not be removed successfully an exception will be thrown.
    --
    fileChooserRemoveShortcutFolder :: FileChooserClass self => self
     -> FilePath -- ^ @folder@ - filename of the folder to remove
     -> IO ()
    fileChooserRemoveShortcutFolder :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserRemoveShortcutFolder self
    self FilePath
    folder =
      (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a. (Ptr (Ptr ()) -> IO a) -> IO a
    propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
    -> (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr (Ptr ())
    errorPtr ->
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    folder ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    folderPtr -> do

      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 Ptr (Ptr ())
    arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
    gtk_file_chooser_remove_shortcut_folder Ptr FileChooser
    argPtr1 CString
    arg2 Ptr (Ptr ())
    arg3)
    {-# LINE 856 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
        CString
    folderPtr
        Ptr (Ptr ())
    errorPtr
      () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Queries the list of shortcut folders in the file chooser, as set by
    -- 'fileChooserAddShortcutFolder'.
    --
    fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]
    fileChooserListShortcutFolders :: forall self. FileChooserClass self => self -> IO [FilePath]
    fileChooserListShortcutFolders self
    self =

      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr ())
    gtk_file_chooser_list_shortcut_folders Ptr FileChooser
    argPtr1)
    {-# LINE 871 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}

        (self -> FileChooser
    forall o. FileChooserClass o => o -> FileChooser
    toFileChooser self
    self)
      IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr () -> IO [FilePath]
    fromStringGSList

    -- | 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.
    --
    -- If the folder can not be added successfully an exception will be thrown.
    --
    fileChooserAddShortcutFolderURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - URI of the folder to add
     -> IO ()
    fileChooserAddShortcutFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserAddShortcutFolderURI self
    self FilePath
    uri =
      (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a. (Ptr (Ptr ()) -> IO a) -> IO a
    propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
    -> (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr (Ptr ())
    errorPtr ->
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr -> do
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 Ptr (Ptr ())
    arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
    gtk_file_chooser_add_shortcut_folder_uri Ptr FileChooser
    argPtr1 CString
    arg2 Ptr (Ptr ())
    arg3)
    {-# LINE 889 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr
        Ptr (Ptr ())
    errorPtr
      () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Removes a folder URI from a file chooser's list of shortcut folders.
    --
    fileChooserRemoveShortcutFolderURI :: FileChooserClass self => self
     -> String -- ^ @uri@ - URI of the folder to remove
     -> IO ()
    fileChooserRemoveShortcutFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
    fileChooserRemoveShortcutFolderURI self
    self FilePath
    uri =
      (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a. (Ptr (Ptr ()) -> IO a) -> IO a
    propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
    -> (Ptr (Ptr ()) -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr (Ptr ())
    errorPtr ->
      FilePath -> (CString -> IO ()) -> IO ()
    forall a. FilePath -> (CString -> IO a) -> IO a
    withCString FilePath
    uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    uriPtr -> do
      (\(FileChooser ForeignPtr FileChooser
    arg1) CString
    arg2 Ptr (Ptr ())
    arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
    gtk_file_chooser_remove_shortcut_folder_uri Ptr FileChooser
    argPtr1 CString
    arg2 Ptr (Ptr ())
    arg3)
    {-# LINE 903 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        CString
    uriPtr
        Ptr (Ptr ())
    errorPtr
      () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    -- | Queries the list of shortcut folders in the file chooser, as set by
    -- 'fileChooserAddShortcutFolderURI'.
    --
    fileChooserListShortcutFolderURIs :: FileChooserClass self => self -> IO [String]
    fileChooserListShortcutFolderURIs :: forall self. FileChooserClass self => self -> IO [FilePath]
    fileChooserListShortcutFolderURIs self
    self =
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO (Ptr ())
    gtk_file_chooser_list_shortcut_folder_uris Ptr FileChooser
    argPtr1)
    {-# LINE 914 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
      IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr () -> IO [FilePath]
    fromStringGSList

    -- | Sets whether hidden files and folders are displayed in the file selector.
    --
    -- Available since Gtk+ version 2.6
    --
    fileChooserSetShowHidden :: FileChooserClass self => self
     -> Bool -- ^ @showHidden@ - @True@ if hidden files and folders should be
              -- displayed.
     -> IO ()
    fileChooserSetShowHidden :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetShowHidden self
    self Bool
    showHidden =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_show_hidden Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 928 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    showHidden)

    -- | Gets whether hidden files and folders are displayed in the file selector.
    -- See 'fileChooserSetShowHidden'.
    --
    -- * Available since Gtk+ version 2.6
    --
    fileChooserGetShowHidden :: FileChooserClass self => self
     -> IO Bool -- ^ returns @True@ if hidden files and folders are displayed.
    fileChooserGetShowHidden :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetShowHidden self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_show_hidden Ptr FileChooser
    argPtr1)
    {-# LINE 941 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    -- | Sets whether a file chooser in 'FileChooserActionSave' mode will present
    -- a confirmation dialog if the user types a file name that already exists.
    -- This is @False@ by default.
    --
    -- Regardless of this setting, the @chooser@ will emit the
    -- \"confirm-overwrite\" signal when appropriate.
    --
    -- If all you need is the stock confirmation dialog, set this property to
    -- @True@. You can override the way confirmation is done by actually handling
    -- the \"confirm-overwrite\" signal; please refer to its documentation for the
    -- details.
    --
    -- Available since Gtk+ version 2.8
    --
    fileChooserSetDoOverwriteConfirmation :: FileChooserClass self => self
     -> Bool -- ^ @doOverwriteConfirmation@ - whether to confirm overwriting in
              -- save mode
     -> IO ()
    fileChooserSetDoOverwriteConfirmation :: forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetDoOverwriteConfirmation self
    self Bool
    doOverwriteConfirmation =
      (\(FileChooser ForeignPtr FileChooser
    arg1) CInt
    arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO ()) -> IO ())
    -> (Ptr FileChooser -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> CInt -> IO ()
    gtk_file_chooser_set_do_overwrite_confirmation Ptr FileChooser
    argPtr1 CInt
    arg2)
    {-# LINE 965 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)
        (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    doOverwriteConfirmation)

    -- | Queries whether a file chooser is set to confirm for overwriting when the
    -- user types a file name that already exists.
    --
    -- * Available since Gtk+ version 2.8
    --
    fileChooserGetDoOverwriteConfirmation :: FileChooserClass self => self
     -> IO Bool -- ^ returns @True@ if the file chooser will present a
                -- confirmation dialog; @False@ otherwise.
    fileChooserGetDoOverwriteConfirmation :: forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetDoOverwriteConfirmation self
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(FileChooser ForeignPtr FileChooser
    arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileChooser
    arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
    -> (Ptr FileChooser -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileChooser
    argPtr1 ->Ptr FileChooser -> IO CInt
    gtk_file_chooser_get_do_overwrite_confirmation Ptr FileChooser
    argPtr1)
    {-# LINE 979 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
        (toFileChooser self)

    --------------------
    -- Attributes

    -- | \'usePreviewLabel\' property. See 'fileChooserGetUsePreviewLabel' and
    -- 'fileChooserSetUsePreviewLabel'
    --
    fileChooserUsePreviewLabel :: FileChooserClass self => Attr self Bool
    fileChooserUsePreviewLabel :: forall self. FileChooserClass self => Attr self Bool
    fileChooserUsePreviewLabel = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetUsePreviewLabel
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetUsePreviewLabel

    -- | \'showHidden\' property. See 'fileChooserGetShowHidden' and
    -- 'fileChooserSetShowHidden'
    --
    -- Since Gtk 2.6.
    fileChooserShowHidden :: FileChooserClass self => Attr self Bool
    fileChooserShowHidden :: forall self. FileChooserClass self => Attr self Bool
    fileChooserShowHidden = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetShowHidden
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetShowHidden

    -- | \'selectMultiple\' property. See 'fileChooserGetSelectMultiple' and
    -- 'fileChooserSetSelectMultiple'
    --
    fileChooserSelectMultiple :: FileChooserClass self => Attr self Bool
    fileChooserSelectMultiple :: forall self. FileChooserClass self => Attr self Bool
    fileChooserSelectMultiple = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetSelectMultiple
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetSelectMultiple

    -- | \'previewWidgetActive\' property. See 'fileChooserGetPreviewWidgetActive'
    -- and 'fileChooserSetPreviewWidgetActive'
    --
    fileChooserPreviewWidgetActive :: FileChooserClass self => Attr self Bool
    fileChooserPreviewWidgetActive :: forall self. FileChooserClass self => Attr self Bool
    fileChooserPreviewWidgetActive = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetPreviewWidgetActive
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetPreviewWidgetActive

    -- | \'previewWidget\' property. See 'fileChooserGetPreviewWidget' and
    -- 'fileChooserSetPreviewWidget'
    --
    fileChooserPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => ReadWriteAttr self (Maybe Widget) previewWidget
    fileChooserPreviewWidget :: forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    ReadWriteAttr self (Maybe Widget) previewWidget
    fileChooserPreviewWidget = (self -> IO (Maybe Widget))
    -> (self -> previewWidget -> IO ())
    -> ReadWriteAttr self (Maybe Widget) previewWidget
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO (Maybe Widget)
    forall self. FileChooserClass self => self -> IO (Maybe Widget)
    fileChooserGetPreviewWidget
      self -> previewWidget -> IO ()
    forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    self -> previewWidget -> IO ()
    fileChooserSetPreviewWidget

    -- | \'localOnly\' property. See 'fileChooserGetLocalOnly' and
    -- 'fileChooserSetLocalOnly'
    --
    fileChooserLocalOnly :: FileChooserClass self => Attr self Bool
    fileChooserLocalOnly :: forall self. FileChooserClass self => Attr self Bool
    fileChooserLocalOnly = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetLocalOnly
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetLocalOnly

    -- | \'filter\' property. See 'fileChooserGetFilter' and
    -- 'fileChooserSetFilter'
    --
    fileChooserFilter :: FileChooserClass self => ReadWriteAttr self (Maybe FileFilter) FileFilter
    fileChooserFilter :: forall self.
    FileChooserClass self =>
    ReadWriteAttr self (Maybe FileFilter) FileFilter
    fileChooserFilter = (self -> IO (Maybe FileFilter))
    -> (self -> FileFilter -> IO ())
    -> ReadWriteAttr self (Maybe FileFilter) FileFilter
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO (Maybe FileFilter)
    forall self. FileChooserClass self => self -> IO (Maybe FileFilter)
    fileChooserGetFilter
      self -> FileFilter -> IO ()
    forall self. FileChooserClass self => self -> FileFilter -> IO ()
    fileChooserSetFilter

    -- | \'extraWidget\' property. See 'fileChooserGetExtraWidget' and
    -- 'fileChooserSetExtraWidget'
    --
    fileChooserExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => ReadWriteAttr self (Maybe Widget) extraWidget
    fileChooserExtraWidget :: forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    ReadWriteAttr self (Maybe Widget) previewWidget
    fileChooserExtraWidget = (self -> IO (Maybe Widget))
    -> (self -> extraWidget -> IO ())
    -> ReadWriteAttr self (Maybe Widget) extraWidget
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO (Maybe Widget)
    forall self. FileChooserClass self => self -> IO (Maybe Widget)
    fileChooserGetExtraWidget
      self -> extraWidget -> IO ()
    forall self previewWidget.
    (FileChooserClass self, WidgetClass previewWidget) =>
    self -> previewWidget -> IO ()
    fileChooserSetExtraWidget

    -- | \'doOverwriteConfirmation\' property. See
    -- 'fileChooserGetDoOverwriteConfirmation' and
    -- 'fileChooserSetDoOverwriteConfirmation'
    --
    fileChooserDoOverwriteConfirmation :: FileChooserClass self => Attr self Bool
    fileChooserDoOverwriteConfirmation :: forall self. FileChooserClass self => Attr self Bool
    fileChooserDoOverwriteConfirmation = (self -> IO Bool)
    -> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO Bool
    forall self. FileChooserClass self => self -> IO Bool
    fileChooserGetDoOverwriteConfirmation
      self -> Bool -> IO ()
    forall self. FileChooserClass self => self -> Bool -> IO ()
    fileChooserSetDoOverwriteConfirmation

    -- | \'action\' property. See 'fileChooserGetAction' and
    -- 'fileChooserSetAction'
    --
    fileChooserAction :: FileChooserClass self => Attr self FileChooserAction
    fileChooserAction :: forall self. FileChooserClass self => Attr self FileChooserAction
    fileChooserAction = (self -> IO FileChooserAction)
    -> (self -> FileChooserAction -> IO ())
    -> ReadWriteAttr self FileChooserAction FileChooserAction
    forall o a b.
    (o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
    newAttr
      self -> IO FileChooserAction
    forall self. FileChooserClass self => self -> IO FileChooserAction
    fileChooserGetAction
      self -> FileChooserAction -> IO ()
    forall self.
    FileChooserClass self =>
    self -> FileChooserAction -> IO ()
    fileChooserSetAction

    --------------------
    -- Signals

    -- | This signal is emitted when the current folder in a '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: 'fileChooserSetCurrentFolder', 'fileChooserGetCurrentFolder',
    -- 'fileChooserSetCurrentFolderURI', 'fileChooserGetCurrentFolderURI'.
    --
    currentFolderChanged :: FileChooserClass self => Signal self (IO ())
    currentFolderChanged :: forall self. FileChooserClass self => Signal self (IO ())
    currentFolderChanged = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE FilePath
    "current-folder-changed")

    -- | This signal is emitted when there is a change in the set of selected
    -- files in a '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: 'fileChooserSelectFilename', 'fileChooserUnselectFilename',
    -- 'fileChooserGetFilename', 'fileChooserGetFilenames', 'fileChooserSelectURI',
    -- 'fileChooserUnselectURI', 'fileChooserGetURI', 'fileChooserGetURIs'.
    --
    fileSelectionChanged :: FileChooserClass self => Signal self (IO ())
    fileSelectionChanged :: forall self. FileChooserClass self => Signal self (IO ())
    fileSelectionChanged = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE FilePath
    "selection-changed")

    -- | 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
    -- 'fileChooserSetPreviewWidget', you should update it when this signal is
    -- emitted. You can use the functions 'fileChooserGetPreviewFilename' or
    -- '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 'fileChooserSetPreviewWidgetActive' to inform the file chooser about
    -- whether the preview was generated successfully or not.
    --
    -- See also: 'fileChooserSetPreviewWidget',
    -- 'fileChooserSetPreviewWidgetActive', 'fileChooserSetUsePreviewLabel',
    -- 'fileChooserGetPreviewFilename', 'fileChooserGetPreviewURI'.
    --
    updatePreview :: FileChooserClass self => Signal self (IO ())
    updatePreview :: forall self. FileChooserClass self => Signal self (IO ())
    updatePreview = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE FilePath
    "update-preview")

    -- | 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 'FileChooserDialog' to know when to activate the default button in the
    -- dialog.
    --
    -- See also: 'fileChooserGetFilename', 'fileChooserGetFilenames',
    -- 'fileChooserGetURI', 'fileChooserGetURIs'.
    --
    fileActivated :: FileChooserClass self => Signal self (IO ())
    fileActivated :: forall self. FileChooserClass self => Signal self (IO ())
    fileActivated = (Bool -> self -> IO () -> IO (ConnectId self))
    -> Signal self (IO ())
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
    forall obj.
    GObjectClass obj =>
    FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
    connect_NONE__NONE FilePath
    "file-activated")

    -- | 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
    -- 'FileChooserActionSave' mode.
    --
    -- Most applications just need to turn on the do-overwrite-confirmation
    -- property (or call the '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' signal.
    --
    -- A signal handler for this signal must return a 'FileChooserConfirmation'
    -- value, which indicates the action to take. If the handler determines that
    -- the user wants to select a different filename, it should return
    -- 'FileChooserConfirmationSelectAgain'. If it determines that the user is
    -- satisfied with his choice of file name, it should return
    -- 'FileChooserConfirmationAcceptFilename'. On the other hand, if it determines
    -- that the stock confirmation dialog should be used, it should return
    -- 'FileChooserConfirmationConfirm'.
    --
    -- Since Gtk 2.8.
    --
    confirmOverwrite :: FileChooserClass self => Signal self (IO FileChooserConfirmation)
    confirmOverwrite :: forall self.
    FileChooserClass self =>
    Signal self (IO FileChooserConfirmation)
    confirmOverwrite = (Bool -> self -> IO FileChooserConfirmation -> IO (ConnectId self))
    -> Signal self (IO FileChooserConfirmation)
    forall object handler.
    (Bool -> object -> handler -> IO (ConnectId object))
    -> Signal object handler
    Signal (FilePath
    -> Bool
    -> self
    -> IO FileChooserConfirmation
    -> IO (ConnectId self)
    forall a obj.
    (Enum a, GObjectClass obj) =>
    FilePath -> Bool -> obj -> IO a -> IO (ConnectId obj)
    connect_NONE__ENUM FilePath
    "confirm-overwrite")
    {-# LINE 1214 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
    ------------------------------------------------------
    -- Utility functions that really ought to go elsewhere

    -- convenience functions for GSlists of strings
    fromStringGSList :: GSList -> IO [String]
    fromStringGSList :: Ptr () -> IO [FilePath]
    fromStringGSList Ptr ()
    strList = do
      strPtrs <- Ptr () -> IO [CString]
    forall a. Ptr () -> IO [Ptr a]
    fromGSList Ptr ()
    strList
      mapM readCString strPtrs

    foreign import ccall unsafe "gtk_file_chooser_error_quark"
      gtk_file_chooser_error_quark :: (IO CUInt)

    foreign import ccall safe "gtk_file_chooser_set_action"
      gtk_file_chooser_set_action :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_action"
      gtk_file_chooser_get_action :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_set_local_only"
      gtk_file_chooser_set_local_only :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_local_only"
      gtk_file_chooser_get_local_only :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_set_select_multiple"
      gtk_file_chooser_set_select_multiple :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_select_multiple"
      gtk_file_chooser_get_select_multiple :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_set_current_name"
      gtk_file_chooser_set_current_name :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_filename"
      gtk_file_chooser_get_filename :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_set_filename"
      gtk_file_chooser_set_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_select_filename"
      gtk_file_chooser_select_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_unselect_filename"
      gtk_file_chooser_unselect_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_select_all"
      gtk_file_chooser_select_all :: ((Ptr FileChooser) -> (IO ()))

    foreign import ccall safe "gtk_file_chooser_unselect_all"
      gtk_file_chooser_unselect_all :: ((Ptr FileChooser) -> (IO ()))

    foreign import ccall safe "gtk_file_chooser_get_filenames"
      gtk_file_chooser_get_filenames :: ((Ptr FileChooser) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_file_chooser_set_current_folder"
      gtk_file_chooser_set_current_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_get_current_folder"
      gtk_file_chooser_get_current_folder :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_get_uri"
      gtk_file_chooser_get_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_set_uri"
      gtk_file_chooser_set_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_select_uri"
      gtk_file_chooser_select_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_unselect_uri"
      gtk_file_chooser_unselect_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_uris"
      gtk_file_chooser_get_uris :: ((Ptr FileChooser) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_file_chooser_set_current_folder_uri"
      gtk_file_chooser_set_current_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_file_chooser_get_current_folder_uri"
      gtk_file_chooser_get_current_folder_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_set_preview_widget"
      gtk_file_chooser_set_preview_widget :: ((Ptr FileChooser) -> ((Ptr Widget) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_preview_widget"
      gtk_file_chooser_get_preview_widget :: ((Ptr FileChooser) -> (IO (Ptr Widget)))

    foreign import ccall safe "gtk_file_chooser_set_preview_widget_active"
      gtk_file_chooser_set_preview_widget_active :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_preview_widget_active"
      gtk_file_chooser_get_preview_widget_active :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_set_use_preview_label"
      gtk_file_chooser_set_use_preview_label :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_use_preview_label"
      gtk_file_chooser_get_use_preview_label :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_get_preview_filename"
      gtk_file_chooser_get_preview_filename :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_get_preview_uri"
      gtk_file_chooser_get_preview_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_file_chooser_set_extra_widget"
      gtk_file_chooser_set_extra_widget :: ((Ptr FileChooser) -> ((Ptr Widget) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_extra_widget"
      gtk_file_chooser_get_extra_widget :: ((Ptr FileChooser) -> (IO (Ptr Widget)))

    foreign import ccall safe "gtk_file_chooser_add_filter"
      gtk_file_chooser_add_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_remove_filter"
      gtk_file_chooser_remove_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_list_filters"
      gtk_file_chooser_list_filters :: ((Ptr FileChooser) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_file_chooser_set_filter"
      gtk_file_chooser_set_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_filter"
      gtk_file_chooser_get_filter :: ((Ptr FileChooser) -> (IO (Ptr FileFilter)))

    foreign import ccall safe "gtk_file_chooser_add_shortcut_folder"
      gtk_file_chooser_add_shortcut_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))

    foreign import ccall safe "gtk_file_chooser_remove_shortcut_folder"
      gtk_file_chooser_remove_shortcut_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))

    foreign import ccall safe "gtk_file_chooser_list_shortcut_folders"
      gtk_file_chooser_list_shortcut_folders :: ((Ptr FileChooser) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_file_chooser_add_shortcut_folder_uri"
      gtk_file_chooser_add_shortcut_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))

    foreign import ccall safe "gtk_file_chooser_remove_shortcut_folder_uri"
      gtk_file_chooser_remove_shortcut_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))

    foreign import ccall safe "gtk_file_chooser_list_shortcut_folder_uris"
      gtk_file_chooser_list_shortcut_folder_uris :: ((Ptr FileChooser) -> (IO (Ptr ())))

    foreign import ccall safe "gtk_file_chooser_set_show_hidden"
      gtk_file_chooser_set_show_hidden :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_show_hidden"
      gtk_file_chooser_get_show_hidden :: ((Ptr FileChooser) -> (IO CInt))

    foreign import ccall safe "gtk_file_chooser_set_do_overwrite_confirmation"
      gtk_file_chooser_set_do_overwrite_confirmation :: ((Ptr FileChooser) -> (CInt -> (IO ())))

    foreign import ccall safe "gtk_file_chooser_get_do_overwrite_confirmation"
      gtk_file_chooser_get_do_overwrite_confirmation :: ((Ptr FileChooser) -> (IO CInt))