{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.NativeDialog
(
NativeDialog(..) ,
IsNativeDialog ,
toNativeDialog ,
noNativeDialog ,
#if defined(ENABLE_OVERLOADING)
ResolveNativeDialogMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
NativeDialogDestroyMethodInfo ,
#endif
nativeDialogDestroy ,
#if defined(ENABLE_OVERLOADING)
NativeDialogGetModalMethodInfo ,
#endif
nativeDialogGetModal ,
#if defined(ENABLE_OVERLOADING)
NativeDialogGetTitleMethodInfo ,
#endif
nativeDialogGetTitle ,
#if defined(ENABLE_OVERLOADING)
NativeDialogGetTransientForMethodInfo ,
#endif
nativeDialogGetTransientFor ,
#if defined(ENABLE_OVERLOADING)
NativeDialogGetVisibleMethodInfo ,
#endif
nativeDialogGetVisible ,
#if defined(ENABLE_OVERLOADING)
NativeDialogHideMethodInfo ,
#endif
nativeDialogHide ,
#if defined(ENABLE_OVERLOADING)
NativeDialogRunMethodInfo ,
#endif
nativeDialogRun ,
#if defined(ENABLE_OVERLOADING)
NativeDialogSetModalMethodInfo ,
#endif
nativeDialogSetModal ,
#if defined(ENABLE_OVERLOADING)
NativeDialogSetTitleMethodInfo ,
#endif
nativeDialogSetTitle ,
#if defined(ENABLE_OVERLOADING)
NativeDialogSetTransientForMethodInfo ,
#endif
nativeDialogSetTransientFor ,
#if defined(ENABLE_OVERLOADING)
NativeDialogShowMethodInfo ,
#endif
nativeDialogShow ,
#if defined(ENABLE_OVERLOADING)
NativeDialogModalPropertyInfo ,
#endif
constructNativeDialogModal ,
getNativeDialogModal ,
#if defined(ENABLE_OVERLOADING)
nativeDialogModal ,
#endif
setNativeDialogModal ,
#if defined(ENABLE_OVERLOADING)
NativeDialogTitlePropertyInfo ,
#endif
constructNativeDialogTitle ,
getNativeDialogTitle ,
#if defined(ENABLE_OVERLOADING)
nativeDialogTitle ,
#endif
setNativeDialogTitle ,
#if defined(ENABLE_OVERLOADING)
NativeDialogTransientForPropertyInfo ,
#endif
clearNativeDialogTransientFor ,
constructNativeDialogTransientFor ,
getNativeDialogTransientFor ,
#if defined(ENABLE_OVERLOADING)
nativeDialogTransientFor ,
#endif
setNativeDialogTransientFor ,
#if defined(ENABLE_OVERLOADING)
NativeDialogVisiblePropertyInfo ,
#endif
constructNativeDialogVisible ,
getNativeDialogVisible ,
#if defined(ENABLE_OVERLOADING)
nativeDialogVisible ,
#endif
setNativeDialogVisible ,
C_NativeDialogResponseCallback ,
NativeDialogResponseCallback ,
#if defined(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.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
newtype NativeDialog = NativeDialog (ManagedPtr NativeDialog)
deriving (NativeDialog -> NativeDialog -> Bool
(NativeDialog -> NativeDialog -> Bool)
-> (NativeDialog -> NativeDialog -> Bool) -> Eq NativeDialog
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NativeDialog -> NativeDialog -> Bool
$c/= :: NativeDialog -> NativeDialog -> Bool
== :: NativeDialog -> NativeDialog -> Bool
$c== :: NativeDialog -> NativeDialog -> Bool
Eq)
foreign import ccall "gtk_native_dialog_get_type"
c_gtk_native_dialog_get_type :: IO GType
instance GObject NativeDialog where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_native_dialog_get_type
instance B.GValue.IsGValue NativeDialog where
toGValue :: NativeDialog -> IO GValue
toGValue o :: NativeDialog
o = do
GType
gtype <- IO GType
c_gtk_native_dialog_get_type
NativeDialog -> (Ptr NativeDialog -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr NativeDialog
o (GType
-> (GValue -> Ptr NativeDialog -> IO ())
-> Ptr NativeDialog
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr NativeDialog -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO NativeDialog
fromGValue gv :: GValue
gv = do
Ptr NativeDialog
ptr <- GValue -> IO (Ptr NativeDialog)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr NativeDialog)
(ManagedPtr NativeDialog -> NativeDialog)
-> Ptr NativeDialog -> IO NativeDialog
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr NativeDialog -> NativeDialog
NativeDialog Ptr NativeDialog
ptr
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 :: o -> m NativeDialog
toNativeDialog = IO NativeDialog -> m NativeDialog
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NativeDialog -> m NativeDialog)
-> (o -> IO NativeDialog) -> o -> m NativeDialog
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr NativeDialog -> NativeDialog) -> o -> IO NativeDialog
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr NativeDialog -> NativeDialog
NativeDialog
noNativeDialog :: Maybe NativeDialog
noNativeDialog :: Maybe NativeDialog
noNativeDialog = Maybe NativeDialog
forall a. Maybe a
Nothing
#if defined(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 @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type NativeDialogResponseCallback =
Int32
-> IO ()
noNativeDialogResponseCallback :: Maybe NativeDialogResponseCallback
noNativeDialogResponseCallback :: Maybe NativeDialogResponseCallback
noNativeDialogResponseCallback = Maybe NativeDialogResponseCallback
forall a. Maybe a
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 :: NativeDialogResponseCallback
-> m (GClosure C_NativeDialogResponseCallback)
genClosure_NativeDialogResponse cb :: NativeDialogResponseCallback
cb = IO (GClosure C_NativeDialogResponseCallback)
-> m (GClosure C_NativeDialogResponseCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_NativeDialogResponseCallback)
-> m (GClosure C_NativeDialogResponseCallback))
-> IO (GClosure C_NativeDialogResponseCallback)
-> m (GClosure C_NativeDialogResponseCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_NativeDialogResponseCallback
cb' = NativeDialogResponseCallback -> C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback NativeDialogResponseCallback
cb
C_NativeDialogResponseCallback
-> IO (FunPtr C_NativeDialogResponseCallback)
mk_NativeDialogResponseCallback C_NativeDialogResponseCallback
cb' IO (FunPtr C_NativeDialogResponseCallback)
-> (FunPtr C_NativeDialogResponseCallback
-> IO (GClosure C_NativeDialogResponseCallback))
-> IO (GClosure C_NativeDialogResponseCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_NativeDialogResponseCallback
-> IO (GClosure C_NativeDialogResponseCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_NativeDialogResponseCallback ::
NativeDialogResponseCallback ->
C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback :: NativeDialogResponseCallback -> C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback _cb :: NativeDialogResponseCallback
_cb _ responseId :: Int32
responseId _ = do
NativeDialogResponseCallback
_cb Int32
responseId
onNativeDialogResponse :: (IsNativeDialog a, MonadIO m) => a -> NativeDialogResponseCallback -> m SignalHandlerId
onNativeDialogResponse :: a -> NativeDialogResponseCallback -> m SignalHandlerId
onNativeDialogResponse obj :: a
obj cb :: NativeDialogResponseCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_NativeDialogResponseCallback
cb' = NativeDialogResponseCallback -> C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback NativeDialogResponseCallback
cb
FunPtr C_NativeDialogResponseCallback
cb'' <- C_NativeDialogResponseCallback
-> IO (FunPtr C_NativeDialogResponseCallback)
mk_NativeDialogResponseCallback C_NativeDialogResponseCallback
cb'
a
-> Text
-> FunPtr C_NativeDialogResponseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "response" FunPtr C_NativeDialogResponseCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterNativeDialogResponse :: (IsNativeDialog a, MonadIO m) => a -> NativeDialogResponseCallback -> m SignalHandlerId
afterNativeDialogResponse :: a -> NativeDialogResponseCallback -> m SignalHandlerId
afterNativeDialogResponse obj :: a
obj cb :: NativeDialogResponseCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_NativeDialogResponseCallback
cb' = NativeDialogResponseCallback -> C_NativeDialogResponseCallback
wrap_NativeDialogResponseCallback NativeDialogResponseCallback
cb
FunPtr C_NativeDialogResponseCallback
cb'' <- C_NativeDialogResponseCallback
-> IO (FunPtr C_NativeDialogResponseCallback)
mk_NativeDialogResponseCallback C_NativeDialogResponseCallback
cb'
a
-> Text
-> FunPtr C_NativeDialogResponseCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "response" FunPtr C_NativeDialogResponseCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data NativeDialogResponseSignalInfo
instance SignalInfo NativeDialogResponseSignalInfo where
type HaskellCallbackType NativeDialogResponseSignalInfo = NativeDialogResponseCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_NativeDialogResponseCallback cb
cb'' <- mk_NativeDialogResponseCallback cb'
connectSignalFunPtr obj "response" cb'' connectMode detail
#endif
getNativeDialogModal :: (MonadIO m, IsNativeDialog o) => o -> m Bool
getNativeDialogModal :: o -> m Bool
getNativeDialogModal obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "modal"
setNativeDialogModal :: (MonadIO m, IsNativeDialog o) => o -> Bool -> m ()
setNativeDialogModal :: o -> Bool -> m ()
setNativeDialogModal obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "modal" Bool
val
constructNativeDialogModal :: (IsNativeDialog o) => Bool -> IO (GValueConstruct o)
constructNativeDialogModal :: Bool -> IO (GValueConstruct o)
constructNativeDialogModal val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "modal" Bool
val
#if defined(ENABLE_OVERLOADING)
data NativeDialogModalPropertyInfo
instance AttrInfo NativeDialogModalPropertyInfo where
type AttrAllowedOps NativeDialogModalPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint NativeDialogModalPropertyInfo = IsNativeDialog
type AttrSetTypeConstraint NativeDialogModalPropertyInfo = (~) Bool
type AttrTransferTypeConstraint NativeDialogModalPropertyInfo = (~) Bool
type AttrTransferType NativeDialogModalPropertyInfo = Bool
type AttrGetType NativeDialogModalPropertyInfo = Bool
type AttrLabel NativeDialogModalPropertyInfo = "modal"
type AttrOrigin NativeDialogModalPropertyInfo = NativeDialog
attrGet = getNativeDialogModal
attrSet = setNativeDialogModal
attrTransfer _ v = do
return v
attrConstruct = constructNativeDialogModal
attrClear = undefined
#endif
getNativeDialogTitle :: (MonadIO m, IsNativeDialog o) => o -> m (Maybe T.Text)
getNativeDialogTitle :: o -> m (Maybe Text)
getNativeDialogTitle obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "title"
setNativeDialogTitle :: (MonadIO m, IsNativeDialog o) => o -> T.Text -> m ()
setNativeDialogTitle :: o -> Text -> m ()
setNativeDialogTitle obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "title" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructNativeDialogTitle :: (IsNativeDialog o) => T.Text -> IO (GValueConstruct o)
constructNativeDialogTitle :: Text -> IO (GValueConstruct o)
constructNativeDialogTitle val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "title" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
#if defined(ENABLE_OVERLOADING)
data NativeDialogTitlePropertyInfo
instance AttrInfo NativeDialogTitlePropertyInfo where
type AttrAllowedOps NativeDialogTitlePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint NativeDialogTitlePropertyInfo = IsNativeDialog
type AttrSetTypeConstraint NativeDialogTitlePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint NativeDialogTitlePropertyInfo = (~) T.Text
type AttrTransferType NativeDialogTitlePropertyInfo = T.Text
type AttrGetType NativeDialogTitlePropertyInfo = (Maybe T.Text)
type AttrLabel NativeDialogTitlePropertyInfo = "title"
type AttrOrigin NativeDialogTitlePropertyInfo = NativeDialog
attrGet = getNativeDialogTitle
attrSet = setNativeDialogTitle
attrTransfer _ v = do
return v
attrConstruct = constructNativeDialogTitle
attrClear = undefined
#endif
getNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o) => o -> m (Maybe Gtk.Window.Window)
getNativeDialogTransientFor :: o -> m (Maybe Window)
getNativeDialogTransientFor obj :: o
obj = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Window -> Window) -> IO (Maybe Window)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "transient-for" ManagedPtr Window -> Window
Gtk.Window.Window
setNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o, Gtk.Window.IsWindow a) => o -> a -> m ()
setNativeDialogTransientFor :: o -> a -> m ()
setNativeDialogTransientFor obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "transient-for" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructNativeDialogTransientFor :: (IsNativeDialog o, Gtk.Window.IsWindow a) => a -> IO (GValueConstruct o)
constructNativeDialogTransientFor :: a -> IO (GValueConstruct o)
constructNativeDialogTransientFor val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "transient-for" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
clearNativeDialogTransientFor :: (MonadIO m, IsNativeDialog o) => o -> m ()
clearNativeDialogTransientFor :: o -> m ()
clearNativeDialogTransientFor obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Window -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "transient-for" (Maybe Window
forall a. Maybe a
Nothing :: Maybe Gtk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data NativeDialogTransientForPropertyInfo
instance AttrInfo NativeDialogTransientForPropertyInfo where
type AttrAllowedOps NativeDialogTransientForPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint NativeDialogTransientForPropertyInfo = IsNativeDialog
type AttrSetTypeConstraint NativeDialogTransientForPropertyInfo = Gtk.Window.IsWindow
type AttrTransferTypeConstraint NativeDialogTransientForPropertyInfo = Gtk.Window.IsWindow
type AttrTransferType NativeDialogTransientForPropertyInfo = Gtk.Window.Window
type AttrGetType NativeDialogTransientForPropertyInfo = (Maybe Gtk.Window.Window)
type AttrLabel NativeDialogTransientForPropertyInfo = "transient-for"
type AttrOrigin NativeDialogTransientForPropertyInfo = NativeDialog
attrGet = getNativeDialogTransientFor
attrSet = setNativeDialogTransientFor
attrTransfer _ v = do
unsafeCastTo Gtk.Window.Window v
attrConstruct = constructNativeDialogTransientFor
attrClear = clearNativeDialogTransientFor
#endif
getNativeDialogVisible :: (MonadIO m, IsNativeDialog o) => o -> m Bool
getNativeDialogVisible :: o -> m Bool
getNativeDialogVisible obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "visible"
setNativeDialogVisible :: (MonadIO m, IsNativeDialog o) => o -> Bool -> m ()
setNativeDialogVisible :: o -> Bool -> m ()
setNativeDialogVisible obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "visible" Bool
val
constructNativeDialogVisible :: (IsNativeDialog o) => Bool -> IO (GValueConstruct o)
constructNativeDialogVisible :: Bool -> IO (GValueConstruct o)
constructNativeDialogVisible val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "visible" Bool
val
#if defined(ENABLE_OVERLOADING)
data NativeDialogVisiblePropertyInfo
instance AttrInfo NativeDialogVisiblePropertyInfo where
type AttrAllowedOps NativeDialogVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint NativeDialogVisiblePropertyInfo = IsNativeDialog
type AttrSetTypeConstraint NativeDialogVisiblePropertyInfo = (~) Bool
type AttrTransferTypeConstraint NativeDialogVisiblePropertyInfo = (~) Bool
type AttrTransferType NativeDialogVisiblePropertyInfo = Bool
type AttrGetType NativeDialogVisiblePropertyInfo = Bool
type AttrLabel NativeDialogVisiblePropertyInfo = "visible"
type AttrOrigin NativeDialogVisiblePropertyInfo = NativeDialog
attrGet = getNativeDialogVisible
attrSet = setNativeDialogVisible
attrTransfer _ v = do
return v
attrConstruct = constructNativeDialogVisible
attrClear = undefined
#endif
#if defined(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 defined(ENABLE_OVERLOADING)
nativeDialogModal :: AttrLabelProxy "modal"
nativeDialogModal = AttrLabelProxy
nativeDialogTitle :: AttrLabelProxy "title"
nativeDialogTitle = AttrLabelProxy
nativeDialogTransientFor :: AttrLabelProxy "transientFor"
nativeDialogTransientFor = AttrLabelProxy
nativeDialogVisible :: AttrLabelProxy "visible"
nativeDialogVisible = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
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 :: a -> m ()
nativeDialogDestroy self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr NativeDialog -> IO ()
gtk_native_dialog_destroy Ptr NativeDialog
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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 :: a -> m Bool
nativeDialogGetModal self :: a
self = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr NativeDialog -> IO CInt
gtk_native_dialog_get_modal Ptr NativeDialog
self'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(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 :: a -> m (Maybe Text)
nativeDialogGetTitle self :: a
self = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
result <- Ptr NativeDialog -> IO CString
gtk_native_dialog_get_title Ptr NativeDialog
self'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(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 :: a -> m (Maybe Window)
nativeDialogGetTransientFor self :: a
self = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Window
result <- Ptr NativeDialog -> IO (Ptr Window)
gtk_native_dialog_get_transient_for Ptr NativeDialog
self'
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
result'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult
#if defined(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 :: a -> m Bool
nativeDialogGetVisible self :: a
self = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr NativeDialog -> IO CInt
gtk_native_dialog_get_visible Ptr NativeDialog
self'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(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 :: a -> m ()
nativeDialogHide self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr NativeDialog -> IO ()
gtk_native_dialog_hide Ptr NativeDialog
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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 :: a -> m Int32
nativeDialogRun self :: a
self = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Int32
result <- Ptr NativeDialog -> IO Int32
gtk_native_dialog_run Ptr NativeDialog
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(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 :: a -> Bool -> m ()
nativeDialogSetModal self :: a
self modal :: Bool
modal = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let modal' :: CInt
modal' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
modal
Ptr NativeDialog -> CInt -> IO ()
gtk_native_dialog_set_modal Ptr NativeDialog
self' CInt
modal'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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 :: a -> Text -> m ()
nativeDialogSetTitle self :: a
self title :: Text
title = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
title' <- Text -> IO CString
textToCString Text
title
Ptr NativeDialog -> CString -> IO ()
gtk_native_dialog_set_title Ptr NativeDialog
self' CString
title'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
title'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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 :: a -> Maybe b -> m ()
nativeDialogSetTransientFor self :: a
self parent :: Maybe b
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Window
maybeParent <- case Maybe b
parent of
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just jParent :: b
jParent -> do
Ptr Window
jParent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jParent
Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr NativeDialog -> Ptr Window -> IO ()
gtk_native_dialog_set_transient_for Ptr NativeDialog
self' Ptr Window
maybeParent
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
parent b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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 :: a -> m ()
nativeDialogShow self :: a
self = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr NativeDialog
self' <- a -> IO (Ptr NativeDialog)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr NativeDialog -> IO ()
gtk_native_dialog_show Ptr NativeDialog
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data NativeDialogShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNativeDialog a) => O.MethodInfo NativeDialogShowMethodInfo a signature where
overloadedMethod = nativeDialogShow
#endif