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