{-# LINE 2 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
module Graphics.UI.Gtk.Selectors.FileChooser (
FileChooser,
FileChooserClass,
castToFileChooser, gTypeFileChooser,
toFileChooser,
FileChooserAction(..),
FileChooserError(..),
FileChooserConfirmation(..),
fileChooserSetAction,
fileChooserGetAction,
fileChooserSetLocalOnly,
fileChooserGetLocalOnly,
fileChooserSetSelectMultiple,
fileChooserGetSelectMultiple,
fileChooserSetCurrentName,
fileChooserGetFilename,
fileChooserSetFilename,
fileChooserSelectFilename,
fileChooserUnselectFilename,
fileChooserSelectAll,
fileChooserUnselectAll,
fileChooserGetFilenames,
fileChooserSetCurrentFolder,
fileChooserGetCurrentFolder,
fileChooserGetURI,
fileChooserSetURI,
fileChooserSelectURI,
fileChooserUnselectURI,
fileChooserGetURIs,
fileChooserSetCurrentFolderURI,
fileChooserGetCurrentFolderURI,
fileChooserSetPreviewWidget,
fileChooserGetPreviewWidget,
fileChooserSetPreviewWidgetActive,
fileChooserGetPreviewWidgetActive,
fileChooserSetUsePreviewLabel,
fileChooserGetUsePreviewLabel,
fileChooserGetPreviewFilename,
fileChooserGetPreviewURI,
fileChooserSetExtraWidget,
fileChooserGetExtraWidget,
fileChooserAddFilter,
fileChooserRemoveFilter,
fileChooserListFilters,
fileChooserSetFilter,
fileChooserGetFilter,
fileChooserAddShortcutFolder,
fileChooserRemoveShortcutFolder,
fileChooserListShortcutFolders,
fileChooserAddShortcutFolderURI,
fileChooserRemoveShortcutFolderURI,
fileChooserListShortcutFolderURIs,
fileChooserErrorDomain,
fileChooserSetShowHidden,
fileChooserGetShowHidden,
fileChooserSetDoOverwriteConfirmation,
fileChooserGetDoOverwriteConfirmation,
fileChooserUsePreviewLabel,
fileChooserShowHidden,
fileChooserSelectMultiple,
fileChooserPreviewWidgetActive,
fileChooserPreviewWidget,
fileChooserLocalOnly,
fileChooserFilter,
fileChooserExtraWidget,
fileChooserDoOverwriteConfirmation,
fileChooserAction,
currentFolderChanged,
fileActivated,
fileSelectionChanged,
updatePreview,
confirmOverwrite,
onCurrentFolderChanged,
afterCurrentFolderChanged,
onFileActivated,
afterFileActivated,
onUpdatePreview,
afterUpdatePreview,
onConfirmOverwrite,
afterConfirmOverwrite,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import Graphics.UI.Gtk.Types
{-# LINE 242 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Signals
import System.Glib.GList
{-# LINE 245 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
import System.Glib.GError (propagateGError, GErrorDomain, GErrorClass(..))
{-# LINE 248 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
data FileChooserAction = FileChooserActionOpen
| FileChooserActionSave
| FileChooserActionSelectFolder
| FileChooserActionCreateFolder
deriving (Int -> FileChooserAction
FileChooserAction -> Int
FileChooserAction -> [FileChooserAction]
FileChooserAction -> FileChooserAction
FileChooserAction -> FileChooserAction -> [FileChooserAction]
FileChooserAction
-> FileChooserAction -> FileChooserAction -> [FileChooserAction]
(FileChooserAction -> FileChooserAction)
-> (FileChooserAction -> FileChooserAction)
-> (Int -> FileChooserAction)
-> (FileChooserAction -> Int)
-> (FileChooserAction -> [FileChooserAction])
-> (FileChooserAction -> FileChooserAction -> [FileChooserAction])
-> (FileChooserAction -> FileChooserAction -> [FileChooserAction])
-> (FileChooserAction
-> FileChooserAction -> FileChooserAction -> [FileChooserAction])
-> Enum FileChooserAction
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: FileChooserAction -> FileChooserAction
succ :: FileChooserAction -> FileChooserAction
$cpred :: FileChooserAction -> FileChooserAction
pred :: FileChooserAction -> FileChooserAction
$ctoEnum :: Int -> FileChooserAction
toEnum :: Int -> FileChooserAction
$cfromEnum :: FileChooserAction -> Int
fromEnum :: FileChooserAction -> Int
$cenumFrom :: FileChooserAction -> [FileChooserAction]
enumFrom :: FileChooserAction -> [FileChooserAction]
$cenumFromThen :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
enumFromThen :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
$cenumFromTo :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
enumFromTo :: FileChooserAction -> FileChooserAction -> [FileChooserAction]
$cenumFromThenTo :: FileChooserAction
-> FileChooserAction -> FileChooserAction -> [FileChooserAction]
enumFromThenTo :: FileChooserAction
-> FileChooserAction -> FileChooserAction -> [FileChooserAction]
Enum)
{-# LINE 254 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
data FileChooserError = FileChooserErrorNonexistent
| FileChooserErrorBadFilename
| FileChooserErrorAlreadyExists
| FileChooserErrorIncompleteHostname
deriving (Enum)
{-# LINE 258 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
data FileChooserConfirmation = FileChooserConfirmationConfirm
| FileChooserConfirmationAcceptFilename
| FileChooserConfirmationSelectAgain
deriving (Int -> FileChooserConfirmation
FileChooserConfirmation -> Int
FileChooserConfirmation -> [FileChooserConfirmation]
FileChooserConfirmation -> FileChooserConfirmation
FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation]
FileChooserConfirmation
-> FileChooserConfirmation
-> FileChooserConfirmation
-> [FileChooserConfirmation]
(FileChooserConfirmation -> FileChooserConfirmation)
-> (FileChooserConfirmation -> FileChooserConfirmation)
-> (Int -> FileChooserConfirmation)
-> (FileChooserConfirmation -> Int)
-> (FileChooserConfirmation -> [FileChooserConfirmation])
-> (FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation])
-> (FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation])
-> (FileChooserConfirmation
-> FileChooserConfirmation
-> FileChooserConfirmation
-> [FileChooserConfirmation])
-> Enum FileChooserConfirmation
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: FileChooserConfirmation -> FileChooserConfirmation
succ :: FileChooserConfirmation -> FileChooserConfirmation
$cpred :: FileChooserConfirmation -> FileChooserConfirmation
pred :: FileChooserConfirmation -> FileChooserConfirmation
$ctoEnum :: Int -> FileChooserConfirmation
toEnum :: Int -> FileChooserConfirmation
$cfromEnum :: FileChooserConfirmation -> Int
fromEnum :: FileChooserConfirmation -> Int
$cenumFrom :: FileChooserConfirmation -> [FileChooserConfirmation]
enumFrom :: FileChooserConfirmation -> [FileChooserConfirmation]
$cenumFromThen :: FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation]
enumFromThen :: FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation]
$cenumFromTo :: FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation]
enumFromTo :: FileChooserConfirmation
-> FileChooserConfirmation -> [FileChooserConfirmation]
$cenumFromThenTo :: FileChooserConfirmation
-> FileChooserConfirmation
-> FileChooserConfirmation
-> [FileChooserConfirmation]
enumFromThenTo :: FileChooserConfirmation
-> FileChooserConfirmation
-> FileChooserConfirmation
-> [FileChooserConfirmation]
Enum)
{-# LINE 271 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
fileChooserErrorDomain :: GErrorDomain
fileChooserErrorDomain :: GErrorDomain
fileChooserErrorDomain = IO GErrorDomain -> GErrorDomain
forall a. IO a -> a
unsafePerformIO IO GErrorDomain
gtk_file_chooser_error_quark
{-# LINE 278 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
instance GErrorClass FileChooserError where
gerrorDomain :: FileChooserError -> GErrorDomain
gerrorDomain FileChooserError
_ = GErrorDomain
fileChooserErrorDomain
fileChooserSetAction :: FileChooserClass self => self
-> FileChooserAction
-> IO ()
fileChooserSetAction :: forall self.
FileChooserClass self =>
self -> FileChooserAction -> IO ()
fileChooserSetAction self
self FileChooserAction
action =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_action Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 293 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> (FileChooserAction -> Int) -> FileChooserAction -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileChooserAction -> Int
forall a. Enum a => a -> Int
fromEnum) FileChooserAction
action)
fileChooserGetAction :: FileChooserClass self => self -> IO FileChooserAction
fileChooserGetAction :: forall self. FileChooserClass self => self -> IO FileChooserAction
fileChooserGetAction self
self =
(CInt -> FileChooserAction) -> IO CInt -> IO FileChooserAction
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> FileChooserAction
forall a. Enum a => Int -> a
toEnum (Int -> FileChooserAction)
-> (CInt -> Int) -> CInt -> FileChooserAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO FileChooserAction)
-> IO CInt -> IO FileChooserAction
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_action Ptr FileChooser
argPtr1)
{-# LINE 303 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetLocalOnly :: FileChooserClass self => self -> Bool -> IO ()
fileChooserSetLocalOnly :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetLocalOnly self
self Bool
localOnly =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_local_only Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 315 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
localOnly)
fileChooserGetLocalOnly :: FileChooserClass self => self -> IO Bool
fileChooserGetLocalOnly :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetLocalOnly self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_local_only Ptr FileChooser
argPtr1)
{-# LINE 325 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetSelectMultiple :: FileChooserClass self => self -> Bool -> IO ()
fileChooserSetSelectMultiple :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetSelectMultiple self
self Bool
selectMultiple =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_select_multiple Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 334 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
selectMultiple)
fileChooserGetSelectMultiple :: FileChooserClass self => self -> IO Bool
fileChooserGetSelectMultiple :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetSelectMultiple self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_select_multiple Ptr FileChooser
argPtr1)
{-# LINE 344 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetCurrentName :: (FileChooserClass self, GlibFilePath fp) => self
-> fp
-> IO ()
fileChooserSetCurrentName :: forall self fp.
(FileChooserClass self, GlibFilePath fp) =>
self -> fp -> IO ()
fileChooserSetCurrentName self
self fp
name =
fp -> (CString -> IO ()) -> IO ()
forall a. fp -> (CString -> IO a) -> IO a
forall fp a. GlibFilePath fp => fp -> (CString -> IO a) -> IO a
withUTFFilePath fp
name ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
namePtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO ()
gtk_file_chooser_set_current_name Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 362 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
namePtr
fileChooserGetFilename :: (FileChooserClass self, GlibFilePath fp) => self
-> IO (Maybe fp)
fileChooserGetFilename :: forall self fp.
(FileChooserClass self, GlibFilePath fp) =>
self -> IO (Maybe fp)
fileChooserGetFilename self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_filename Ptr FileChooser
argPtr1)
{-# LINE 381 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
IO CString -> (CString -> IO (Maybe fp)) -> IO (Maybe fp)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO fp) -> CString -> IO (Maybe fp)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO fp
forall fp. GlibFilePath fp => CString -> IO fp
peekUTFFilePath
fileChooserSetFilename :: FileChooserClass self => self
-> FilePath
-> IO Bool
fileChooserSetFilename :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSetFilename self
self FilePath
filename =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
filename ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
filenamePtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_set_filename Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 423 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
filenamePtr
fileChooserSelectFilename :: FileChooserClass self => self
-> FilePath
-> IO Bool
fileChooserSelectFilename :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSelectFilename self
self FilePath
filename =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
filename ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
filenamePtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_select_filename Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 442 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
filenamePtr
fileChooserUnselectFilename :: FileChooserClass self => self
-> FilePath
-> IO ()
fileChooserUnselectFilename :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserUnselectFilename self
self FilePath
filename =
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
filename ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
filenamePtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO ()
gtk_file_chooser_unselect_filename Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 459 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
filenamePtr
fileChooserSelectAll :: FileChooserClass self => self -> IO ()
fileChooserSelectAll :: forall self. FileChooserClass self => self -> IO ()
fileChooserSelectAll self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO ()
gtk_file_chooser_select_all Ptr FileChooser
argPtr1)
{-# LINE 468 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserUnselectAll :: FileChooserClass self => self -> IO ()
fileChooserUnselectAll :: forall self. FileChooserClass self => self -> IO ()
fileChooserUnselectAll self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO ()
gtk_file_chooser_unselect_all Ptr FileChooser
argPtr1)
{-# LINE 475 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]
fileChooserGetFilenames :: forall self. FileChooserClass self => self -> IO [FilePath]
fileChooserGetFilenames self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr ())
gtk_file_chooser_get_filenames Ptr FileChooser
argPtr1)
{-# LINE 488 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [FilePath]
fromStringGSList
fileChooserSetCurrentFolder :: FileChooserClass self => self
-> FilePath
-> IO Bool
fileChooserSetCurrentFolder :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSetCurrentFolder self
self FilePath
filename =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
filename ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
filenamePtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_set_current_folder Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 507 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
filenamePtr
fileChooserGetCurrentFolder :: FileChooserClass self => self
-> IO (Maybe FilePath)
fileChooserGetCurrentFolder :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetCurrentFolder self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder Ptr FileChooser
argPtr1)
{-# LINE 523 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
IO CString
-> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO FilePath
readCString
fileChooserGetURI :: FileChooserClass self => self
-> IO (Maybe String)
fileChooserGetURI :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetURI self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_uri Ptr FileChooser
argPtr1)
{-# LINE 539 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
IO CString
-> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO FilePath
readCString
fileChooserSetURI :: FileChooserClass self => self
-> String
-> IO Bool
fileChooserSetURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSetURI self
self FilePath
uri =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_set_uri Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 575 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
fileChooserSelectURI :: FileChooserClass self => self
-> String
-> IO Bool
fileChooserSelectURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSelectURI self
self FilePath
uri =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_select_uri Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 590 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
fileChooserUnselectURI :: FileChooserClass self => self
-> String
-> IO ()
fileChooserUnselectURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserUnselectURI self
self FilePath
uri =
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO ()
gtk_file_chooser_unselect_uri Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 603 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
fileChooserGetURIs :: FileChooserClass self => self -> IO [String]
fileChooserGetURIs :: forall self. FileChooserClass self => self -> IO [FilePath]
fileChooserGetURIs self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr ())
gtk_file_chooser_get_uris Ptr FileChooser
argPtr1)
{-# LINE 612 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [FilePath]
fromStringGSList
fileChooserSetCurrentFolderURI :: FileChooserClass self => self
-> String
-> IO Bool
fileChooserSetCurrentFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSetCurrentFolderURI self
self FilePath
uri =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
FilePath -> (CString -> IO CInt) -> IO CInt
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO CInt) -> IO CInt)
-> (CString -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr ->
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_set_current_folder_uri Ptr FileChooser
argPtr1 CString
arg2)
{-# LINE 627 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
fileChooserGetCurrentFolderURI :: FileChooserClass self => self
-> IO String
fileChooserGetCurrentFolderURI :: forall self. FileChooserClass self => self -> IO FilePath
fileChooserGetCurrentFolderURI self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder_uri Ptr FileChooser
argPtr1)
{-# LINE 637 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
IO CString -> (CString -> IO FilePath) -> IO FilePath
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO FilePath
readCString
fileChooserSetPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => self
-> previewWidget
-> IO ()
fileChooserSetPreviewWidget :: forall self previewWidget.
(FileChooserClass self, WidgetClass previewWidget) =>
self -> previewWidget -> IO ()
fileChooserSetPreviewWidget self
self previewWidget
previewWidget =
(\(FileChooser ForeignPtr FileChooser
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr FileChooser -> Ptr Widget -> IO ()
gtk_file_chooser_set_preview_widget Ptr FileChooser
argPtr1 Ptr Widget
argPtr2)
{-# LINE 658 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(previewWidget -> Widget
forall o. WidgetClass o => o -> Widget
toWidget previewWidget
previewWidget)
fileChooserGetPreviewWidget :: FileChooserClass self => self
-> IO (Maybe Widget)
fileChooserGetPreviewWidget :: forall self. FileChooserClass self => self -> IO (Maybe Widget)
fileChooserGetPreviewWidget self
self =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_preview_widget Ptr FileChooser
argPtr1)
{-# LINE 668 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetPreviewWidgetActive :: FileChooserClass self => self
-> Bool
-> IO ()
fileChooserSetPreviewWidgetActive :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetPreviewWidgetActive self
self Bool
active =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_preview_widget_active Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 681 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
active)
fileChooserGetPreviewWidgetActive :: FileChooserClass self => self
-> IO Bool
fileChooserGetPreviewWidgetActive :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetPreviewWidgetActive self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_preview_widget_active Ptr FileChooser
argPtr1)
{-# LINE 694 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetUsePreviewLabel :: FileChooserClass self => self
-> Bool
-> IO ()
fileChooserSetUsePreviewLabel :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetUsePreviewLabel self
self Bool
useLabel =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_use_preview_label Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 709 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
useLabel)
fileChooserGetUsePreviewLabel :: FileChooserClass self => self
-> IO Bool
fileChooserGetUsePreviewLabel :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetUsePreviewLabel self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_use_preview_label Ptr FileChooser
argPtr1)
{-# LINE 721 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserGetPreviewFilename :: FileChooserClass self => self
-> IO (Maybe FilePath)
fileChooserGetPreviewFilename :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetPreviewFilename self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_filename Ptr FileChooser
argPtr1)
{-# LINE 735 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
IO CString
-> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO FilePath
readCString
fileChooserGetPreviewURI :: FileChooserClass self => self
-> IO (Maybe String)
fileChooserGetPreviewURI :: forall self. FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetPreviewURI self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CString) -> IO CString)
-> (Ptr FileChooser -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_uri Ptr FileChooser
argPtr1)
{-# LINE 747 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
IO CString
-> (CString -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (CString -> IO FilePath) -> CString -> IO (Maybe FilePath)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek CString -> IO FilePath
readCString
fileChooserSetExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => self
-> extraWidget
-> IO ()
self
self extraWidget
extraWidget =
(\(FileChooser ForeignPtr FileChooser
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr FileChooser -> Ptr Widget -> IO ()
gtk_file_chooser_set_extra_widget Ptr FileChooser
argPtr1 Ptr Widget
argPtr2)
{-# LINE 757 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(extraWidget -> Widget
forall o. WidgetClass o => o -> Widget
toWidget extraWidget
extraWidget)
fileChooserGetExtraWidget :: FileChooserClass self => self
-> IO (Maybe Widget)
self
self =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr FileChooser -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_extra_widget Ptr FileChooser
argPtr1)
{-# LINE 767 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserAddFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserAddFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
fileChooserAddFilter self
self FileFilter
filter =
(\(FileChooser ForeignPtr FileChooser
arg1) (FileFilter ForeignPtr FileFilter
arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileFilter
arg2 ((Ptr FileFilter -> IO ()) -> IO ())
-> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileFilter
argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
gtk_file_chooser_add_filter Ptr FileChooser
argPtr1 Ptr FileFilter
argPtr2)
{-# LINE 776 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
FileFilter
filter
fileChooserRemoveFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserRemoveFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
fileChooserRemoveFilter self
self FileFilter
filter =
(\(FileChooser ForeignPtr FileChooser
arg1) (FileFilter ForeignPtr FileFilter
arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileFilter
arg2 ((Ptr FileFilter -> IO ()) -> IO ())
-> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileFilter
argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
gtk_file_chooser_remove_filter Ptr FileChooser
argPtr1 Ptr FileFilter
argPtr2)
{-# LINE 785 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
FileFilter
filter
fileChooserListFilters :: FileChooserClass self => self -> IO [FileFilter]
fileChooserListFilters :: forall self. FileChooserClass self => self -> IO [FileFilter]
fileChooserListFilters self
self = do
Ptr ()
filterList <- (\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr ())
gtk_file_chooser_list_filters Ptr FileChooser
argPtr1)
{-# LINE 794 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
[Ptr FileFilter]
filterPtrs <- Ptr () -> IO [Ptr FileFilter]
forall a. Ptr () -> IO [Ptr a]
fromGSList Ptr ()
filterList
(Ptr FileFilter -> IO FileFilter)
-> [Ptr FileFilter] -> IO [FileFilter]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
-> IO (Ptr FileFilter) -> IO FileFilter
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
forall {a}. (ForeignPtr FileFilter -> FileFilter, FinalizerPtr a)
mkFileFilter (IO (Ptr FileFilter) -> IO FileFilter)
-> (Ptr FileFilter -> IO (Ptr FileFilter))
-> Ptr FileFilter
-> IO FileFilter
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr FileFilter -> IO (Ptr FileFilter)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return) [Ptr FileFilter]
filterPtrs
fileChooserSetFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserSetFilter :: forall self. FileChooserClass self => self -> FileFilter -> IO ()
fileChooserSetFilter self
self FileFilter
filter =
(\(FileChooser ForeignPtr FileChooser
arg1) (FileFilter ForeignPtr FileFilter
arg2) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->ForeignPtr FileFilter -> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileFilter
arg2 ((Ptr FileFilter -> IO ()) -> IO ())
-> (Ptr FileFilter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileFilter
argPtr2 ->Ptr FileChooser -> Ptr FileFilter -> IO ()
gtk_file_chooser_set_filter Ptr FileChooser
argPtr1 Ptr FileFilter
argPtr2)
{-# LINE 807 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
FileFilter
filter
fileChooserGetFilter :: FileChooserClass self => self
-> IO (Maybe FileFilter)
fileChooserGetFilter :: forall self. FileChooserClass self => self -> IO (Maybe FileFilter)
fileChooserGetFilter self
self =
(IO (Ptr FileFilter) -> IO FileFilter)
-> IO (Ptr FileFilter) -> IO (Maybe FileFilter)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
-> IO (Ptr FileFilter) -> IO FileFilter
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr FileFilter -> FileFilter, FinalizerPtr FileFilter)
forall {a}. (ForeignPtr FileFilter -> FileFilter, FinalizerPtr a)
mkFileFilter) (IO (Ptr FileFilter) -> IO (Maybe FileFilter))
-> IO (Ptr FileFilter) -> IO (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter))
-> (Ptr FileChooser -> IO (Ptr FileFilter)) -> IO (Ptr FileFilter)
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr FileFilter)
gtk_file_chooser_get_filter Ptr FileChooser
argPtr1)
{-# LINE 817 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserAddShortcutFolder :: FileChooserClass self => self
-> FilePath
-> IO ()
fileChooserAddShortcutFolder :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserAddShortcutFolder self
self FilePath
folder =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
folder ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
folderPtr -> do
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 Ptr (Ptr ())
arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
gtk_file_chooser_add_shortcut_folder Ptr FileChooser
argPtr1 CString
arg2 Ptr (Ptr ())
arg3)
{-# LINE 836 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
folderPtr
Ptr (Ptr ())
errorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileChooserRemoveShortcutFolder :: FileChooserClass self => self
-> FilePath
-> IO ()
fileChooserRemoveShortcutFolder :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserRemoveShortcutFolder self
self FilePath
folder =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
folder ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
folderPtr -> do
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 Ptr (Ptr ())
arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
gtk_file_chooser_remove_shortcut_folder Ptr FileChooser
argPtr1 CString
arg2 Ptr (Ptr ())
arg3)
{-# LINE 856 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
CString
folderPtr
Ptr (Ptr ())
errorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]
fileChooserListShortcutFolders :: forall self. FileChooserClass self => self -> IO [FilePath]
fileChooserListShortcutFolders self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr ())
gtk_file_chooser_list_shortcut_folders Ptr FileChooser
argPtr1)
{-# LINE 871 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(self -> FileChooser
forall o. FileChooserClass o => o -> FileChooser
toFileChooser self
self)
IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [FilePath]
fromStringGSList
fileChooserAddShortcutFolderURI :: FileChooserClass self => self
-> String
-> IO ()
fileChooserAddShortcutFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserAddShortcutFolderURI self
self FilePath
uri =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr -> do
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 Ptr (Ptr ())
arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
gtk_file_chooser_add_shortcut_folder_uri Ptr FileChooser
argPtr1 CString
arg2 Ptr (Ptr ())
arg3)
{-# LINE 889 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
Ptr (Ptr ())
errorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileChooserRemoveShortcutFolderURI :: FileChooserClass self => self
-> String
-> IO ()
fileChooserRemoveShortcutFolderURI :: forall self. FileChooserClass self => self -> FilePath -> IO ()
fileChooserRemoveShortcutFolderURI self
self FilePath
uri =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
errorPtr ->
FilePath -> (CString -> IO ()) -> IO ()
forall a. FilePath -> (CString -> IO a) -> IO a
withCString FilePath
uri ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
uriPtr -> do
(\(FileChooser ForeignPtr FileChooser
arg1) CString
arg2 Ptr (Ptr ())
arg3 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CString -> Ptr (Ptr ()) -> IO CInt
gtk_file_chooser_remove_shortcut_folder_uri Ptr FileChooser
argPtr1 CString
arg2 Ptr (Ptr ())
arg3)
{-# LINE 903 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
CString
uriPtr
Ptr (Ptr ())
errorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileChooserListShortcutFolderURIs :: FileChooserClass self => self -> IO [String]
fileChooserListShortcutFolderURIs :: forall self. FileChooserClass self => self -> IO [FilePath]
fileChooserListShortcutFolderURIs self
self =
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr FileChooser -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO (Ptr ())
gtk_file_chooser_list_shortcut_folder_uris Ptr FileChooser
argPtr1)
{-# LINE 914 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
IO (Ptr ()) -> (Ptr () -> IO [FilePath]) -> IO [FilePath]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [FilePath]
fromStringGSList
fileChooserSetShowHidden :: FileChooserClass self => self
-> Bool
-> IO ()
fileChooserSetShowHidden :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetShowHidden self
self Bool
showHidden =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_show_hidden Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 928 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
showHidden)
fileChooserGetShowHidden :: FileChooserClass self => self
-> IO Bool
fileChooserGetShowHidden :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetShowHidden self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_show_hidden Ptr FileChooser
argPtr1)
{-# LINE 941 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserSetDoOverwriteConfirmation :: FileChooserClass self => self
-> Bool
-> IO ()
fileChooserSetDoOverwriteConfirmation :: forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetDoOverwriteConfirmation self
self Bool
doOverwriteConfirmation =
(\(FileChooser ForeignPtr FileChooser
arg1) CInt
arg2 -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO ()) -> IO ())
-> (Ptr FileChooser -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_do_overwrite_confirmation Ptr FileChooser
argPtr1 CInt
arg2)
{-# LINE 965 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
doOverwriteConfirmation)
fileChooserGetDoOverwriteConfirmation :: FileChooserClass self => self
-> IO Bool
fileChooserGetDoOverwriteConfirmation :: forall self. FileChooserClass self => self -> IO Bool
fileChooserGetDoOverwriteConfirmation self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(FileChooser ForeignPtr FileChooser
arg1) -> ForeignPtr FileChooser -> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileChooser
arg1 ((Ptr FileChooser -> IO CInt) -> IO CInt)
-> (Ptr FileChooser -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileChooser
argPtr1 ->Ptr FileChooser -> IO CInt
gtk_file_chooser_get_do_overwrite_confirmation Ptr FileChooser
argPtr1)
{-# LINE 979 "./Graphics/UI/Gtk/Selectors/FileChooser.chs" #-}
(toFileChooser self)
fileChooserUsePreviewLabel :: FileChooserClass self => Attr self Bool
fileChooserUsePreviewLabel :: forall self. FileChooserClass self => Attr self Bool
fileChooserUsePreviewLabel = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetUsePreviewLabel
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetUsePreviewLabel
fileChooserShowHidden :: FileChooserClass self => Attr self Bool
fileChooserShowHidden :: forall self. FileChooserClass self => Attr self Bool
fileChooserShowHidden = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetShowHidden
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetShowHidden
fileChooserSelectMultiple :: FileChooserClass self => Attr self Bool
fileChooserSelectMultiple :: forall self. FileChooserClass self => Attr self Bool
fileChooserSelectMultiple = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetSelectMultiple
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetSelectMultiple
fileChooserPreviewWidgetActive :: FileChooserClass self => Attr self Bool
fileChooserPreviewWidgetActive :: forall self. FileChooserClass self => Attr self Bool
fileChooserPreviewWidgetActive = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetPreviewWidgetActive
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetPreviewWidgetActive
fileChooserPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => ReadWriteAttr self (Maybe Widget) previewWidget
fileChooserPreviewWidget :: forall self previewWidget.
(FileChooserClass self, WidgetClass previewWidget) =>
ReadWriteAttr self (Maybe Widget) previewWidget
fileChooserPreviewWidget = (self -> IO (Maybe Widget))
-> (self -> previewWidget -> IO ())
-> ReadWriteAttr self (Maybe Widget) previewWidget
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO (Maybe Widget)
forall self. FileChooserClass self => self -> IO (Maybe Widget)
fileChooserGetPreviewWidget
self -> previewWidget -> IO ()
forall self previewWidget.
(FileChooserClass self, WidgetClass previewWidget) =>
self -> previewWidget -> IO ()
fileChooserSetPreviewWidget
fileChooserLocalOnly :: FileChooserClass self => Attr self Bool
fileChooserLocalOnly :: forall self. FileChooserClass self => Attr self Bool
fileChooserLocalOnly = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetLocalOnly
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetLocalOnly
fileChooserFilter :: FileChooserClass self => ReadWriteAttr self (Maybe FileFilter) FileFilter
fileChooserFilter :: forall self.
FileChooserClass self =>
ReadWriteAttr self (Maybe FileFilter) FileFilter
fileChooserFilter = (self -> IO (Maybe FileFilter))
-> (self -> FileFilter -> IO ())
-> ReadWriteAttr self (Maybe FileFilter) FileFilter
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO (Maybe FileFilter)
forall self. FileChooserClass self => self -> IO (Maybe FileFilter)
fileChooserGetFilter
self -> FileFilter -> IO ()
forall self. FileChooserClass self => self -> FileFilter -> IO ()
fileChooserSetFilter
fileChooserExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => ReadWriteAttr self (Maybe Widget) extraWidget
= (self -> IO (Maybe Widget))
-> (self -> extraWidget -> IO ())
-> ReadWriteAttr self (Maybe Widget) extraWidget
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO (Maybe Widget)
forall self. FileChooserClass self => self -> IO (Maybe Widget)
fileChooserGetExtraWidget
self -> extraWidget -> IO ()
forall self previewWidget.
(FileChooserClass self, WidgetClass previewWidget) =>
self -> previewWidget -> IO ()
fileChooserSetExtraWidget
fileChooserDoOverwriteConfirmation :: FileChooserClass self => Attr self Bool
fileChooserDoOverwriteConfirmation :: forall self. FileChooserClass self => Attr self Bool
fileChooserDoOverwriteConfirmation = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. FileChooserClass self => self -> IO Bool
fileChooserGetDoOverwriteConfirmation
self -> Bool -> IO ()
forall self. FileChooserClass self => self -> Bool -> IO ()
fileChooserSetDoOverwriteConfirmation
fileChooserAction :: FileChooserClass self => Attr self FileChooserAction
fileChooserAction :: forall self. FileChooserClass self => Attr self FileChooserAction
fileChooserAction = (self -> IO FileChooserAction)
-> (self -> FileChooserAction -> IO ())
-> ReadWriteAttr self FileChooserAction FileChooserAction
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO FileChooserAction
forall self. FileChooserClass self => self -> IO FileChooserAction
fileChooserGetAction
self -> FileChooserAction -> IO ()
forall self.
FileChooserClass self =>
self -> FileChooserAction -> IO ()
fileChooserSetAction
currentFolderChanged :: FileChooserClass self => Signal self (IO ())
currentFolderChanged :: forall self. FileChooserClass self => Signal self (IO ())
currentFolderChanged = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"current-folder-changed")
fileSelectionChanged :: FileChooserClass self => Signal self (IO ())
fileSelectionChanged :: forall self. FileChooserClass self => Signal self (IO ())
fileSelectionChanged = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"selection-changed")
updatePreview :: FileChooserClass self => Signal self (IO ())
updatePreview :: forall self. FileChooserClass self => Signal self (IO ())
updatePreview = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"update-preview")
fileActivated :: FileChooserClass self => Signal self (IO ())
fileActivated :: forall self. FileChooserClass self => Signal self (IO ())
fileActivated = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"file-activated")
confirmOverwrite :: FileChooserClass self => Signal self (IO FileChooserConfirmation)
confirmOverwrite :: forall self.
FileChooserClass self =>
Signal self (IO FileChooserConfirmation)
confirmOverwrite = (Bool -> self -> IO FileChooserConfirmation -> IO (ConnectId self))
-> Signal self (IO FileChooserConfirmation)
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (FilePath
-> Bool
-> self
-> IO FileChooserConfirmation
-> IO (ConnectId self)
forall a obj.
(Enum a, GObjectClass obj) =>
FilePath -> Bool -> obj -> IO a -> IO (ConnectId obj)
connect_NONE__ENUM FilePath
"confirm-overwrite")
onCurrentFolderChanged, afterCurrentFolderChanged :: FileChooserClass self => self
-> IO ()
-> IO (ConnectId self)
onCurrentFolderChanged :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
onCurrentFolderChanged = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"current-folder-changed" Bool
False
afterCurrentFolderChanged :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
afterCurrentFolderChanged = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"current-folder-changed" Bool
True
{-# DEPRECATED onCurrentFolderChanged "use currentFolderChanged instead" #-}
{-# DEPRECATED afterCurrentFolderChanged "use currentFolderChanged instead" #-}
onUpdatePreview, afterUpdatePreview :: FileChooserClass self => self
-> IO ()
-> IO (ConnectId self)
onUpdatePreview :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
onUpdatePreview = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"update-preview" Bool
False
afterUpdatePreview :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
afterUpdatePreview = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"update-preview" Bool
True
{-# DEPRECATED onUpdatePreview "use updatePreview instead" #-}
{-# DEPRECATED afterUpdatePreview "use updatePreview instead" #-}
onFileActivated, afterFileActivated :: FileChooserClass self => self
-> IO ()
-> IO (ConnectId self)
onFileActivated :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
onFileActivated = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"file-activated" Bool
False
afterFileActivated :: forall self.
FileChooserClass self =>
self -> IO () -> IO (ConnectId self)
afterFileActivated = FilePath -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
FilePath -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE FilePath
"file-activated" Bool
True
{-# DEPRECATED onFileActivated "use fileActivated instead" #-}
{-# DEPRECATED afterFileActivated "use fileActivated instead" #-}
onConfirmOverwrite, afterConfirmOverwrite :: FileChooserClass self => self
-> IO FileChooserConfirmation
-> IO (ConnectId self)
onConfirmOverwrite :: forall self.
FileChooserClass self =>
self -> IO FileChooserConfirmation -> IO (ConnectId self)
onConfirmOverwrite = FilePath
-> Bool
-> self
-> IO FileChooserConfirmation
-> IO (ConnectId self)
forall a obj.
(Enum a, GObjectClass obj) =>
FilePath -> Bool -> obj -> IO a -> IO (ConnectId obj)
connect_NONE__ENUM FilePath
"confirm-overwrite" Bool
False
afterConfirmOverwrite :: forall self.
FileChooserClass self =>
self -> IO FileChooserConfirmation -> IO (ConnectId self)
afterConfirmOverwrite = FilePath
-> Bool
-> self
-> IO FileChooserConfirmation
-> IO (ConnectId self)
forall a obj.
(Enum a, GObjectClass obj) =>
FilePath -> Bool -> obj -> IO a -> IO (ConnectId obj)
connect_NONE__ENUM FilePath
"confirm-overwrite" Bool
True
{-# DEPRECATED onConfirmOverwrite "use confirmOverwrite instead" #-}
{-# DEPRECATED afterConfirmOverwrite "use confirmOverwrite instead" #-}
fromStringGSList :: GSList -> IO [String]
fromStringGSList :: Ptr () -> IO [FilePath]
fromStringGSList Ptr ()
strList = do
[CString]
strPtrs <- Ptr () -> IO [CString]
forall a. Ptr () -> IO [Ptr a]
fromGSList Ptr ()
strList
(CString -> IO FilePath) -> [CString] -> IO [FilePath]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM CString -> IO FilePath
readCString [CString]
strPtrs
foreign import ccall unsafe "gtk_file_chooser_error_quark"
gtk_file_chooser_error_quark :: (IO CUInt)
foreign import ccall safe "gtk_file_chooser_set_action"
gtk_file_chooser_set_action :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_action"
gtk_file_chooser_get_action :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_set_local_only"
gtk_file_chooser_set_local_only :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_local_only"
gtk_file_chooser_get_local_only :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_set_select_multiple"
gtk_file_chooser_set_select_multiple :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_select_multiple"
gtk_file_chooser_get_select_multiple :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_set_current_name"
gtk_file_chooser_set_current_name :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_filename"
gtk_file_chooser_get_filename :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_set_filename"
gtk_file_chooser_set_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_select_filename"
gtk_file_chooser_select_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_unselect_filename"
gtk_file_chooser_unselect_filename :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_select_all"
gtk_file_chooser_select_all :: ((Ptr FileChooser) -> (IO ()))
foreign import ccall safe "gtk_file_chooser_unselect_all"
gtk_file_chooser_unselect_all :: ((Ptr FileChooser) -> (IO ()))
foreign import ccall safe "gtk_file_chooser_get_filenames"
gtk_file_chooser_get_filenames :: ((Ptr FileChooser) -> (IO (Ptr ())))
foreign import ccall safe "gtk_file_chooser_set_current_folder"
gtk_file_chooser_set_current_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_get_current_folder"
gtk_file_chooser_get_current_folder :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_get_uri"
gtk_file_chooser_get_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_set_uri"
gtk_file_chooser_set_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_select_uri"
gtk_file_chooser_select_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_unselect_uri"
gtk_file_chooser_unselect_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_uris"
gtk_file_chooser_get_uris :: ((Ptr FileChooser) -> (IO (Ptr ())))
foreign import ccall safe "gtk_file_chooser_set_current_folder_uri"
gtk_file_chooser_set_current_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_file_chooser_get_current_folder_uri"
gtk_file_chooser_get_current_folder_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_set_preview_widget"
gtk_file_chooser_set_preview_widget :: ((Ptr FileChooser) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_preview_widget"
gtk_file_chooser_get_preview_widget :: ((Ptr FileChooser) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_file_chooser_set_preview_widget_active"
gtk_file_chooser_set_preview_widget_active :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_preview_widget_active"
gtk_file_chooser_get_preview_widget_active :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_set_use_preview_label"
gtk_file_chooser_set_use_preview_label :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_use_preview_label"
gtk_file_chooser_get_use_preview_label :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_get_preview_filename"
gtk_file_chooser_get_preview_filename :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_get_preview_uri"
gtk_file_chooser_get_preview_uri :: ((Ptr FileChooser) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_file_chooser_set_extra_widget"
:: ((Ptr FileChooser) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_extra_widget"
:: ((Ptr FileChooser) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_file_chooser_add_filter"
gtk_file_chooser_add_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_remove_filter"
gtk_file_chooser_remove_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_list_filters"
gtk_file_chooser_list_filters :: ((Ptr FileChooser) -> (IO (Ptr ())))
foreign import ccall safe "gtk_file_chooser_set_filter"
gtk_file_chooser_set_filter :: ((Ptr FileChooser) -> ((Ptr FileFilter) -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_filter"
gtk_file_chooser_get_filter :: ((Ptr FileChooser) -> (IO (Ptr FileFilter)))
foreign import ccall safe "gtk_file_chooser_add_shortcut_folder"
gtk_file_chooser_add_shortcut_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "gtk_file_chooser_remove_shortcut_folder"
gtk_file_chooser_remove_shortcut_folder :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "gtk_file_chooser_list_shortcut_folders"
gtk_file_chooser_list_shortcut_folders :: ((Ptr FileChooser) -> (IO (Ptr ())))
foreign import ccall safe "gtk_file_chooser_add_shortcut_folder_uri"
gtk_file_chooser_add_shortcut_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "gtk_file_chooser_remove_shortcut_folder_uri"
gtk_file_chooser_remove_shortcut_folder_uri :: ((Ptr FileChooser) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "gtk_file_chooser_list_shortcut_folder_uris"
gtk_file_chooser_list_shortcut_folder_uris :: ((Ptr FileChooser) -> (IO (Ptr ())))
foreign import ccall safe "gtk_file_chooser_set_show_hidden"
gtk_file_chooser_set_show_hidden :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_show_hidden"
gtk_file_chooser_get_show_hidden :: ((Ptr FileChooser) -> (IO CInt))
foreign import ccall safe "gtk_file_chooser_set_do_overwrite_confirmation"
gtk_file_chooser_set_do_overwrite_confirmation :: ((Ptr FileChooser) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_file_chooser_get_do_overwrite_confirmation"
gtk_file_chooser_get_do_overwrite_confirmation :: ((Ptr FileChooser) -> (IO CInt))