{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.FileChooser
(
FileChooser(..) ,
IsFileChooser ,
toFileChooser ,
#if defined(ENABLE_OVERLOADING)
ResolveFileChooserMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FileChooserAddChoiceMethodInfo ,
#endif
fileChooserAddChoice ,
#if defined(ENABLE_OVERLOADING)
FileChooserAddFilterMethodInfo ,
#endif
fileChooserAddFilter ,
#if defined(ENABLE_OVERLOADING)
FileChooserAddShortcutFolderMethodInfo ,
#endif
fileChooserAddShortcutFolder ,
#if defined(ENABLE_OVERLOADING)
FileChooserAddShortcutFolderUriMethodInfo,
#endif
fileChooserAddShortcutFolderUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetActionMethodInfo ,
#endif
fileChooserGetAction ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetChoiceMethodInfo ,
#endif
fileChooserGetChoice ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetCreateFoldersMethodInfo ,
#endif
fileChooserGetCreateFolders ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetCurrentFolderMethodInfo ,
#endif
fileChooserGetCurrentFolder ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetCurrentFolderFileMethodInfo,
#endif
fileChooserGetCurrentFolderFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetCurrentFolderUriMethodInfo,
#endif
fileChooserGetCurrentFolderUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetCurrentNameMethodInfo ,
#endif
fileChooserGetCurrentName ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetDoOverwriteConfirmationMethodInfo,
#endif
fileChooserGetDoOverwriteConfirmation ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetExtraWidgetMethodInfo ,
#endif
fileChooserGetExtraWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetFileMethodInfo ,
#endif
fileChooserGetFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetFilenameMethodInfo ,
#endif
fileChooserGetFilename ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetFilenamesMethodInfo ,
#endif
fileChooserGetFilenames ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetFilesMethodInfo ,
#endif
fileChooserGetFiles ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetFilterMethodInfo ,
#endif
fileChooserGetFilter ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetLocalOnlyMethodInfo ,
#endif
fileChooserGetLocalOnly ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetPreviewFileMethodInfo ,
#endif
fileChooserGetPreviewFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetPreviewFilenameMethodInfo ,
#endif
fileChooserGetPreviewFilename ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetPreviewUriMethodInfo ,
#endif
fileChooserGetPreviewUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetPreviewWidgetMethodInfo ,
#endif
fileChooserGetPreviewWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetPreviewWidgetActiveMethodInfo,
#endif
fileChooserGetPreviewWidgetActive ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetSelectMultipleMethodInfo ,
#endif
fileChooserGetSelectMultiple ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetShowHiddenMethodInfo ,
#endif
fileChooserGetShowHidden ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetUriMethodInfo ,
#endif
fileChooserGetUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetUrisMethodInfo ,
#endif
fileChooserGetUris ,
#if defined(ENABLE_OVERLOADING)
FileChooserGetUsePreviewLabelMethodInfo ,
#endif
fileChooserGetUsePreviewLabel ,
#if defined(ENABLE_OVERLOADING)
FileChooserListFiltersMethodInfo ,
#endif
fileChooserListFilters ,
#if defined(ENABLE_OVERLOADING)
FileChooserListShortcutFolderUrisMethodInfo,
#endif
fileChooserListShortcutFolderUris ,
#if defined(ENABLE_OVERLOADING)
FileChooserListShortcutFoldersMethodInfo,
#endif
fileChooserListShortcutFolders ,
#if defined(ENABLE_OVERLOADING)
FileChooserRemoveChoiceMethodInfo ,
#endif
fileChooserRemoveChoice ,
#if defined(ENABLE_OVERLOADING)
FileChooserRemoveFilterMethodInfo ,
#endif
fileChooserRemoveFilter ,
#if defined(ENABLE_OVERLOADING)
FileChooserRemoveShortcutFolderMethodInfo,
#endif
fileChooserRemoveShortcutFolder ,
#if defined(ENABLE_OVERLOADING)
FileChooserRemoveShortcutFolderUriMethodInfo,
#endif
fileChooserRemoveShortcutFolderUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectAllMethodInfo ,
#endif
fileChooserSelectAll ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectFileMethodInfo ,
#endif
fileChooserSelectFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectFilenameMethodInfo ,
#endif
fileChooserSelectFilename ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectUriMethodInfo ,
#endif
fileChooserSelectUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetActionMethodInfo ,
#endif
fileChooserSetAction ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetChoiceMethodInfo ,
#endif
fileChooserSetChoice ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetCreateFoldersMethodInfo ,
#endif
fileChooserSetCreateFolders ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetCurrentFolderMethodInfo ,
#endif
fileChooserSetCurrentFolder ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetCurrentFolderFileMethodInfo,
#endif
fileChooserSetCurrentFolderFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetCurrentFolderUriMethodInfo,
#endif
fileChooserSetCurrentFolderUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetCurrentNameMethodInfo ,
#endif
fileChooserSetCurrentName ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetDoOverwriteConfirmationMethodInfo,
#endif
fileChooserSetDoOverwriteConfirmation ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetExtraWidgetMethodInfo ,
#endif
fileChooserSetExtraWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetFileMethodInfo ,
#endif
fileChooserSetFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetFilenameMethodInfo ,
#endif
fileChooserSetFilename ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetFilterMethodInfo ,
#endif
fileChooserSetFilter ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetLocalOnlyMethodInfo ,
#endif
fileChooserSetLocalOnly ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetPreviewWidgetMethodInfo ,
#endif
fileChooserSetPreviewWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetPreviewWidgetActiveMethodInfo,
#endif
fileChooserSetPreviewWidgetActive ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetSelectMultipleMethodInfo ,
#endif
fileChooserSetSelectMultiple ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetShowHiddenMethodInfo ,
#endif
fileChooserSetShowHidden ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetUriMethodInfo ,
#endif
fileChooserSetUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserSetUsePreviewLabelMethodInfo ,
#endif
fileChooserSetUsePreviewLabel ,
#if defined(ENABLE_OVERLOADING)
FileChooserUnselectAllMethodInfo ,
#endif
fileChooserUnselectAll ,
#if defined(ENABLE_OVERLOADING)
FileChooserUnselectFileMethodInfo ,
#endif
fileChooserUnselectFile ,
#if defined(ENABLE_OVERLOADING)
FileChooserUnselectFilenameMethodInfo ,
#endif
fileChooserUnselectFilename ,
#if defined(ENABLE_OVERLOADING)
FileChooserUnselectUriMethodInfo ,
#endif
fileChooserUnselectUri ,
#if defined(ENABLE_OVERLOADING)
FileChooserActionPropertyInfo ,
#endif
constructFileChooserAction ,
#if defined(ENABLE_OVERLOADING)
fileChooserAction ,
#endif
getFileChooserAction ,
setFileChooserAction ,
#if defined(ENABLE_OVERLOADING)
FileChooserCreateFoldersPropertyInfo ,
#endif
constructFileChooserCreateFolders ,
#if defined(ENABLE_OVERLOADING)
fileChooserCreateFolders ,
#endif
getFileChooserCreateFolders ,
setFileChooserCreateFolders ,
#if defined(ENABLE_OVERLOADING)
FileChooserDoOverwriteConfirmationPropertyInfo,
#endif
constructFileChooserDoOverwriteConfirmation,
#if defined(ENABLE_OVERLOADING)
fileChooserDoOverwriteConfirmation ,
#endif
getFileChooserDoOverwriteConfirmation ,
setFileChooserDoOverwriteConfirmation ,
#if defined(ENABLE_OVERLOADING)
FileChooserExtraWidgetPropertyInfo ,
#endif
constructFileChooserExtraWidget ,
#if defined(ENABLE_OVERLOADING)
fileChooserExtraWidget ,
#endif
getFileChooserExtraWidget ,
setFileChooserExtraWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserFilterPropertyInfo ,
#endif
constructFileChooserFilter ,
#if defined(ENABLE_OVERLOADING)
fileChooserFilter ,
#endif
getFileChooserFilter ,
setFileChooserFilter ,
#if defined(ENABLE_OVERLOADING)
FileChooserLocalOnlyPropertyInfo ,
#endif
constructFileChooserLocalOnly ,
#if defined(ENABLE_OVERLOADING)
fileChooserLocalOnly ,
#endif
getFileChooserLocalOnly ,
setFileChooserLocalOnly ,
#if defined(ENABLE_OVERLOADING)
FileChooserPreviewWidgetPropertyInfo ,
#endif
constructFileChooserPreviewWidget ,
#if defined(ENABLE_OVERLOADING)
fileChooserPreviewWidget ,
#endif
getFileChooserPreviewWidget ,
setFileChooserPreviewWidget ,
#if defined(ENABLE_OVERLOADING)
FileChooserPreviewWidgetActivePropertyInfo,
#endif
constructFileChooserPreviewWidgetActive ,
#if defined(ENABLE_OVERLOADING)
fileChooserPreviewWidgetActive ,
#endif
getFileChooserPreviewWidgetActive ,
setFileChooserPreviewWidgetActive ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectMultiplePropertyInfo ,
#endif
constructFileChooserSelectMultiple ,
#if defined(ENABLE_OVERLOADING)
fileChooserSelectMultiple ,
#endif
getFileChooserSelectMultiple ,
setFileChooserSelectMultiple ,
#if defined(ENABLE_OVERLOADING)
FileChooserShowHiddenPropertyInfo ,
#endif
constructFileChooserShowHidden ,
#if defined(ENABLE_OVERLOADING)
fileChooserShowHidden ,
#endif
getFileChooserShowHidden ,
setFileChooserShowHidden ,
#if defined(ENABLE_OVERLOADING)
FileChooserUsePreviewLabelPropertyInfo ,
#endif
constructFileChooserUsePreviewLabel ,
#if defined(ENABLE_OVERLOADING)
fileChooserUsePreviewLabel ,
#endif
getFileChooserUsePreviewLabel ,
setFileChooserUsePreviewLabel ,
C_FileChooserConfirmOverwriteCallback ,
FileChooserConfirmOverwriteCallback ,
#if defined(ENABLE_OVERLOADING)
FileChooserConfirmOverwriteSignalInfo ,
#endif
afterFileChooserConfirmOverwrite ,
genClosure_FileChooserConfirmOverwrite ,
mk_FileChooserConfirmOverwriteCallback ,
noFileChooserConfirmOverwriteCallback ,
onFileChooserConfirmOverwrite ,
wrap_FileChooserConfirmOverwriteCallback,
C_FileChooserCurrentFolderChangedCallback,
FileChooserCurrentFolderChangedCallback ,
#if defined(ENABLE_OVERLOADING)
FileChooserCurrentFolderChangedSignalInfo,
#endif
afterFileChooserCurrentFolderChanged ,
genClosure_FileChooserCurrentFolderChanged,
mk_FileChooserCurrentFolderChangedCallback,
noFileChooserCurrentFolderChangedCallback,
onFileChooserCurrentFolderChanged ,
wrap_FileChooserCurrentFolderChangedCallback,
C_FileChooserFileActivatedCallback ,
FileChooserFileActivatedCallback ,
#if defined(ENABLE_OVERLOADING)
FileChooserFileActivatedSignalInfo ,
#endif
afterFileChooserFileActivated ,
genClosure_FileChooserFileActivated ,
mk_FileChooserFileActivatedCallback ,
noFileChooserFileActivatedCallback ,
onFileChooserFileActivated ,
wrap_FileChooserFileActivatedCallback ,
C_FileChooserSelectionChangedCallback ,
FileChooserSelectionChangedCallback ,
#if defined(ENABLE_OVERLOADING)
FileChooserSelectionChangedSignalInfo ,
#endif
afterFileChooserSelectionChanged ,
genClosure_FileChooserSelectionChanged ,
mk_FileChooserSelectionChangedCallback ,
noFileChooserSelectionChangedCallback ,
onFileChooserSelectionChanged ,
wrap_FileChooserSelectionChangedCallback,
C_FileChooserUpdatePreviewCallback ,
FileChooserUpdatePreviewCallback ,
#if defined(ENABLE_OVERLOADING)
FileChooserUpdatePreviewSignalInfo ,
#endif
afterFileChooserUpdatePreview ,
genClosure_FileChooserUpdatePreview ,
mk_FileChooserUpdatePreviewCallback ,
noFileChooserUpdatePreviewCallback ,
onFileChooserUpdatePreview ,
wrap_FileChooserUpdatePreviewCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.File as Gio.File
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.FileFilter as Gtk.FileFilter
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype FileChooser = FileChooser (SP.ManagedPtr FileChooser)
deriving (FileChooser -> FileChooser -> Bool
(FileChooser -> FileChooser -> Bool)
-> (FileChooser -> FileChooser -> Bool) -> Eq FileChooser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileChooser -> FileChooser -> Bool
$c/= :: FileChooser -> FileChooser -> Bool
== :: FileChooser -> FileChooser -> Bool
$c== :: FileChooser -> FileChooser -> Bool
Eq)
instance SP.ManagedPtrNewtype FileChooser where
toManagedPtr :: FileChooser -> ManagedPtr FileChooser
toManagedPtr (FileChooser ManagedPtr FileChooser
p) = ManagedPtr FileChooser
p
foreign import ccall "gtk_file_chooser_get_type"
c_gtk_file_chooser_get_type :: IO B.Types.GType
instance B.Types.TypedObject FileChooser where
glibType :: IO GType
glibType = IO GType
c_gtk_file_chooser_get_type
instance B.Types.GObject FileChooser
instance B.GValue.IsGValue FileChooser where
toGValue :: FileChooser -> IO GValue
toGValue FileChooser
o = do
GType
gtype <- IO GType
c_gtk_file_chooser_get_type
FileChooser -> (Ptr FileChooser -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileChooser
o (GType
-> (GValue -> Ptr FileChooser -> IO ())
-> Ptr FileChooser
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FileChooser -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO FileChooser
fromGValue GValue
gv = do
Ptr FileChooser
ptr <- GValue -> IO (Ptr FileChooser)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FileChooser)
(ManagedPtr FileChooser -> FileChooser)
-> Ptr FileChooser -> IO FileChooser
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FileChooser -> FileChooser
FileChooser Ptr FileChooser
ptr
class (SP.GObject o, O.IsDescendantOf FileChooser o) => IsFileChooser o
instance (SP.GObject o, O.IsDescendantOf FileChooser o) => IsFileChooser o
instance O.HasParentTypes FileChooser
type instance O.ParentTypes FileChooser = '[GObject.Object.Object]
toFileChooser :: (MonadIO m, IsFileChooser o) => o -> m FileChooser
toFileChooser :: o -> m FileChooser
toFileChooser = IO FileChooser -> m FileChooser
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileChooser -> m FileChooser)
-> (o -> IO FileChooser) -> o -> m FileChooser
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FileChooser -> FileChooser) -> o -> IO FileChooser
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr FileChooser -> FileChooser
FileChooser
getFileChooserAction :: (MonadIO m, IsFileChooser o) => o -> m Gtk.Enums.FileChooserAction
getFileChooserAction :: o -> m FileChooserAction
getFileChooserAction o
obj = IO FileChooserAction -> m FileChooserAction
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileChooserAction -> m FileChooserAction)
-> IO FileChooserAction -> m FileChooserAction
forall a b. (a -> b) -> a -> b
$ o -> String -> IO FileChooserAction
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"action"
setFileChooserAction :: (MonadIO m, IsFileChooser o) => o -> Gtk.Enums.FileChooserAction -> m ()
setFileChooserAction :: o -> FileChooserAction -> m ()
setFileChooserAction o
obj FileChooserAction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> FileChooserAction -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"action" FileChooserAction
val
constructFileChooserAction :: (IsFileChooser o, MIO.MonadIO m) => Gtk.Enums.FileChooserAction -> m (GValueConstruct o)
constructFileChooserAction :: FileChooserAction -> m (GValueConstruct o)
constructFileChooserAction FileChooserAction
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> FileChooserAction -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"action" FileChooserAction
val
#if defined(ENABLE_OVERLOADING)
data FileChooserActionPropertyInfo
instance AttrInfo FileChooserActionPropertyInfo where
type AttrAllowedOps FileChooserActionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserActionPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserActionPropertyInfo = (~) Gtk.Enums.FileChooserAction
type AttrTransferTypeConstraint FileChooserActionPropertyInfo = (~) Gtk.Enums.FileChooserAction
type AttrTransferType FileChooserActionPropertyInfo = Gtk.Enums.FileChooserAction
type AttrGetType FileChooserActionPropertyInfo = Gtk.Enums.FileChooserAction
type AttrLabel FileChooserActionPropertyInfo = "action"
type AttrOrigin FileChooserActionPropertyInfo = FileChooser
attrGet = getFileChooserAction
attrSet = setFileChooserAction
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserAction
attrClear = undefined
#endif
getFileChooserCreateFolders :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserCreateFolders :: o -> m Bool
getFileChooserCreateFolders o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"create-folders"
setFileChooserCreateFolders :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserCreateFolders :: o -> Bool -> m ()
setFileChooserCreateFolders o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"create-folders" Bool
val
constructFileChooserCreateFolders :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserCreateFolders :: Bool -> m (GValueConstruct o)
constructFileChooserCreateFolders Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"create-folders" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserCreateFoldersPropertyInfo
instance AttrInfo FileChooserCreateFoldersPropertyInfo where
type AttrAllowedOps FileChooserCreateFoldersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserCreateFoldersPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool
type AttrTransferType FileChooserCreateFoldersPropertyInfo = Bool
type AttrGetType FileChooserCreateFoldersPropertyInfo = Bool
type AttrLabel FileChooserCreateFoldersPropertyInfo = "create-folders"
type AttrOrigin FileChooserCreateFoldersPropertyInfo = FileChooser
attrGet = getFileChooserCreateFolders
attrSet = setFileChooserCreateFolders
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserCreateFolders
attrClear = undefined
#endif
getFileChooserDoOverwriteConfirmation :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserDoOverwriteConfirmation :: o -> m Bool
getFileChooserDoOverwriteConfirmation o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"do-overwrite-confirmation"
setFileChooserDoOverwriteConfirmation :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserDoOverwriteConfirmation :: o -> Bool -> m ()
setFileChooserDoOverwriteConfirmation o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"do-overwrite-confirmation" Bool
val
constructFileChooserDoOverwriteConfirmation :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserDoOverwriteConfirmation :: Bool -> m (GValueConstruct o)
constructFileChooserDoOverwriteConfirmation Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"do-overwrite-confirmation" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserDoOverwriteConfirmationPropertyInfo
instance AttrInfo FileChooserDoOverwriteConfirmationPropertyInfo where
type AttrAllowedOps FileChooserDoOverwriteConfirmationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool
type AttrTransferType FileChooserDoOverwriteConfirmationPropertyInfo = Bool
type AttrGetType FileChooserDoOverwriteConfirmationPropertyInfo = Bool
type AttrLabel FileChooserDoOverwriteConfirmationPropertyInfo = "do-overwrite-confirmation"
type AttrOrigin FileChooserDoOverwriteConfirmationPropertyInfo = FileChooser
attrGet = getFileChooserDoOverwriteConfirmation
attrSet = setFileChooserDoOverwriteConfirmation
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserDoOverwriteConfirmation
attrClear = undefined
#endif
getFileChooserExtraWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget)
o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"extra-widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
setFileChooserExtraWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m ()
o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"extra-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructFileChooserExtraWidget :: (IsFileChooser o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"extra-widget" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data FileChooserExtraWidgetPropertyInfo
instance AttrInfo FileChooserExtraWidgetPropertyInfo where
type AttrAllowedOps FileChooserExtraWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserExtraWidgetPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserExtraWidgetPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint FileChooserExtraWidgetPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType FileChooserExtraWidgetPropertyInfo = Gtk.Widget.Widget
type AttrGetType FileChooserExtraWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
type AttrLabel FileChooserExtraWidgetPropertyInfo = "extra-widget"
type AttrOrigin FileChooserExtraWidgetPropertyInfo = FileChooser
attrGet = getFileChooserExtraWidget
attrSet = setFileChooserExtraWidget
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructFileChooserExtraWidget
attrClear = undefined
#endif
getFileChooserFilter :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.FileFilter.FileFilter)
getFileChooserFilter :: o -> m (Maybe FileFilter)
getFileChooserFilter o
obj = IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FileFilter) -> m (Maybe FileFilter))
-> IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr FileFilter -> FileFilter)
-> IO (Maybe FileFilter)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"filter" ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter
setFileChooserFilter :: (MonadIO m, IsFileChooser o, Gtk.FileFilter.IsFileFilter a) => o -> a -> m ()
setFileChooserFilter :: o -> a -> m ()
setFileChooserFilter o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"filter" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructFileChooserFilter :: (IsFileChooser o, MIO.MonadIO m, Gtk.FileFilter.IsFileFilter a) => a -> m (GValueConstruct o)
constructFileChooserFilter :: a -> m (GValueConstruct o)
constructFileChooserFilter a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"filter" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data FileChooserFilterPropertyInfo
instance AttrInfo FileChooserFilterPropertyInfo where
type AttrAllowedOps FileChooserFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserFilterPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserFilterPropertyInfo = Gtk.FileFilter.IsFileFilter
type AttrTransferTypeConstraint FileChooserFilterPropertyInfo = Gtk.FileFilter.IsFileFilter
type AttrTransferType FileChooserFilterPropertyInfo = Gtk.FileFilter.FileFilter
type AttrGetType FileChooserFilterPropertyInfo = (Maybe Gtk.FileFilter.FileFilter)
type AttrLabel FileChooserFilterPropertyInfo = "filter"
type AttrOrigin FileChooserFilterPropertyInfo = FileChooser
attrGet = getFileChooserFilter
attrSet = setFileChooserFilter
attrTransfer _ v = do
unsafeCastTo Gtk.FileFilter.FileFilter v
attrConstruct = constructFileChooserFilter
attrClear = undefined
#endif
getFileChooserLocalOnly :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserLocalOnly :: o -> m Bool
getFileChooserLocalOnly o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"local-only"
setFileChooserLocalOnly :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserLocalOnly :: o -> Bool -> m ()
setFileChooserLocalOnly o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"local-only" Bool
val
constructFileChooserLocalOnly :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserLocalOnly :: Bool -> m (GValueConstruct o)
constructFileChooserLocalOnly Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"local-only" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserLocalOnlyPropertyInfo
instance AttrInfo FileChooserLocalOnlyPropertyInfo where
type AttrAllowedOps FileChooserLocalOnlyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserLocalOnlyPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool
type AttrTransferType FileChooserLocalOnlyPropertyInfo = Bool
type AttrGetType FileChooserLocalOnlyPropertyInfo = Bool
type AttrLabel FileChooserLocalOnlyPropertyInfo = "local-only"
type AttrOrigin FileChooserLocalOnlyPropertyInfo = FileChooser
attrGet = getFileChooserLocalOnly
attrSet = setFileChooserLocalOnly
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserLocalOnly
attrClear = undefined
#endif
getFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o) => o -> m (Maybe Gtk.Widget.Widget)
getFileChooserPreviewWidget :: o -> m (Maybe Widget)
getFileChooserPreviewWidget o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"preview-widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
setFileChooserPreviewWidget :: (MonadIO m, IsFileChooser o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setFileChooserPreviewWidget :: o -> a -> m ()
setFileChooserPreviewWidget o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"preview-widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructFileChooserPreviewWidget :: (IsFileChooser o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructFileChooserPreviewWidget :: a -> m (GValueConstruct o)
constructFileChooserPreviewWidget a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"preview-widget" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data FileChooserPreviewWidgetPropertyInfo
instance AttrInfo FileChooserPreviewWidgetPropertyInfo where
type AttrAllowedOps FileChooserPreviewWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserPreviewWidgetPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType FileChooserPreviewWidgetPropertyInfo = Gtk.Widget.Widget
type AttrGetType FileChooserPreviewWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
type AttrLabel FileChooserPreviewWidgetPropertyInfo = "preview-widget"
type AttrOrigin FileChooserPreviewWidgetPropertyInfo = FileChooser
attrGet = getFileChooserPreviewWidget
attrSet = setFileChooserPreviewWidget
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructFileChooserPreviewWidget
attrClear = undefined
#endif
getFileChooserPreviewWidgetActive :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserPreviewWidgetActive :: o -> m Bool
getFileChooserPreviewWidgetActive o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"preview-widget-active"
setFileChooserPreviewWidgetActive :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserPreviewWidgetActive :: o -> Bool -> m ()
setFileChooserPreviewWidgetActive o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"preview-widget-active" Bool
val
constructFileChooserPreviewWidgetActive :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserPreviewWidgetActive :: Bool -> m (GValueConstruct o)
constructFileChooserPreviewWidgetActive Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"preview-widget-active" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserPreviewWidgetActivePropertyInfo
instance AttrInfo FileChooserPreviewWidgetActivePropertyInfo where
type AttrAllowedOps FileChooserPreviewWidgetActivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool
type AttrTransferType FileChooserPreviewWidgetActivePropertyInfo = Bool
type AttrGetType FileChooserPreviewWidgetActivePropertyInfo = Bool
type AttrLabel FileChooserPreviewWidgetActivePropertyInfo = "preview-widget-active"
type AttrOrigin FileChooserPreviewWidgetActivePropertyInfo = FileChooser
attrGet = getFileChooserPreviewWidgetActive
attrSet = setFileChooserPreviewWidgetActive
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserPreviewWidgetActive
attrClear = undefined
#endif
getFileChooserSelectMultiple :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserSelectMultiple :: o -> m Bool
getFileChooserSelectMultiple o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"select-multiple"
setFileChooserSelectMultiple :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserSelectMultiple :: o -> Bool -> m ()
setFileChooserSelectMultiple o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"select-multiple" Bool
val
constructFileChooserSelectMultiple :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserSelectMultiple :: Bool -> m (GValueConstruct o)
constructFileChooserSelectMultiple Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"select-multiple" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserSelectMultiplePropertyInfo
instance AttrInfo FileChooserSelectMultiplePropertyInfo where
type AttrAllowedOps FileChooserSelectMultiplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserSelectMultiplePropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool
type AttrTransferType FileChooserSelectMultiplePropertyInfo = Bool
type AttrGetType FileChooserSelectMultiplePropertyInfo = Bool
type AttrLabel FileChooserSelectMultiplePropertyInfo = "select-multiple"
type AttrOrigin FileChooserSelectMultiplePropertyInfo = FileChooser
attrGet = getFileChooserSelectMultiple
attrSet = setFileChooserSelectMultiple
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserSelectMultiple
attrClear = undefined
#endif
getFileChooserShowHidden :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserShowHidden :: o -> m Bool
getFileChooserShowHidden o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"show-hidden"
setFileChooserShowHidden :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserShowHidden :: o -> Bool -> m ()
setFileChooserShowHidden o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"show-hidden" Bool
val
constructFileChooserShowHidden :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserShowHidden :: Bool -> m (GValueConstruct o)
constructFileChooserShowHidden Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-hidden" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserShowHiddenPropertyInfo
instance AttrInfo FileChooserShowHiddenPropertyInfo where
type AttrAllowedOps FileChooserShowHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserShowHiddenPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool
type AttrTransferType FileChooserShowHiddenPropertyInfo = Bool
type AttrGetType FileChooserShowHiddenPropertyInfo = Bool
type AttrLabel FileChooserShowHiddenPropertyInfo = "show-hidden"
type AttrOrigin FileChooserShowHiddenPropertyInfo = FileChooser
attrGet = getFileChooserShowHidden
attrSet = setFileChooserShowHidden
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserShowHidden
attrClear = undefined
#endif
getFileChooserUsePreviewLabel :: (MonadIO m, IsFileChooser o) => o -> m Bool
getFileChooserUsePreviewLabel :: o -> m Bool
getFileChooserUsePreviewLabel o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"use-preview-label"
setFileChooserUsePreviewLabel :: (MonadIO m, IsFileChooser o) => o -> Bool -> m ()
setFileChooserUsePreviewLabel :: o -> Bool -> m ()
setFileChooserUsePreviewLabel o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"use-preview-label" Bool
val
constructFileChooserUsePreviewLabel :: (IsFileChooser o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileChooserUsePreviewLabel :: Bool -> m (GValueConstruct o)
constructFileChooserUsePreviewLabel Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"use-preview-label" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileChooserUsePreviewLabelPropertyInfo
instance AttrInfo FileChooserUsePreviewLabelPropertyInfo where
type AttrAllowedOps FileChooserUsePreviewLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileChooserUsePreviewLabelPropertyInfo = IsFileChooser
type AttrSetTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool
type AttrTransferType FileChooserUsePreviewLabelPropertyInfo = Bool
type AttrGetType FileChooserUsePreviewLabelPropertyInfo = Bool
type AttrLabel FileChooserUsePreviewLabelPropertyInfo = "use-preview-label"
type AttrOrigin FileChooserUsePreviewLabelPropertyInfo = FileChooser
attrGet = getFileChooserUsePreviewLabel
attrSet = setFileChooserUsePreviewLabel
attrTransfer _ v = do
return v
attrConstruct = constructFileChooserUsePreviewLabel
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileChooser
type instance O.AttributeList FileChooser = FileChooserAttributeList
type FileChooserAttributeList = ('[ '("action", FileChooserActionPropertyInfo), '("createFolders", FileChooserCreateFoldersPropertyInfo), '("doOverwriteConfirmation", FileChooserDoOverwriteConfirmationPropertyInfo), '("extraWidget", FileChooserExtraWidgetPropertyInfo), '("filter", FileChooserFilterPropertyInfo), '("localOnly", FileChooserLocalOnlyPropertyInfo), '("previewWidget", FileChooserPreviewWidgetPropertyInfo), '("previewWidgetActive", FileChooserPreviewWidgetActivePropertyInfo), '("selectMultiple", FileChooserSelectMultiplePropertyInfo), '("showHidden", FileChooserShowHiddenPropertyInfo), '("usePreviewLabel", FileChooserUsePreviewLabelPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
fileChooserAction :: AttrLabelProxy "action"
fileChooserAction = AttrLabelProxy
fileChooserCreateFolders :: AttrLabelProxy "createFolders"
fileChooserCreateFolders = AttrLabelProxy
fileChooserDoOverwriteConfirmation :: AttrLabelProxy "doOverwriteConfirmation"
fileChooserDoOverwriteConfirmation = AttrLabelProxy
fileChooserExtraWidget :: AttrLabelProxy "extraWidget"
fileChooserExtraWidget = AttrLabelProxy
fileChooserFilter :: AttrLabelProxy "filter"
fileChooserFilter = AttrLabelProxy
fileChooserLocalOnly :: AttrLabelProxy "localOnly"
fileChooserLocalOnly = AttrLabelProxy
fileChooserPreviewWidget :: AttrLabelProxy "previewWidget"
fileChooserPreviewWidget = AttrLabelProxy
fileChooserPreviewWidgetActive :: AttrLabelProxy "previewWidgetActive"
fileChooserPreviewWidgetActive = AttrLabelProxy
fileChooserSelectMultiple :: AttrLabelProxy "selectMultiple"
fileChooserSelectMultiple = AttrLabelProxy
fileChooserShowHidden :: AttrLabelProxy "showHidden"
fileChooserShowHidden = AttrLabelProxy
fileChooserUsePreviewLabel :: AttrLabelProxy "usePreviewLabel"
fileChooserUsePreviewLabel = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFileChooserMethod (t :: Symbol) (o :: *) :: * where
ResolveFileChooserMethod "addChoice" o = FileChooserAddChoiceMethodInfo
ResolveFileChooserMethod "addFilter" o = FileChooserAddFilterMethodInfo
ResolveFileChooserMethod "addShortcutFolder" o = FileChooserAddShortcutFolderMethodInfo
ResolveFileChooserMethod "addShortcutFolderUri" o = FileChooserAddShortcutFolderUriMethodInfo
ResolveFileChooserMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFileChooserMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFileChooserMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFileChooserMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFileChooserMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFileChooserMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFileChooserMethod "listFilters" o = FileChooserListFiltersMethodInfo
ResolveFileChooserMethod "listShortcutFolderUris" o = FileChooserListShortcutFolderUrisMethodInfo
ResolveFileChooserMethod "listShortcutFolders" o = FileChooserListShortcutFoldersMethodInfo
ResolveFileChooserMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFileChooserMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFileChooserMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFileChooserMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFileChooserMethod "removeChoice" o = FileChooserRemoveChoiceMethodInfo
ResolveFileChooserMethod "removeFilter" o = FileChooserRemoveFilterMethodInfo
ResolveFileChooserMethod "removeShortcutFolder" o = FileChooserRemoveShortcutFolderMethodInfo
ResolveFileChooserMethod "removeShortcutFolderUri" o = FileChooserRemoveShortcutFolderUriMethodInfo
ResolveFileChooserMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFileChooserMethod "selectAll" o = FileChooserSelectAllMethodInfo
ResolveFileChooserMethod "selectFile" o = FileChooserSelectFileMethodInfo
ResolveFileChooserMethod "selectFilename" o = FileChooserSelectFilenameMethodInfo
ResolveFileChooserMethod "selectUri" o = FileChooserSelectUriMethodInfo
ResolveFileChooserMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFileChooserMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFileChooserMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFileChooserMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFileChooserMethod "unselectAll" o = FileChooserUnselectAllMethodInfo
ResolveFileChooserMethod "unselectFile" o = FileChooserUnselectFileMethodInfo
ResolveFileChooserMethod "unselectFilename" o = FileChooserUnselectFilenameMethodInfo
ResolveFileChooserMethod "unselectUri" o = FileChooserUnselectUriMethodInfo
ResolveFileChooserMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFileChooserMethod "getAction" o = FileChooserGetActionMethodInfo
ResolveFileChooserMethod "getChoice" o = FileChooserGetChoiceMethodInfo
ResolveFileChooserMethod "getCreateFolders" o = FileChooserGetCreateFoldersMethodInfo
ResolveFileChooserMethod "getCurrentFolder" o = FileChooserGetCurrentFolderMethodInfo
ResolveFileChooserMethod "getCurrentFolderFile" o = FileChooserGetCurrentFolderFileMethodInfo
ResolveFileChooserMethod "getCurrentFolderUri" o = FileChooserGetCurrentFolderUriMethodInfo
ResolveFileChooserMethod "getCurrentName" o = FileChooserGetCurrentNameMethodInfo
ResolveFileChooserMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFileChooserMethod "getDoOverwriteConfirmation" o = FileChooserGetDoOverwriteConfirmationMethodInfo
ResolveFileChooserMethod "getExtraWidget" o = FileChooserGetExtraWidgetMethodInfo
ResolveFileChooserMethod "getFile" o = FileChooserGetFileMethodInfo
ResolveFileChooserMethod "getFilename" o = FileChooserGetFilenameMethodInfo
ResolveFileChooserMethod "getFilenames" o = FileChooserGetFilenamesMethodInfo
ResolveFileChooserMethod "getFiles" o = FileChooserGetFilesMethodInfo
ResolveFileChooserMethod "getFilter" o = FileChooserGetFilterMethodInfo
ResolveFileChooserMethod "getLocalOnly" o = FileChooserGetLocalOnlyMethodInfo
ResolveFileChooserMethod "getPreviewFile" o = FileChooserGetPreviewFileMethodInfo
ResolveFileChooserMethod "getPreviewFilename" o = FileChooserGetPreviewFilenameMethodInfo
ResolveFileChooserMethod "getPreviewUri" o = FileChooserGetPreviewUriMethodInfo
ResolveFileChooserMethod "getPreviewWidget" o = FileChooserGetPreviewWidgetMethodInfo
ResolveFileChooserMethod "getPreviewWidgetActive" o = FileChooserGetPreviewWidgetActiveMethodInfo
ResolveFileChooserMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFileChooserMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFileChooserMethod "getSelectMultiple" o = FileChooserGetSelectMultipleMethodInfo
ResolveFileChooserMethod "getShowHidden" o = FileChooserGetShowHiddenMethodInfo
ResolveFileChooserMethod "getUri" o = FileChooserGetUriMethodInfo
ResolveFileChooserMethod "getUris" o = FileChooserGetUrisMethodInfo
ResolveFileChooserMethod "getUsePreviewLabel" o = FileChooserGetUsePreviewLabelMethodInfo
ResolveFileChooserMethod "setAction" o = FileChooserSetActionMethodInfo
ResolveFileChooserMethod "setChoice" o = FileChooserSetChoiceMethodInfo
ResolveFileChooserMethod "setCreateFolders" o = FileChooserSetCreateFoldersMethodInfo
ResolveFileChooserMethod "setCurrentFolder" o = FileChooserSetCurrentFolderMethodInfo
ResolveFileChooserMethod "setCurrentFolderFile" o = FileChooserSetCurrentFolderFileMethodInfo
ResolveFileChooserMethod "setCurrentFolderUri" o = FileChooserSetCurrentFolderUriMethodInfo
ResolveFileChooserMethod "setCurrentName" o = FileChooserSetCurrentNameMethodInfo
ResolveFileChooserMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFileChooserMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFileChooserMethod "setDoOverwriteConfirmation" o = FileChooserSetDoOverwriteConfirmationMethodInfo
ResolveFileChooserMethod "setExtraWidget" o = FileChooserSetExtraWidgetMethodInfo
ResolveFileChooserMethod "setFile" o = FileChooserSetFileMethodInfo
ResolveFileChooserMethod "setFilename" o = FileChooserSetFilenameMethodInfo
ResolveFileChooserMethod "setFilter" o = FileChooserSetFilterMethodInfo
ResolveFileChooserMethod "setLocalOnly" o = FileChooserSetLocalOnlyMethodInfo
ResolveFileChooserMethod "setPreviewWidget" o = FileChooserSetPreviewWidgetMethodInfo
ResolveFileChooserMethod "setPreviewWidgetActive" o = FileChooserSetPreviewWidgetActiveMethodInfo
ResolveFileChooserMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFileChooserMethod "setSelectMultiple" o = FileChooserSetSelectMultipleMethodInfo
ResolveFileChooserMethod "setShowHidden" o = FileChooserSetShowHiddenMethodInfo
ResolveFileChooserMethod "setUri" o = FileChooserSetUriMethodInfo
ResolveFileChooserMethod "setUsePreviewLabel" o = FileChooserSetUsePreviewLabelMethodInfo
ResolveFileChooserMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileChooserMethod t FileChooser, O.MethodInfo info FileChooser p) => OL.IsLabel t (FileChooser -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "gtk_file_chooser_add_choice" gtk_file_chooser_add_choice ::
Ptr FileChooser ->
CString ->
CString ->
Ptr CString ->
Ptr CString ->
IO ()
fileChooserAddChoice ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> T.Text
-> Maybe ([T.Text])
-> Maybe ([T.Text])
-> m ()
fileChooserAddChoice :: a -> Text -> Text -> Maybe [Text] -> Maybe [Text] -> m ()
fileChooserAddChoice a
chooser Text
id Text
label Maybe [Text]
options Maybe [Text]
optionLabels = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
id' <- Text -> IO CString
textToCString Text
id
CString
label' <- Text -> IO CString
textToCString Text
label
Ptr CString
maybeOptions <- case Maybe [Text]
options of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jOptions -> do
Ptr CString
jOptions' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOptions
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOptions'
Ptr CString
maybeOptionLabels <- case Maybe [Text]
optionLabels of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jOptionLabels -> do
Ptr CString
jOptionLabels' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jOptionLabels
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jOptionLabels'
Ptr FileChooser
-> CString -> CString -> Ptr CString -> Ptr CString -> IO ()
gtk_file_chooser_add_choice Ptr FileChooser
chooser' CString
id' CString
label' Ptr CString
maybeOptions Ptr CString
maybeOptionLabels
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOptions
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOptions
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOptionLabels
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeOptionLabels
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserAddChoiceMethodInfo
instance (signature ~ (T.Text -> T.Text -> Maybe ([T.Text]) -> Maybe ([T.Text]) -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddChoiceMethodInfo a signature where
overloadedMethod = fileChooserAddChoice
#endif
foreign import ccall "gtk_file_chooser_add_filter" gtk_file_chooser_add_filter ::
Ptr FileChooser ->
Ptr Gtk.FileFilter.FileFilter ->
IO ()
fileChooserAddFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) =>
a
-> b
-> m ()
fileChooserAddFilter :: a -> b -> m ()
fileChooserAddFilter a
chooser b
filter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr FileFilter
filter' <- b -> IO (Ptr FileFilter)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
filter
Ptr FileChooser -> Ptr FileFilter -> IO ()
gtk_file_chooser_add_filter Ptr FileChooser
chooser' Ptr FileFilter
filter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
filter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserAddFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserAddFilterMethodInfo a signature where
overloadedMethod = fileChooserAddFilter
#endif
foreign import ccall "gtk_file_chooser_add_shortcut_folder" gtk_file_chooser_add_shortcut_folder ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserAddShortcutFolder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> [Char]
-> m ()
fileChooserAddShortcutFolder :: a -> String -> m ()
fileChooserAddShortcutFolder a
chooser String
folder = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
folder' <- String -> IO CString
stringToCString String
folder
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_add_shortcut_folder Ptr FileChooser
chooser' CString
folder'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
folder'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
folder'
)
#if defined(ENABLE_OVERLOADING)
data FileChooserAddShortcutFolderMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderMethodInfo a signature where
overloadedMethod = fileChooserAddShortcutFolder
#endif
foreign import ccall "gtk_file_chooser_add_shortcut_folder_uri" gtk_file_chooser_add_shortcut_folder_uri ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserAddShortcutFolderUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> m ()
fileChooserAddShortcutFolderUri :: a -> Text -> m ()
fileChooserAddShortcutFolderUri a
chooser Text
uri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_add_shortcut_folder_uri Ptr FileChooser
chooser' CString
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data FileChooserAddShortcutFolderUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserAddShortcutFolderUriMethodInfo a signature where
overloadedMethod = fileChooserAddShortcutFolderUri
#endif
foreign import ccall "gtk_file_chooser_get_action" gtk_file_chooser_get_action ::
Ptr FileChooser ->
IO CUInt
fileChooserGetAction ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Gtk.Enums.FileChooserAction
fileChooserGetAction :: a -> m FileChooserAction
fileChooserGetAction a
chooser = IO FileChooserAction -> m FileChooserAction
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileChooserAction -> m FileChooserAction)
-> IO FileChooserAction -> m FileChooserAction
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CUInt
result <- Ptr FileChooser -> IO CUInt
gtk_file_chooser_get_action Ptr FileChooser
chooser'
let result' :: FileChooserAction
result' = (Int -> FileChooserAction
forall a. Enum a => Int -> a
toEnum (Int -> FileChooserAction)
-> (CUInt -> Int) -> CUInt -> FileChooserAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
FileChooserAction -> IO FileChooserAction
forall (m :: * -> *) a. Monad m => a -> m a
return FileChooserAction
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetActionMethodInfo
instance (signature ~ (m Gtk.Enums.FileChooserAction), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetActionMethodInfo a signature where
overloadedMethod = fileChooserGetAction
#endif
foreign import ccall "gtk_file_chooser_get_choice" gtk_file_chooser_get_choice ::
Ptr FileChooser ->
CString ->
IO CString
fileChooserGetChoice ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> m T.Text
fileChooserGetChoice :: a -> Text -> m Text
fileChooserGetChoice a
chooser Text
id = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
id' <- Text -> IO CString
textToCString Text
id
CString
result <- Ptr FileChooser -> CString -> IO CString
gtk_file_chooser_get_choice Ptr FileChooser
chooser' CString
id'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileChooserGetChoice" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetChoiceMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetChoiceMethodInfo a signature where
overloadedMethod = fileChooserGetChoice
#endif
foreign import ccall "gtk_file_chooser_get_create_folders" gtk_file_chooser_get_create_folders ::
Ptr FileChooser ->
IO CInt
fileChooserGetCreateFolders ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetCreateFolders :: a -> m Bool
fileChooserGetCreateFolders a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_create_folders Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetCreateFoldersMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCreateFoldersMethodInfo a signature where
overloadedMethod = fileChooserGetCreateFolders
#endif
foreign import ccall "gtk_file_chooser_get_current_folder" gtk_file_chooser_get_current_folder ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentFolder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe [Char])
fileChooserGetCurrentFolder :: a -> m (Maybe String)
fileChooserGetCurrentFolder a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder Ptr FileChooser
chooser'
Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderMethodInfo a signature where
overloadedMethod = fileChooserGetCurrentFolder
#endif
foreign import ccall "gtk_file_chooser_get_current_folder_file" gtk_file_chooser_get_current_folder_file ::
Ptr FileChooser ->
IO (Ptr Gio.File.File)
fileChooserGetCurrentFolderFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Gio.File.File
fileChooserGetCurrentFolderFile :: a -> m File
fileChooserGetCurrentFolderFile a
chooser = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_current_folder_file Ptr FileChooser
chooser'
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileChooserGetCurrentFolderFile" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderFileMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderFileMethodInfo a signature where
overloadedMethod = fileChooserGetCurrentFolderFile
#endif
foreign import ccall "gtk_file_chooser_get_current_folder_uri" gtk_file_chooser_get_current_folder_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentFolderUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe T.Text)
fileChooserGetCurrentFolderUri :: a -> m (Maybe Text)
fileChooserGetCurrentFolderUri a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_folder_uri Ptr FileChooser
chooser'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentFolderUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentFolderUriMethodInfo a signature where
overloadedMethod = fileChooserGetCurrentFolderUri
#endif
foreign import ccall "gtk_file_chooser_get_current_name" gtk_file_chooser_get_current_name ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m T.Text
fileChooserGetCurrentName :: a -> m Text
fileChooserGetCurrentName a
chooser = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_current_name Ptr FileChooser
chooser'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileChooserGetCurrentName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetCurrentNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetCurrentNameMethodInfo a signature where
overloadedMethod = fileChooserGetCurrentName
#endif
foreign import ccall "gtk_file_chooser_get_do_overwrite_confirmation" gtk_file_chooser_get_do_overwrite_confirmation ::
Ptr FileChooser ->
IO CInt
fileChooserGetDoOverwriteConfirmation ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetDoOverwriteConfirmation :: a -> m Bool
fileChooserGetDoOverwriteConfirmation a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_do_overwrite_confirmation Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetDoOverwriteConfirmationMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetDoOverwriteConfirmationMethodInfo a signature where
overloadedMethod = fileChooserGetDoOverwriteConfirmation
#endif
foreign import ccall "gtk_file_chooser_get_extra_widget" ::
Ptr FileChooser ->
IO (Ptr Gtk.Widget.Widget)
fileChooserGetExtraWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe Gtk.Widget.Widget)
a
chooser = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr Widget
result <- Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_extra_widget Ptr FileChooser
chooser'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetExtraWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetExtraWidgetMethodInfo a signature where
overloadedMethod = fileChooserGetExtraWidget
#endif
foreign import ccall "gtk_file_chooser_get_file" gtk_file_chooser_get_file ::
Ptr FileChooser ->
IO (Ptr Gio.File.File)
fileChooserGetFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Gio.File.File
fileChooserGetFile :: a -> m File
fileChooserGetFile a
chooser = IO File -> m File
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO File -> m File) -> IO File -> m File
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_file Ptr FileChooser
chooser'
Text -> Ptr File -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileChooserGetFile" Ptr File
result
File
result' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetFileMethodInfo
instance (signature ~ (m Gio.File.File), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFileMethodInfo a signature where
overloadedMethod = fileChooserGetFile
#endif
foreign import ccall "gtk_file_chooser_get_filename" gtk_file_chooser_get_filename ::
Ptr FileChooser ->
IO CString
fileChooserGetFilename ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe [Char])
fileChooserGetFilename :: a -> m (Maybe String)
fileChooserGetFilename a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_filename Ptr FileChooser
chooser'
Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilenameMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenameMethodInfo a signature where
overloadedMethod = fileChooserGetFilename
#endif
foreign import ccall "gtk_file_chooser_get_filenames" gtk_file_chooser_get_filenames ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserGetFilenames ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [[Char]]
fileChooserGetFilenames :: a -> m [String]
fileChooserGetFilenames a
chooser = IO [String] -> m [String]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [String] -> m [String]) -> IO [String] -> m [String]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_get_filenames Ptr FileChooser
chooser'
[CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
[String]
result'' <- (CString -> IO String) -> [CString] -> IO [String]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO String
CString -> IO String
cstringToString [CString]
result'
(CString -> IO ()) -> Ptr (GSList CString) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO ()
mapGSList CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (GSList CString)
result
Ptr (GSList CString) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[String] -> IO [String]
forall (m :: * -> *) a. Monad m => a -> m a
return [String]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilenamesMethodInfo
instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilenamesMethodInfo a signature where
overloadedMethod = fileChooserGetFilenames
#endif
foreign import ccall "gtk_file_chooser_get_files" gtk_file_chooser_get_files ::
Ptr FileChooser ->
IO (Ptr (GSList (Ptr Gio.File.File)))
fileChooserGetFiles ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [Gio.File.File]
fileChooserGetFiles :: a -> m [File]
fileChooserGetFiles a
chooser = IO [File] -> m [File]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [File] -> m [File]) -> IO [File] -> m [File]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList (Ptr File))
result <- Ptr FileChooser -> IO (Ptr (GSList (Ptr File)))
gtk_file_chooser_get_files Ptr FileChooser
chooser'
[Ptr File]
result' <- Ptr (GSList (Ptr File)) -> IO [Ptr File]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr File))
result
[File]
result'' <- (Ptr File -> IO File) -> [Ptr File] -> IO [File]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) [Ptr File]
result'
Ptr (GSList (Ptr File)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr File))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[File] -> IO [File]
forall (m :: * -> *) a. Monad m => a -> m a
return [File]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilesMethodInfo
instance (signature ~ (m [Gio.File.File]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilesMethodInfo a signature where
overloadedMethod = fileChooserGetFiles
#endif
foreign import ccall "gtk_file_chooser_get_filter" gtk_file_chooser_get_filter ::
Ptr FileChooser ->
IO (Ptr Gtk.FileFilter.FileFilter)
fileChooserGetFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe Gtk.FileFilter.FileFilter)
fileChooserGetFilter :: a -> m (Maybe FileFilter)
fileChooserGetFilter a
chooser = IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FileFilter) -> m (Maybe FileFilter))
-> IO (Maybe FileFilter) -> m (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr FileFilter
result <- Ptr FileChooser -> IO (Ptr FileFilter)
gtk_file_chooser_get_filter Ptr FileChooser
chooser'
Maybe FileFilter
maybeResult <- Ptr FileFilter
-> (Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FileFilter
result ((Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter))
-> (Ptr FileFilter -> IO FileFilter) -> IO (Maybe FileFilter)
forall a b. (a -> b) -> a -> b
$ \Ptr FileFilter
result' -> do
FileFilter
result'' <- ((ManagedPtr FileFilter -> FileFilter)
-> Ptr FileFilter -> IO FileFilter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter) Ptr FileFilter
result'
FileFilter -> IO FileFilter
forall (m :: * -> *) a. Monad m => a -> m a
return FileFilter
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe FileFilter -> IO (Maybe FileFilter)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileFilter
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetFilterMethodInfo
instance (signature ~ (m (Maybe Gtk.FileFilter.FileFilter)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetFilterMethodInfo a signature where
overloadedMethod = fileChooserGetFilter
#endif
foreign import ccall "gtk_file_chooser_get_local_only" gtk_file_chooser_get_local_only ::
Ptr FileChooser ->
IO CInt
fileChooserGetLocalOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetLocalOnly :: a -> m Bool
fileChooserGetLocalOnly a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_local_only Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetLocalOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetLocalOnlyMethodInfo a signature where
overloadedMethod = fileChooserGetLocalOnly
#endif
foreign import ccall "gtk_file_chooser_get_preview_file" gtk_file_chooser_get_preview_file ::
Ptr FileChooser ->
IO (Ptr Gio.File.File)
fileChooserGetPreviewFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe Gio.File.File)
fileChooserGetPreviewFile :: a -> m (Maybe File)
fileChooserGetPreviewFile a
chooser = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr File
result <- Ptr FileChooser -> IO (Ptr File)
gtk_file_chooser_get_preview_file Ptr FileChooser
chooser'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewFileMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFileMethodInfo a signature where
overloadedMethod = fileChooserGetPreviewFile
#endif
foreign import ccall "gtk_file_chooser_get_preview_filename" gtk_file_chooser_get_preview_filename ::
Ptr FileChooser ->
IO CString
fileChooserGetPreviewFilename ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe [Char])
fileChooserGetPreviewFilename :: a -> m (Maybe String)
fileChooserGetPreviewFilename a
chooser = IO (Maybe String) -> m (Maybe String)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_filename Ptr FileChooser
chooser'
Maybe String
maybeResult <- CString -> (CString -> IO String) -> IO (Maybe String)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO String) -> IO (Maybe String))
-> (CString -> IO String) -> IO (Maybe String)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
String
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
String -> IO String
forall (m :: * -> *) a. Monad m => a -> m a
return String
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe String -> IO (Maybe String)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe String
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewFilenameMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewFilenameMethodInfo a signature where
overloadedMethod = fileChooserGetPreviewFilename
#endif
foreign import ccall "gtk_file_chooser_get_preview_uri" gtk_file_chooser_get_preview_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetPreviewUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe T.Text)
fileChooserGetPreviewUri :: a -> m (Maybe Text)
fileChooserGetPreviewUri a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_preview_uri Ptr FileChooser
chooser'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewUriMethodInfo a signature where
overloadedMethod = fileChooserGetPreviewUri
#endif
foreign import ccall "gtk_file_chooser_get_preview_widget" gtk_file_chooser_get_preview_widget ::
Ptr FileChooser ->
IO (Ptr Gtk.Widget.Widget)
fileChooserGetPreviewWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe Gtk.Widget.Widget)
fileChooserGetPreviewWidget :: a -> m (Maybe Widget)
fileChooserGetPreviewWidget a
chooser = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr Widget
result <- Ptr FileChooser -> IO (Ptr Widget)
gtk_file_chooser_get_preview_widget Ptr FileChooser
chooser'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetMethodInfo a signature where
overloadedMethod = fileChooserGetPreviewWidget
#endif
foreign import ccall "gtk_file_chooser_get_preview_widget_active" gtk_file_chooser_get_preview_widget_active ::
Ptr FileChooser ->
IO CInt
fileChooserGetPreviewWidgetActive ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetPreviewWidgetActive :: a -> m Bool
fileChooserGetPreviewWidgetActive a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_preview_widget_active Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetPreviewWidgetActiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetPreviewWidgetActiveMethodInfo a signature where
overloadedMethod = fileChooserGetPreviewWidgetActive
#endif
foreign import ccall "gtk_file_chooser_get_select_multiple" gtk_file_chooser_get_select_multiple ::
Ptr FileChooser ->
IO CInt
fileChooserGetSelectMultiple ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetSelectMultiple :: a -> m Bool
fileChooserGetSelectMultiple a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_select_multiple Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetSelectMultipleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetSelectMultipleMethodInfo a signature where
overloadedMethod = fileChooserGetSelectMultiple
#endif
foreign import ccall "gtk_file_chooser_get_show_hidden" gtk_file_chooser_get_show_hidden ::
Ptr FileChooser ->
IO CInt
fileChooserGetShowHidden ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetShowHidden :: a -> m Bool
fileChooserGetShowHidden a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_show_hidden Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetShowHiddenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetShowHiddenMethodInfo a signature where
overloadedMethod = fileChooserGetShowHidden
#endif
foreign import ccall "gtk_file_chooser_get_uri" gtk_file_chooser_get_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m (Maybe T.Text)
fileChooserGetUri :: a -> m (Maybe Text)
fileChooserGetUri a
chooser = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
result <- Ptr FileChooser -> IO CString
gtk_file_chooser_get_uri Ptr FileChooser
chooser'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileChooserGetUriMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUriMethodInfo a signature where
overloadedMethod = fileChooserGetUri
#endif
foreign import ccall "gtk_file_chooser_get_uris" gtk_file_chooser_get_uris ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserGetUris ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [T.Text]
fileChooserGetUris :: a -> m [Text]
fileChooserGetUris a
chooser = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_get_uris Ptr FileChooser
chooser'
[CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
(CString -> IO ()) -> Ptr (GSList CString) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO ()
mapGSList CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (GSList CString)
result
Ptr (GSList CString) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserGetUrisMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUrisMethodInfo a signature where
overloadedMethod = fileChooserGetUris
#endif
foreign import ccall "gtk_file_chooser_get_use_preview_label" gtk_file_chooser_get_use_preview_label ::
Ptr FileChooser ->
IO CInt
fileChooserGetUsePreviewLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m Bool
fileChooserGetUsePreviewLabel :: a -> m Bool
fileChooserGetUsePreviewLabel a
chooser = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CInt
result <- Ptr FileChooser -> IO CInt
gtk_file_chooser_get_use_preview_label Ptr FileChooser
chooser'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserGetUsePreviewLabelMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserGetUsePreviewLabelMethodInfo a signature where
overloadedMethod = fileChooserGetUsePreviewLabel
#endif
foreign import ccall "gtk_file_chooser_list_filters" gtk_file_chooser_list_filters ::
Ptr FileChooser ->
IO (Ptr (GSList (Ptr Gtk.FileFilter.FileFilter)))
fileChooserListFilters ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [Gtk.FileFilter.FileFilter]
fileChooserListFilters :: a -> m [FileFilter]
fileChooserListFilters a
chooser = IO [FileFilter] -> m [FileFilter]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [FileFilter] -> m [FileFilter])
-> IO [FileFilter] -> m [FileFilter]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList (Ptr FileFilter))
result <- Ptr FileChooser -> IO (Ptr (GSList (Ptr FileFilter)))
gtk_file_chooser_list_filters Ptr FileChooser
chooser'
[Ptr FileFilter]
result' <- Ptr (GSList (Ptr FileFilter)) -> IO [Ptr FileFilter]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr FileFilter))
result
[FileFilter]
result'' <- (Ptr FileFilter -> IO FileFilter)
-> [Ptr FileFilter] -> IO [FileFilter]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr FileFilter -> FileFilter)
-> Ptr FileFilter -> IO FileFilter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FileFilter -> FileFilter
Gtk.FileFilter.FileFilter) [Ptr FileFilter]
result'
Ptr (GSList (Ptr FileFilter)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr FileFilter))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[FileFilter] -> IO [FileFilter]
forall (m :: * -> *) a. Monad m => a -> m a
return [FileFilter]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserListFiltersMethodInfo
instance (signature ~ (m [Gtk.FileFilter.FileFilter]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListFiltersMethodInfo a signature where
overloadedMethod = fileChooserListFilters
#endif
foreign import ccall "gtk_file_chooser_list_shortcut_folder_uris" gtk_file_chooser_list_shortcut_folder_uris ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserListShortcutFolderUris ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [T.Text]
fileChooserListShortcutFolderUris :: a -> m [Text]
fileChooserListShortcutFolderUris a
chooser = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_list_shortcut_folder_uris Ptr FileChooser
chooser'
[CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
[Text]
result'' <- (CString -> IO Text) -> [CString] -> IO [Text]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [CString]
result'
(CString -> IO ()) -> Ptr (GSList CString) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO ()
mapGSList CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (GSList CString)
result
Ptr (GSList CString) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserListShortcutFolderUrisMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFolderUrisMethodInfo a signature where
overloadedMethod = fileChooserListShortcutFolderUris
#endif
foreign import ccall "gtk_file_chooser_list_shortcut_folders" gtk_file_chooser_list_shortcut_folders ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserListShortcutFolders ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m [[Char]]
fileChooserListShortcutFolders :: a -> m [String]
fileChooserListShortcutFolders a
chooser = IO [String] -> m [String]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [String] -> m [String]) -> IO [String] -> m [String]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr (GSList CString)
result <- Ptr FileChooser -> IO (Ptr (GSList CString))
gtk_file_chooser_list_shortcut_folders Ptr FileChooser
chooser'
[CString]
result' <- Ptr (GSList CString) -> IO [CString]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList CString)
result
[String]
result'' <- (CString -> IO String) -> [CString] -> IO [String]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM HasCallStack => CString -> IO String
CString -> IO String
cstringToString [CString]
result'
(CString -> IO ()) -> Ptr (GSList CString) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (GSList (Ptr a)) -> IO ()
mapGSList CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (GSList CString)
result
Ptr (GSList CString) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList CString)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
[String] -> IO [String]
forall (m :: * -> *) a. Monad m => a -> m a
return [String]
result''
#if defined(ENABLE_OVERLOADING)
data FileChooserListShortcutFoldersMethodInfo
instance (signature ~ (m [[Char]]), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserListShortcutFoldersMethodInfo a signature where
overloadedMethod = fileChooserListShortcutFolders
#endif
foreign import ccall "gtk_file_chooser_remove_choice" gtk_file_chooser_remove_choice ::
Ptr FileChooser ->
CString ->
IO ()
fileChooserRemoveChoice ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> m ()
fileChooserRemoveChoice :: a -> Text -> m ()
fileChooserRemoveChoice a
chooser Text
id = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
id' <- Text -> IO CString
textToCString Text
id
Ptr FileChooser -> CString -> IO ()
gtk_file_chooser_remove_choice Ptr FileChooser
chooser' CString
id'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveChoiceMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveChoiceMethodInfo a signature where
overloadedMethod = fileChooserRemoveChoice
#endif
foreign import ccall "gtk_file_chooser_remove_filter" gtk_file_chooser_remove_filter ::
Ptr FileChooser ->
Ptr Gtk.FileFilter.FileFilter ->
IO ()
fileChooserRemoveFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) =>
a
-> b
-> m ()
fileChooserRemoveFilter :: a -> b -> m ()
fileChooserRemoveFilter a
chooser b
filter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr FileFilter
filter' <- b -> IO (Ptr FileFilter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
filter
Ptr FileChooser -> Ptr FileFilter -> IO ()
gtk_file_chooser_remove_filter Ptr FileChooser
chooser' Ptr FileFilter
filter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
filter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveFilterMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gtk.FileFilter.IsFileFilter b) => O.MethodInfo FileChooserRemoveFilterMethodInfo a signature where
overloadedMethod = fileChooserRemoveFilter
#endif
foreign import ccall "gtk_file_chooser_remove_shortcut_folder" gtk_file_chooser_remove_shortcut_folder ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserRemoveShortcutFolder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> [Char]
-> m ()
fileChooserRemoveShortcutFolder :: a -> String -> m ()
fileChooserRemoveShortcutFolder a
chooser String
folder = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
folder' <- String -> IO CString
stringToCString String
folder
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_remove_shortcut_folder Ptr FileChooser
chooser' CString
folder'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
folder'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
folder'
)
#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveShortcutFolderMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveShortcutFolderMethodInfo a signature where
overloadedMethod = fileChooserRemoveShortcutFolder
#endif
foreign import ccall "gtk_file_chooser_remove_shortcut_folder_uri" gtk_file_chooser_remove_shortcut_folder_uri ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserRemoveShortcutFolderUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> m ()
fileChooserRemoveShortcutFolderUri :: a -> Text -> m ()
fileChooserRemoveShortcutFolderUri a
chooser Text
uri = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_remove_shortcut_folder_uri Ptr FileChooser
chooser' CString
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
#if defined(ENABLE_OVERLOADING)
data FileChooserRemoveShortcutFolderUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserRemoveShortcutFolderUriMethodInfo a signature where
overloadedMethod = fileChooserRemoveShortcutFolderUri
#endif
foreign import ccall "gtk_file_chooser_select_all" gtk_file_chooser_select_all ::
Ptr FileChooser ->
IO ()
fileChooserSelectAll ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> m ()
fileChooserSelectAll :: a -> m ()
fileChooserSelectAll a
chooser = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr FileChooser -> IO ()
gtk_file_chooser_select_all Ptr FileChooser
chooser'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserSelectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectAllMethodInfo a signature where
overloadedMethod = fileChooserSelectAll
#endif
foreign import ccall "gtk_file_chooser_select_file" gtk_file_chooser_select_file ::
Ptr FileChooser ->
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO CInt
fileChooserSelectFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) =>
a
-> b
-> m ()
fileChooserSelectFile :: a -> b -> m ()
fileChooserSelectFile a
chooser b
file = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> Ptr File -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_select_file Ptr FileChooser
chooser' Ptr File
file'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data FileChooserSelectFileMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserSelectFileMethodInfo a signature where
overloadedMethod = fileChooserSelectFile
#endif
foreign import ccall "gtk_file_chooser_select_filename" gtk_file_chooser_select_filename ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSelectFilename ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> [Char]
-> m Bool
fileChooserSelectFilename :: a -> String -> m Bool
fileChooserSelectFilename a
chooser String
filename = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
filename' <- String -> IO CString
stringToCString String
filename
CInt
result <- Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_select_filename Ptr FileChooser
chooser' CString
filename'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserSelectFilenameMethodInfo
instance (signature ~ ([Char] -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectFilenameMethodInfo a signature where
overloadedMethod = fileChooserSelectFilename
#endif
foreign import ccall "gtk_file_chooser_select_uri" gtk_file_chooser_select_uri ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSelectUri ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> m Bool
fileChooserSelectUri :: a -> Text -> m Bool
fileChooserSelectUri a
chooser Text
uri = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
uri' <- Text -> IO CString
textToCString Text
uri
CInt
result <- Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_select_uri Ptr FileChooser
chooser' CString
uri'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserSelectUriMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSelectUriMethodInfo a signature where
overloadedMethod = fileChooserSelectUri
#endif
foreign import ccall "gtk_file_chooser_set_action" gtk_file_chooser_set_action ::
Ptr FileChooser ->
CUInt ->
IO ()
fileChooserSetAction ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> Gtk.Enums.FileChooserAction
-> m ()
fileChooserSetAction :: a -> FileChooserAction -> m ()
fileChooserSetAction a
chooser FileChooserAction
action = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
let action' :: CUInt
action' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FileChooserAction -> Int) -> FileChooserAction -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileChooserAction -> Int
forall a. Enum a => a -> Int
fromEnum) FileChooserAction
action
Ptr FileChooser -> CUInt -> IO ()
gtk_file_chooser_set_action Ptr FileChooser
chooser' CUInt
action'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserSetActionMethodInfo
instance (signature ~ (Gtk.Enums.FileChooserAction -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetActionMethodInfo a signature where
overloadedMethod = fileChooserSetAction
#endif
foreign import ccall "gtk_file_chooser_set_choice" gtk_file_chooser_set_choice ::
Ptr FileChooser ->
CString ->
CString ->
IO ()
fileChooserSetChoice ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> T.Text
-> T.Text
-> m ()
fileChooserSetChoice :: a -> Text -> Text -> m ()
fileChooserSetChoice a
chooser Text
id Text
option = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
id' <- Text -> IO CString
textToCString Text
id
CString
option' <- Text -> IO CString
textToCString Text
option
Ptr FileChooser -> CString -> CString -> IO ()
gtk_file_chooser_set_choice Ptr FileChooser
chooser' CString
id' CString
option'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
option'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserSetChoiceMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetChoiceMethodInfo a signature where
overloadedMethod = fileChooserSetChoice
#endif
foreign import ccall "gtk_file_chooser_set_create_folders" gtk_file_chooser_set_create_folders ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetCreateFolders ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> Bool
-> m ()
fileChooserSetCreateFolders :: a -> Bool -> m ()
fileChooserSetCreateFolders a
chooser Bool
createFolders = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
let createFolders' :: CInt
createFolders' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
createFolders
Ptr FileChooser -> CInt -> IO ()
gtk_file_chooser_set_create_folders Ptr FileChooser
chooser' CInt
createFolders'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileChooserSetCreateFoldersMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCreateFoldersMethodInfo a signature where
overloadedMethod = fileChooserSetCreateFolders
#endif
foreign import ccall "gtk_file_chooser_set_current_folder" gtk_file_chooser_set_current_folder ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSetCurrentFolder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a) =>
a
-> [Char]
-> m Bool
fileChooserSetCurrentFolder :: a -> String -> m Bool
fileChooserSetCurrentFolder a
chooser String
filename = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
CString
filename' <- String -> IO CString
stringToCString String
filename
CInt
result <- Ptr FileChooser -> CString -> IO CInt
gtk_file_chooser_set_current_folder Ptr FileChooser
chooser' CString
filename'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileChooserSetCurrentFolderMethodInfo
instance (signature ~ ([Char] -> m Bool), MonadIO m, IsFileChooser a) => O.MethodInfo FileChooserSetCurrentFolderMethodInfo a signature where
overloadedMethod = fileChooserSetCurrentFolder
#endif
foreign import ccall "gtk_file_chooser_set_current_folder_file" gtk_file_chooser_set_current_folder_file ::
Ptr FileChooser ->
Ptr Gio.File.File ->
Ptr (Ptr GError) ->
IO CInt
fileChooserSetCurrentFolderFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooser a, Gio.File.IsFile b) =>
a
-> b
-> m ()
fileChooserSetCurrentFolderFile :: a -> b -> m ()
fileChooserSetCurrentFolderFile a
chooser b
file = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileChooser
chooser' <- a -> IO (Ptr FileChooser)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
chooser
Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileChooser -> Ptr File -> Ptr (Ptr GError) -> IO CInt
gtk_file_chooser_set_current_folder_file Ptr FileChooser
chooser' Ptr File
file'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
chooser
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data FileChooserSetCurrentFolderFileMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileChooser a, Gio.File.IsFile b) => O.MethodInfo FileChooserSetCurrentFolderFileMethodInfo a signature where
overloadedMethod = fileChooserSetCurrentFolderFile
#endif