{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) 'GI.Gtk.Interfaces.FileChooser.FileChooser' is an interface that can be implemented by file selection widgets. In GTK+, the main objects that implement this interface are 'GI.Gtk.Objects.FileChooserWidget.FileChooserWidget', 'GI.Gtk.Objects.FileChooserDialog.FileChooserDialog', and 'GI.Gtk.Objects.FileChooserButton.FileChooserButton'. You do not need to write an object that implements the 'GI.Gtk.Interfaces.FileChooser.FileChooser' interface unless you are trying to adapt an existing file selector to expose a standard programming interface. 'GI.Gtk.Interfaces.FileChooser.FileChooser' allows for shortcuts to various places in the filesystem. In the default implementation these are displayed in the left pane. It may be a bit confusing at first that these shortcuts come from various sources and in various flavours, so lets explain the terminology here: * Bookmarks: are created by the user, by dragging folders from the right pane to the left pane, or by using the “Add”. Bookmarks can be renamed and deleted by the user. * Shortcuts: can be provided by the application. For example, a Paint program may want to add a shortcut for a Clipart folder. Shortcuts cannot be modified by the user. * Volumes: are provided by the underlying filesystem abstraction. They are the “roots” of the filesystem. = File Names and Encodings When the user is finished selecting files in a 'GI.Gtk.Interfaces.FileChooser.FileChooser', your program can get the selected names either as filenames or as URIs. For URIs, the normal escaping rules are applied if the URI contains non-ASCII characters. However, filenames are always returned in the character set specified by the @G_FILENAME_ENCODING@ environment variable. Please see the GLib documentation for more details about this variable. This means that while you can pass the result of 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilename' to @/open()/@ or @/fopen()/@, you may not be able to directly set it as the text of a 'GI.Gtk.Objects.Label.Label' widget unless you convert it first to UTF-8, which all GTK+ widgets expect. You should use 'GI.GLib.Functions.filenameToUtf8' to convert filenames into strings that can be passed to GTK+ widgets. = Adding a Preview Widget You can add a custom preview widget to a file chooser and then get notification about when the preview needs to be updated. To install a preview widget, use 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'. Then, connect to the 'GI.Gtk.Interfaces.FileChooser.FileChooser'::@/update-preview/@ signal to get notified when you need to update the contents of the preview. Your callback should use 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewFilename' to see what needs previewing. Once you have generated the preview for the corresponding file, you must call 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive' with a boolean flag that indicates whether your callback could successfully generate a preview. ## Example: Using a Preview Widget ## {@/gtkfilechooser/@-preview} === /C code/ > >{ > GtkImage *preview; > > ... > > preview = gtk_image_new (); > > gtk_file_chooser_set_preview_widget (my_file_chooser, preview); > g_signal_connect (my_file_chooser, "update-preview", > G_CALLBACK (update_preview_cb), preview); >} > >static void >update_preview_cb (GtkFileChooser *file_chooser, gpointer data) >{ > GtkWidget *preview; > char *filename; > GdkPixbuf *pixbuf; > gboolean have_preview; > > preview = GTK_WIDGET (data); > filename = gtk_file_chooser_get_preview_filename (file_chooser); > > pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL); > have_preview = (pixbuf != NULL); > g_free (filename); > > gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf); > if (pixbuf) > g_object_unref (pixbuf); > > gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview); >} = Adding Extra Widgets You can add extra widgets to a file chooser to provide options that are not present in the default design. For example, you can add a toggle button to give the user the option to open a file in read-only mode. You can use 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget' to insert additional widgets in a file chooser. An example for adding extra widgets: === /C code/ > > > GtkWidget *toggle; > > ... > > toggle = gtk_check_button_new_with_label ("Open file read-only"); > gtk_widget_show (toggle); > gtk_file_chooser_set_extra_widget (my_file_chooser, toggle); >} If you want to set more than one extra widget in the file chooser, you can a container such as a 'GI.Gtk.Objects.Box.Box' or a 'GI.Gtk.Objects.Grid.Grid' and include your widgets in it. Then, set the container as the whole extra widget. -} module GI.Gtk.Interfaces.FileChooser ( -- * Exported types FileChooser(..) , noFileChooser , IsFileChooser , toFileChooser , -- * Methods -- ** addChoice #method:addChoice# FileChooserAddChoiceMethodInfo , fileChooserAddChoice , -- ** addFilter #method:addFilter# FileChooserAddFilterMethodInfo , fileChooserAddFilter , -- ** addShortcutFolder #method:addShortcutFolder# FileChooserAddShortcutFolderMethodInfo , fileChooserAddShortcutFolder , -- ** addShortcutFolderUri #method:addShortcutFolderUri# FileChooserAddShortcutFolderUriMethodInfo, fileChooserAddShortcutFolderUri , -- ** getAction #method:getAction# FileChooserGetActionMethodInfo , fileChooserGetAction , -- ** getChoice #method:getChoice# FileChooserGetChoiceMethodInfo , fileChooserGetChoice , -- ** getCreateFolders #method:getCreateFolders# FileChooserGetCreateFoldersMethodInfo , fileChooserGetCreateFolders , -- ** getCurrentFolder #method:getCurrentFolder# FileChooserGetCurrentFolderMethodInfo , fileChooserGetCurrentFolder , -- ** getCurrentFolderFile #method:getCurrentFolderFile# FileChooserGetCurrentFolderFileMethodInfo, fileChooserGetCurrentFolderFile , -- ** getCurrentFolderUri #method:getCurrentFolderUri# FileChooserGetCurrentFolderUriMethodInfo, fileChooserGetCurrentFolderUri , -- ** getCurrentName #method:getCurrentName# FileChooserGetCurrentNameMethodInfo , fileChooserGetCurrentName , -- ** getDoOverwriteConfirmation #method:getDoOverwriteConfirmation# FileChooserGetDoOverwriteConfirmationMethodInfo, fileChooserGetDoOverwriteConfirmation , -- ** getExtraWidget #method:getExtraWidget# FileChooserGetExtraWidgetMethodInfo , fileChooserGetExtraWidget , -- ** getFile #method:getFile# FileChooserGetFileMethodInfo , fileChooserGetFile , -- ** getFilename #method:getFilename# FileChooserGetFilenameMethodInfo , fileChooserGetFilename , -- ** getFilenames #method:getFilenames# FileChooserGetFilenamesMethodInfo , fileChooserGetFilenames , -- ** getFiles #method:getFiles# FileChooserGetFilesMethodInfo , fileChooserGetFiles , -- ** getFilter #method:getFilter# FileChooserGetFilterMethodInfo , fileChooserGetFilter , -- ** getLocalOnly #method:getLocalOnly# FileChooserGetLocalOnlyMethodInfo , fileChooserGetLocalOnly , -- ** getPreviewFile #method:getPreviewFile# FileChooserGetPreviewFileMethodInfo , fileChooserGetPreviewFile , -- ** getPreviewFilename #method:getPreviewFilename# FileChooserGetPreviewFilenameMethodInfo , fileChooserGetPreviewFilename , -- ** getPreviewUri #method:getPreviewUri# FileChooserGetPreviewUriMethodInfo , fileChooserGetPreviewUri , -- ** getPreviewWidget #method:getPreviewWidget# FileChooserGetPreviewWidgetMethodInfo , fileChooserGetPreviewWidget , -- ** getPreviewWidgetActive #method:getPreviewWidgetActive# FileChooserGetPreviewWidgetActiveMethodInfo, fileChooserGetPreviewWidgetActive , -- ** getSelectMultiple #method:getSelectMultiple# FileChooserGetSelectMultipleMethodInfo , fileChooserGetSelectMultiple , -- ** getShowHidden #method:getShowHidden# FileChooserGetShowHiddenMethodInfo , fileChooserGetShowHidden , -- ** getUri #method:getUri# FileChooserGetUriMethodInfo , fileChooserGetUri , -- ** getUris #method:getUris# FileChooserGetUrisMethodInfo , fileChooserGetUris , -- ** getUsePreviewLabel #method:getUsePreviewLabel# FileChooserGetUsePreviewLabelMethodInfo , fileChooserGetUsePreviewLabel , -- ** listFilters #method:listFilters# FileChooserListFiltersMethodInfo , fileChooserListFilters , -- ** listShortcutFolderUris #method:listShortcutFolderUris# FileChooserListShortcutFolderUrisMethodInfo, fileChooserListShortcutFolderUris , -- ** listShortcutFolders #method:listShortcutFolders# FileChooserListShortcutFoldersMethodInfo, fileChooserListShortcutFolders , -- ** removeChoice #method:removeChoice# FileChooserRemoveChoiceMethodInfo , fileChooserRemoveChoice , -- ** removeFilter #method:removeFilter# FileChooserRemoveFilterMethodInfo , fileChooserRemoveFilter , -- ** removeShortcutFolder #method:removeShortcutFolder# FileChooserRemoveShortcutFolderMethodInfo, fileChooserRemoveShortcutFolder , -- ** removeShortcutFolderUri #method:removeShortcutFolderUri# FileChooserRemoveShortcutFolderUriMethodInfo, fileChooserRemoveShortcutFolderUri , -- ** selectAll #method:selectAll# FileChooserSelectAllMethodInfo , fileChooserSelectAll , -- ** selectFile #method:selectFile# FileChooserSelectFileMethodInfo , fileChooserSelectFile , -- ** selectFilename #method:selectFilename# FileChooserSelectFilenameMethodInfo , fileChooserSelectFilename , -- ** selectUri #method:selectUri# FileChooserSelectUriMethodInfo , fileChooserSelectUri , -- ** setAction #method:setAction# FileChooserSetActionMethodInfo , fileChooserSetAction , -- ** setChoice #method:setChoice# FileChooserSetChoiceMethodInfo , fileChooserSetChoice , -- ** setCreateFolders #method:setCreateFolders# FileChooserSetCreateFoldersMethodInfo , fileChooserSetCreateFolders , -- ** setCurrentFolder #method:setCurrentFolder# FileChooserSetCurrentFolderMethodInfo , fileChooserSetCurrentFolder , -- ** setCurrentFolderFile #method:setCurrentFolderFile# FileChooserSetCurrentFolderFileMethodInfo, fileChooserSetCurrentFolderFile , -- ** setCurrentFolderUri #method:setCurrentFolderUri# FileChooserSetCurrentFolderUriMethodInfo, fileChooserSetCurrentFolderUri , -- ** setCurrentName #method:setCurrentName# FileChooserSetCurrentNameMethodInfo , fileChooserSetCurrentName , -- ** setDoOverwriteConfirmation #method:setDoOverwriteConfirmation# FileChooserSetDoOverwriteConfirmationMethodInfo, fileChooserSetDoOverwriteConfirmation , -- ** setExtraWidget #method:setExtraWidget# FileChooserSetExtraWidgetMethodInfo , fileChooserSetExtraWidget , -- ** setFile #method:setFile# FileChooserSetFileMethodInfo , fileChooserSetFile , -- ** setFilename #method:setFilename# FileChooserSetFilenameMethodInfo , fileChooserSetFilename , -- ** setFilter #method:setFilter# FileChooserSetFilterMethodInfo , fileChooserSetFilter , -- ** setLocalOnly #method:setLocalOnly# FileChooserSetLocalOnlyMethodInfo , fileChooserSetLocalOnly , -- ** setPreviewWidget #method:setPreviewWidget# FileChooserSetPreviewWidgetMethodInfo , fileChooserSetPreviewWidget , -- ** setPreviewWidgetActive #method:setPreviewWidgetActive# FileChooserSetPreviewWidgetActiveMethodInfo, fileChooserSetPreviewWidgetActive , -- ** setSelectMultiple #method:setSelectMultiple# FileChooserSetSelectMultipleMethodInfo , fileChooserSetSelectMultiple , -- ** setShowHidden #method:setShowHidden# FileChooserSetShowHiddenMethodInfo , fileChooserSetShowHidden , -- ** setUri #method:setUri# FileChooserSetUriMethodInfo , fileChooserSetUri , -- ** setUsePreviewLabel #method:setUsePreviewLabel# FileChooserSetUsePreviewLabelMethodInfo , fileChooserSetUsePreviewLabel , -- ** unselectAll #method:unselectAll# FileChooserUnselectAllMethodInfo , fileChooserUnselectAll , -- ** unselectFile #method:unselectFile# FileChooserUnselectFileMethodInfo , fileChooserUnselectFile , -- ** unselectFilename #method:unselectFilename# FileChooserUnselectFilenameMethodInfo , fileChooserUnselectFilename , -- ** unselectUri #method:unselectUri# FileChooserUnselectUriMethodInfo , fileChooserUnselectUri , -- * Properties -- ** action #attr:action# FileChooserActionPropertyInfo , constructFileChooserAction , fileChooserAction , getFileChooserAction , setFileChooserAction , -- ** createFolders #attr:createFolders# FileChooserCreateFoldersPropertyInfo , constructFileChooserCreateFolders , fileChooserCreateFolders , getFileChooserCreateFolders , setFileChooserCreateFolders , -- ** doOverwriteConfirmation #attr:doOverwriteConfirmation# FileChooserDoOverwriteConfirmationPropertyInfo, constructFileChooserDoOverwriteConfirmation, fileChooserDoOverwriteConfirmation , getFileChooserDoOverwriteConfirmation , setFileChooserDoOverwriteConfirmation , -- ** extraWidget #attr:extraWidget# FileChooserExtraWidgetPropertyInfo , constructFileChooserExtraWidget , fileChooserExtraWidget , getFileChooserExtraWidget , setFileChooserExtraWidget , -- ** filter #attr:filter# FileChooserFilterPropertyInfo , constructFileChooserFilter , fileChooserFilter , getFileChooserFilter , setFileChooserFilter , -- ** localOnly #attr:localOnly# FileChooserLocalOnlyPropertyInfo , constructFileChooserLocalOnly , fileChooserLocalOnly , getFileChooserLocalOnly , setFileChooserLocalOnly , -- ** previewWidget #attr:previewWidget# FileChooserPreviewWidgetPropertyInfo , constructFileChooserPreviewWidget , fileChooserPreviewWidget , getFileChooserPreviewWidget , setFileChooserPreviewWidget , -- ** previewWidgetActive #attr:previewWidgetActive# FileChooserPreviewWidgetActivePropertyInfo, constructFileChooserPreviewWidgetActive , fileChooserPreviewWidgetActive , getFileChooserPreviewWidgetActive , setFileChooserPreviewWidgetActive , -- ** selectMultiple #attr:selectMultiple# FileChooserSelectMultiplePropertyInfo , constructFileChooserSelectMultiple , fileChooserSelectMultiple , getFileChooserSelectMultiple , setFileChooserSelectMultiple , -- ** showHidden #attr:showHidden# FileChooserShowHiddenPropertyInfo , constructFileChooserShowHidden , fileChooserShowHidden , getFileChooserShowHidden , setFileChooserShowHidden , -- ** usePreviewLabel #attr:usePreviewLabel# FileChooserUsePreviewLabelPropertyInfo , constructFileChooserUsePreviewLabel , fileChooserUsePreviewLabel , getFileChooserUsePreviewLabel , setFileChooserUsePreviewLabel , -- * Signals -- ** confirmOverwrite #signal:confirmOverwrite# C_FileChooserConfirmOverwriteCallback , FileChooserConfirmOverwriteCallback , FileChooserConfirmOverwriteSignalInfo , afterFileChooserConfirmOverwrite , genClosure_FileChooserConfirmOverwrite , mk_FileChooserConfirmOverwriteCallback , noFileChooserConfirmOverwriteCallback , onFileChooserConfirmOverwrite , wrap_FileChooserConfirmOverwriteCallback, -- ** currentFolderChanged #signal:currentFolderChanged# C_FileChooserCurrentFolderChangedCallback, FileChooserCurrentFolderChangedCallback , FileChooserCurrentFolderChangedSignalInfo, afterFileChooserCurrentFolderChanged , genClosure_FileChooserCurrentFolderChanged, mk_FileChooserCurrentFolderChangedCallback, noFileChooserCurrentFolderChangedCallback, onFileChooserCurrentFolderChanged , wrap_FileChooserCurrentFolderChangedCallback, -- ** fileActivated #signal:fileActivated# C_FileChooserFileActivatedCallback , FileChooserFileActivatedCallback , FileChooserFileActivatedSignalInfo , afterFileChooserFileActivated , genClosure_FileChooserFileActivated , mk_FileChooserFileActivatedCallback , noFileChooserFileActivatedCallback , onFileChooserFileActivated , wrap_FileChooserFileActivatedCallback , -- ** selectionChanged #signal:selectionChanged# C_FileChooserSelectionChangedCallback , FileChooserSelectionChangedCallback , FileChooserSelectionChangedSignalInfo , afterFileChooserSelectionChanged , genClosure_FileChooserSelectionChanged , mk_FileChooserSelectionChangedCallback , noFileChooserSelectionChangedCallback , onFileChooserSelectionChanged , wrap_FileChooserSelectionChangedCallback, -- ** updatePreview #signal:updatePreview# C_FileChooserUpdatePreviewCallback , FileChooserUpdatePreviewCallback , FileChooserUpdatePreviewSignalInfo , afterFileChooserUpdatePreview , genClosure_FileChooserUpdatePreview , mk_FileChooserUpdatePreviewCallback , noFileChooserUpdatePreviewCallback , onFileChooserUpdatePreview , wrap_FileChooserUpdatePreviewCallback , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GI.GObject.Objects.Object as GObject.Object import qualified GI.Gio.Interfaces.File as Gio.File import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums import {-# SOURCE #-} qualified GI.Gtk.Objects.FileFilter as Gtk.FileFilter import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget -- interface FileChooser newtype FileChooser = FileChooser (ManagedPtr FileChooser) noFileChooser :: Maybe FileChooser noFileChooser = Nothing type family ResolveFileChooserMethod (t :: Symbol) (o :: *) :: * where ResolveFileChooserMethod "addChoice" o = FileChooserAddChoiceMethodInfo ResolveFileChooserMethod "addFilter" o = FileChooserAddFilterMethodInfo ResolveFileChooserMethod "addShortcutFolder" o = FileChooserAddShortcutFolderMethodInfo ResolveFileChooserMethod "addShortcutFolderUri" o = FileChooserAddShortcutFolderUriMethodInfo ResolveFileChooserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveFileChooserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveFileChooserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveFileChooserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveFileChooserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveFileChooserMethod "listFilters" o = FileChooserListFiltersMethodInfo ResolveFileChooserMethod "listShortcutFolderUris" o = FileChooserListShortcutFolderUrisMethodInfo ResolveFileChooserMethod "listShortcutFolders" o = FileChooserListShortcutFoldersMethodInfo ResolveFileChooserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveFileChooserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveFileChooserMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolveFileChooserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveFileChooserMethod "removeChoice" o = FileChooserRemoveChoiceMethodInfo ResolveFileChooserMethod "removeFilter" o = FileChooserRemoveFilterMethodInfo ResolveFileChooserMethod "removeShortcutFolder" o = FileChooserRemoveShortcutFolderMethodInfo ResolveFileChooserMethod "removeShortcutFolderUri" o = FileChooserRemoveShortcutFolderUriMethodInfo ResolveFileChooserMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo ResolveFileChooserMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo ResolveFileChooserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveFileChooserMethod "selectAll" o = FileChooserSelectAllMethodInfo ResolveFileChooserMethod "selectFile" o = FileChooserSelectFileMethodInfo ResolveFileChooserMethod "selectFilename" o = FileChooserSelectFilenameMethodInfo ResolveFileChooserMethod "selectUri" o = FileChooserSelectUriMethodInfo ResolveFileChooserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveFileChooserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveFileChooserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveFileChooserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveFileChooserMethod "unselectAll" o = FileChooserUnselectAllMethodInfo ResolveFileChooserMethod "unselectFile" o = FileChooserUnselectFileMethodInfo ResolveFileChooserMethod "unselectFilename" o = FileChooserUnselectFilenameMethodInfo ResolveFileChooserMethod "unselectUri" o = FileChooserUnselectUriMethodInfo ResolveFileChooserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveFileChooserMethod "getAction" o = FileChooserGetActionMethodInfo ResolveFileChooserMethod "getChoice" o = FileChooserGetChoiceMethodInfo ResolveFileChooserMethod "getCreateFolders" o = FileChooserGetCreateFoldersMethodInfo ResolveFileChooserMethod "getCurrentFolder" o = FileChooserGetCurrentFolderMethodInfo ResolveFileChooserMethod "getCurrentFolderFile" o = FileChooserGetCurrentFolderFileMethodInfo ResolveFileChooserMethod "getCurrentFolderUri" o = FileChooserGetCurrentFolderUriMethodInfo ResolveFileChooserMethod "getCurrentName" o = FileChooserGetCurrentNameMethodInfo ResolveFileChooserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveFileChooserMethod "getDoOverwriteConfirmation" o = FileChooserGetDoOverwriteConfirmationMethodInfo ResolveFileChooserMethod "getExtraWidget" o = FileChooserGetExtraWidgetMethodInfo ResolveFileChooserMethod "getFile" o = FileChooserGetFileMethodInfo ResolveFileChooserMethod "getFilename" o = FileChooserGetFilenameMethodInfo ResolveFileChooserMethod "getFilenames" o = FileChooserGetFilenamesMethodInfo ResolveFileChooserMethod "getFiles" o = FileChooserGetFilesMethodInfo ResolveFileChooserMethod "getFilter" o = FileChooserGetFilterMethodInfo ResolveFileChooserMethod "getLocalOnly" o = FileChooserGetLocalOnlyMethodInfo ResolveFileChooserMethod "getPreviewFile" o = FileChooserGetPreviewFileMethodInfo ResolveFileChooserMethod "getPreviewFilename" o = FileChooserGetPreviewFilenameMethodInfo ResolveFileChooserMethod "getPreviewUri" o = FileChooserGetPreviewUriMethodInfo ResolveFileChooserMethod "getPreviewWidget" o = FileChooserGetPreviewWidgetMethodInfo ResolveFileChooserMethod "getPreviewWidgetActive" o = FileChooserGetPreviewWidgetActiveMethodInfo ResolveFileChooserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveFileChooserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveFileChooserMethod "getSelectMultiple" o = FileChooserGetSelectMultipleMethodInfo ResolveFileChooserMethod "getShowHidden" o = FileChooserGetShowHiddenMethodInfo ResolveFileChooserMethod "getUri" o = FileChooserGetUriMethodInfo ResolveFileChooserMethod "getUris" o = FileChooserGetUrisMethodInfo ResolveFileChooserMethod "getUsePreviewLabel" o = FileChooserGetUsePreviewLabelMethodInfo ResolveFileChooserMethod "setAction" o = FileChooserSetActionMethodInfo ResolveFileChooserMethod "setChoice" o = FileChooserSetChoiceMethodInfo ResolveFileChooserMethod "setCreateFolders" o = FileChooserSetCreateFoldersMethodInfo ResolveFileChooserMethod "setCurrentFolder" o = FileChooserSetCurrentFolderMethodInfo ResolveFileChooserMethod "setCurrentFolderFile" o = FileChooserSetCurrentFolderFileMethodInfo ResolveFileChooserMethod "setCurrentFolderUri" o = FileChooserSetCurrentFolderUriMethodInfo ResolveFileChooserMethod "setCurrentName" o = FileChooserSetCurrentNameMethodInfo ResolveFileChooserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveFileChooserMethod "setDoOverwriteConfirmation" o = FileChooserSetDoOverwriteConfirmationMethodInfo ResolveFileChooserMethod "setExtraWidget" o = FileChooserSetExtraWidgetMethodInfo ResolveFileChooserMethod "setFile" o = FileChooserSetFileMethodInfo ResolveFileChooserMethod "setFilename" o = FileChooserSetFilenameMethodInfo ResolveFileChooserMethod "setFilter" o = FileChooserSetFilterMethodInfo ResolveFileChooserMethod "setLocalOnly" o = FileChooserSetLocalOnlyMethodInfo ResolveFileChooserMethod "setPreviewWidget" o = FileChooserSetPreviewWidgetMethodInfo ResolveFileChooserMethod "setPreviewWidgetActive" o = FileChooserSetPreviewWidgetActiveMethodInfo ResolveFileChooserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveFileChooserMethod "setSelectMultiple" o = FileChooserSetSelectMultipleMethodInfo ResolveFileChooserMethod "setShowHidden" o = FileChooserSetShowHiddenMethodInfo ResolveFileChooserMethod "setUri" o = FileChooserSetUriMethodInfo ResolveFileChooserMethod "setUsePreviewLabel" o = FileChooserSetUsePreviewLabelMethodInfo ResolveFileChooserMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveFileChooserMethod t FileChooser, O.MethodInfo info FileChooser p) => O.IsLabelProxy t (FileChooser -> p) where fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveFileChooserMethod t FileChooser, O.MethodInfo info FileChooser p) => O.IsLabel t (FileChooser -> p) where fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif -- signal FileChooser::confirm-overwrite type FileChooserConfirmOverwriteCallback = IO Gtk.Enums.FileChooserConfirmation noFileChooserConfirmOverwriteCallback :: Maybe FileChooserConfirmOverwriteCallback noFileChooserConfirmOverwriteCallback = Nothing type C_FileChooserConfirmOverwriteCallback = Ptr () -> -- object Ptr () -> -- user_data IO CUInt foreign import ccall "wrapper" mk_FileChooserConfirmOverwriteCallback :: C_FileChooserConfirmOverwriteCallback -> IO (FunPtr C_FileChooserConfirmOverwriteCallback) genClosure_FileChooserConfirmOverwrite :: FileChooserConfirmOverwriteCallback -> IO Closure genClosure_FileChooserConfirmOverwrite cb = do let cb' = wrap_FileChooserConfirmOverwriteCallback cb mk_FileChooserConfirmOverwriteCallback cb' >>= newCClosure wrap_FileChooserConfirmOverwriteCallback :: FileChooserConfirmOverwriteCallback -> Ptr () -> Ptr () -> IO CUInt wrap_FileChooserConfirmOverwriteCallback _cb _ _ = do result <- _cb let result' = (fromIntegral . fromEnum) result return result' onFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId onFileChooserConfirmOverwrite obj cb = liftIO $ connectFileChooserConfirmOverwrite obj cb SignalConnectBefore afterFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId afterFileChooserConfirmOverwrite obj cb = connectFileChooserConfirmOverwrite obj cb SignalConnectAfter connectFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> SignalConnectMode -> m SignalHandlerId connectFileChooserConfirmOverwrite obj cb after = liftIO $ do let cb' = wrap_FileChooserConfirmOverwriteCallback cb cb'' <- mk_FileChooserConfirmOverwriteCallback cb' connectSignalFunPtr obj "confirm-overwrite" cb'' after -- signal FileChooser::current-folder-changed type FileChooserCurrentFolderChangedCallback = IO () noFileChooserCurrentFolderChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback noFileChooserCurrentFolderChangedCallback = Nothing type C_FileChooserCurrentFolderChangedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_FileChooserCurrentFolderChangedCallback :: C_FileChooserCurrentFolderChangedCallback -> IO (FunPtr C_FileChooserCurrentFolderChangedCallback) genClosure_FileChooserCurrentFolderChanged :: FileChooserCurrentFolderChangedCallback -> IO Closure genClosure_FileChooserCurrentFolderChanged cb = do let cb' = wrap_FileChooserCurrentFolderChangedCallback cb mk_FileChooserCurrentFolderChangedCallback cb' >>= newCClosure wrap_FileChooserCurrentFolderChangedCallback :: FileChooserCurrentFolderChangedCallback -> Ptr () -> Ptr () -> IO () wrap_FileChooserCurrentFolderChangedCallback _cb _ _ = do _cb onFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId onFileChooserCurrentFolderChanged obj cb = liftIO $ connectFileChooserCurrentFolderChanged obj cb SignalConnectBefore afterFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId afterFileChooserCurrentFolderChanged obj cb = connectFileChooserCurrentFolderChanged obj cb SignalConnectAfter connectFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> SignalConnectMode -> m SignalHandlerId connectFileChooserCurrentFolderChanged obj cb after = liftIO $ do let cb' = wrap_FileChooserCurrentFolderChangedCallback cb cb'' <- mk_FileChooserCurrentFolderChangedCallback cb' connectSignalFunPtr obj "current-folder-changed" cb'' after -- signal FileChooser::file-activated type FileChooserFileActivatedCallback = IO () noFileChooserFileActivatedCallback :: Maybe FileChooserFileActivatedCallback noFileChooserFileActivatedCallback = Nothing type C_FileChooserFileActivatedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_FileChooserFileActivatedCallback :: C_FileChooserFileActivatedCallback -> IO (FunPtr C_FileChooserFileActivatedCallback) genClosure_FileChooserFileActivated :: FileChooserFileActivatedCallback -> IO Closure genClosure_FileChooserFileActivated cb = do let cb' = wrap_FileChooserFileActivatedCallback cb mk_FileChooserFileActivatedCallback cb' >>= newCClosure wrap_FileChooserFileActivatedCallback :: FileChooserFileActivatedCallback -> Ptr () -> Ptr () -> IO () wrap_FileChooserFileActivatedCallback _cb _ _ = do _cb onFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId onFileChooserFileActivated obj cb = liftIO $ connectFileChooserFileActivated obj cb SignalConnectBefore afterFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId afterFileChooserFileActivated obj cb = connectFileChooserFileActivated obj cb SignalConnectAfter connectFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> SignalConnectMode -> m SignalHandlerId connectFileChooserFileActivated obj cb after = liftIO $ do let cb' = wrap_FileChooserFileActivatedCallback cb cb'' <- mk_FileChooserFileActivatedCallback cb' connectSignalFunPtr obj "file-activated" cb'' after -- signal FileChooser::selection-changed type FileChooserSelectionChangedCallback = IO () noFileChooserSelectionChangedCallback :: Maybe FileChooserSelectionChangedCallback noFileChooserSelectionChangedCallback = Nothing type C_FileChooserSelectionChangedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_FileChooserSelectionChangedCallback :: C_FileChooserSelectionChangedCallback -> IO (FunPtr C_FileChooserSelectionChangedCallback) genClosure_FileChooserSelectionChanged :: FileChooserSelectionChangedCallback -> IO Closure genClosure_FileChooserSelectionChanged cb = do let cb' = wrap_FileChooserSelectionChangedCallback cb mk_FileChooserSelectionChangedCallback cb' >>= newCClosure wrap_FileChooserSelectionChangedCallback :: FileChooserSelectionChangedCallback -> Ptr () -> Ptr () -> IO () wrap_FileChooserSelectionChangedCallback _cb _ _ = do _cb onFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId onFileChooserSelectionChanged obj cb = liftIO $ connectFileChooserSelectionChanged obj cb SignalConnectBefore afterFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId afterFileChooserSelectionChanged obj cb = connectFileChooserSelectionChanged obj cb SignalConnectAfter connectFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId connectFileChooserSelectionChanged obj cb after = liftIO $ do let cb' = wrap_FileChooserSelectionChangedCallback cb cb'' <- mk_FileChooserSelectionChangedCallback cb' connectSignalFunPtr obj "selection-changed" cb'' after -- signal FileChooser::update-preview type FileChooserUpdatePreviewCallback = IO () noFileChooserUpdatePreviewCallback :: Maybe FileChooserUpdatePreviewCallback noFileChooserUpdatePreviewCallback = Nothing type C_FileChooserUpdatePreviewCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_FileChooserUpdatePreviewCallback :: C_FileChooserUpdatePreviewCallback -> IO (FunPtr C_FileChooserUpdatePreviewCallback) genClosure_FileChooserUpdatePreview :: FileChooserUpdatePreviewCallback -> IO Closure genClosure_FileChooserUpdatePreview cb = do let cb' = wrap_FileChooserUpdatePreviewCallback cb mk_FileChooserUpdatePreviewCallback cb' >>= newCClosure wrap_FileChooserUpdatePreviewCallback :: FileChooserUpdatePreviewCallback -> Ptr () -> Ptr () -> IO () wrap_FileChooserUpdatePreviewCallback _cb _ _ = do _cb onFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId onFileChooserUpdatePreview obj cb = liftIO $ connectFileChooserUpdatePreview obj cb SignalConnectBefore afterFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId afterFileChooserUpdatePreview obj cb = connectFileChooserUpdatePreview obj cb SignalConnectAfter connectFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> SignalConnectMode -> m SignalHandlerId connectFileChooserUpdatePreview obj cb after = liftIO $ do let cb' = wrap_FileChooserUpdatePreviewCallback cb cb'' <- mk_FileChooserUpdatePreviewCallback cb' connectSignalFunPtr obj "update-preview" cb'' after -- VVV Prop "action" -- Type: TInterface (Name {namespace = "Gtk", name = "FileChooserAction"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserAction :: (MonadIO m, IsFileChooser o) => o -> m Gtk.Enums.FileChooserAction getFileChooserAction obj = liftIO $ getObjectPropertyEnum obj "action" setFileChooserAction :: (MonadIO m, IsFileChooser o) => o -> Gtk.Enums.FileChooserAction -> m () setFileChooserAction obj val = liftIO $ setObjectPropertyEnum obj "action" val constructFileChooserAction :: (IsFileChooser o) => Gtk.Enums.FileChooserAction -> IO (GValueConstruct o) constructFileChooserAction val = constructObjectPropertyEnum "action" val data FileChooserActionPropertyInfo instance AttrInfo FileChooserActionPropertyInfo where type AttrAllowedOps FileChooserActionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserActionPropertyInfo = (~) Gtk.Enums.FileChooserAction type AttrBaseTypeConstraint FileChooserActionPropertyInfo = IsFileChooser type AttrGetType FileChooserActionPropertyInfo = Gtk.Enums.FileChooserAction type AttrLabel FileChooserActionPropertyInfo = "action" type AttrOrigin FileChooserActionPropertyInfo = FileChooser attrGet _ = getFileChooserAction attrSet _ = setFileChooserAction attrConstruct _ = constructFileChooserAction attrClear _ = undefined -- VVV Prop "create-folders" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserCreateFolders :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserCreateFolders obj = liftIO $ getObjectPropertyBool obj "create-folders" setFileChooserCreateFolders :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserCreateFolders obj val = liftIO $ setObjectPropertyBool obj "create-folders" val constructFileChooserCreateFolders :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserCreateFolders val = constructObjectPropertyBool "create-folders" val data FileChooserCreateFoldersPropertyInfo instance AttrInfo FileChooserCreateFoldersPropertyInfo where type AttrAllowedOps FileChooserCreateFoldersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserCreateFoldersPropertyInfo = IsFileChooser type AttrGetType FileChooserCreateFoldersPropertyInfo = Bool type AttrLabel FileChooserCreateFoldersPropertyInfo = "create-folders" type AttrOrigin FileChooserCreateFoldersPropertyInfo = FileChooser attrGet _ = getFileChooserCreateFolders attrSet _ = setFileChooserCreateFolders attrConstruct _ = constructFileChooserCreateFolders attrClear _ = undefined -- VVV Prop "do-overwrite-confirmation" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserDoOverwriteConfirmation :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserDoOverwriteConfirmation obj = liftIO $ getObjectPropertyBool obj "do-overwrite-confirmation" setFileChooserDoOverwriteConfirmation :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserDoOverwriteConfirmation obj val = liftIO $ setObjectPropertyBool obj "do-overwrite-confirmation" val constructFileChooserDoOverwriteConfirmation :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserDoOverwriteConfirmation val = constructObjectPropertyBool "do-overwrite-confirmation" val data FileChooserDoOverwriteConfirmationPropertyInfo instance AttrInfo FileChooserDoOverwriteConfirmationPropertyInfo where type AttrAllowedOps FileChooserDoOverwriteConfirmationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = IsFileChooser type AttrGetType FileChooserDoOverwriteConfirmationPropertyInfo = Bool type AttrLabel FileChooserDoOverwriteConfirmationPropertyInfo = "do-overwrite-confirmation" type AttrOrigin FileChooserDoOverwriteConfirmationPropertyInfo = FileChooser attrGet _ = getFileChooserDoOverwriteConfirmation attrSet _ = setFileChooserDoOverwriteConfirmation attrConstruct _ = constructFileChooserDoOverwriteConfirmation attrClear _ = undefined -- VVV Prop "extra-widget" -- Type: TInterface (Name {namespace = "Gtk", name = "Widget"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just True,Just False) getFileChooserExtraWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget) getFileChooserExtraWidget obj = liftIO $ getObjectPropertyObject obj "extra-widget" Gtk.Widget.Widget setFileChooserExtraWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m () setFileChooserExtraWidget obj val = liftIO $ setObjectPropertyObject obj "extra-widget" (Just val) constructFileChooserExtraWidget :: (IsFileChooser o, Gtk.Widget.IsWidget a) => a -> IO (GValueConstruct o) constructFileChooserExtraWidget val = constructObjectPropertyObject "extra-widget" (Just val) data FileChooserExtraWidgetPropertyInfo instance AttrInfo FileChooserExtraWidgetPropertyInfo where type AttrAllowedOps FileChooserExtraWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserExtraWidgetPropertyInfo = Gtk.Widget.IsWidget type AttrBaseTypeConstraint FileChooserExtraWidgetPropertyInfo = IsFileChooser type AttrGetType FileChooserExtraWidgetPropertyInfo = (Maybe Gtk.Widget.Widget) type AttrLabel FileChooserExtraWidgetPropertyInfo = "extra-widget" type AttrOrigin FileChooserExtraWidgetPropertyInfo = FileChooser attrGet _ = getFileChooserExtraWidget attrSet _ = setFileChooserExtraWidget attrConstruct _ = constructFileChooserExtraWidget attrClear _ = undefined -- VVV Prop "filter" -- Type: TInterface (Name {namespace = "Gtk", name = "FileFilter"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just True,Just False) getFileChooserFilter :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.FileFilter.FileFilter) getFileChooserFilter obj = liftIO $ getObjectPropertyObject obj "filter" Gtk.FileFilter.FileFilter setFileChooserFilter :: (MonadIO m, IsFileChooser o, Gtk.FileFilter.IsFileFilter a) => o -> a -> m () setFileChooserFilter obj val = liftIO $ setObjectPropertyObject obj "filter" (Just val) constructFileChooserFilter :: (IsFileChooser o, Gtk.FileFilter.IsFileFilter a) => a -> IO (GValueConstruct o) constructFileChooserFilter val = constructObjectPropertyObject "filter" (Just val) data FileChooserFilterPropertyInfo instance AttrInfo FileChooserFilterPropertyInfo where type AttrAllowedOps FileChooserFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserFilterPropertyInfo = Gtk.FileFilter.IsFileFilter type AttrBaseTypeConstraint FileChooserFilterPropertyInfo = IsFileChooser type AttrGetType FileChooserFilterPropertyInfo = (Maybe Gtk.FileFilter.FileFilter) type AttrLabel FileChooserFilterPropertyInfo = "filter" type AttrOrigin FileChooserFilterPropertyInfo = FileChooser attrGet _ = getFileChooserFilter attrSet _ = setFileChooserFilter attrConstruct _ = constructFileChooserFilter attrClear _ = undefined -- VVV Prop "local-only" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserLocalOnly :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserLocalOnly obj = liftIO $ getObjectPropertyBool obj "local-only" setFileChooserLocalOnly :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserLocalOnly obj val = liftIO $ setObjectPropertyBool obj "local-only" val constructFileChooserLocalOnly :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserLocalOnly val = constructObjectPropertyBool "local-only" val data FileChooserLocalOnlyPropertyInfo instance AttrInfo FileChooserLocalOnlyPropertyInfo where type AttrAllowedOps FileChooserLocalOnlyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserLocalOnlyPropertyInfo = IsFileChooser type AttrGetType FileChooserLocalOnlyPropertyInfo = Bool type AttrLabel FileChooserLocalOnlyPropertyInfo = "local-only" type AttrOrigin FileChooserLocalOnlyPropertyInfo = FileChooser attrGet _ = getFileChooserLocalOnly attrSet _ = setFileChooserLocalOnly attrConstruct _ = constructFileChooserLocalOnly attrClear _ = undefined -- VVV Prop "preview-widget" -- Type: TInterface (Name {namespace = "Gtk", name = "Widget"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just True,Just False) getFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget) getFileChooserPreviewWidget obj = liftIO $ getObjectPropertyObject obj "preview-widget" Gtk.Widget.Widget setFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m () setFileChooserPreviewWidget obj val = liftIO $ setObjectPropertyObject obj "preview-widget" (Just val) constructFileChooserPreviewWidget :: (IsFileChooser o, Gtk.Widget.IsWidget a) => a -> IO (GValueConstruct o) constructFileChooserPreviewWidget val = constructObjectPropertyObject "preview-widget" (Just val) data FileChooserPreviewWidgetPropertyInfo instance AttrInfo FileChooserPreviewWidgetPropertyInfo where type AttrAllowedOps FileChooserPreviewWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.IsWidget type AttrBaseTypeConstraint FileChooserPreviewWidgetPropertyInfo = IsFileChooser type AttrGetType FileChooserPreviewWidgetPropertyInfo = (Maybe Gtk.Widget.Widget) type AttrLabel FileChooserPreviewWidgetPropertyInfo = "preview-widget" type AttrOrigin FileChooserPreviewWidgetPropertyInfo = FileChooser attrGet _ = getFileChooserPreviewWidget attrSet _ = setFileChooserPreviewWidget attrConstruct _ = constructFileChooserPreviewWidget attrClear _ = undefined -- VVV Prop "preview-widget-active" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserPreviewWidgetActive :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserPreviewWidgetActive obj = liftIO $ getObjectPropertyBool obj "preview-widget-active" setFileChooserPreviewWidgetActive :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserPreviewWidgetActive obj val = liftIO $ setObjectPropertyBool obj "preview-widget-active" val constructFileChooserPreviewWidgetActive :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserPreviewWidgetActive val = constructObjectPropertyBool "preview-widget-active" val data FileChooserPreviewWidgetActivePropertyInfo instance AttrInfo FileChooserPreviewWidgetActivePropertyInfo where type AttrAllowedOps FileChooserPreviewWidgetActivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = IsFileChooser type AttrGetType FileChooserPreviewWidgetActivePropertyInfo = Bool type AttrLabel FileChooserPreviewWidgetActivePropertyInfo = "preview-widget-active" type AttrOrigin FileChooserPreviewWidgetActivePropertyInfo = FileChooser attrGet _ = getFileChooserPreviewWidgetActive attrSet _ = setFileChooserPreviewWidgetActive attrConstruct _ = constructFileChooserPreviewWidgetActive attrClear _ = undefined -- VVV Prop "select-multiple" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserSelectMultiple :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserSelectMultiple obj = liftIO $ getObjectPropertyBool obj "select-multiple" setFileChooserSelectMultiple :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserSelectMultiple obj val = liftIO $ setObjectPropertyBool obj "select-multiple" val constructFileChooserSelectMultiple :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserSelectMultiple val = constructObjectPropertyBool "select-multiple" val data FileChooserSelectMultiplePropertyInfo instance AttrInfo FileChooserSelectMultiplePropertyInfo where type AttrAllowedOps FileChooserSelectMultiplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserSelectMultiplePropertyInfo = IsFileChooser type AttrGetType FileChooserSelectMultiplePropertyInfo = Bool type AttrLabel FileChooserSelectMultiplePropertyInfo = "select-multiple" type AttrOrigin FileChooserSelectMultiplePropertyInfo = FileChooser attrGet _ = getFileChooserSelectMultiple attrSet _ = setFileChooserSelectMultiple attrConstruct _ = constructFileChooserSelectMultiple attrClear _ = undefined -- VVV Prop "show-hidden" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserShowHidden :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserShowHidden obj = liftIO $ getObjectPropertyBool obj "show-hidden" setFileChooserShowHidden :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserShowHidden obj val = liftIO $ setObjectPropertyBool obj "show-hidden" val constructFileChooserShowHidden :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserShowHidden val = constructObjectPropertyBool "show-hidden" val data FileChooserShowHiddenPropertyInfo instance AttrInfo FileChooserShowHiddenPropertyInfo where type AttrAllowedOps FileChooserShowHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserShowHiddenPropertyInfo = IsFileChooser type AttrGetType FileChooserShowHiddenPropertyInfo = Bool type AttrLabel FileChooserShowHiddenPropertyInfo = "show-hidden" type AttrOrigin FileChooserShowHiddenPropertyInfo = FileChooser attrGet _ = getFileChooserShowHidden attrSet _ = setFileChooserShowHidden attrConstruct _ = constructFileChooserShowHidden attrClear _ = undefined -- VVV Prop "use-preview-label" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getFileChooserUsePreviewLabel :: (MonadIO m, IsFileChooser o) => o -> m Bool getFileChooserUsePreviewLabel obj = liftIO $ getObjectPropertyBool obj "use-preview-label" setFileChooserUsePreviewLabel :: (MonadIO m, IsFileChooser o) => o -> Bool -> m () setFileChooserUsePreviewLabel obj val = liftIO $ setObjectPropertyBool obj "use-preview-label" val constructFileChooserUsePreviewLabel :: (IsFileChooser o) => Bool -> IO (GValueConstruct o) constructFileChooserUsePreviewLabel val = constructObjectPropertyBool "use-preview-label" val data FileChooserUsePreviewLabelPropertyInfo instance AttrInfo FileChooserUsePreviewLabelPropertyInfo where type AttrAllowedOps FileChooserUsePreviewLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool type AttrBaseTypeConstraint FileChooserUsePreviewLabelPropertyInfo = IsFileChooser type AttrGetType FileChooserUsePreviewLabelPropertyInfo = Bool type AttrLabel FileChooserUsePreviewLabelPropertyInfo = "use-preview-label" type AttrOrigin FileChooserUsePreviewLabelPropertyInfo = FileChooser attrGet _ = getFileChooserUsePreviewLabel attrSet _ = setFileChooserUsePreviewLabel attrConstruct _ = constructFileChooserUsePreviewLabel attrClear _ = undefined instance O.HasAttributeList FileChooser type instance O.AttributeList FileChooser = FileChooserAttributeList type FileChooserAttributeList = ('[ '("action", FileChooserActionPropertyInfo), '("createFolders", FileChooserCreateFoldersPropertyInfo), '("doOverwriteConfirmation", FileChooserDoOverwriteConfirmationPropertyInfo), '("extraWidget", FileChooserExtraWidgetPropertyInfo), '("filter", FileChooserFilterPropertyInfo), '("localOnly", FileChooserLocalOnlyPropertyInfo), '("previewWidget", FileChooserPreviewWidgetPropertyInfo), '("previewWidgetActive", FileChooserPreviewWidgetActivePropertyInfo), '("selectMultiple", FileChooserSelectMultiplePropertyInfo), '("showHidden", FileChooserShowHiddenPropertyInfo), '("usePreviewLabel", FileChooserUsePreviewLabelPropertyInfo)] :: [(Symbol, *)]) fileChooserAction :: AttrLabelProxy "action" fileChooserAction = AttrLabelProxy fileChooserCreateFolders :: AttrLabelProxy "createFolders" fileChooserCreateFolders = AttrLabelProxy fileChooserDoOverwriteConfirmation :: AttrLabelProxy "doOverwriteConfirmation" fileChooserDoOverwriteConfirmation = AttrLabelProxy fileChooserExtraWidget :: AttrLabelProxy "extraWidget" fileChooserExtraWidget = AttrLabelProxy fileChooserFilter :: AttrLabelProxy "filter" fileChooserFilter = AttrLabelProxy fileChooserLocalOnly :: AttrLabelProxy "localOnly" fileChooserLocalOnly = AttrLabelProxy fileChooserPreviewWidget :: AttrLabelProxy "previewWidget" fileChooserPreviewWidget = AttrLabelProxy fileChooserPreviewWidgetActive :: AttrLabelProxy "previewWidgetActive" fileChooserPreviewWidgetActive = AttrLabelProxy fileChooserSelectMultiple :: AttrLabelProxy "selectMultiple" fileChooserSelectMultiple = AttrLabelProxy fileChooserShowHidden :: AttrLabelProxy "showHidden" fileChooserShowHidden = AttrLabelProxy fileChooserUsePreviewLabel :: AttrLabelProxy "usePreviewLabel" fileChooserUsePreviewLabel = AttrLabelProxy data FileChooserConfirmOverwriteSignalInfo instance SignalInfo FileChooserConfirmOverwriteSignalInfo where type HaskellCallbackType FileChooserConfirmOverwriteSignalInfo = FileChooserConfirmOverwriteCallback connectSignal _ = connectFileChooserConfirmOverwrite data FileChooserCurrentFolderChangedSignalInfo instance SignalInfo FileChooserCurrentFolderChangedSignalInfo where type HaskellCallbackType FileChooserCurrentFolderChangedSignalInfo = FileChooserCurrentFolderChangedCallback connectSignal _ = connectFileChooserCurrentFolderChanged data FileChooserFileActivatedSignalInfo instance SignalInfo FileChooserFileActivatedSignalInfo where type HaskellCallbackType FileChooserFileActivatedSignalInfo = FileChooserFileActivatedCallback connectSignal _ = connectFileChooserFileActivated data FileChooserSelectionChangedSignalInfo instance SignalInfo FileChooserSelectionChangedSignalInfo where type HaskellCallbackType FileChooserSelectionChangedSignalInfo = FileChooserSelectionChangedCallback connectSignal _ = connectFileChooserSelectionChanged data FileChooserUpdatePreviewSignalInfo instance SignalInfo FileChooserUpdatePreviewSignalInfo where type HaskellCallbackType FileChooserUpdatePreviewSignalInfo = FileChooserUpdatePreviewCallback connectSignal _ = connectFileChooserUpdatePreview type instance O.SignalList FileChooser = FileChooserSignalList type FileChooserSignalList = ('[ '("confirmOverwrite", FileChooserConfirmOverwriteSignalInfo), '("currentFolderChanged", FileChooserCurrentFolderChangedSignalInfo), '("fileActivated", FileChooserFileActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("selectionChanged", FileChooserSelectionChangedSignalInfo), '("updatePreview", FileChooserUpdatePreviewSignalInfo)] :: [(Symbol, *)]) foreign import ccall "gtk_file_chooser_get_type" c_gtk_file_chooser_get_type :: IO GType instance GObject FileChooser where gobjectType _ = c_gtk_file_chooser_get_type class GObject o => IsFileChooser o #if MIN_VERSION_base(4,9,0) instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError FileChooser a) => IsFileChooser a #endif instance IsFileChooser FileChooser instance GObject.Object.IsObject FileChooser toFileChooser :: IsFileChooser o => o -> IO FileChooser toFileChooser = unsafeCastTo FileChooser -- method FileChooser::add_choice -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "id for the added choice", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "user-visible label for the added choice", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "ids for the options of the choice, or %NULL for a boolean choice", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "option_labels", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "user-visible labels for the options, must be the same length as @options", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_add_choice" gtk_file_chooser_add_choice :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- id : TBasicType TUTF8 CString -> -- label : TBasicType TUTF8 CString -> -- options : TBasicType TUTF8 CString -> -- option_labels : TBasicType TUTF8 IO () {- | Adds a \'choice\' to the file chooser. This is typically implemented as a combobox or, for boolean choices, as a checkbutton. You can select a value using 'GI.Gtk.Interfaces.FileChooser.fileChooserSetChoice' before the dialog is shown, and you can obtain the user-selected value in the ::response signal handler using 'GI.Gtk.Interfaces.FileChooser.fileChooserGetChoice'. Compare 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget'. @since 3.22 -} fileChooserAddChoice :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@id@/: id for the added choice -} -> T.Text {- ^ /@label@/: user-visible label for the added choice -} -> T.Text {- ^ /@options@/: ids for the options of the choice, or 'Nothing' for a boolean choice -} -> T.Text {- ^ /@optionLabels@/: user-visible labels for the options, must be the same length as /@options@/ -} -> m () fileChooserAddChoice chooser id label options optionLabels = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser id' <- textToCString id label' <- textToCString label options' <- textToCString options optionLabels' <- textToCString optionLabels gtk_file_chooser_add_choice chooser' id' label' options' optionLabels' touchManagedPtr chooser freeMem id' freeMem label' freeMem options' freeMem optionLabels' return () data FileChooserAddChoiceMethodInfo instance (signature ~ (T.Text -> T.Text -> T.Text -> T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddChoiceMethodInfo a signature where overloadedMethod _ = fileChooserAddChoice -- method FileChooser::add_filter -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "FileFilter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_add_filter" gtk_file_chooser_add_filter :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gtk.FileFilter.FileFilter -> -- filter : TInterface (Name {namespace = "Gtk", name = "FileFilter"}) IO () {- | Adds /@filter@/ to the list of filters that the user can select between. When a filter is selected, only files that are passed by that filter are displayed. Note that the /@chooser@/ takes ownership of the filter, so you have to ref and sink it if you want to keep a reference. @since 2.4 -} fileChooserAddFilter :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@filter@/: a 'GI.Gtk.Objects.FileFilter.FileFilter' -} -> m () fileChooserAddFilter chooser filter = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filter' <- B.ManagedPtr.disownObject filter gtk_file_chooser_add_filter chooser' filter' touchManagedPtr chooser touchManagedPtr filter return () data FileChooserAddFilterMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserAddFilterMethodInfo a signature where overloadedMethod _ = fileChooserAddFilter -- method FileChooser::add_shortcut_folder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "filename of the folder to add", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_add_shortcut_folder" gtk_file_chooser_add_shortcut_folder :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- folder : TBasicType TFileName Ptr (Ptr GError) -> -- error IO CInt {- | Adds a folder to be displayed with the shortcut folders in a file chooser. Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a “\/usr\/share\/mydrawprogram\/Clipart” folder to the volume list. @since 2.4 -} fileChooserAddShortcutFolder :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@folder@/: filename of the folder to add -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserAddShortcutFolder chooser folder = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser folder' <- stringToCString folder onException (do _ <- propagateGError $ gtk_file_chooser_add_shortcut_folder chooser' folder' touchManagedPtr chooser freeMem folder' return () ) (do freeMem folder' ) data FileChooserAddShortcutFolderMethodInfo instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderMethodInfo a signature where overloadedMethod _ = fileChooserAddShortcutFolder -- method FileChooser::add_shortcut_folder_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "URI of the folder to add", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_add_shortcut_folder_uri" gtk_file_chooser_add_shortcut_folder_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | Adds a folder URI to be displayed with the shortcut folders in a file chooser. Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a “file:\/\/\/usr\/share\/mydrawprogram\/Clipart” folder to the volume list. @since 2.4 -} fileChooserAddShortcutFolderUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: URI of the folder to add -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserAddShortcutFolderUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri onException (do _ <- propagateGError $ gtk_file_chooser_add_shortcut_folder_uri chooser' uri' touchManagedPtr chooser freeMem uri' return () ) (do freeMem uri' ) data FileChooserAddShortcutFolderUriMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderUriMethodInfo a signature where overloadedMethod _ = fileChooserAddShortcutFolderUri -- method FileChooser::get_action -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "FileChooserAction"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_action" gtk_file_chooser_get_action :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CUInt {- | Gets the type of operation that the file chooser is performing; see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetAction'. @since 2.4 -} fileChooserGetAction :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Gtk.Enums.FileChooserAction {- ^ __Returns:__ the action that the file selector is performing -} fileChooserGetAction chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_action chooser' let result' = (toEnum . fromIntegral) result touchManagedPtr chooser return result' data FileChooserGetActionMethodInfo instance (signature ~ (m Gtk.Enums.FileChooserAction), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetActionMethodInfo a signature where overloadedMethod _ = fileChooserGetAction -- method FileChooser::get_choice -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ID of the choice to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_choice" gtk_file_chooser_get_choice :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- id : TBasicType TUTF8 IO CString {- | Gets the currently selected option in the \'choice\' with the given ID. @since 3.22 -} fileChooserGetChoice :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@id@/: the ID of the choice to get -} -> m T.Text {- ^ __Returns:__ the ID of the currenly selected option -} fileChooserGetChoice chooser id = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser id' <- textToCString id result <- gtk_file_chooser_get_choice chooser' id' checkUnexpectedReturnNULL "fileChooserGetChoice" result result' <- cstringToText result touchManagedPtr chooser freeMem id' return result' data FileChooserGetChoiceMethodInfo instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetChoiceMethodInfo a signature where overloadedMethod _ = fileChooserGetChoice -- method FileChooser::get_create_folders -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_create_folders" gtk_file_chooser_get_create_folders :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether file choser will offer to create new folders. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCreateFolders'. @since 2.18 -} fileChooserGetCreateFolders :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if the Create Folder button should be displayed. -} fileChooserGetCreateFolders chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_create_folders chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetCreateFoldersMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCreateFoldersMethodInfo a signature where overloadedMethod _ = fileChooserGetCreateFolders -- method FileChooser::get_current_folder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TFileName) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_current_folder" gtk_file_chooser_get_current_folder :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the current folder of /@chooser@/ as a local filename. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolder'. Note that this is the folder that the file chooser is currently displaying (e.g. \"\/home\/username\/Documents\"), which is not the same as the currently-selected folder if the chooser is in 'GI.Gtk.Enums.FileChooserActionSelectFolder' mode (e.g. \"\/home\/username\/Documents\/selected-folder\/\". To get the currently-selected folder in that mode, use 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri' as the usual way to get the selection. @since 2.4 -} fileChooserGetCurrentFolder :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe [Char]) {- ^ __Returns:__ the full path of the current folder, or 'Nothing' if the current path cannot be represented as a local filename. Free with 'GI.GLib.Functions.free'. This function will also return 'Nothing' if the file chooser was unable to load the last folder that was requested from it; for example, as would be for calling 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolder' on a nonexistent folder. -} fileChooserGetCurrentFolder chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_current_folder chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToString result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetCurrentFolderMethodInfo instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderMethodInfo a signature where overloadedMethod _ = fileChooserGetCurrentFolder -- method FileChooser::get_current_folder_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_current_folder_file" gtk_file_chooser_get_current_folder_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gio.File.File) {- | Gets the current folder of /@chooser@/ as 'GI.Gio.Interfaces.File.File'. See 'GI.Gtk.Interfaces.FileChooser.fileChooserGetCurrentFolderUri'. @since 2.14 -} fileChooserGetCurrentFolderFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Gio.File.File {- ^ __Returns:__ the 'GI.Gio.Interfaces.File.File' for the current folder. -} fileChooserGetCurrentFolderFile chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_current_folder_file chooser' checkUnexpectedReturnNULL "fileChooserGetCurrentFolderFile" result result' <- (wrapObject Gio.File.File) result touchManagedPtr chooser return result' data FileChooserGetCurrentFolderFileMethodInfo instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderFileMethodInfo a signature where overloadedMethod _ = fileChooserGetCurrentFolderFile -- method FileChooser::get_current_folder_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_current_folder_uri" gtk_file_chooser_get_current_folder_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the current folder of /@chooser@/ as an URI. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri'. Note that this is the folder that the file chooser is currently displaying (e.g. \"file:\/\/\/home\/username\/Documents\"), which is not the same as the currently-selected folder if the chooser is in 'GI.Gtk.Enums.FileChooserActionSelectFolder' mode (e.g. \"file:\/\/\/home\/username\/Documents\/selected-folder\/\". To get the currently-selected folder in that mode, use 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri' as the usual way to get the selection. @since 2.4 -} fileChooserGetCurrentFolderUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe T.Text) {- ^ __Returns:__ the URI for the current folder. Free with 'GI.GLib.Functions.free'. This function will also return 'Nothing' if the file chooser was unable to load the last folder that was requested from it; for example, as would be for calling 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri' on a nonexistent folder. -} fileChooserGetCurrentFolderUri chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_current_folder_uri chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetCurrentFolderUriMethodInfo instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderUriMethodInfo a signature where overloadedMethod _ = fileChooserGetCurrentFolderUri -- method FileChooser::get_current_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_current_name" gtk_file_chooser_get_current_name :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the current name in the file selector, as entered by the user in the text entry for “Name”. This is meant to be used in save dialogs, to get the currently typed filename when the file itself does not exist yet. For example, an application that adds a custom extra widget to the file chooser for “file format” may want to change the extension of the typed filename based on the chosen format, say, from “.jpg” to “.png”. @since 3.10 -} fileChooserGetCurrentName :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m T.Text {- ^ __Returns:__ The raw text from the file chooser’s “Name” entry. Free this with 'GI.GLib.Functions.free'. Note that this string is not a full pathname or URI; it is whatever the contents of the entry are. Note also that this string is in UTF-8 encoding, which is not necessarily the system’s encoding for filenames. -} fileChooserGetCurrentName chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_current_name chooser' checkUnexpectedReturnNULL "fileChooserGetCurrentName" result result' <- cstringToText result freeMem result touchManagedPtr chooser return result' data FileChooserGetCurrentNameMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentNameMethodInfo a signature where overloadedMethod _ = fileChooserGetCurrentName -- method FileChooser::get_do_overwrite_confirmation -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_do_overwrite_confirmation" gtk_file_chooser_get_do_overwrite_confirmation :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Queries whether a file chooser is set to confirm for overwriting when the user types a file name that already exists. @since 2.8 -} fileChooserGetDoOverwriteConfirmation :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if the file chooser will present a confirmation dialog; 'False' otherwise. -} fileChooserGetDoOverwriteConfirmation chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_do_overwrite_confirmation chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetDoOverwriteConfirmationMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetDoOverwriteConfirmationMethodInfo a signature where overloadedMethod _ = fileChooserGetDoOverwriteConfirmation -- method FileChooser::get_extra_widget -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "Widget"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_extra_widget" gtk_file_chooser_get_extra_widget :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gtk.Widget.Widget) {- | Gets the current preview widget; see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetExtraWidget'. @since 2.4 -} fileChooserGetExtraWidget :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe Gtk.Widget.Widget) {- ^ __Returns:__ the current extra widget, or 'Nothing' -} fileChooserGetExtraWidget chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_extra_widget chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gtk.Widget.Widget) result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetExtraWidgetMethodInfo instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetExtraWidgetMethodInfo a signature where overloadedMethod _ = fileChooserGetExtraWidget -- method FileChooser::get_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_file" gtk_file_chooser_get_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gio.File.File) {- | Gets the 'GI.Gio.Interfaces.File.File' for the currently selected file in the file selector. If multiple files are selected, one of the files will be returned at random. If the file chooser is in folder mode, this function returns the selected folder. @since 2.14 -} fileChooserGetFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Gio.File.File {- ^ __Returns:__ a selected 'GI.Gio.Interfaces.File.File'. You own the returned file; use 'GI.GObject.Objects.Object.objectUnref' to release it. -} fileChooserGetFile chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_file chooser' checkUnexpectedReturnNULL "fileChooserGetFile" result result' <- (wrapObject Gio.File.File) result touchManagedPtr chooser return result' data FileChooserGetFileMethodInfo instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFileMethodInfo a signature where overloadedMethod _ = fileChooserGetFile -- method FileChooser::get_filename -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TFileName) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_filename" gtk_file_chooser_get_filename :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the filename for the currently selected file in the file selector. The filename is returned as an absolute path. If multiple files are selected, one of the filenames will be returned at random. If the file chooser is in folder mode, this function returns the selected folder. @since 2.4 -} fileChooserGetFilename :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe [Char]) {- ^ __Returns:__ The currently selected filename, or 'Nothing' if no file is selected, or the selected file can\'t be represented with a local filename. Free with 'GI.GLib.Functions.free'. -} fileChooserGetFilename chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_filename chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToString result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetFilenameMethodInfo instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenameMethodInfo a signature where overloadedMethod _ = fileChooserGetFilename -- method FileChooser::get_filenames -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TBasicType TFileName)) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_filenames" gtk_file_chooser_get_filenames :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList CString)) {- | Lists all the selected files and subfolders in the current folder of /@chooser@/. The returned names are full absolute paths. If files in the current folder cannot be represented as local filenames they will be ignored. (See 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris') @since 2.4 -} fileChooserGetFilenames :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [[Char]] {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing the filenames of all selected files and subfolders in the current folder. Free the returned list with @/g_slist_free()/@, and the filenames with 'GI.GLib.Functions.free'. -} fileChooserGetFilenames chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_filenames chooser' result' <- unpackGSList result result'' <- mapM cstringToString result' mapGSList freeMem result g_slist_free result touchManagedPtr chooser return result'' data FileChooserGetFilenamesMethodInfo instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenamesMethodInfo a signature where overloadedMethod _ = fileChooserGetFilenames -- method FileChooser::get_files -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TInterface (Name {namespace = "Gio", name = "File"}))) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_files" gtk_file_chooser_get_files :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList (Ptr Gio.File.File))) {- | Lists all the selected files and subfolders in the current folder of /@chooser@/ as 'GI.Gio.Interfaces.File.File'. An internal function, see 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUris'. @since 2.14 -} fileChooserGetFiles :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [Gio.File.File] {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing a 'GI.Gio.Interfaces.File.File' for each selected file and subfolder in the current folder. Free the returned list with @/g_slist_free()/@, and the files with 'GI.GObject.Objects.Object.objectUnref'. -} fileChooserGetFiles chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_files chooser' result' <- unpackGSList result result'' <- mapM (wrapObject Gio.File.File) result' g_slist_free result touchManagedPtr chooser return result'' data FileChooserGetFilesMethodInfo instance (signature ~ (m [Gio.File.File]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilesMethodInfo a signature where overloadedMethod _ = fileChooserGetFiles -- method FileChooser::get_filter -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "FileFilter"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_filter" gtk_file_chooser_get_filter :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gtk.FileFilter.FileFilter) {- | Gets the current filter; see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetFilter'. @since 2.4 -} fileChooserGetFilter :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe Gtk.FileFilter.FileFilter) {- ^ __Returns:__ the current filter, or 'Nothing' -} fileChooserGetFilter chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_filter chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gtk.FileFilter.FileFilter) result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetFilterMethodInfo instance (signature ~ (m (Maybe Gtk.FileFilter.FileFilter)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilterMethodInfo a signature where overloadedMethod _ = fileChooserGetFilter -- method FileChooser::get_local_only -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_local_only" gtk_file_chooser_get_local_only :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether only local files can be selected in the file selector. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetLocalOnly' @since 2.4 -} fileChooserGetLocalOnly :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if only local files can be selected. -} fileChooserGetLocalOnly chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_local_only chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetLocalOnlyMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetLocalOnlyMethodInfo a signature where overloadedMethod _ = fileChooserGetLocalOnly -- method FileChooser::get_preview_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gio", name = "File"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_preview_file" gtk_file_chooser_get_preview_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gio.File.File) {- | Gets the 'GI.Gio.Interfaces.File.File' that should be previewed in a custom preview Internal function, see 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewUri'. @since 2.14 -} fileChooserGetPreviewFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe Gio.File.File) {- ^ __Returns:__ the 'GI.Gio.Interfaces.File.File' for the file to preview, or 'Nothing' if no file is selected. Free with 'GI.GObject.Objects.Object.objectUnref'. -} fileChooserGetPreviewFile chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_preview_file chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gio.File.File) result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetPreviewFileMethodInfo instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFileMethodInfo a signature where overloadedMethod _ = fileChooserGetPreviewFile -- method FileChooser::get_preview_filename -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TFileName) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_preview_filename" gtk_file_chooser_get_preview_filename :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the filename that should be previewed in a custom preview widget. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'. @since 2.4 -} fileChooserGetPreviewFilename :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe [Char]) {- ^ __Returns:__ the filename to preview, or 'Nothing' if no file is selected, or if the selected file cannot be represented as a local filename. Free with 'GI.GLib.Functions.free' -} fileChooserGetPreviewFilename chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_preview_filename chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToString result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetPreviewFilenameMethodInfo instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFilenameMethodInfo a signature where overloadedMethod _ = fileChooserGetPreviewFilename -- method FileChooser::get_preview_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_preview_uri" gtk_file_chooser_get_preview_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the URI that should be previewed in a custom preview widget. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'. @since 2.4 -} fileChooserGetPreviewUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe T.Text) {- ^ __Returns:__ the URI for the file to preview, or 'Nothing' if no file is selected. Free with 'GI.GLib.Functions.free'. -} fileChooserGetPreviewUri chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_preview_uri chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetPreviewUriMethodInfo instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewUriMethodInfo a signature where overloadedMethod _ = fileChooserGetPreviewUri -- method FileChooser::get_preview_widget -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "Widget"})) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_preview_widget" gtk_file_chooser_get_preview_widget :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr Gtk.Widget.Widget) {- | Gets the current preview widget; see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget'. @since 2.4 -} fileChooserGetPreviewWidget :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe Gtk.Widget.Widget) {- ^ __Returns:__ the current preview widget, or 'Nothing' -} fileChooserGetPreviewWidget chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_preview_widget chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gtk.Widget.Widget) result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetPreviewWidgetMethodInfo instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetMethodInfo a signature where overloadedMethod _ = fileChooserGetPreviewWidget -- method FileChooser::get_preview_widget_active -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_preview_widget_active" gtk_file_chooser_get_preview_widget_active :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether the preview widget set by 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget' should be shown for the current filename. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidgetActive'. @since 2.4 -} fileChooserGetPreviewWidgetActive :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if the preview widget is active for the current filename. -} fileChooserGetPreviewWidgetActive chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_preview_widget_active chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetPreviewWidgetActiveMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetActiveMethodInfo a signature where overloadedMethod _ = fileChooserGetPreviewWidgetActive -- method FileChooser::get_select_multiple -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_select_multiple" gtk_file_chooser_get_select_multiple :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether multiple files can be selected in the file selector. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetSelectMultiple'. @since 2.4 -} fileChooserGetSelectMultiple :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if multiple files can be selected. -} fileChooserGetSelectMultiple chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_select_multiple chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetSelectMultipleMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetSelectMultipleMethodInfo a signature where overloadedMethod _ = fileChooserGetSelectMultiple -- method FileChooser::get_show_hidden -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_show_hidden" gtk_file_chooser_get_show_hidden :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether hidden files and folders are displayed in the file selector. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetShowHidden'. @since 2.6 -} fileChooserGetShowHidden :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if hidden files and folders are displayed. -} fileChooserGetShowHidden chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_show_hidden chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetShowHiddenMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetShowHiddenMethodInfo a signature where overloadedMethod _ = fileChooserGetShowHidden -- method FileChooser::get_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_uri" gtk_file_chooser_get_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CString {- | Gets the URI for the currently selected file in the file selector. If multiple files are selected, one of the filenames will be returned at random. If the file chooser is in folder mode, this function returns the selected folder. @since 2.4 -} fileChooserGetUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m (Maybe T.Text) {- ^ __Returns:__ The currently selected URI, or 'Nothing' if no file is selected. If 'GI.Gtk.Interfaces.FileChooser.fileChooserSetLocalOnly' is set to 'True' (the default) a local URI will be returned for any FUSE locations. Free with 'GI.GLib.Functions.free' -} fileChooserGetUri chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_uri chooser' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' freeMem result' return result'' touchManagedPtr chooser return maybeResult data FileChooserGetUriMethodInfo instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUriMethodInfo a signature where overloadedMethod _ = fileChooserGetUri -- method FileChooser::get_uris -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_uris" gtk_file_chooser_get_uris :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList CString)) {- | Lists all the selected files and subfolders in the current folder of /@chooser@/. The returned names are full absolute URIs. @since 2.4 -} fileChooserGetUris :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [T.Text] {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing the URIs of all selected files and subfolders in the current folder. Free the returned list with @/g_slist_free()/@, and the filenames with 'GI.GLib.Functions.free'. -} fileChooserGetUris chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_uris chooser' result' <- unpackGSList result result'' <- mapM cstringToText result' mapGSList freeMem result g_slist_free result touchManagedPtr chooser return result'' data FileChooserGetUrisMethodInfo instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUrisMethodInfo a signature where overloadedMethod _ = fileChooserGetUris -- method FileChooser::get_use_preview_label -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_get_use_preview_label" gtk_file_chooser_get_use_preview_label :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO CInt {- | Gets whether a stock label should be drawn with the name of the previewed file. See 'GI.Gtk.Interfaces.FileChooser.fileChooserSetUsePreviewLabel'. -} fileChooserGetUsePreviewLabel :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m Bool {- ^ __Returns:__ 'True' if the file chooser is set to display a label with the name of the previewed file, 'False' otherwise. -} fileChooserGetUsePreviewLabel chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_get_use_preview_label chooser' let result' = (/= 0) result touchManagedPtr chooser return result' data FileChooserGetUsePreviewLabelMethodInfo instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUsePreviewLabelMethodInfo a signature where overloadedMethod _ = fileChooserGetUsePreviewLabel -- method FileChooser::list_filters -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TInterface (Name {namespace = "Gtk", name = "FileFilter"}))) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_list_filters" gtk_file_chooser_list_filters :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList (Ptr Gtk.FileFilter.FileFilter))) {- | Lists the current set of user-selectable filters; see 'GI.Gtk.Interfaces.FileChooser.fileChooserAddFilter', 'GI.Gtk.Interfaces.FileChooser.fileChooserRemoveFilter'. @since 2.4 -} fileChooserListFilters :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [Gtk.FileFilter.FileFilter] {- ^ __Returns:__ a 'GI.GLib.Structs.SList.SList' containing the current set of user selectable filters. The contents of the list are owned by GTK+, but you must free the list itself with @/g_slist_free()/@ when you are done with it. -} fileChooserListFilters chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_list_filters chooser' result' <- unpackGSList result result'' <- mapM (newObject Gtk.FileFilter.FileFilter) result' g_slist_free result touchManagedPtr chooser return result'' data FileChooserListFiltersMethodInfo instance (signature ~ (m [Gtk.FileFilter.FileFilter]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListFiltersMethodInfo a signature where overloadedMethod _ = fileChooserListFilters -- method FileChooser::list_shortcut_folder_uris -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_list_shortcut_folder_uris" gtk_file_chooser_list_shortcut_folder_uris :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList CString)) {- | Queries the list of shortcut folders in the file chooser, as set by 'GI.Gtk.Interfaces.FileChooser.fileChooserAddShortcutFolderUri'. @since 2.4 -} fileChooserListShortcutFolderUris :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [T.Text] {- ^ __Returns:__ A list of folder URIs, or 'Nothing' if there are no shortcut folders. Free the returned list with @/g_slist_free()/@, and the URIs with 'GI.GLib.Functions.free'. -} fileChooserListShortcutFolderUris chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_list_shortcut_folder_uris chooser' result' <- unpackGSList result result'' <- mapM cstringToText result' mapGSList freeMem result g_slist_free result touchManagedPtr chooser return result'' data FileChooserListShortcutFolderUrisMethodInfo instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFolderUrisMethodInfo a signature where overloadedMethod _ = fileChooserListShortcutFolderUris -- method FileChooser::list_shortcut_folders -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGSList (TBasicType TFileName)) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_list_shortcut_folders" gtk_file_chooser_list_shortcut_folders :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO (Ptr (GSList CString)) {- | Queries the list of shortcut folders in the file chooser, as set by 'GI.Gtk.Interfaces.FileChooser.fileChooserAddShortcutFolder'. @since 2.4 -} fileChooserListShortcutFolders :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m [[Char]] {- ^ __Returns:__ A list of folder filenames, or 'Nothing' if there are no shortcut folders. Free the returned list with @/g_slist_free()/@, and the filenames with 'GI.GLib.Functions.free'. -} fileChooserListShortcutFolders chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser result <- gtk_file_chooser_list_shortcut_folders chooser' result' <- unpackGSList result result'' <- mapM cstringToString result' mapGSList freeMem result g_slist_free result touchManagedPtr chooser return result'' data FileChooserListShortcutFoldersMethodInfo instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFoldersMethodInfo a signature where overloadedMethod _ = fileChooserListShortcutFolders -- method FileChooser::remove_choice -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ID of the choice to remove", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_remove_choice" gtk_file_chooser_remove_choice :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- id : TBasicType TUTF8 IO () {- | Removes a \'choice\' that has been added with 'GI.Gtk.Interfaces.FileChooser.fileChooserAddChoice'. @since 3.22 -} fileChooserRemoveChoice :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@id@/: the ID of the choice to remove -} -> m () fileChooserRemoveChoice chooser id = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser id' <- textToCString id gtk_file_chooser_remove_choice chooser' id' touchManagedPtr chooser freeMem id' return () data FileChooserRemoveChoiceMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveChoiceMethodInfo a signature where overloadedMethod _ = fileChooserRemoveChoice -- method FileChooser::remove_filter -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "FileFilter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_remove_filter" gtk_file_chooser_remove_filter :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gtk.FileFilter.FileFilter -> -- filter : TInterface (Name {namespace = "Gtk", name = "FileFilter"}) IO () {- | Removes /@filter@/ from the list of filters that the user can select between. @since 2.4 -} fileChooserRemoveFilter :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@filter@/: a 'GI.Gtk.Objects.FileFilter.FileFilter' -} -> m () fileChooserRemoveFilter chooser filter = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filter' <- unsafeManagedPtrCastPtr filter gtk_file_chooser_remove_filter chooser' filter' touchManagedPtr chooser touchManagedPtr filter return () data FileChooserRemoveFilterMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserRemoveFilterMethodInfo a signature where overloadedMethod _ = fileChooserRemoveFilter -- method FileChooser::remove_shortcut_folder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "folder", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "filename of the folder to remove", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_remove_shortcut_folder" gtk_file_chooser_remove_shortcut_folder :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- folder : TBasicType TFileName Ptr (Ptr GError) -> -- error IO CInt {- | Removes a folder from a file chooser’s list of shortcut folders. @since 2.4 -} fileChooserRemoveShortcutFolder :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@folder@/: filename of the folder to remove -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserRemoveShortcutFolder chooser folder = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser folder' <- stringToCString folder onException (do _ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder chooser' folder' touchManagedPtr chooser freeMem folder' return () ) (do freeMem folder' ) data FileChooserRemoveShortcutFolderMethodInfo instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveShortcutFolderMethodInfo a signature where overloadedMethod _ = fileChooserRemoveShortcutFolder -- method FileChooser::remove_shortcut_folder_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "URI of the folder to remove", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_remove_shortcut_folder_uri" gtk_file_chooser_remove_shortcut_folder_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO CInt {- | Removes a folder URI from a file chooser’s list of shortcut folders. @since 2.4 -} fileChooserRemoveShortcutFolderUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: URI of the folder to remove -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserRemoveShortcutFolderUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri onException (do _ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder_uri chooser' uri' touchManagedPtr chooser freeMem uri' return () ) (do freeMem uri' ) data FileChooserRemoveShortcutFolderUriMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveShortcutFolderUriMethodInfo a signature where overloadedMethod _ = fileChooserRemoveShortcutFolderUri -- method FileChooser::select_all -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_select_all" gtk_file_chooser_select_all :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO () {- | Selects all the files in the current folder of a file chooser. @since 2.4 -} fileChooserSelectAll :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m () fileChooserSelectAll chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser gtk_file_chooser_select_all chooser' touchManagedPtr chooser return () data FileChooserSelectAllMethodInfo instance (signature ~ (m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectAllMethodInfo a signature where overloadedMethod _ = fileChooserSelectAll -- method FileChooser::select_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the file to select", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_select_file" gtk_file_chooser_select_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO CInt {- | Selects the file referred to by /@file@/. An internal function. See @/_gtk_file_chooser_select_uri()/@. @since 2.14 -} fileChooserSelectFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@file@/: the file to select -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserSelectFile chooser file = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser file' <- unsafeManagedPtrCastPtr file onException (do _ <- propagateGError $ gtk_file_chooser_select_file chooser' file' touchManagedPtr chooser touchManagedPtr file return () ) (do return () ) data FileChooserSelectFileMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserSelectFileMethodInfo a signature where overloadedMethod _ = fileChooserSelectFile -- method FileChooser::select_filename -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the filename to select", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_select_filename" gtk_file_chooser_select_filename :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- filename : TBasicType TFileName IO CInt {- | Selects a filename. 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@/. @since 2.4 -} fileChooserSelectFilename :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@filename@/: the filename to select -} -> m Bool {- ^ __Returns:__ Not useful. See also: 'GI.Gtk.Interfaces.FileChooser.fileChooserSetFilename' -} fileChooserSelectFilename chooser filename = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filename' <- stringToCString filename result <- gtk_file_chooser_select_filename chooser' filename' let result' = (/= 0) result touchManagedPtr chooser freeMem filename' return result' data FileChooserSelectFilenameMethodInfo instance (signature ~ ([Char] -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectFilenameMethodInfo a signature where overloadedMethod _ = fileChooserSelectFilename -- method FileChooser::select_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the URI to select", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_select_uri" gtk_file_chooser_select_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 IO CInt {- | Selects the file to by /@uri@/. If the URI doesn’t refer to a file in the current folder of /@chooser@/, then the current folder of /@chooser@/ will be changed to the folder containing /@filename@/. @since 2.4 -} fileChooserSelectUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: the URI to select -} -> m Bool {- ^ __Returns:__ Not useful. -} fileChooserSelectUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri result <- gtk_file_chooser_select_uri chooser' uri' let result' = (/= 0) result touchManagedPtr chooser freeMem uri' return result' data FileChooserSelectUriMethodInfo instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectUriMethodInfo a signature where overloadedMethod _ = fileChooserSelectUri -- method FileChooser::set_action -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "action", argType = TInterface (Name {namespace = "Gtk", name = "FileChooserAction"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the action that the file selector is performing", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_action" gtk_file_chooser_set_action :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CUInt -> -- action : TInterface (Name {namespace = "Gtk", name = "FileChooserAction"}) IO () {- | 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 'GI.Gtk.Enums.FileChooserActionSave' but not if the action is 'GI.Gtk.Enums.FileChooserActionOpen'. @since 2.4 -} fileChooserSetAction :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Gtk.Enums.FileChooserAction {- ^ /@action@/: the action that the file selector is performing -} -> m () fileChooserSetAction chooser action = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let action' = (fromIntegral . fromEnum) action gtk_file_chooser_set_action chooser' action' touchManagedPtr chooser return () data FileChooserSetActionMethodInfo instance (signature ~ (Gtk.Enums.FileChooserAction -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetActionMethodInfo a signature where overloadedMethod _ = fileChooserSetAction -- method FileChooser::set_choice -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ID of the choice to set", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "option", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the ID of the option to select", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_choice" gtk_file_chooser_set_choice :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- id : TBasicType TUTF8 CString -> -- option : TBasicType TUTF8 IO () {- | Selects an option in a \'choice\' that has been added with 'GI.Gtk.Interfaces.FileChooser.fileChooserAddChoice'. For a boolean choice, the possible options are \"true\" and \"false\". @since 3.22 -} fileChooserSetChoice :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@id@/: the ID of the choice to set -} -> T.Text {- ^ /@option@/: the ID of the option to select -} -> m () fileChooserSetChoice chooser id option = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser id' <- textToCString id option' <- textToCString option gtk_file_chooser_set_choice chooser' id' option' touchManagedPtr chooser freeMem id' freeMem option' return () data FileChooserSetChoiceMethodInfo instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetChoiceMethodInfo a signature where overloadedMethod _ = fileChooserSetChoice -- method FileChooser::set_create_folders -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "create_folders", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if the Create Folder button should be displayed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_create_folders" gtk_file_chooser_set_create_folders :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- create_folders : TBasicType TBoolean IO () {- | Sets whether file choser will offer to create new folders. This is only relevant if the action is not set to be 'GI.Gtk.Enums.FileChooserActionOpen'. @since 2.18 -} fileChooserSetCreateFolders :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@createFolders@/: 'True' if the Create Folder button should be displayed -} -> m () fileChooserSetCreateFolders chooser createFolders = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let createFolders' = (fromIntegral . fromEnum) createFolders gtk_file_chooser_set_create_folders chooser' createFolders' touchManagedPtr chooser return () data FileChooserSetCreateFoldersMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCreateFoldersMethodInfo a signature where overloadedMethod _ = fileChooserSetCreateFolders -- method FileChooser::set_current_folder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the full path of the new current folder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_current_folder" gtk_file_chooser_set_current_folder :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- filename : TBasicType TFileName IO CInt {- | Sets the current folder for /@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. In general, you should not use this function. See the [section on setting up a file chooser dialog][gtkfilechooserdialog-setting-up] for the rationale behind this. @since 2.4 -} fileChooserSetCurrentFolder :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@filename@/: the full path of the new current folder -} -> m Bool {- ^ __Returns:__ Not useful. -} fileChooserSetCurrentFolder chooser filename = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filename' <- stringToCString filename result <- gtk_file_chooser_set_current_folder chooser' filename' let result' = (/= 0) result touchManagedPtr chooser freeMem filename' return result' data FileChooserSetCurrentFolderMethodInfo instance (signature ~ ([Char] -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCurrentFolderMethodInfo a signature where overloadedMethod _ = fileChooserSetCurrentFolder -- method FileChooser::set_current_folder_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GFile for the new folder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_set_current_folder_file" gtk_file_chooser_set_current_folder_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO CInt {- | Sets the current folder for /@chooser@/ from a 'GI.Gio.Interfaces.File.File'. Internal function, see 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentFolderUri'. @since 2.14 -} fileChooserSetCurrentFolderFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@file@/: the 'GI.Gio.Interfaces.File.File' for the new folder -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserSetCurrentFolderFile chooser file = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser file' <- unsafeManagedPtrCastPtr file onException (do _ <- propagateGError $ gtk_file_chooser_set_current_folder_file chooser' file' touchManagedPtr chooser touchManagedPtr file return () ) (do return () ) data FileChooserSetCurrentFolderFileMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserSetCurrentFolderFileMethodInfo a signature where overloadedMethod _ = fileChooserSetCurrentFolderFile -- method FileChooser::set_current_folder_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the URI for the new current folder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_current_folder_uri" gtk_file_chooser_set_current_folder_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 IO CInt {- | Sets the current folder for /@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. In general, you should not use this function. See the [section on setting up a file chooser dialog][gtkfilechooserdialog-setting-up] for the rationale behind this. @since 2.4 -} fileChooserSetCurrentFolderUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: the URI for the new current folder -} -> m Bool {- ^ __Returns:__ 'True' if the folder could be changed successfully, 'False' otherwise. -} fileChooserSetCurrentFolderUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri result <- gtk_file_chooser_set_current_folder_uri chooser' uri' let result' = (/= 0) result touchManagedPtr chooser freeMem uri' return result' data FileChooserSetCurrentFolderUriMethodInfo instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCurrentFolderUriMethodInfo a signature where overloadedMethod _ = fileChooserSetCurrentFolderUri -- method FileChooser::set_current_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the filename to use, as a UTF-8 string", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_current_name" gtk_file_chooser_set_current_name :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- name : TBasicType TFileName IO () {- | Sets the current name in the file selector, as if entered by the user. Note that the name passed in here is a UTF-8 string rather than a filename. This function is meant for such uses as a suggested name in a “Save As...” dialog. You can pass “Untitled.doc” or a similarly suitable suggestion for the /@name@/. If you want to preselect a particular existing file, you should use 'GI.Gtk.Interfaces.FileChooser.fileChooserSetFilename' or 'GI.Gtk.Interfaces.FileChooser.fileChooserSetUri' instead. Please see the documentation for those functions for an example of using 'GI.Gtk.Interfaces.FileChooser.fileChooserSetCurrentName' as well. @since 2.4 -} fileChooserSetCurrentName :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@name@/: the filename to use, as a UTF-8 string -} -> m () fileChooserSetCurrentName chooser name = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser name' <- stringToCString name gtk_file_chooser_set_current_name chooser' name' touchManagedPtr chooser freeMem name' return () data FileChooserSetCurrentNameMethodInfo instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCurrentNameMethodInfo a signature where overloadedMethod _ = fileChooserSetCurrentName -- method FileChooser::set_do_overwrite_confirmation -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "do_overwrite_confirmation", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to confirm overwriting in save mode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_do_overwrite_confirmation" gtk_file_chooser_set_do_overwrite_confirmation :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- do_overwrite_confirmation : TBasicType TBoolean IO () {- | Sets whether a file chooser in 'GI.Gtk.Enums.FileChooserActionSave' mode will present a confirmation dialog if the user types a file name that already exists. This is 'False' by default. If set to 'True', the /@chooser@/ will emit the 'GI.Gtk.Interfaces.FileChooser.FileChooser'::@/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 'GI.Gtk.Interfaces.FileChooser.FileChooser'::@/confirm-overwrite/@ signal; please refer to its documentation for the details. @since 2.8 -} fileChooserSetDoOverwriteConfirmation :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@doOverwriteConfirmation@/: whether to confirm overwriting in save mode -} -> m () fileChooserSetDoOverwriteConfirmation chooser doOverwriteConfirmation = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let doOverwriteConfirmation' = (fromIntegral . fromEnum) doOverwriteConfirmation gtk_file_chooser_set_do_overwrite_confirmation chooser' doOverwriteConfirmation' touchManagedPtr chooser return () data FileChooserSetDoOverwriteConfirmationMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetDoOverwriteConfirmationMethodInfo a signature where overloadedMethod _ = fileChooserSetDoOverwriteConfirmation -- method FileChooser::set_extra_widget -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "extra_widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "widget for extra options", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_extra_widget" gtk_file_chooser_set_extra_widget :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gtk.Widget.Widget -> -- extra_widget : TInterface (Name {namespace = "Gtk", name = "Widget"}) IO () {- | Sets an application-supplied widget to provide extra options to the user. @since 2.4 -} fileChooserSetExtraWidget :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.Widget.IsWidget b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@extraWidget@/: widget for extra options -} -> m () fileChooserSetExtraWidget chooser extraWidget = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser extraWidget' <- unsafeManagedPtrCastPtr extraWidget gtk_file_chooser_set_extra_widget chooser' extraWidget' touchManagedPtr chooser touchManagedPtr extraWidget return () data FileChooserSetExtraWidgetMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.Widget.IsWidget b) => O.MethodInfo FileChooserSetExtraWidgetMethodInfo a signature where overloadedMethod _ = fileChooserSetExtraWidget -- method FileChooser::set_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GFile to set as current", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gtk_file_chooser_set_file" gtk_file_chooser_set_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) Ptr (Ptr GError) -> -- error IO CInt {- | Sets /@file@/ 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 'GI.Gtk.Enums.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 'GI.Gtk.Interfaces.FileChooser.fileChooserUnselectAll' followed by 'GI.Gtk.Interfaces.FileChooser.fileChooserSelectFilename'. Note that the file must exist, or nothing will be done except for the directory change. If you are implementing a save 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 Save As... 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: === /C code/ > >if (document_is_new) > { > // the user just created a new document > gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving); > gtk_file_chooser_set_current_name (chooser, "Untitled document"); > } >else > { > // the user edited an existing document > gtk_file_chooser_set_file (chooser, existing_file); > } @since 2.14 -} fileChooserSetFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@file@/: the 'GI.Gio.Interfaces.File.File' to set as current -} -> m () {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -} fileChooserSetFile chooser file = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser file' <- unsafeManagedPtrCastPtr file onException (do _ <- propagateGError $ gtk_file_chooser_set_file chooser' file' touchManagedPtr chooser touchManagedPtr file return () ) (do return () ) data FileChooserSetFileMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserSetFileMethodInfo a signature where overloadedMethod _ = fileChooserSetFile -- method FileChooser::set_filename -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the filename to set as current", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_filename" gtk_file_chooser_set_filename :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- filename : TBasicType TFileName IO CInt {- | 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; all other files will be unselected. If the /@chooser@/ is in 'GI.Gtk.Enums.FileChooserActionSave' mode, the file’s base name will also appear in the dialog’s file name entry. Note that the file must exist, or nothing will be done except for the directory change. You should use this function only when implementing a save dialog for which you already have a file name to which the user may save. For example, when the user opens an existing file and then does Save As... to save a copy or a modified version. 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: === /C code/ > >if (document_is_new) > { > // the user just created a new document > gtk_file_chooser_set_current_name (chooser, "Untitled document"); > } >else > { > // the user edited an existing document > gtk_file_chooser_set_filename (chooser, existing_filename); > } In the first case, the file chooser will present the user with useful suggestions as to where to save his new file. In the second case, the file’s existing location is already known, so the file chooser will use it. @since 2.4 -} fileChooserSetFilename :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@filename@/: the filename to set as current -} -> m Bool {- ^ __Returns:__ Not useful. -} fileChooserSetFilename chooser filename = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filename' <- stringToCString filename result <- gtk_file_chooser_set_filename chooser' filename' let result' = (/= 0) result touchManagedPtr chooser freeMem filename' return result' data FileChooserSetFilenameMethodInfo instance (signature ~ ([Char] -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetFilenameMethodInfo a signature where overloadedMethod _ = fileChooserSetFilename -- method FileChooser::set_filter -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gtk", name = "FileFilter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileFilter", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_filter" gtk_file_chooser_set_filter :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gtk.FileFilter.FileFilter -> -- filter : TInterface (Name {namespace = "Gtk", name = "FileFilter"}) IO () {- | 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. @since 2.4 -} fileChooserSetFilter :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@filter@/: a 'GI.Gtk.Objects.FileFilter.FileFilter' -} -> m () fileChooserSetFilter chooser filter = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filter' <- unsafeManagedPtrCastPtr filter gtk_file_chooser_set_filter chooser' filter' touchManagedPtr chooser touchManagedPtr filter return () data FileChooserSetFilterMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserSetFilterMethodInfo a signature where overloadedMethod _ = fileChooserSetFilter -- method FileChooser::set_local_only -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "local_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if only local files can be selected", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_local_only" gtk_file_chooser_set_local_only :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- local_only : TBasicType TBoolean IO () {- | Sets whether only local files can be selected in the file selector. If /@localOnly@/ is 'True' (the default), then the selected file or files are guaranteed to be accessible through the operating systems native file system and therefore the application only needs to worry about the filename functions in 'GI.Gtk.Interfaces.FileChooser.FileChooser', like 'GI.Gtk.Interfaces.FileChooser.fileChooserGetFilename', rather than the URI functions like 'GI.Gtk.Interfaces.FileChooser.fileChooserGetUri', On some systems non-native files may still be available using the native filesystem via a userspace filesystem (FUSE). @since 2.4 -} fileChooserSetLocalOnly :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@localOnly@/: 'True' if only local files can be selected -} -> m () fileChooserSetLocalOnly chooser localOnly = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let localOnly' = (fromIntegral . fromEnum) localOnly gtk_file_chooser_set_local_only chooser' localOnly' touchManagedPtr chooser return () data FileChooserSetLocalOnlyMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetLocalOnlyMethodInfo a signature where overloadedMethod _ = fileChooserSetLocalOnly -- method FileChooser::set_preview_widget -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "preview_widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "widget for displaying preview.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_preview_widget" gtk_file_chooser_set_preview_widget :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gtk.Widget.Widget -> -- preview_widget : TInterface (Name {namespace = "Gtk", name = "Widget"}) IO () {- | 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 'GI.Gtk.Interfaces.FileChooser.FileChooser'::@/update-preview/@ signal, and call 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewFilename' or 'GI.Gtk.Interfaces.FileChooser.fileChooserGetPreviewUri' on each change. If you can display a preview of the new file, update your widget and set the preview active using 'GI.Gtk.Interfaces.FileChooser.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 will display no preview at all. @since 2.4 -} fileChooserSetPreviewWidget :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.Widget.IsWidget b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@previewWidget@/: widget for displaying preview. -} -> m () fileChooserSetPreviewWidget chooser previewWidget = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser previewWidget' <- unsafeManagedPtrCastPtr previewWidget gtk_file_chooser_set_preview_widget chooser' previewWidget' touchManagedPtr chooser touchManagedPtr previewWidget return () data FileChooserSetPreviewWidgetMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.Widget.IsWidget b) => O.MethodInfo FileChooserSetPreviewWidgetMethodInfo a signature where overloadedMethod _ = fileChooserSetPreviewWidget -- method FileChooser::set_preview_widget_active -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "active", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to display the user-specified preview widget", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_preview_widget_active" gtk_file_chooser_set_preview_widget_active :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- active : TBasicType TBoolean IO () {- | Sets whether the preview widget set by 'GI.Gtk.Interfaces.FileChooser.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 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget' for more details. @since 2.4 -} fileChooserSetPreviewWidgetActive :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@active@/: whether to display the user-specified preview widget -} -> m () fileChooserSetPreviewWidgetActive chooser active = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let active' = (fromIntegral . fromEnum) active gtk_file_chooser_set_preview_widget_active chooser' active' touchManagedPtr chooser return () data FileChooserSetPreviewWidgetActiveMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetPreviewWidgetActiveMethodInfo a signature where overloadedMethod _ = fileChooserSetPreviewWidgetActive -- method FileChooser::set_select_multiple -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "select_multiple", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if multiple files can be selected.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_select_multiple" gtk_file_chooser_set_select_multiple :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- select_multiple : TBasicType TBoolean IO () {- | Sets whether multiple files can be selected in the file selector. This is only relevant if the action is set to be 'GI.Gtk.Enums.FileChooserActionOpen' or 'GI.Gtk.Enums.FileChooserActionSelectFolder'. @since 2.4 -} fileChooserSetSelectMultiple :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@selectMultiple@/: 'True' if multiple files can be selected. -} -> m () fileChooserSetSelectMultiple chooser selectMultiple = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let selectMultiple' = (fromIntegral . fromEnum) selectMultiple gtk_file_chooser_set_select_multiple chooser' selectMultiple' touchManagedPtr chooser return () data FileChooserSetSelectMultipleMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetSelectMultipleMethodInfo a signature where overloadedMethod _ = fileChooserSetSelectMultiple -- method FileChooser::set_show_hidden -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "show_hidden", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "%TRUE if hidden files and folders should be displayed.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_show_hidden" gtk_file_chooser_set_show_hidden :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- show_hidden : TBasicType TBoolean IO () {- | Sets whether hidden files and folders are displayed in the file selector. @since 2.6 -} fileChooserSetShowHidden :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@showHidden@/: 'True' if hidden files and folders should be displayed. -} -> m () fileChooserSetShowHidden chooser showHidden = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let showHidden' = (fromIntegral . fromEnum) showHidden gtk_file_chooser_set_show_hidden chooser' showHidden' touchManagedPtr chooser return () data FileChooserSetShowHiddenMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetShowHiddenMethodInfo a signature where overloadedMethod _ = fileChooserSetShowHidden -- method FileChooser::set_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the URI to set as current", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_uri" gtk_file_chooser_set_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 IO CInt {- | 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 'GI.Gtk.Enums.FileChooserActionSave' mode, the URI’s base name will also appear in the dialog’s file name entry. Note that the URI must exist, or nothing will be done except for the directory change. You should use this function only when implementing a save dialog for which you already have a file name to which the user may save. For example, when the user opens an existing file and then does Save As... to save a copy or a modified version. 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: === /C code/ > >if (document_is_new) > { > // the user just created a new document > gtk_file_chooser_set_current_name (chooser, "Untitled document"); > } >else > { > // the user edited an existing document > gtk_file_chooser_set_uri (chooser, existing_uri); > } In the first case, the file chooser will present the user with useful suggestions as to where to save his new file. In the second case, the file’s existing location is already known, so the file chooser will use it. @since 2.4 -} fileChooserSetUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: the URI to set as current -} -> m Bool {- ^ __Returns:__ Not useful. -} fileChooserSetUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri result <- gtk_file_chooser_set_uri chooser' uri' let result' = (/= 0) result touchManagedPtr chooser freeMem uri' return result' data FileChooserSetUriMethodInfo instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetUriMethodInfo a signature where overloadedMethod _ = fileChooserSetUri -- method FileChooser::set_use_preview_label -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "use_label", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether to display a stock label with the name of the previewed file", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_set_use_preview_label" gtk_file_chooser_set_use_preview_label :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CInt -> -- use_label : TBasicType TBoolean IO () {- | 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: 'GI.Gtk.Interfaces.FileChooser.fileChooserSetPreviewWidget' @since 2.4 -} fileChooserSetUsePreviewLabel :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> Bool {- ^ /@useLabel@/: whether to display a stock label with the name of the previewed file -} -> m () fileChooserSetUsePreviewLabel chooser useLabel = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser let useLabel' = (fromIntegral . fromEnum) useLabel gtk_file_chooser_set_use_preview_label chooser' useLabel' touchManagedPtr chooser return () data FileChooserSetUsePreviewLabelMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetUsePreviewLabelMethodInfo a signature where overloadedMethod _ = fileChooserSetUsePreviewLabel -- method FileChooser::unselect_all -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_unselect_all" gtk_file_chooser_unselect_all :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) IO () {- | Unselects all the files in the current folder of a file chooser. @since 2.4 -} fileChooserUnselectAll :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> m () fileChooserUnselectAll chooser = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser gtk_file_chooser_unselect_all chooser' touchManagedPtr chooser return () data FileChooserUnselectAllMethodInfo instance (signature ~ (m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserUnselectAllMethodInfo a signature where overloadedMethod _ = fileChooserUnselectAll -- method FileChooser::unselect_file -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "file", argType = TInterface (Name {namespace = "Gio", name = "File"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GFile", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_unselect_file" gtk_file_chooser_unselect_file :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) Ptr Gio.File.File -> -- file : TInterface (Name {namespace = "Gio", name = "File"}) IO () {- | Unselects the file referred to by /@file@/. If the file is not in the current directory, does not exist, or is otherwise not currently selected, does nothing. @since 2.14 -} fileChooserUnselectFile :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> b {- ^ /@file@/: a 'GI.Gio.Interfaces.File.File' -} -> m () fileChooserUnselectFile chooser file = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser file' <- unsafeManagedPtrCastPtr file gtk_file_chooser_unselect_file chooser' file' touchManagedPtr chooser touchManagedPtr file return () data FileChooserUnselectFileMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserUnselectFileMethodInfo a signature where overloadedMethod _ = fileChooserUnselectFile -- method FileChooser::unselect_filename -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filename", argType = TBasicType TFileName, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the filename to unselect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_unselect_filename" gtk_file_chooser_unselect_filename :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- filename : TBasicType TFileName IO () {- | 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. @since 2.4 -} fileChooserUnselectFilename :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> [Char] {- ^ /@filename@/: the filename to unselect -} -> m () fileChooserUnselectFilename chooser filename = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser filename' <- stringToCString filename gtk_file_chooser_unselect_filename chooser' filename' touchManagedPtr chooser freeMem filename' return () data FileChooserUnselectFilenameMethodInfo instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserUnselectFilenameMethodInfo a signature where overloadedMethod _ = fileChooserUnselectFilename -- method FileChooser::unselect_uri -- method type : OrdinaryMethod -- Args : [Arg {argCName = "chooser", argType = TInterface (Name {namespace = "Gtk", name = "FileChooser"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkFileChooser", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the URI to unselect", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_file_chooser_unselect_uri" gtk_file_chooser_unselect_uri :: Ptr FileChooser -> -- chooser : TInterface (Name {namespace = "Gtk", name = "FileChooser"}) CString -> -- uri : TBasicType TUTF8 IO () {- | 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. @since 2.4 -} fileChooserUnselectUri :: (B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) => a {- ^ /@chooser@/: a 'GI.Gtk.Interfaces.FileChooser.FileChooser' -} -> T.Text {- ^ /@uri@/: the URI to unselect -} -> m () fileChooserUnselectUri chooser uri = liftIO $ do chooser' <- unsafeManagedPtrCastPtr chooser uri' <- textToCString uri gtk_file_chooser_unselect_uri chooser' uri' touchManagedPtr chooser freeMem uri' return () data FileChooserUnselectUriMethodInfo instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserUnselectUriMethodInfo a signature where overloadedMethod _ = fileChooserUnselectUri