#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.FileChooserNative
(
FileChooserNative(..) ,
IsFileChooserNative ,
toFileChooserNative ,
noFileChooserNative ,
#if ENABLE_OVERLOADING
FileChooserNativeGetAcceptLabelMethodInfo,
#endif
fileChooserNativeGetAcceptLabel ,
#if ENABLE_OVERLOADING
FileChooserNativeGetCancelLabelMethodInfo,
#endif
fileChooserNativeGetCancelLabel ,
fileChooserNativeNew ,
#if ENABLE_OVERLOADING
FileChooserNativeSetAcceptLabelMethodInfo,
#endif
fileChooserNativeSetAcceptLabel ,
#if ENABLE_OVERLOADING
FileChooserNativeSetCancelLabelMethodInfo,
#endif
fileChooserNativeSetCancelLabel ,
#if ENABLE_OVERLOADING
FileChooserNativeAcceptLabelPropertyInfo,
#endif
clearFileChooserNativeAcceptLabel ,
constructFileChooserNativeAcceptLabel ,
#if ENABLE_OVERLOADING
fileChooserNativeAcceptLabel ,
#endif
getFileChooserNativeAcceptLabel ,
setFileChooserNativeAcceptLabel ,
#if ENABLE_OVERLOADING
FileChooserNativeCancelLabelPropertyInfo,
#endif
clearFileChooserNativeCancelLabel ,
constructFileChooserNativeCancelLabel ,
#if ENABLE_OVERLOADING
fileChooserNativeCancelLabel ,
#endif
getFileChooserNativeCancelLabel ,
setFileChooserNativeCancelLabel ,
) 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.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 {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.FileChooser as Gtk.FileChooser
import {-# SOURCE #-} qualified GI.Gtk.Objects.NativeDialog as Gtk.NativeDialog
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
newtype FileChooserNative = FileChooserNative (ManagedPtr FileChooserNative)
foreign import ccall "gtk_file_chooser_native_get_type"
c_gtk_file_chooser_native_get_type :: IO GType
instance GObject FileChooserNative where
gobjectType = c_gtk_file_chooser_native_get_type
class (GObject o, O.IsDescendantOf FileChooserNative o) => IsFileChooserNative o
instance (GObject o, O.IsDescendantOf FileChooserNative o) => IsFileChooserNative o
instance O.HasParentTypes FileChooserNative
type instance O.ParentTypes FileChooserNative = '[Gtk.NativeDialog.NativeDialog, GObject.Object.Object, Gtk.FileChooser.FileChooser]
toFileChooserNative :: (MonadIO m, IsFileChooserNative o) => o -> m FileChooserNative
toFileChooserNative = liftIO . unsafeCastTo FileChooserNative
noFileChooserNative :: Maybe FileChooserNative
noFileChooserNative = Nothing
#if ENABLE_OVERLOADING
type family ResolveFileChooserNativeMethod (t :: Symbol) (o :: *) :: * where
ResolveFileChooserNativeMethod "addChoice" o = Gtk.FileChooser.FileChooserAddChoiceMethodInfo
ResolveFileChooserNativeMethod "addFilter" o = Gtk.FileChooser.FileChooserAddFilterMethodInfo
ResolveFileChooserNativeMethod "addShortcutFolder" o = Gtk.FileChooser.FileChooserAddShortcutFolderMethodInfo
ResolveFileChooserNativeMethod "addShortcutFolderUri" o = Gtk.FileChooser.FileChooserAddShortcutFolderUriMethodInfo
ResolveFileChooserNativeMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFileChooserNativeMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFileChooserNativeMethod "destroy" o = Gtk.NativeDialog.NativeDialogDestroyMethodInfo
ResolveFileChooserNativeMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFileChooserNativeMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFileChooserNativeMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFileChooserNativeMethod "hide" o = Gtk.NativeDialog.NativeDialogHideMethodInfo
ResolveFileChooserNativeMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFileChooserNativeMethod "listFilters" o = Gtk.FileChooser.FileChooserListFiltersMethodInfo
ResolveFileChooserNativeMethod "listShortcutFolderUris" o = Gtk.FileChooser.FileChooserListShortcutFolderUrisMethodInfo
ResolveFileChooserNativeMethod "listShortcutFolders" o = Gtk.FileChooser.FileChooserListShortcutFoldersMethodInfo
ResolveFileChooserNativeMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFileChooserNativeMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFileChooserNativeMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFileChooserNativeMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFileChooserNativeMethod "removeChoice" o = Gtk.FileChooser.FileChooserRemoveChoiceMethodInfo
ResolveFileChooserNativeMethod "removeFilter" o = Gtk.FileChooser.FileChooserRemoveFilterMethodInfo
ResolveFileChooserNativeMethod "removeShortcutFolder" o = Gtk.FileChooser.FileChooserRemoveShortcutFolderMethodInfo
ResolveFileChooserNativeMethod "removeShortcutFolderUri" o = Gtk.FileChooser.FileChooserRemoveShortcutFolderUriMethodInfo
ResolveFileChooserNativeMethod "run" o = Gtk.NativeDialog.NativeDialogRunMethodInfo
ResolveFileChooserNativeMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFileChooserNativeMethod "selectAll" o = Gtk.FileChooser.FileChooserSelectAllMethodInfo
ResolveFileChooserNativeMethod "selectFile" o = Gtk.FileChooser.FileChooserSelectFileMethodInfo
ResolveFileChooserNativeMethod "selectFilename" o = Gtk.FileChooser.FileChooserSelectFilenameMethodInfo
ResolveFileChooserNativeMethod "selectUri" o = Gtk.FileChooser.FileChooserSelectUriMethodInfo
ResolveFileChooserNativeMethod "show" o = Gtk.NativeDialog.NativeDialogShowMethodInfo
ResolveFileChooserNativeMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFileChooserNativeMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFileChooserNativeMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFileChooserNativeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFileChooserNativeMethod "unselectAll" o = Gtk.FileChooser.FileChooserUnselectAllMethodInfo
ResolveFileChooserNativeMethod "unselectFile" o = Gtk.FileChooser.FileChooserUnselectFileMethodInfo
ResolveFileChooserNativeMethod "unselectFilename" o = Gtk.FileChooser.FileChooserUnselectFilenameMethodInfo
ResolveFileChooserNativeMethod "unselectUri" o = Gtk.FileChooser.FileChooserUnselectUriMethodInfo
ResolveFileChooserNativeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFileChooserNativeMethod "getAcceptLabel" o = FileChooserNativeGetAcceptLabelMethodInfo
ResolveFileChooserNativeMethod "getAction" o = Gtk.FileChooser.FileChooserGetActionMethodInfo
ResolveFileChooserNativeMethod "getCancelLabel" o = FileChooserNativeGetCancelLabelMethodInfo
ResolveFileChooserNativeMethod "getChoice" o = Gtk.FileChooser.FileChooserGetChoiceMethodInfo
ResolveFileChooserNativeMethod "getCreateFolders" o = Gtk.FileChooser.FileChooserGetCreateFoldersMethodInfo
ResolveFileChooserNativeMethod "getCurrentFolder" o = Gtk.FileChooser.FileChooserGetCurrentFolderMethodInfo
ResolveFileChooserNativeMethod "getCurrentFolderFile" o = Gtk.FileChooser.FileChooserGetCurrentFolderFileMethodInfo
ResolveFileChooserNativeMethod "getCurrentFolderUri" o = Gtk.FileChooser.FileChooserGetCurrentFolderUriMethodInfo
ResolveFileChooserNativeMethod "getCurrentName" o = Gtk.FileChooser.FileChooserGetCurrentNameMethodInfo
ResolveFileChooserNativeMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFileChooserNativeMethod "getDoOverwriteConfirmation" o = Gtk.FileChooser.FileChooserGetDoOverwriteConfirmationMethodInfo
ResolveFileChooserNativeMethod "getExtraWidget" o = Gtk.FileChooser.FileChooserGetExtraWidgetMethodInfo
ResolveFileChooserNativeMethod "getFile" o = Gtk.FileChooser.FileChooserGetFileMethodInfo
ResolveFileChooserNativeMethod "getFilename" o = Gtk.FileChooser.FileChooserGetFilenameMethodInfo
ResolveFileChooserNativeMethod "getFilenames" o = Gtk.FileChooser.FileChooserGetFilenamesMethodInfo
ResolveFileChooserNativeMethod "getFiles" o = Gtk.FileChooser.FileChooserGetFilesMethodInfo
ResolveFileChooserNativeMethod "getFilter" o = Gtk.FileChooser.FileChooserGetFilterMethodInfo
ResolveFileChooserNativeMethod "getLocalOnly" o = Gtk.FileChooser.FileChooserGetLocalOnlyMethodInfo
ResolveFileChooserNativeMethod "getModal" o = Gtk.NativeDialog.NativeDialogGetModalMethodInfo
ResolveFileChooserNativeMethod "getPreviewFile" o = Gtk.FileChooser.FileChooserGetPreviewFileMethodInfo
ResolveFileChooserNativeMethod "getPreviewFilename" o = Gtk.FileChooser.FileChooserGetPreviewFilenameMethodInfo
ResolveFileChooserNativeMethod "getPreviewUri" o = Gtk.FileChooser.FileChooserGetPreviewUriMethodInfo
ResolveFileChooserNativeMethod "getPreviewWidget" o = Gtk.FileChooser.FileChooserGetPreviewWidgetMethodInfo
ResolveFileChooserNativeMethod "getPreviewWidgetActive" o = Gtk.FileChooser.FileChooserGetPreviewWidgetActiveMethodInfo
ResolveFileChooserNativeMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFileChooserNativeMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFileChooserNativeMethod "getSelectMultiple" o = Gtk.FileChooser.FileChooserGetSelectMultipleMethodInfo
ResolveFileChooserNativeMethod "getShowHidden" o = Gtk.FileChooser.FileChooserGetShowHiddenMethodInfo
ResolveFileChooserNativeMethod "getTitle" o = Gtk.NativeDialog.NativeDialogGetTitleMethodInfo
ResolveFileChooserNativeMethod "getTransientFor" o = Gtk.NativeDialog.NativeDialogGetTransientForMethodInfo
ResolveFileChooserNativeMethod "getUri" o = Gtk.FileChooser.FileChooserGetUriMethodInfo
ResolveFileChooserNativeMethod "getUris" o = Gtk.FileChooser.FileChooserGetUrisMethodInfo
ResolveFileChooserNativeMethod "getUsePreviewLabel" o = Gtk.FileChooser.FileChooserGetUsePreviewLabelMethodInfo
ResolveFileChooserNativeMethod "getVisible" o = Gtk.NativeDialog.NativeDialogGetVisibleMethodInfo
ResolveFileChooserNativeMethod "setAcceptLabel" o = FileChooserNativeSetAcceptLabelMethodInfo
ResolveFileChooserNativeMethod "setAction" o = Gtk.FileChooser.FileChooserSetActionMethodInfo
ResolveFileChooserNativeMethod "setCancelLabel" o = FileChooserNativeSetCancelLabelMethodInfo
ResolveFileChooserNativeMethod "setChoice" o = Gtk.FileChooser.FileChooserSetChoiceMethodInfo
ResolveFileChooserNativeMethod "setCreateFolders" o = Gtk.FileChooser.FileChooserSetCreateFoldersMethodInfo
ResolveFileChooserNativeMethod "setCurrentFolder" o = Gtk.FileChooser.FileChooserSetCurrentFolderMethodInfo
ResolveFileChooserNativeMethod "setCurrentFolderFile" o = Gtk.FileChooser.FileChooserSetCurrentFolderFileMethodInfo
ResolveFileChooserNativeMethod "setCurrentFolderUri" o = Gtk.FileChooser.FileChooserSetCurrentFolderUriMethodInfo
ResolveFileChooserNativeMethod "setCurrentName" o = Gtk.FileChooser.FileChooserSetCurrentNameMethodInfo
ResolveFileChooserNativeMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFileChooserNativeMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFileChooserNativeMethod "setDoOverwriteConfirmation" o = Gtk.FileChooser.FileChooserSetDoOverwriteConfirmationMethodInfo
ResolveFileChooserNativeMethod "setExtraWidget" o = Gtk.FileChooser.FileChooserSetExtraWidgetMethodInfo
ResolveFileChooserNativeMethod "setFile" o = Gtk.FileChooser.FileChooserSetFileMethodInfo
ResolveFileChooserNativeMethod "setFilename" o = Gtk.FileChooser.FileChooserSetFilenameMethodInfo
ResolveFileChooserNativeMethod "setFilter" o = Gtk.FileChooser.FileChooserSetFilterMethodInfo
ResolveFileChooserNativeMethod "setLocalOnly" o = Gtk.FileChooser.FileChooserSetLocalOnlyMethodInfo
ResolveFileChooserNativeMethod "setModal" o = Gtk.NativeDialog.NativeDialogSetModalMethodInfo
ResolveFileChooserNativeMethod "setPreviewWidget" o = Gtk.FileChooser.FileChooserSetPreviewWidgetMethodInfo
ResolveFileChooserNativeMethod "setPreviewWidgetActive" o = Gtk.FileChooser.FileChooserSetPreviewWidgetActiveMethodInfo
ResolveFileChooserNativeMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFileChooserNativeMethod "setSelectMultiple" o = Gtk.FileChooser.FileChooserSetSelectMultipleMethodInfo
ResolveFileChooserNativeMethod "setShowHidden" o = Gtk.FileChooser.FileChooserSetShowHiddenMethodInfo
ResolveFileChooserNativeMethod "setTitle" o = Gtk.NativeDialog.NativeDialogSetTitleMethodInfo
ResolveFileChooserNativeMethod "setTransientFor" o = Gtk.NativeDialog.NativeDialogSetTransientForMethodInfo
ResolveFileChooserNativeMethod "setUri" o = Gtk.FileChooser.FileChooserSetUriMethodInfo
ResolveFileChooserNativeMethod "setUsePreviewLabel" o = Gtk.FileChooser.FileChooserSetUsePreviewLabelMethodInfo
ResolveFileChooserNativeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileChooserNativeMethod t FileChooserNative, O.MethodInfo info FileChooserNative p) => OL.IsLabel t (FileChooserNative -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getFileChooserNativeAcceptLabel :: (MonadIO m, IsFileChooserNative o) => o -> m (Maybe T.Text)
getFileChooserNativeAcceptLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "accept-label"
setFileChooserNativeAcceptLabel :: (MonadIO m, IsFileChooserNative o) => o -> T.Text -> m ()
setFileChooserNativeAcceptLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "accept-label" (Just val)
constructFileChooserNativeAcceptLabel :: (IsFileChooserNative o) => T.Text -> IO (GValueConstruct o)
constructFileChooserNativeAcceptLabel val = B.Properties.constructObjectPropertyString "accept-label" (Just val)
clearFileChooserNativeAcceptLabel :: (MonadIO m, IsFileChooserNative o) => o -> m ()
clearFileChooserNativeAcceptLabel obj = liftIO $ B.Properties.setObjectPropertyString obj "accept-label" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data FileChooserNativeAcceptLabelPropertyInfo
instance AttrInfo FileChooserNativeAcceptLabelPropertyInfo where
type AttrAllowedOps FileChooserNativeAcceptLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint FileChooserNativeAcceptLabelPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FileChooserNativeAcceptLabelPropertyInfo = IsFileChooserNative
type AttrGetType FileChooserNativeAcceptLabelPropertyInfo = (Maybe T.Text)
type AttrLabel FileChooserNativeAcceptLabelPropertyInfo = "accept-label"
type AttrOrigin FileChooserNativeAcceptLabelPropertyInfo = FileChooserNative
attrGet _ = getFileChooserNativeAcceptLabel
attrSet _ = setFileChooserNativeAcceptLabel
attrConstruct _ = constructFileChooserNativeAcceptLabel
attrClear _ = clearFileChooserNativeAcceptLabel
#endif
getFileChooserNativeCancelLabel :: (MonadIO m, IsFileChooserNative o) => o -> m (Maybe T.Text)
getFileChooserNativeCancelLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "cancel-label"
setFileChooserNativeCancelLabel :: (MonadIO m, IsFileChooserNative o) => o -> T.Text -> m ()
setFileChooserNativeCancelLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "cancel-label" (Just val)
constructFileChooserNativeCancelLabel :: (IsFileChooserNative o) => T.Text -> IO (GValueConstruct o)
constructFileChooserNativeCancelLabel val = B.Properties.constructObjectPropertyString "cancel-label" (Just val)
clearFileChooserNativeCancelLabel :: (MonadIO m, IsFileChooserNative o) => o -> m ()
clearFileChooserNativeCancelLabel obj = liftIO $ B.Properties.setObjectPropertyString obj "cancel-label" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data FileChooserNativeCancelLabelPropertyInfo
instance AttrInfo FileChooserNativeCancelLabelPropertyInfo where
type AttrAllowedOps FileChooserNativeCancelLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint FileChooserNativeCancelLabelPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint FileChooserNativeCancelLabelPropertyInfo = IsFileChooserNative
type AttrGetType FileChooserNativeCancelLabelPropertyInfo = (Maybe T.Text)
type AttrLabel FileChooserNativeCancelLabelPropertyInfo = "cancel-label"
type AttrOrigin FileChooserNativeCancelLabelPropertyInfo = FileChooserNative
attrGet _ = getFileChooserNativeCancelLabel
attrSet _ = setFileChooserNativeCancelLabel
attrConstruct _ = constructFileChooserNativeCancelLabel
attrClear _ = clearFileChooserNativeCancelLabel
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList FileChooserNative
type instance O.AttributeList FileChooserNative = FileChooserNativeAttributeList
type FileChooserNativeAttributeList = ('[ '("acceptLabel", FileChooserNativeAcceptLabelPropertyInfo), '("action", Gtk.FileChooser.FileChooserActionPropertyInfo), '("cancelLabel", FileChooserNativeCancelLabelPropertyInfo), '("createFolders", Gtk.FileChooser.FileChooserCreateFoldersPropertyInfo), '("doOverwriteConfirmation", Gtk.FileChooser.FileChooserDoOverwriteConfirmationPropertyInfo), '("extraWidget", Gtk.FileChooser.FileChooserExtraWidgetPropertyInfo), '("filter", Gtk.FileChooser.FileChooserFilterPropertyInfo), '("localOnly", Gtk.FileChooser.FileChooserLocalOnlyPropertyInfo), '("modal", Gtk.NativeDialog.NativeDialogModalPropertyInfo), '("previewWidget", Gtk.FileChooser.FileChooserPreviewWidgetPropertyInfo), '("previewWidgetActive", Gtk.FileChooser.FileChooserPreviewWidgetActivePropertyInfo), '("selectMultiple", Gtk.FileChooser.FileChooserSelectMultiplePropertyInfo), '("showHidden", Gtk.FileChooser.FileChooserShowHiddenPropertyInfo), '("title", Gtk.NativeDialog.NativeDialogTitlePropertyInfo), '("transientFor", Gtk.NativeDialog.NativeDialogTransientForPropertyInfo), '("usePreviewLabel", Gtk.FileChooser.FileChooserUsePreviewLabelPropertyInfo), '("visible", Gtk.NativeDialog.NativeDialogVisiblePropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
fileChooserNativeAcceptLabel :: AttrLabelProxy "acceptLabel"
fileChooserNativeAcceptLabel = AttrLabelProxy
fileChooserNativeCancelLabel :: AttrLabelProxy "cancelLabel"
fileChooserNativeCancelLabel = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList FileChooserNative = FileChooserNativeSignalList
type FileChooserNativeSignalList = ('[ '("confirmOverwrite", Gtk.FileChooser.FileChooserConfirmOverwriteSignalInfo), '("currentFolderChanged", Gtk.FileChooser.FileChooserCurrentFolderChangedSignalInfo), '("fileActivated", Gtk.FileChooser.FileChooserFileActivatedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("response", Gtk.NativeDialog.NativeDialogResponseSignalInfo), '("selectionChanged", Gtk.FileChooser.FileChooserSelectionChangedSignalInfo), '("updatePreview", Gtk.FileChooser.FileChooserUpdatePreviewSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_file_chooser_native_new" gtk_file_chooser_native_new ::
CString ->
Ptr Gtk.Window.Window ->
CUInt ->
CString ->
CString ->
IO (Ptr FileChooserNative)
fileChooserNativeNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
Maybe (T.Text)
-> Maybe (a)
-> Gtk.Enums.FileChooserAction
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m FileChooserNative
fileChooserNativeNew title parent action acceptLabel cancelLabel = liftIO $ do
maybeTitle <- case title of
Nothing -> return nullPtr
Just jTitle -> do
jTitle' <- textToCString jTitle
return jTitle'
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
jParent' <- unsafeManagedPtrCastPtr jParent
return jParent'
let action' = (fromIntegral . fromEnum) action
maybeAcceptLabel <- case acceptLabel of
Nothing -> return nullPtr
Just jAcceptLabel -> do
jAcceptLabel' <- textToCString jAcceptLabel
return jAcceptLabel'
maybeCancelLabel <- case cancelLabel of
Nothing -> return nullPtr
Just jCancelLabel -> do
jCancelLabel' <- textToCString jCancelLabel
return jCancelLabel'
result <- gtk_file_chooser_native_new maybeTitle maybeParent action' maybeAcceptLabel maybeCancelLabel
checkUnexpectedReturnNULL "fileChooserNativeNew" result
result' <- (wrapObject FileChooserNative) result
whenJust parent touchManagedPtr
freeMem maybeTitle
freeMem maybeAcceptLabel
freeMem maybeCancelLabel
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_file_chooser_native_get_accept_label" gtk_file_chooser_native_get_accept_label ::
Ptr FileChooserNative ->
IO CString
fileChooserNativeGetAcceptLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooserNative a) =>
a
-> m (Maybe T.Text)
fileChooserNativeGetAcceptLabel self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_file_chooser_native_get_accept_label self'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr self
return maybeResult
#if ENABLE_OVERLOADING
data FileChooserNativeGetAcceptLabelMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooserNative a) => O.MethodInfo FileChooserNativeGetAcceptLabelMethodInfo a signature where
overloadedMethod _ = fileChooserNativeGetAcceptLabel
#endif
foreign import ccall "gtk_file_chooser_native_get_cancel_label" gtk_file_chooser_native_get_cancel_label ::
Ptr FileChooserNative ->
IO CString
fileChooserNativeGetCancelLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooserNative a) =>
a
-> m (Maybe T.Text)
fileChooserNativeGetCancelLabel self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_file_chooser_native_get_cancel_label self'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr self
return maybeResult
#if ENABLE_OVERLOADING
data FileChooserNativeGetCancelLabelMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileChooserNative a) => O.MethodInfo FileChooserNativeGetCancelLabelMethodInfo a signature where
overloadedMethod _ = fileChooserNativeGetCancelLabel
#endif
foreign import ccall "gtk_file_chooser_native_set_accept_label" gtk_file_chooser_native_set_accept_label ::
Ptr FileChooserNative ->
CString ->
IO ()
fileChooserNativeSetAcceptLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooserNative a) =>
a
-> Maybe (T.Text)
-> m ()
fileChooserNativeSetAcceptLabel self acceptLabel = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
maybeAcceptLabel <- case acceptLabel of
Nothing -> return nullPtr
Just jAcceptLabel -> do
jAcceptLabel' <- textToCString jAcceptLabel
return jAcceptLabel'
gtk_file_chooser_native_set_accept_label self' maybeAcceptLabel
touchManagedPtr self
freeMem maybeAcceptLabel
return ()
#if ENABLE_OVERLOADING
data FileChooserNativeSetAcceptLabelMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsFileChooserNative a) => O.MethodInfo FileChooserNativeSetAcceptLabelMethodInfo a signature where
overloadedMethod _ = fileChooserNativeSetAcceptLabel
#endif
foreign import ccall "gtk_file_chooser_native_set_cancel_label" gtk_file_chooser_native_set_cancel_label ::
Ptr FileChooserNative ->
CString ->
IO ()
fileChooserNativeSetCancelLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsFileChooserNative a) =>
a
-> Maybe (T.Text)
-> m ()
fileChooserNativeSetCancelLabel self cancelLabel = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
maybeCancelLabel <- case cancelLabel of
Nothing -> return nullPtr
Just jCancelLabel -> do
jCancelLabel' <- textToCString jCancelLabel
return jCancelLabel'
gtk_file_chooser_native_set_cancel_label self' maybeCancelLabel
touchManagedPtr self
freeMem maybeCancelLabel
return ()
#if ENABLE_OVERLOADING
data FileChooserNativeSetCancelLabelMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsFileChooserNative a) => O.MethodInfo FileChooserNativeSetCancelLabelMethodInfo a signature where
overloadedMethod _ = fileChooserNativeSetCancelLabel
#endif