module GI.Gtk.Interfaces.FileChooser
(
FileChooser(..) ,
noFileChooser ,
FileChooserK ,
toFileChooser ,
fileChooserAddFilter ,
fileChooserAddShortcutFolder ,
fileChooserAddShortcutFolderUri ,
fileChooserGetAction ,
fileChooserGetCreateFolders ,
fileChooserGetCurrentFolder ,
fileChooserGetCurrentFolderFile ,
fileChooserGetCurrentFolderUri ,
fileChooserGetCurrentName ,
fileChooserGetDoOverwriteConfirmation ,
fileChooserGetExtraWidget ,
fileChooserGetFile ,
fileChooserGetFilename ,
fileChooserGetFilenames ,
fileChooserGetFiles ,
fileChooserGetFilter ,
fileChooserGetLocalOnly ,
fileChooserGetPreviewFile ,
fileChooserGetPreviewFilename ,
fileChooserGetPreviewUri ,
fileChooserGetPreviewWidget ,
fileChooserGetPreviewWidgetActive ,
fileChooserGetSelectMultiple ,
fileChooserGetShowHidden ,
fileChooserGetUri ,
fileChooserGetUris ,
fileChooserGetUsePreviewLabel ,
fileChooserListFilters ,
fileChooserListShortcutFolderUris ,
fileChooserListShortcutFolders ,
fileChooserRemoveFilter ,
fileChooserRemoveShortcutFolder ,
fileChooserRemoveShortcutFolderUri ,
fileChooserSelectAll ,
fileChooserSelectFile ,
fileChooserSelectFilename ,
fileChooserSelectUri ,
fileChooserSetAction ,
fileChooserSetCreateFolders ,
fileChooserSetCurrentFolder ,
fileChooserSetCurrentFolderFile ,
fileChooserSetCurrentFolderUri ,
fileChooserSetCurrentName ,
fileChooserSetDoOverwriteConfirmation ,
fileChooserSetExtraWidget ,
fileChooserSetFile ,
fileChooserSetFilename ,
fileChooserSetFilter ,
fileChooserSetLocalOnly ,
fileChooserSetPreviewWidget ,
fileChooserSetPreviewWidgetActive ,
fileChooserSetSelectMultiple ,
fileChooserSetShowHidden ,
fileChooserSetUri ,
fileChooserSetUsePreviewLabel ,
fileChooserUnselectAll ,
fileChooserUnselectFile ,
fileChooserUnselectFilename ,
fileChooserUnselectUri ,
FileChooserActionPropertyInfo ,
constructFileChooserAction ,
getFileChooserAction ,
setFileChooserAction ,
FileChooserCreateFoldersPropertyInfo ,
constructFileChooserCreateFolders ,
getFileChooserCreateFolders ,
setFileChooserCreateFolders ,
FileChooserDoOverwriteConfirmationPropertyInfo,
constructFileChooserDoOverwriteConfirmation,
getFileChooserDoOverwriteConfirmation ,
setFileChooserDoOverwriteConfirmation ,
FileChooserExtraWidgetPropertyInfo ,
constructFileChooserExtraWidget ,
getFileChooserExtraWidget ,
setFileChooserExtraWidget ,
FileChooserFilterPropertyInfo ,
constructFileChooserFilter ,
getFileChooserFilter ,
setFileChooserFilter ,
FileChooserLocalOnlyPropertyInfo ,
constructFileChooserLocalOnly ,
getFileChooserLocalOnly ,
setFileChooserLocalOnly ,
FileChooserPreviewWidgetPropertyInfo ,
constructFileChooserPreviewWidget ,
getFileChooserPreviewWidget ,
setFileChooserPreviewWidget ,
FileChooserPreviewWidgetActivePropertyInfo,
constructFileChooserPreviewWidgetActive ,
getFileChooserPreviewWidgetActive ,
setFileChooserPreviewWidgetActive ,
FileChooserSelectMultiplePropertyInfo ,
constructFileChooserSelectMultiple ,
getFileChooserSelectMultiple ,
setFileChooserSelectMultiple ,
FileChooserShowHiddenPropertyInfo ,
constructFileChooserShowHidden ,
getFileChooserShowHidden ,
setFileChooserShowHidden ,
FileChooserUsePreviewLabelPropertyInfo ,
constructFileChooserUsePreviewLabel ,
getFileChooserUsePreviewLabel ,
setFileChooserUsePreviewLabel ,
FileChooserConfirmOverwriteCallback ,
FileChooserConfirmOverwriteCallbackC ,
FileChooserConfirmOverwriteSignalInfo ,
afterFileChooserConfirmOverwrite ,
fileChooserConfirmOverwriteCallbackWrapper,
fileChooserConfirmOverwriteClosure ,
mkFileChooserConfirmOverwriteCallback ,
noFileChooserConfirmOverwriteCallback ,
onFileChooserConfirmOverwrite ,
FileChooserCurrentFolderChangedCallback ,
FileChooserCurrentFolderChangedCallbackC,
FileChooserCurrentFolderChangedSignalInfo,
afterFileChooserCurrentFolderChanged ,
fileChooserCurrentFolderChangedCallbackWrapper,
fileChooserCurrentFolderChangedClosure ,
mkFileChooserCurrentFolderChangedCallback,
noFileChooserCurrentFolderChangedCallback,
onFileChooserCurrentFolderChanged ,
FileChooserFileActivatedCallback ,
FileChooserFileActivatedCallbackC ,
FileChooserFileActivatedSignalInfo ,
afterFileChooserFileActivated ,
fileChooserFileActivatedCallbackWrapper ,
fileChooserFileActivatedClosure ,
mkFileChooserFileActivatedCallback ,
noFileChooserFileActivatedCallback ,
onFileChooserFileActivated ,
FileChooserSelectionChangedCallback ,
FileChooserSelectionChangedCallbackC ,
FileChooserSelectionChangedSignalInfo ,
afterFileChooserSelectionChanged ,
fileChooserSelectionChangedCallbackWrapper,
fileChooserSelectionChangedClosure ,
mkFileChooserSelectionChangedCallback ,
noFileChooserSelectionChangedCallback ,
onFileChooserSelectionChanged ,
FileChooserUpdatePreviewCallback ,
FileChooserUpdatePreviewCallbackC ,
FileChooserUpdatePreviewSignalInfo ,
afterFileChooserUpdatePreview ,
fileChooserUpdatePreviewCallbackWrapper ,
fileChooserUpdatePreviewClosure ,
mkFileChooserUpdatePreviewCallback ,
noFileChooserUpdatePreviewCallback ,
onFileChooserUpdatePreview ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.GObject as GObject
import qualified GI.Gio as Gio
newtype FileChooser = FileChooser (ForeignPtr FileChooser)
noFileChooser :: Maybe FileChooser
noFileChooser = Nothing
type FileChooserConfirmOverwriteCallback =
IO FileChooserConfirmation
noFileChooserConfirmOverwriteCallback :: Maybe FileChooserConfirmOverwriteCallback
noFileChooserConfirmOverwriteCallback = Nothing
type FileChooserConfirmOverwriteCallbackC =
Ptr () ->
Ptr () ->
IO CUInt
foreign import ccall "wrapper"
mkFileChooserConfirmOverwriteCallback :: FileChooserConfirmOverwriteCallbackC -> IO (FunPtr FileChooserConfirmOverwriteCallbackC)
fileChooserConfirmOverwriteClosure :: FileChooserConfirmOverwriteCallback -> IO Closure
fileChooserConfirmOverwriteClosure cb = newCClosure =<< mkFileChooserConfirmOverwriteCallback wrapped
where wrapped = fileChooserConfirmOverwriteCallbackWrapper cb
fileChooserConfirmOverwriteCallbackWrapper ::
FileChooserConfirmOverwriteCallback ->
Ptr () ->
Ptr () ->
IO CUInt
fileChooserConfirmOverwriteCallbackWrapper _cb _ _ = do
result <- _cb
let result' = (fromIntegral . fromEnum) result
return result'
onFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
onFileChooserConfirmOverwrite obj cb = liftIO $ connectFileChooserConfirmOverwrite obj cb SignalConnectBefore
afterFileChooserConfirmOverwrite :: (GObject a, MonadIO m) => a -> FileChooserConfirmOverwriteCallback -> m SignalHandlerId
afterFileChooserConfirmOverwrite obj cb = connectFileChooserConfirmOverwrite obj cb SignalConnectAfter
connectFileChooserConfirmOverwrite :: (GObject a, MonadIO m) =>
a -> FileChooserConfirmOverwriteCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserConfirmOverwrite obj cb after = liftIO $ do
cb' <- mkFileChooserConfirmOverwriteCallback (fileChooserConfirmOverwriteCallbackWrapper cb)
connectSignalFunPtr obj "confirm-overwrite" cb' after
type FileChooserCurrentFolderChangedCallback =
IO ()
noFileChooserCurrentFolderChangedCallback :: Maybe FileChooserCurrentFolderChangedCallback
noFileChooserCurrentFolderChangedCallback = Nothing
type FileChooserCurrentFolderChangedCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkFileChooserCurrentFolderChangedCallback :: FileChooserCurrentFolderChangedCallbackC -> IO (FunPtr FileChooserCurrentFolderChangedCallbackC)
fileChooserCurrentFolderChangedClosure :: FileChooserCurrentFolderChangedCallback -> IO Closure
fileChooserCurrentFolderChangedClosure cb = newCClosure =<< mkFileChooserCurrentFolderChangedCallback wrapped
where wrapped = fileChooserCurrentFolderChangedCallbackWrapper cb
fileChooserCurrentFolderChangedCallbackWrapper ::
FileChooserCurrentFolderChangedCallback ->
Ptr () ->
Ptr () ->
IO ()
fileChooserCurrentFolderChangedCallbackWrapper _cb _ _ = do
_cb
onFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
onFileChooserCurrentFolderChanged obj cb = liftIO $ connectFileChooserCurrentFolderChanged obj cb SignalConnectBefore
afterFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) => a -> FileChooserCurrentFolderChangedCallback -> m SignalHandlerId
afterFileChooserCurrentFolderChanged obj cb = connectFileChooserCurrentFolderChanged obj cb SignalConnectAfter
connectFileChooserCurrentFolderChanged :: (GObject a, MonadIO m) =>
a -> FileChooserCurrentFolderChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserCurrentFolderChanged obj cb after = liftIO $ do
cb' <- mkFileChooserCurrentFolderChangedCallback (fileChooserCurrentFolderChangedCallbackWrapper cb)
connectSignalFunPtr obj "current-folder-changed" cb' after
type FileChooserFileActivatedCallback =
IO ()
noFileChooserFileActivatedCallback :: Maybe FileChooserFileActivatedCallback
noFileChooserFileActivatedCallback = Nothing
type FileChooserFileActivatedCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkFileChooserFileActivatedCallback :: FileChooserFileActivatedCallbackC -> IO (FunPtr FileChooserFileActivatedCallbackC)
fileChooserFileActivatedClosure :: FileChooserFileActivatedCallback -> IO Closure
fileChooserFileActivatedClosure cb = newCClosure =<< mkFileChooserFileActivatedCallback wrapped
where wrapped = fileChooserFileActivatedCallbackWrapper cb
fileChooserFileActivatedCallbackWrapper ::
FileChooserFileActivatedCallback ->
Ptr () ->
Ptr () ->
IO ()
fileChooserFileActivatedCallbackWrapper _cb _ _ = do
_cb
onFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
onFileChooserFileActivated obj cb = liftIO $ connectFileChooserFileActivated obj cb SignalConnectBefore
afterFileChooserFileActivated :: (GObject a, MonadIO m) => a -> FileChooserFileActivatedCallback -> m SignalHandlerId
afterFileChooserFileActivated obj cb = connectFileChooserFileActivated obj cb SignalConnectAfter
connectFileChooserFileActivated :: (GObject a, MonadIO m) =>
a -> FileChooserFileActivatedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserFileActivated obj cb after = liftIO $ do
cb' <- mkFileChooserFileActivatedCallback (fileChooserFileActivatedCallbackWrapper cb)
connectSignalFunPtr obj "file-activated" cb' after
type FileChooserSelectionChangedCallback =
IO ()
noFileChooserSelectionChangedCallback :: Maybe FileChooserSelectionChangedCallback
noFileChooserSelectionChangedCallback = Nothing
type FileChooserSelectionChangedCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkFileChooserSelectionChangedCallback :: FileChooserSelectionChangedCallbackC -> IO (FunPtr FileChooserSelectionChangedCallbackC)
fileChooserSelectionChangedClosure :: FileChooserSelectionChangedCallback -> IO Closure
fileChooserSelectionChangedClosure cb = newCClosure =<< mkFileChooserSelectionChangedCallback wrapped
where wrapped = fileChooserSelectionChangedCallbackWrapper cb
fileChooserSelectionChangedCallbackWrapper ::
FileChooserSelectionChangedCallback ->
Ptr () ->
Ptr () ->
IO ()
fileChooserSelectionChangedCallbackWrapper _cb _ _ = do
_cb
onFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
onFileChooserSelectionChanged obj cb = liftIO $ connectFileChooserSelectionChanged obj cb SignalConnectBefore
afterFileChooserSelectionChanged :: (GObject a, MonadIO m) => a -> FileChooserSelectionChangedCallback -> m SignalHandlerId
afterFileChooserSelectionChanged obj cb = connectFileChooserSelectionChanged obj cb SignalConnectAfter
connectFileChooserSelectionChanged :: (GObject a, MonadIO m) =>
a -> FileChooserSelectionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserSelectionChanged obj cb after = liftIO $ do
cb' <- mkFileChooserSelectionChangedCallback (fileChooserSelectionChangedCallbackWrapper cb)
connectSignalFunPtr obj "selection-changed" cb' after
type FileChooserUpdatePreviewCallback =
IO ()
noFileChooserUpdatePreviewCallback :: Maybe FileChooserUpdatePreviewCallback
noFileChooserUpdatePreviewCallback = Nothing
type FileChooserUpdatePreviewCallbackC =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mkFileChooserUpdatePreviewCallback :: FileChooserUpdatePreviewCallbackC -> IO (FunPtr FileChooserUpdatePreviewCallbackC)
fileChooserUpdatePreviewClosure :: FileChooserUpdatePreviewCallback -> IO Closure
fileChooserUpdatePreviewClosure cb = newCClosure =<< mkFileChooserUpdatePreviewCallback wrapped
where wrapped = fileChooserUpdatePreviewCallbackWrapper cb
fileChooserUpdatePreviewCallbackWrapper ::
FileChooserUpdatePreviewCallback ->
Ptr () ->
Ptr () ->
IO ()
fileChooserUpdatePreviewCallbackWrapper _cb _ _ = do
_cb
onFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
onFileChooserUpdatePreview obj cb = liftIO $ connectFileChooserUpdatePreview obj cb SignalConnectBefore
afterFileChooserUpdatePreview :: (GObject a, MonadIO m) => a -> FileChooserUpdatePreviewCallback -> m SignalHandlerId
afterFileChooserUpdatePreview obj cb = connectFileChooserUpdatePreview obj cb SignalConnectAfter
connectFileChooserUpdatePreview :: (GObject a, MonadIO m) =>
a -> FileChooserUpdatePreviewCallback -> SignalConnectMode -> m SignalHandlerId
connectFileChooserUpdatePreview obj cb after = liftIO $ do
cb' <- mkFileChooserUpdatePreviewCallback (fileChooserUpdatePreviewCallbackWrapper cb)
connectSignalFunPtr obj "update-preview" cb' after
getFileChooserAction :: (MonadIO m, FileChooserK o) => o -> m FileChooserAction
getFileChooserAction obj = liftIO $ getObjectPropertyEnum obj "action"
setFileChooserAction :: (MonadIO m, FileChooserK o) => o -> FileChooserAction -> m ()
setFileChooserAction obj val = liftIO $ setObjectPropertyEnum obj "action" val
constructFileChooserAction :: FileChooserAction -> IO ([Char], GValue)
constructFileChooserAction val = constructObjectPropertyEnum "action" val
data FileChooserActionPropertyInfo
instance AttrInfo FileChooserActionPropertyInfo where
type AttrAllowedOps FileChooserActionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserActionPropertyInfo = (~) FileChooserAction
type AttrBaseTypeConstraint FileChooserActionPropertyInfo = FileChooserK
type AttrGetType FileChooserActionPropertyInfo = FileChooserAction
type AttrLabel FileChooserActionPropertyInfo = "FileChooser::action"
attrGet _ = getFileChooserAction
attrSet _ = setFileChooserAction
attrConstruct _ = constructFileChooserAction
getFileChooserCreateFolders :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserCreateFolders obj = liftIO $ getObjectPropertyBool obj "create-folders"
setFileChooserCreateFolders :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserCreateFolders obj val = liftIO $ setObjectPropertyBool obj "create-folders" val
constructFileChooserCreateFolders :: Bool -> IO ([Char], GValue)
constructFileChooserCreateFolders val = constructObjectPropertyBool "create-folders" val
data FileChooserCreateFoldersPropertyInfo
instance AttrInfo FileChooserCreateFoldersPropertyInfo where
type AttrAllowedOps FileChooserCreateFoldersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserCreateFoldersPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserCreateFoldersPropertyInfo = FileChooserK
type AttrGetType FileChooserCreateFoldersPropertyInfo = Bool
type AttrLabel FileChooserCreateFoldersPropertyInfo = "FileChooser::create-folders"
attrGet _ = getFileChooserCreateFolders
attrSet _ = setFileChooserCreateFolders
attrConstruct _ = constructFileChooserCreateFolders
getFileChooserDoOverwriteConfirmation :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserDoOverwriteConfirmation obj = liftIO $ getObjectPropertyBool obj "do-overwrite-confirmation"
setFileChooserDoOverwriteConfirmation :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserDoOverwriteConfirmation obj val = liftIO $ setObjectPropertyBool obj "do-overwrite-confirmation" val
constructFileChooserDoOverwriteConfirmation :: Bool -> IO ([Char], GValue)
constructFileChooserDoOverwriteConfirmation val = constructObjectPropertyBool "do-overwrite-confirmation" val
data FileChooserDoOverwriteConfirmationPropertyInfo
instance AttrInfo FileChooserDoOverwriteConfirmationPropertyInfo where
type AttrAllowedOps FileChooserDoOverwriteConfirmationPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserDoOverwriteConfirmationPropertyInfo = FileChooserK
type AttrGetType FileChooserDoOverwriteConfirmationPropertyInfo = Bool
type AttrLabel FileChooserDoOverwriteConfirmationPropertyInfo = "FileChooser::do-overwrite-confirmation"
attrGet _ = getFileChooserDoOverwriteConfirmation
attrSet _ = setFileChooserDoOverwriteConfirmation
attrConstruct _ = constructFileChooserDoOverwriteConfirmation
getFileChooserExtraWidget :: (MonadIO m, FileChooserK o) => o -> m Widget
getFileChooserExtraWidget obj = liftIO $ getObjectPropertyObject obj "extra-widget" Widget
setFileChooserExtraWidget :: (MonadIO m, FileChooserK o, WidgetK a) => o -> a -> m ()
setFileChooserExtraWidget obj val = liftIO $ setObjectPropertyObject obj "extra-widget" val
constructFileChooserExtraWidget :: (WidgetK a) => a -> IO ([Char], GValue)
constructFileChooserExtraWidget val = constructObjectPropertyObject "extra-widget" val
data FileChooserExtraWidgetPropertyInfo
instance AttrInfo FileChooserExtraWidgetPropertyInfo where
type AttrAllowedOps FileChooserExtraWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserExtraWidgetPropertyInfo = WidgetK
type AttrBaseTypeConstraint FileChooserExtraWidgetPropertyInfo = FileChooserK
type AttrGetType FileChooserExtraWidgetPropertyInfo = Widget
type AttrLabel FileChooserExtraWidgetPropertyInfo = "FileChooser::extra-widget"
attrGet _ = getFileChooserExtraWidget
attrSet _ = setFileChooserExtraWidget
attrConstruct _ = constructFileChooserExtraWidget
getFileChooserFilter :: (MonadIO m, FileChooserK o) => o -> m FileFilter
getFileChooserFilter obj = liftIO $ getObjectPropertyObject obj "filter" FileFilter
setFileChooserFilter :: (MonadIO m, FileChooserK o, FileFilterK a) => o -> a -> m ()
setFileChooserFilter obj val = liftIO $ setObjectPropertyObject obj "filter" val
constructFileChooserFilter :: (FileFilterK a) => a -> IO ([Char], GValue)
constructFileChooserFilter val = constructObjectPropertyObject "filter" val
data FileChooserFilterPropertyInfo
instance AttrInfo FileChooserFilterPropertyInfo where
type AttrAllowedOps FileChooserFilterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserFilterPropertyInfo = FileFilterK
type AttrBaseTypeConstraint FileChooserFilterPropertyInfo = FileChooserK
type AttrGetType FileChooserFilterPropertyInfo = FileFilter
type AttrLabel FileChooserFilterPropertyInfo = "FileChooser::filter"
attrGet _ = getFileChooserFilter
attrSet _ = setFileChooserFilter
attrConstruct _ = constructFileChooserFilter
getFileChooserLocalOnly :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserLocalOnly obj = liftIO $ getObjectPropertyBool obj "local-only"
setFileChooserLocalOnly :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserLocalOnly obj val = liftIO $ setObjectPropertyBool obj "local-only" val
constructFileChooserLocalOnly :: Bool -> IO ([Char], GValue)
constructFileChooserLocalOnly val = constructObjectPropertyBool "local-only" val
data FileChooserLocalOnlyPropertyInfo
instance AttrInfo FileChooserLocalOnlyPropertyInfo where
type AttrAllowedOps FileChooserLocalOnlyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserLocalOnlyPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserLocalOnlyPropertyInfo = FileChooserK
type AttrGetType FileChooserLocalOnlyPropertyInfo = Bool
type AttrLabel FileChooserLocalOnlyPropertyInfo = "FileChooser::local-only"
attrGet _ = getFileChooserLocalOnly
attrSet _ = setFileChooserLocalOnly
attrConstruct _ = constructFileChooserLocalOnly
getFileChooserPreviewWidget :: (MonadIO m, FileChooserK o) => o -> m Widget
getFileChooserPreviewWidget obj = liftIO $ getObjectPropertyObject obj "preview-widget" Widget
setFileChooserPreviewWidget :: (MonadIO m, FileChooserK o, WidgetK a) => o -> a -> m ()
setFileChooserPreviewWidget obj val = liftIO $ setObjectPropertyObject obj "preview-widget" val
constructFileChooserPreviewWidget :: (WidgetK a) => a -> IO ([Char], GValue)
constructFileChooserPreviewWidget val = constructObjectPropertyObject "preview-widget" val
data FileChooserPreviewWidgetPropertyInfo
instance AttrInfo FileChooserPreviewWidgetPropertyInfo where
type AttrAllowedOps FileChooserPreviewWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserPreviewWidgetPropertyInfo = WidgetK
type AttrBaseTypeConstraint FileChooserPreviewWidgetPropertyInfo = FileChooserK
type AttrGetType FileChooserPreviewWidgetPropertyInfo = Widget
type AttrLabel FileChooserPreviewWidgetPropertyInfo = "FileChooser::preview-widget"
attrGet _ = getFileChooserPreviewWidget
attrSet _ = setFileChooserPreviewWidget
attrConstruct _ = constructFileChooserPreviewWidget
getFileChooserPreviewWidgetActive :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserPreviewWidgetActive obj = liftIO $ getObjectPropertyBool obj "preview-widget-active"
setFileChooserPreviewWidgetActive :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserPreviewWidgetActive obj val = liftIO $ setObjectPropertyBool obj "preview-widget-active" val
constructFileChooserPreviewWidgetActive :: Bool -> IO ([Char], GValue)
constructFileChooserPreviewWidgetActive val = constructObjectPropertyBool "preview-widget-active" val
data FileChooserPreviewWidgetActivePropertyInfo
instance AttrInfo FileChooserPreviewWidgetActivePropertyInfo where
type AttrAllowedOps FileChooserPreviewWidgetActivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserPreviewWidgetActivePropertyInfo = FileChooserK
type AttrGetType FileChooserPreviewWidgetActivePropertyInfo = Bool
type AttrLabel FileChooserPreviewWidgetActivePropertyInfo = "FileChooser::preview-widget-active"
attrGet _ = getFileChooserPreviewWidgetActive
attrSet _ = setFileChooserPreviewWidgetActive
attrConstruct _ = constructFileChooserPreviewWidgetActive
getFileChooserSelectMultiple :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserSelectMultiple obj = liftIO $ getObjectPropertyBool obj "select-multiple"
setFileChooserSelectMultiple :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserSelectMultiple obj val = liftIO $ setObjectPropertyBool obj "select-multiple" val
constructFileChooserSelectMultiple :: Bool -> IO ([Char], GValue)
constructFileChooserSelectMultiple val = constructObjectPropertyBool "select-multiple" val
data FileChooserSelectMultiplePropertyInfo
instance AttrInfo FileChooserSelectMultiplePropertyInfo where
type AttrAllowedOps FileChooserSelectMultiplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserSelectMultiplePropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserSelectMultiplePropertyInfo = FileChooserK
type AttrGetType FileChooserSelectMultiplePropertyInfo = Bool
type AttrLabel FileChooserSelectMultiplePropertyInfo = "FileChooser::select-multiple"
attrGet _ = getFileChooserSelectMultiple
attrSet _ = setFileChooserSelectMultiple
attrConstruct _ = constructFileChooserSelectMultiple
getFileChooserShowHidden :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserShowHidden obj = liftIO $ getObjectPropertyBool obj "show-hidden"
setFileChooserShowHidden :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserShowHidden obj val = liftIO $ setObjectPropertyBool obj "show-hidden" val
constructFileChooserShowHidden :: Bool -> IO ([Char], GValue)
constructFileChooserShowHidden val = constructObjectPropertyBool "show-hidden" val
data FileChooserShowHiddenPropertyInfo
instance AttrInfo FileChooserShowHiddenPropertyInfo where
type AttrAllowedOps FileChooserShowHiddenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserShowHiddenPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserShowHiddenPropertyInfo = FileChooserK
type AttrGetType FileChooserShowHiddenPropertyInfo = Bool
type AttrLabel FileChooserShowHiddenPropertyInfo = "FileChooser::show-hidden"
attrGet _ = getFileChooserShowHidden
attrSet _ = setFileChooserShowHidden
attrConstruct _ = constructFileChooserShowHidden
getFileChooserUsePreviewLabel :: (MonadIO m, FileChooserK o) => o -> m Bool
getFileChooserUsePreviewLabel obj = liftIO $ getObjectPropertyBool obj "use-preview-label"
setFileChooserUsePreviewLabel :: (MonadIO m, FileChooserK o) => o -> Bool -> m ()
setFileChooserUsePreviewLabel obj val = liftIO $ setObjectPropertyBool obj "use-preview-label" val
constructFileChooserUsePreviewLabel :: Bool -> IO ([Char], GValue)
constructFileChooserUsePreviewLabel val = constructObjectPropertyBool "use-preview-label" val
data FileChooserUsePreviewLabelPropertyInfo
instance AttrInfo FileChooserUsePreviewLabelPropertyInfo where
type AttrAllowedOps FileChooserUsePreviewLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint FileChooserUsePreviewLabelPropertyInfo = (~) Bool
type AttrBaseTypeConstraint FileChooserUsePreviewLabelPropertyInfo = FileChooserK
type AttrGetType FileChooserUsePreviewLabelPropertyInfo = Bool
type AttrLabel FileChooserUsePreviewLabelPropertyInfo = "FileChooser::use-preview-label"
attrGet _ = getFileChooserUsePreviewLabel
attrSet _ = setFileChooserUsePreviewLabel
attrConstruct _ = constructFileChooserUsePreviewLabel
type instance AttributeList FileChooser = FileChooserAttributeList
type FileChooserAttributeList = ('[ '("action", FileChooserActionPropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("create-folders", FileChooserCreateFoldersPropertyInfo), '("do-overwrite-confirmation", FileChooserDoOverwriteConfirmationPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("extra-widget", FileChooserExtraWidgetPropertyInfo), '("filter", FileChooserFilterPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("local-only", FileChooserLocalOnlyPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("preview-widget", FileChooserPreviewWidgetPropertyInfo), '("preview-widget-active", FileChooserPreviewWidgetActivePropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("select-multiple", FileChooserSelectMultiplePropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("show-hidden", FileChooserShowHiddenPropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("use-preview-label", FileChooserUsePreviewLabelPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])
data FileChooserConfirmOverwriteSignalInfo
instance SignalInfo FileChooserConfirmOverwriteSignalInfo where
type HaskellCallbackType FileChooserConfirmOverwriteSignalInfo = FileChooserConfirmOverwriteCallback
connectSignal _ = connectFileChooserConfirmOverwrite
data FileChooserCurrentFolderChangedSignalInfo
instance SignalInfo FileChooserCurrentFolderChangedSignalInfo where
type HaskellCallbackType FileChooserCurrentFolderChangedSignalInfo = FileChooserCurrentFolderChangedCallback
connectSignal _ = connectFileChooserCurrentFolderChanged
data FileChooserFileActivatedSignalInfo
instance SignalInfo FileChooserFileActivatedSignalInfo where
type HaskellCallbackType FileChooserFileActivatedSignalInfo = FileChooserFileActivatedCallback
connectSignal _ = connectFileChooserFileActivated
data FileChooserSelectionChangedSignalInfo
instance SignalInfo FileChooserSelectionChangedSignalInfo where
type HaskellCallbackType FileChooserSelectionChangedSignalInfo = FileChooserSelectionChangedCallback
connectSignal _ = connectFileChooserSelectionChanged
data FileChooserUpdatePreviewSignalInfo
instance SignalInfo FileChooserUpdatePreviewSignalInfo where
type HaskellCallbackType FileChooserUpdatePreviewSignalInfo = FileChooserUpdatePreviewCallback
connectSignal _ = connectFileChooserUpdatePreview
type instance SignalList FileChooser = FileChooserSignalList
type FileChooserSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("confirm-overwrite", FileChooserConfirmOverwriteSignalInfo), '("current-folder-changed", FileChooserCurrentFolderChangedSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("file-activated", FileChooserFileActivatedSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-changed", FileChooserSelectionChangedSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("update-preview", FileChooserUpdatePreviewSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_file_chooser_get_type"
c_gtk_file_chooser_get_type :: IO GType
type instance ParentTypes FileChooser = FileChooserParentTypes
type FileChooserParentTypes = '[Widget, GObject.Object]
instance GObject FileChooser where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_file_chooser_get_type
class GObject o => FileChooserK o
instance (GObject o, IsDescendantOf FileChooser o) => FileChooserK o
toFileChooser :: FileChooserK o => o -> IO FileChooser
toFileChooser = unsafeCastTo FileChooser
foreign import ccall "gtk_file_chooser_add_filter" gtk_file_chooser_add_filter ::
Ptr FileChooser ->
Ptr FileFilter ->
IO ()
fileChooserAddFilter ::
(MonadIO m, FileChooserK a, FileFilterK b) =>
a ->
b ->
m ()
fileChooserAddFilter _obj filter = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
filter' <- refObject filter
gtk_file_chooser_add_filter _obj' filter'
touchManagedPtr _obj
touchManagedPtr filter
return ()
foreign import ccall "gtk_file_chooser_add_shortcut_folder" gtk_file_chooser_add_shortcut_folder ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserAddShortcutFolder ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m ()
fileChooserAddShortcutFolder _obj folder = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
folder' <- stringToCString folder
onException (do
_ <- propagateGError $ gtk_file_chooser_add_shortcut_folder _obj' folder'
touchManagedPtr _obj
freeMem folder'
return ()
) (do
freeMem folder'
)
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 ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m ()
fileChooserAddShortcutFolderUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
onException (do
_ <- propagateGError $ gtk_file_chooser_add_shortcut_folder_uri _obj' uri'
touchManagedPtr _obj
freeMem uri'
return ()
) (do
freeMem uri'
)
foreign import ccall "gtk_file_chooser_get_action" gtk_file_chooser_get_action ::
Ptr FileChooser ->
IO CUInt
fileChooserGetAction ::
(MonadIO m, FileChooserK a) =>
a ->
m FileChooserAction
fileChooserGetAction _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_action _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_create_folders" gtk_file_chooser_get_create_folders ::
Ptr FileChooser ->
IO CInt
fileChooserGetCreateFolders ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetCreateFolders _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_create_folders _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_current_folder" gtk_file_chooser_get_current_folder ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentFolder ::
(MonadIO m, FileChooserK a) =>
a ->
m [Char]
fileChooserGetCurrentFolder _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_current_folder _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder" result
result' <- cstringToString result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_current_folder_file" gtk_file_chooser_get_current_folder_file ::
Ptr FileChooser ->
IO (Ptr Gio.File)
fileChooserGetCurrentFolderFile ::
(MonadIO m, FileChooserK a) =>
a ->
m Gio.File
fileChooserGetCurrentFolderFile _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_current_folder_file _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder_file" result
result' <- (wrapObject Gio.File) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_current_folder_uri" gtk_file_chooser_get_current_folder_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentFolderUri ::
(MonadIO m, FileChooserK a) =>
a ->
m T.Text
fileChooserGetCurrentFolderUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_current_folder_uri _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_current_folder_uri" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_current_name" gtk_file_chooser_get_current_name ::
Ptr FileChooser ->
IO CString
fileChooserGetCurrentName ::
(MonadIO m, FileChooserK a) =>
a ->
m T.Text
fileChooserGetCurrentName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_current_name _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_current_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_do_overwrite_confirmation" gtk_file_chooser_get_do_overwrite_confirmation ::
Ptr FileChooser ->
IO CInt
fileChooserGetDoOverwriteConfirmation ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetDoOverwriteConfirmation _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_do_overwrite_confirmation _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_extra_widget" gtk_file_chooser_get_extra_widget ::
Ptr FileChooser ->
IO (Ptr Widget)
fileChooserGetExtraWidget ::
(MonadIO m, FileChooserK a) =>
a ->
m Widget
fileChooserGetExtraWidget _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_extra_widget _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_extra_widget" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_file" gtk_file_chooser_get_file ::
Ptr FileChooser ->
IO (Ptr Gio.File)
fileChooserGetFile ::
(MonadIO m, FileChooserK a) =>
a ->
m Gio.File
fileChooserGetFile _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_file _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_file" result
result' <- (wrapObject Gio.File) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_filename" gtk_file_chooser_get_filename ::
Ptr FileChooser ->
IO CString
fileChooserGetFilename ::
(MonadIO m, FileChooserK a) =>
a ->
m [Char]
fileChooserGetFilename _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_filename _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_filename" result
result' <- cstringToString result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_filenames" gtk_file_chooser_get_filenames ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserGetFilenames ::
(MonadIO m, FileChooserK a) =>
a ->
m [[Char]]
fileChooserGetFilenames _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_filenames _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_filenames" result
result' <- unpackGSList result
result'' <- mapM cstringToString result'
mapGSList freeMem result
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_get_files" gtk_file_chooser_get_files ::
Ptr FileChooser ->
IO (Ptr (GSList (Ptr Gio.File)))
fileChooserGetFiles ::
(MonadIO m, FileChooserK a) =>
a ->
m [Gio.File]
fileChooserGetFiles _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_files _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_files" result
result' <- unpackGSList result
result'' <- mapM (wrapObject Gio.File) result'
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_get_filter" gtk_file_chooser_get_filter ::
Ptr FileChooser ->
IO (Ptr FileFilter)
fileChooserGetFilter ::
(MonadIO m, FileChooserK a) =>
a ->
m FileFilter
fileChooserGetFilter _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_filter _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_filter" result
result' <- (newObject FileFilter) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_local_only" gtk_file_chooser_get_local_only ::
Ptr FileChooser ->
IO CInt
fileChooserGetLocalOnly ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetLocalOnly _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_local_only _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_preview_file" gtk_file_chooser_get_preview_file ::
Ptr FileChooser ->
IO (Ptr Gio.File)
fileChooserGetPreviewFile ::
(MonadIO m, FileChooserK a) =>
a ->
m Gio.File
fileChooserGetPreviewFile _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_preview_file _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_file" result
result' <- (wrapObject Gio.File) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_preview_filename" gtk_file_chooser_get_preview_filename ::
Ptr FileChooser ->
IO CString
fileChooserGetPreviewFilename ::
(MonadIO m, FileChooserK a) =>
a ->
m [Char]
fileChooserGetPreviewFilename _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_preview_filename _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_filename" result
result' <- cstringToString result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_preview_uri" gtk_file_chooser_get_preview_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetPreviewUri ::
(MonadIO m, FileChooserK a) =>
a ->
m T.Text
fileChooserGetPreviewUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_preview_uri _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_uri" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_preview_widget" gtk_file_chooser_get_preview_widget ::
Ptr FileChooser ->
IO (Ptr Widget)
fileChooserGetPreviewWidget ::
(MonadIO m, FileChooserK a) =>
a ->
m Widget
fileChooserGetPreviewWidget _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_preview_widget _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_preview_widget" result
result' <- (newObject Widget) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_preview_widget_active" gtk_file_chooser_get_preview_widget_active ::
Ptr FileChooser ->
IO CInt
fileChooserGetPreviewWidgetActive ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetPreviewWidgetActive _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_preview_widget_active _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_select_multiple" gtk_file_chooser_get_select_multiple ::
Ptr FileChooser ->
IO CInt
fileChooserGetSelectMultiple ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetSelectMultiple _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_select_multiple _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_show_hidden" gtk_file_chooser_get_show_hidden ::
Ptr FileChooser ->
IO CInt
fileChooserGetShowHidden ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetShowHidden _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_show_hidden _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_uri" gtk_file_chooser_get_uri ::
Ptr FileChooser ->
IO CString
fileChooserGetUri ::
(MonadIO m, FileChooserK a) =>
a ->
m T.Text
fileChooserGetUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_uri _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_uri" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_get_uris" gtk_file_chooser_get_uris ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserGetUris ::
(MonadIO m, FileChooserK a) =>
a ->
m [T.Text]
fileChooserGetUris _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_uris _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_get_uris" result
result' <- unpackGSList result
result'' <- mapM cstringToText result'
mapGSList freeMem result
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_get_use_preview_label" gtk_file_chooser_get_use_preview_label ::
Ptr FileChooser ->
IO CInt
fileChooserGetUsePreviewLabel ::
(MonadIO m, FileChooserK a) =>
a ->
m Bool
fileChooserGetUsePreviewLabel _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_get_use_preview_label _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_file_chooser_list_filters" gtk_file_chooser_list_filters ::
Ptr FileChooser ->
IO (Ptr (GSList (Ptr FileFilter)))
fileChooserListFilters ::
(MonadIO m, FileChooserK a) =>
a ->
m [FileFilter]
fileChooserListFilters _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_list_filters _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_list_filters" result
result' <- unpackGSList result
result'' <- mapM (newObject FileFilter) result'
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_list_shortcut_folder_uris" gtk_file_chooser_list_shortcut_folder_uris ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserListShortcutFolderUris ::
(MonadIO m, FileChooserK a) =>
a ->
m [T.Text]
fileChooserListShortcutFolderUris _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_list_shortcut_folder_uris _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_list_shortcut_folder_uris" result
result' <- unpackGSList result
result'' <- mapM cstringToText result'
mapGSList freeMem result
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_list_shortcut_folders" gtk_file_chooser_list_shortcut_folders ::
Ptr FileChooser ->
IO (Ptr (GSList CString))
fileChooserListShortcutFolders ::
(MonadIO m, FileChooserK a) =>
a ->
m [[Char]]
fileChooserListShortcutFolders _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_file_chooser_list_shortcut_folders _obj'
checkUnexpectedReturnNULL "gtk_file_chooser_list_shortcut_folders" result
result' <- unpackGSList result
result'' <- mapM cstringToString result'
mapGSList freeMem result
g_slist_free result
touchManagedPtr _obj
return result''
foreign import ccall "gtk_file_chooser_remove_filter" gtk_file_chooser_remove_filter ::
Ptr FileChooser ->
Ptr FileFilter ->
IO ()
fileChooserRemoveFilter ::
(MonadIO m, FileChooserK a, FileFilterK b) =>
a ->
b ->
m ()
fileChooserRemoveFilter _obj filter = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let filter' = unsafeManagedPtrCastPtr filter
gtk_file_chooser_remove_filter _obj' filter'
touchManagedPtr _obj
touchManagedPtr filter
return ()
foreign import ccall "gtk_file_chooser_remove_shortcut_folder" gtk_file_chooser_remove_shortcut_folder ::
Ptr FileChooser ->
CString ->
Ptr (Ptr GError) ->
IO CInt
fileChooserRemoveShortcutFolder ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m ()
fileChooserRemoveShortcutFolder _obj folder = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
folder' <- stringToCString folder
onException (do
_ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder _obj' folder'
touchManagedPtr _obj
freeMem folder'
return ()
) (do
freeMem folder'
)
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 ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m ()
fileChooserRemoveShortcutFolderUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
onException (do
_ <- propagateGError $ gtk_file_chooser_remove_shortcut_folder_uri _obj' uri'
touchManagedPtr _obj
freeMem uri'
return ()
) (do
freeMem uri'
)
foreign import ccall "gtk_file_chooser_select_all" gtk_file_chooser_select_all ::
Ptr FileChooser ->
IO ()
fileChooserSelectAll ::
(MonadIO m, FileChooserK a) =>
a ->
m ()
fileChooserSelectAll _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_file_chooser_select_all _obj'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_select_file" gtk_file_chooser_select_file ::
Ptr FileChooser ->
Ptr Gio.File ->
Ptr (Ptr GError) ->
IO CInt
fileChooserSelectFile ::
(MonadIO m, FileChooserK a, Gio.FileK b) =>
a ->
b ->
m ()
fileChooserSelectFile _obj file = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let file' = unsafeManagedPtrCastPtr file
onException (do
_ <- propagateGError $ gtk_file_chooser_select_file _obj' file'
touchManagedPtr _obj
touchManagedPtr file
return ()
) (do
return ()
)
foreign import ccall "gtk_file_chooser_select_filename" gtk_file_chooser_select_filename ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSelectFilename ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m Bool
fileChooserSelectFilename _obj filename = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
filename' <- stringToCString filename
result <- gtk_file_chooser_select_filename _obj' filename'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem filename'
return result'
foreign import ccall "gtk_file_chooser_select_uri" gtk_file_chooser_select_uri ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSelectUri ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m Bool
fileChooserSelectUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
result <- gtk_file_chooser_select_uri _obj' uri'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem uri'
return result'
foreign import ccall "gtk_file_chooser_set_action" gtk_file_chooser_set_action ::
Ptr FileChooser ->
CUInt ->
IO ()
fileChooserSetAction ::
(MonadIO m, FileChooserK a) =>
a ->
FileChooserAction ->
m ()
fileChooserSetAction _obj action = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let action' = (fromIntegral . fromEnum) action
gtk_file_chooser_set_action _obj' action'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_create_folders" gtk_file_chooser_set_create_folders ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetCreateFolders ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetCreateFolders _obj create_folders = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let create_folders' = (fromIntegral . fromEnum) create_folders
gtk_file_chooser_set_create_folders _obj' create_folders'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_current_folder" gtk_file_chooser_set_current_folder ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSetCurrentFolder ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m Bool
fileChooserSetCurrentFolder _obj filename = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
filename' <- stringToCString filename
result <- gtk_file_chooser_set_current_folder _obj' filename'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem filename'
return result'
foreign import ccall "gtk_file_chooser_set_current_folder_file" gtk_file_chooser_set_current_folder_file ::
Ptr FileChooser ->
Ptr Gio.File ->
Ptr (Ptr GError) ->
IO CInt
fileChooserSetCurrentFolderFile ::
(MonadIO m, FileChooserK a, Gio.FileK b) =>
a ->
b ->
m ()
fileChooserSetCurrentFolderFile _obj file = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let file' = unsafeManagedPtrCastPtr file
onException (do
_ <- propagateGError $ gtk_file_chooser_set_current_folder_file _obj' file'
touchManagedPtr _obj
touchManagedPtr file
return ()
) (do
return ()
)
foreign import ccall "gtk_file_chooser_set_current_folder_uri" gtk_file_chooser_set_current_folder_uri ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSetCurrentFolderUri ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m Bool
fileChooserSetCurrentFolderUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
result <- gtk_file_chooser_set_current_folder_uri _obj' uri'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem uri'
return result'
foreign import ccall "gtk_file_chooser_set_current_name" gtk_file_chooser_set_current_name ::
Ptr FileChooser ->
CString ->
IO ()
fileChooserSetCurrentName ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m ()
fileChooserSetCurrentName _obj name = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
name' <- stringToCString name
gtk_file_chooser_set_current_name _obj' name'
touchManagedPtr _obj
freeMem name'
return ()
foreign import ccall "gtk_file_chooser_set_do_overwrite_confirmation" gtk_file_chooser_set_do_overwrite_confirmation ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetDoOverwriteConfirmation ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetDoOverwriteConfirmation _obj do_overwrite_confirmation = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let do_overwrite_confirmation' = (fromIntegral . fromEnum) do_overwrite_confirmation
gtk_file_chooser_set_do_overwrite_confirmation _obj' do_overwrite_confirmation'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_extra_widget" gtk_file_chooser_set_extra_widget ::
Ptr FileChooser ->
Ptr Widget ->
IO ()
fileChooserSetExtraWidget ::
(MonadIO m, FileChooserK a, WidgetK b) =>
a ->
b ->
m ()
fileChooserSetExtraWidget _obj extra_widget = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let extra_widget' = unsafeManagedPtrCastPtr extra_widget
gtk_file_chooser_set_extra_widget _obj' extra_widget'
touchManagedPtr _obj
touchManagedPtr extra_widget
return ()
foreign import ccall "gtk_file_chooser_set_file" gtk_file_chooser_set_file ::
Ptr FileChooser ->
Ptr Gio.File ->
Ptr (Ptr GError) ->
IO CInt
fileChooserSetFile ::
(MonadIO m, FileChooserK a, Gio.FileK b) =>
a ->
b ->
m ()
fileChooserSetFile _obj file = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let file' = unsafeManagedPtrCastPtr file
onException (do
_ <- propagateGError $ gtk_file_chooser_set_file _obj' file'
touchManagedPtr _obj
touchManagedPtr file
return ()
) (do
return ()
)
foreign import ccall "gtk_file_chooser_set_filename" gtk_file_chooser_set_filename ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSetFilename ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m Bool
fileChooserSetFilename _obj filename = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
filename' <- stringToCString filename
result <- gtk_file_chooser_set_filename _obj' filename'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem filename'
return result'
foreign import ccall "gtk_file_chooser_set_filter" gtk_file_chooser_set_filter ::
Ptr FileChooser ->
Ptr FileFilter ->
IO ()
fileChooserSetFilter ::
(MonadIO m, FileChooserK a, FileFilterK b) =>
a ->
b ->
m ()
fileChooserSetFilter _obj filter = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let filter' = unsafeManagedPtrCastPtr filter
gtk_file_chooser_set_filter _obj' filter'
touchManagedPtr _obj
touchManagedPtr filter
return ()
foreign import ccall "gtk_file_chooser_set_local_only" gtk_file_chooser_set_local_only ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetLocalOnly ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetLocalOnly _obj local_only = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let local_only' = (fromIntegral . fromEnum) local_only
gtk_file_chooser_set_local_only _obj' local_only'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_preview_widget" gtk_file_chooser_set_preview_widget ::
Ptr FileChooser ->
Ptr Widget ->
IO ()
fileChooserSetPreviewWidget ::
(MonadIO m, FileChooserK a, WidgetK b) =>
a ->
b ->
m ()
fileChooserSetPreviewWidget _obj preview_widget = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let preview_widget' = unsafeManagedPtrCastPtr preview_widget
gtk_file_chooser_set_preview_widget _obj' preview_widget'
touchManagedPtr _obj
touchManagedPtr preview_widget
return ()
foreign import ccall "gtk_file_chooser_set_preview_widget_active" gtk_file_chooser_set_preview_widget_active ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetPreviewWidgetActive ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetPreviewWidgetActive _obj active = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let active' = (fromIntegral . fromEnum) active
gtk_file_chooser_set_preview_widget_active _obj' active'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_select_multiple" gtk_file_chooser_set_select_multiple ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetSelectMultiple ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetSelectMultiple _obj select_multiple = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let select_multiple' = (fromIntegral . fromEnum) select_multiple
gtk_file_chooser_set_select_multiple _obj' select_multiple'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_show_hidden" gtk_file_chooser_set_show_hidden ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetShowHidden ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetShowHidden _obj show_hidden = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let show_hidden' = (fromIntegral . fromEnum) show_hidden
gtk_file_chooser_set_show_hidden _obj' show_hidden'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_set_uri" gtk_file_chooser_set_uri ::
Ptr FileChooser ->
CString ->
IO CInt
fileChooserSetUri ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m Bool
fileChooserSetUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
result <- gtk_file_chooser_set_uri _obj' uri'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem uri'
return result'
foreign import ccall "gtk_file_chooser_set_use_preview_label" gtk_file_chooser_set_use_preview_label ::
Ptr FileChooser ->
CInt ->
IO ()
fileChooserSetUsePreviewLabel ::
(MonadIO m, FileChooserK a) =>
a ->
Bool ->
m ()
fileChooserSetUsePreviewLabel _obj use_label = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let use_label' = (fromIntegral . fromEnum) use_label
gtk_file_chooser_set_use_preview_label _obj' use_label'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_unselect_all" gtk_file_chooser_unselect_all ::
Ptr FileChooser ->
IO ()
fileChooserUnselectAll ::
(MonadIO m, FileChooserK a) =>
a ->
m ()
fileChooserUnselectAll _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_file_chooser_unselect_all _obj'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_file_chooser_unselect_file" gtk_file_chooser_unselect_file ::
Ptr FileChooser ->
Ptr Gio.File ->
IO ()
fileChooserUnselectFile ::
(MonadIO m, FileChooserK a, Gio.FileK b) =>
a ->
b ->
m ()
fileChooserUnselectFile _obj file = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let file' = unsafeManagedPtrCastPtr file
gtk_file_chooser_unselect_file _obj' file'
touchManagedPtr _obj
touchManagedPtr file
return ()
foreign import ccall "gtk_file_chooser_unselect_filename" gtk_file_chooser_unselect_filename ::
Ptr FileChooser ->
CString ->
IO ()
fileChooserUnselectFilename ::
(MonadIO m, FileChooserK a) =>
a ->
[Char] ->
m ()
fileChooserUnselectFilename _obj filename = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
filename' <- stringToCString filename
gtk_file_chooser_unselect_filename _obj' filename'
touchManagedPtr _obj
freeMem filename'
return ()
foreign import ccall "gtk_file_chooser_unselect_uri" gtk_file_chooser_unselect_uri ::
Ptr FileChooser ->
CString ->
IO ()
fileChooserUnselectUri ::
(MonadIO m, FileChooserK a) =>
a ->
T.Text ->
m ()
fileChooserUnselectUri _obj uri = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
uri' <- textToCString uri
gtk_file_chooser_unselect_uri _obj' uri'
touchManagedPtr _obj
freeMem uri'
return ()