#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.NativeDialog
(
NativeDialog(..) ,
IsNativeDialog ,
toNativeDialog ,
noNativeDialog ,
#if ENABLE_OVERLOADING
NativeDialogDestroyMethodInfo ,
#endif
nativeDialogDestroy ,
#if ENABLE_OVERLOADING
NativeDialogGetModalMethodInfo ,
#endif
nativeDialogGetModal ,
#if ENABLE_OVERLOADING
NativeDialogGetTitleMethodInfo ,
#endif
nativeDialogGetTitle ,
#if ENABLE_OVERLOADING
NativeDialogGetTransientForMethodInfo ,
#endif
nativeDialogGetTransientFor ,
#if ENABLE_OVERLOADING
NativeDialogGetVisibleMethodInfo ,
#endif
nativeDialogGetVisible ,
#if ENABLE_OVERLOADING
NativeDialogHideMethodInfo ,
#endif
nativeDialogHide ,
#if ENABLE_OVERLOADING
NativeDialogRunMethodInfo ,
#endif
nativeDialogRun ,
#if ENABLE_OVERLOADING
NativeDialogSetModalMethodInfo ,
#endif
nativeDialogSetModal ,
#if ENABLE_OVERLOADING
NativeDialogSetTitleMethodInfo ,
#endif
nativeDialogSetTitle ,
#if ENABLE_OVERLOADING
NativeDialogSetTransientForMethodInfo ,
#endif
nativeDialogSetTransientFor ,
#if ENABLE_OVERLOADING
NativeDialogShowMethodInfo ,
#endif
nativeDialogShow ,
#if ENABLE_OVERLOADING
NativeDialogModalPropertyInfo ,
#endif
constructNativeDialogModal ,
getNativeDialogModal ,
#if ENABLE_OVERLOADING
nativeDialogModal ,
#endif
setNativeDialogModal ,
#if ENABLE_OVERLOADING
NativeDialogTitlePropertyInfo ,
#endif
constructNativeDialogTitle ,
getNativeDialogTitle ,
#if ENABLE_OVERLOADING
nativeDialogTitle ,
#endif
setNativeDialogTitle ,
#if ENABLE_OVERLOADING
NativeDialogTransientForPropertyInfo ,
#endif
clearNativeDialogTransientFor ,
constructNativeDialogTransientFor ,
getNativeDialogTransientFor ,
#if ENABLE_OVERLOADING
nativeDialogTransientFor ,
#endif
setNativeDialogTransientFor ,
#if ENABLE_OVERLOADING
NativeDialogVisiblePropertyInfo ,
#endif
constructNativeDialogVisible ,
getNativeDialogVisible ,
#if ENABLE_OVERLOADING
nativeDialogVisible ,
#endif
setNativeDialogVisible ,
C_NativeDialogResponseCallback ,
NativeDialogResponseCallback ,
#if ENABLE_OVERLOADING
NativeDialogResponseSignalInfo ,
#endif
afterNativeDialogResponse ,
genClosure_NativeDialogResponse ,
mk_NativeDialogResponseCallback ,
noNativeDialogResponseCallback ,
onNativeDialogResponse ,
wrap_NativeDialogResponseCallback ,
) 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.Objects.Window as Gtk.Window
newtype NativeDialog = NativeDialog (ManagedPtr NativeDialog)
foreign import ccall "gtk_native_dialog_get_type"
c_gtk_native_dialog_get_type :: IO GType
instance GObject NativeDialog where
gobjectType = c_gtk_native_dialog_get_type
class (GObject o, O.IsDescendantOf NativeDialog o) => IsNativeDialog o
instance (GObject o, O.IsDescendantOf NativeDialog o) => IsNativeDialog o
instance O.HasParentTypes NativeDialog
type instance O.ParentTypes NativeDialog = '[GObject.Object.Object]
toNativeDialog :: (MonadIO m, IsNativeDialog o) => o -> m NativeDialog
toNativeDialog = liftIO . unsafeCastTo NativeDialog
noNativeDialog :: Maybe NativeDialog
noNativeDialog = Nothing
#if ENABLE_OVERLOADING
type family ResolveNativeDialogMethod (t :: Symbol) (o :: *) :: * where
ResolveNativeDialogMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveNativeDialogMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveNativeDialogMethod "destroy" o = NativeDialogDestroyMethodInfo
ResolveNativeDialogMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveNativeDialogMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveNativeDialogMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveNativeDialogMethod "hide" o = NativeDialogHideMethodInfo
ResolveNativeDialogMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveNativeDialogMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveNativeDialogMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveNativeDialogMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveNativeDialogMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveNativeDialogMethod "run" o = NativeDialogRunMethodInfo
ResolveNativeDialogMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveNativeDialogMethod "show" o = NativeDialogShowMethodInfo
ResolveNativeDialogMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveNativeDialogMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveNativeDialogMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveNativeDialogMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveNativeDialogMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveNativeDialogMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveNativeDialogMethod "getModal" o = NativeDialogGetModalMethodInfo
ResolveNativeDialogMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveNativeDialogMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveNativeDialogMethod "getTitle" o = NativeDialogGetTitleMethodInfo
ResolveNativeDialogMethod "getTransientFor" o = NativeDialogGetTransientForMethodInfo
ResolveNativeDialogMethod "getVisible" o = NativeDialogGetVisibleMethodInfo
ResolveNativeDialogMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveNativeDialogMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveNativeDialogMethod "setModal" o = NativeDialogSetModalMethodInfo
ResolveNativeDialogMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveNativeDialogMethod "setTitle" o = NativeDialogSetTitleMethodInfo
ResolveNativeDialogMethod "setTransientFor" o = NativeDialogSetTransientForMethodInfo
ResolveNativeDialogMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveNativeDialogMethod t NativeDialog, O.MethodInfo info NativeDialog p) => OL.IsLabel t (NativeDialog -> 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
type NativeDialogResponseCallback =
Int32
-> IO ()
noNativeDialogResponseCallback :: Maybe NativeDialogResponseCallback
noNativeDialogResponseCallback = Nothing
type C_NativeDialogResponseCallback =
Ptr () ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_NativeDialogResponseCallback :: C_NativeDialogResponseCallback -> IO (FunPtr C_NativeDialogResponseCallback)
genClosure_NativeDialogResponse :: MonadIO m => NativeDialogResponseCallback -> m (GClosure C_NativeDialogResponseCallback)
genClosure_NativeDialogResponse cb = liftIO $ do
let cb' = wrap_NativeDialogResponseCallback cb
mk_NativeDialogResponseCallback cb' >>= B.GClosure.newGClosure
wrap_NativeDialogResponseCallback ::
NativeDialogResponseCallback ->
C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback _cb _ responseId _ = do
_cb responseId
onNativeDialogResponse :: (IsNativeDialog a, MonadIO m) => a -> NativeDialogResponseCallback -> m SignalHandlerId
onNativeDialogResponse obj cb = liftIO $ do
let cb' = wrap_NativeDialogResponseCallback cb
cb'' <- mk_NativeDialogResponseCallback cb'
connectSignalFunPtr obj "response" cb'' SignalConnectBefore
afterNativeDialogResponse :: (IsNativeDialog a, MonadIO m) => a -> NativeDialogResponseCallback -> m SignalHandlerId
afterNativeDialogResponse obj cb = liftIO $ do
let cb' = wrap_NativeDialogResponseCallback cb
cb'' <- mk_NativeDialogResponseCallback cb'
connectSignalFunPtr obj "response" cb'' SignalConnectAfter
getNativeDialogModal :: (MonadIO m, IsNativeDialog o) => o -> m Bool
getNativeDialogModal obj = liftIO $ B.Properties.getObjectPropertyBool obj "modal"
setNativeDialogModal :: (MonadIO m, IsNativeDialog o) => o -> Bool -> m ()
setNativeDialogModal obj val = liftIO $ B.Properties.setObjectPropertyBool obj "modal" val
constructNativeDialogModal :: (IsNativeDialog o) => Bool -> IO (GValueConstruct o)
constructNativeDialogModal val = B.Properties.constructObjectPropertyBool "modal" val
#if ENABLE_OVERLOADING
data NativeDialogModalPropertyInfo
instance AttrInfo NativeDialogModalPropertyInfo where
type AttrAllowedOps NativeDialogModalPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint NativeDialogModalPropertyInfo = (~) Bool
type AttrBaseTypeConstraint NativeDialogModalPropertyInfo = IsNativeDialog
type AttrGetType NativeDialogModalPropertyInfo = Bool
type AttrLabel NativeDialogModalPropertyInfo = "modal"
type AttrOrigin NativeDialogModalPropertyInfo = NativeDialog
attrGet _ = getNativeDialogModal
attrSet _ = setNativeDialogModal
attrConstruct _ = constructNativeDialogModal
attrClear _ = undefined
#endif
getNativeDialogTitle :: (MonadIO m, IsNativeDialog o) => o -> m (Maybe T.Text)
getNativeDialogTitle obj = liftIO $ B.Properties.getObjectPropertyString obj "title"
setNativeDialogTitle :: (MonadIO m, IsNativeDialog o) => o -> T.Text -> m ()
setNativeDialogTitle obj val = liftIO $ B.Properties.setObjectPropertyString obj "title" (Just val)
constructNativeDialogTitle :: (IsNativeDialog o) => T.Text -> IO (GValueConstruct o)
constructNativeDialogTitle val = B.Properties.constructObjectPropertyString "title" (Just val)
#if ENABLE_OVERLOADING
data NativeDialogTitlePropertyInfo
instance AttrInfo NativeDialogTitlePropertyInfo where
type AttrAllowedOps NativeDialogTitlePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint NativeDialogTitlePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint NativeDialogTitlePropertyInfo = IsNativeDialog
type AttrGetType NativeDialogTitlePropertyInfo = (Maybe T.Text)
type AttrLabel NativeDialogTitlePropertyInfo = "title"
type AttrOrigin NativeDialogTitlePropertyInfo = NativeDialog
attrGet _ = getNativeDialogTitle
attrSet _ = setNativeDialogTitle
attrConstruct _ = constructNativeDialogTitle
attrClear _ = undefined
#endif
getNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o) => o -> m (Maybe Gtk.Window.Window)
getNativeDialogTransientFor obj = liftIO $ B.Properties.getObjectPropertyObject obj "transient-for" Gtk.Window.Window
setNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o, Gtk.Window.IsWindow a) => o -> a -> m ()
setNativeDialogTransientFor obj val = liftIO $ B.Properties.setObjectPropertyObject obj "transient-for" (Just val)
constructNativeDialogTransientFor :: (IsNativeDialog o, Gtk.Window.IsWindow a) => a -> IO (GValueConstruct o)
constructNativeDialogTransientFor val = B.Properties.constructObjectPropertyObject "transient-for" (Just val)
clearNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o) => o -> m ()
clearNativeDialogTransientFor obj = liftIO $ B.Properties.setObjectPropertyObject obj "transient-for" (Nothing :: Maybe Gtk.Window.Window)
#if ENABLE_OVERLOADING
data NativeDialogTransientForPropertyInfo
instance AttrInfo NativeDialogTransientForPropertyInfo where
type AttrAllowedOps NativeDialogTransientForPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint NativeDialogTransientForPropertyInfo = Gtk.Window.IsWindow
type AttrBaseTypeConstraint NativeDialogTransientForPropertyInfo = IsNativeDialog
type AttrGetType NativeDialogTransientForPropertyInfo = (Maybe Gtk.Window.Window)
type AttrLabel NativeDialogTransientForPropertyInfo = "transient-for"
type AttrOrigin NativeDialogTransientForPropertyInfo = NativeDialog
attrGet _ = getNativeDialogTransientFor
attrSet _ = setNativeDialogTransientFor
attrConstruct _ = constructNativeDialogTransientFor
attrClear _ = clearNativeDialogTransientFor
#endif
getNativeDialogVisible :: (MonadIO m, IsNativeDialog o) => o -> m Bool
getNativeDialogVisible obj = liftIO $ B.Properties.getObjectPropertyBool obj "visible"
setNativeDialogVisible :: (MonadIO m, IsNativeDialog o) => o -> Bool -> m ()
setNativeDialogVisible obj val = liftIO $ B.Properties.setObjectPropertyBool obj "visible" val
constructNativeDialogVisible :: (IsNativeDialog o) => Bool -> IO (GValueConstruct o)
constructNativeDialogVisible val = B.Properties.constructObjectPropertyBool "visible" val
#if ENABLE_OVERLOADING
data NativeDialogVisiblePropertyInfo
instance AttrInfo NativeDialogVisiblePropertyInfo where
type AttrAllowedOps NativeDialogVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint NativeDialogVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint NativeDialogVisiblePropertyInfo = IsNativeDialog
type AttrGetType NativeDialogVisiblePropertyInfo = Bool
type AttrLabel NativeDialogVisiblePropertyInfo = "visible"
type AttrOrigin NativeDialogVisiblePropertyInfo = NativeDialog
attrGet _ = getNativeDialogVisible
attrSet _ = setNativeDialogVisible
attrConstruct _ = constructNativeDialogVisible
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList NativeDialog
type instance O.AttributeList NativeDialog = NativeDialogAttributeList
type NativeDialogAttributeList = ('[ '("modal", NativeDialogModalPropertyInfo), '("title", NativeDialogTitlePropertyInfo), '("transientFor", NativeDialogTransientForPropertyInfo), '("visible", NativeDialogVisiblePropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
nativeDialogModal :: AttrLabelProxy "modal"
nativeDialogModal = AttrLabelProxy
nativeDialogTitle :: AttrLabelProxy "title"
nativeDialogTitle = AttrLabelProxy
nativeDialogTransientFor :: AttrLabelProxy "transientFor"
nativeDialogTransientFor = AttrLabelProxy
nativeDialogVisible :: AttrLabelProxy "visible"
nativeDialogVisible = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data NativeDialogResponseSignalInfo
instance SignalInfo NativeDialogResponseSignalInfo where
type HaskellCallbackType NativeDialogResponseSignalInfo = NativeDialogResponseCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_NativeDialogResponseCallback cb
cb'' <- mk_NativeDialogResponseCallback cb'
connectSignalFunPtr obj "response" cb'' connectMode
type instance O.SignalList NativeDialog = NativeDialogSignalList
type NativeDialogSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("response", NativeDialogResponseSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_native_dialog_destroy" gtk_native_dialog_destroy ::
Ptr NativeDialog ->
IO ()
nativeDialogDestroy ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m ()
nativeDialogDestroy self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
gtk_native_dialog_destroy self'
touchManagedPtr self
return ()
#if ENABLE_OVERLOADING
data NativeDialogDestroyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogDestroyMethodInfo a signature where
overloadedMethod _ = nativeDialogDestroy
#endif
foreign import ccall "gtk_native_dialog_get_modal" gtk_native_dialog_get_modal ::
Ptr NativeDialog ->
IO CInt
nativeDialogGetModal ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m Bool
nativeDialogGetModal self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_native_dialog_get_modal self'
let result' = (/= 0) result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data NativeDialogGetModalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogGetModalMethodInfo a signature where
overloadedMethod _ = nativeDialogGetModal
#endif
foreign import ccall "gtk_native_dialog_get_title" gtk_native_dialog_get_title ::
Ptr NativeDialog ->
IO CString
nativeDialogGetTitle ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m (Maybe T.Text)
nativeDialogGetTitle self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_native_dialog_get_title self'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr self
return maybeResult
#if ENABLE_OVERLOADING
data NativeDialogGetTitleMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogGetTitleMethodInfo a signature where
overloadedMethod _ = nativeDialogGetTitle
#endif
foreign import ccall "gtk_native_dialog_get_transient_for" gtk_native_dialog_get_transient_for ::
Ptr NativeDialog ->
IO (Ptr Gtk.Window.Window)
nativeDialogGetTransientFor ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m (Maybe Gtk.Window.Window)
nativeDialogGetTransientFor self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_native_dialog_get_transient_for self'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gtk.Window.Window) result'
return result''
touchManagedPtr self
return maybeResult
#if ENABLE_OVERLOADING
data NativeDialogGetTransientForMethodInfo
instance (signature ~ (m (Maybe Gtk.Window.Window)), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogGetTransientForMethodInfo a signature where
overloadedMethod _ = nativeDialogGetTransientFor
#endif
foreign import ccall "gtk_native_dialog_get_visible" gtk_native_dialog_get_visible ::
Ptr NativeDialog ->
IO CInt
nativeDialogGetVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m Bool
nativeDialogGetVisible self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_native_dialog_get_visible self'
let result' = (/= 0) result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data NativeDialogGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogGetVisibleMethodInfo a signature where
overloadedMethod _ = nativeDialogGetVisible
#endif
foreign import ccall "gtk_native_dialog_hide" gtk_native_dialog_hide ::
Ptr NativeDialog ->
IO ()
nativeDialogHide ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m ()
nativeDialogHide self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
gtk_native_dialog_hide self'
touchManagedPtr self
return ()
#if ENABLE_OVERLOADING
data NativeDialogHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogHideMethodInfo a signature where
overloadedMethod _ = nativeDialogHide
#endif
foreign import ccall "gtk_native_dialog_run" gtk_native_dialog_run ::
Ptr NativeDialog ->
IO Int32
nativeDialogRun ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m Int32
nativeDialogRun self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- gtk_native_dialog_run self'
touchManagedPtr self
return result
#if ENABLE_OVERLOADING
data NativeDialogRunMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogRunMethodInfo a signature where
overloadedMethod _ = nativeDialogRun
#endif
foreign import ccall "gtk_native_dialog_set_modal" gtk_native_dialog_set_modal ::
Ptr NativeDialog ->
CInt ->
IO ()
nativeDialogSetModal ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> Bool
-> m ()
nativeDialogSetModal self modal = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
let modal' = (fromIntegral . fromEnum) modal
gtk_native_dialog_set_modal self' modal'
touchManagedPtr self
return ()
#if ENABLE_OVERLOADING
data NativeDialogSetModalMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogSetModalMethodInfo a signature where
overloadedMethod _ = nativeDialogSetModal
#endif
foreign import ccall "gtk_native_dialog_set_title" gtk_native_dialog_set_title ::
Ptr NativeDialog ->
CString ->
IO ()
nativeDialogSetTitle ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> T.Text
-> m ()
nativeDialogSetTitle self title = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
title' <- textToCString title
gtk_native_dialog_set_title self' title'
touchManagedPtr self
freeMem title'
return ()
#if ENABLE_OVERLOADING
data NativeDialogSetTitleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogSetTitleMethodInfo a signature where
overloadedMethod _ = nativeDialogSetTitle
#endif
foreign import ccall "gtk_native_dialog_set_transient_for" gtk_native_dialog_set_transient_for ::
Ptr NativeDialog ->
Ptr Gtk.Window.Window ->
IO ()
nativeDialogSetTransientFor ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a, Gtk.Window.IsWindow b) =>
a
-> Maybe (b)
-> m ()
nativeDialogSetTransientFor self parent = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
jParent' <- unsafeManagedPtrCastPtr jParent
return jParent'
gtk_native_dialog_set_transient_for self' maybeParent
touchManagedPtr self
whenJust parent touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data NativeDialogSetTransientForMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsNativeDialog a, Gtk.Window.IsWindow b) => O.MethodInfo NativeDialogSetTransientForMethodInfo a signature where
overloadedMethod _ = nativeDialogSetTransientFor
#endif
foreign import ccall "gtk_native_dialog_show" gtk_native_dialog_show ::
Ptr NativeDialog ->
IO ()
nativeDialogShow ::
(B.CallStack.HasCallStack, MonadIO m, IsNativeDialog a) =>
a
-> m ()
nativeDialogShow self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
gtk_native_dialog_show self'
touchManagedPtr self
return ()
#if ENABLE_OVERLOADING
data NativeDialogShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogShowMethodInfo a signature where
overloadedMethod _ = nativeDialogShow
#endif