{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.MountOperation
(
MountOperation(..) ,
IsMountOperation ,
toMountOperation ,
#if defined(ENABLE_OVERLOADING)
ResolveMountOperationMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
MountOperationGetParentMethodInfo ,
#endif
mountOperationGetParent ,
#if defined(ENABLE_OVERLOADING)
MountOperationGetScreenMethodInfo ,
#endif
mountOperationGetScreen ,
#if defined(ENABLE_OVERLOADING)
MountOperationIsShowingMethodInfo ,
#endif
mountOperationIsShowing ,
mountOperationNew ,
#if defined(ENABLE_OVERLOADING)
MountOperationSetParentMethodInfo ,
#endif
mountOperationSetParent ,
#if defined(ENABLE_OVERLOADING)
MountOperationSetScreenMethodInfo ,
#endif
mountOperationSetScreen ,
#if defined(ENABLE_OVERLOADING)
MountOperationIsShowingPropertyInfo ,
#endif
getMountOperationIsShowing ,
#if defined(ENABLE_OVERLOADING)
MountOperationParentPropertyInfo ,
#endif
clearMountOperationParent ,
constructMountOperationParent ,
getMountOperationParent ,
#if defined(ENABLE_OVERLOADING)
mountOperationParent ,
#endif
setMountOperationParent ,
#if defined(ENABLE_OVERLOADING)
MountOperationScreenPropertyInfo ,
#endif
constructMountOperationScreen ,
getMountOperationScreen ,
#if defined(ENABLE_OVERLOADING)
mountOperationScreen ,
#endif
setMountOperationScreen ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Screen as Gdk.Screen
import qualified GI.Gio.Objects.MountOperation as Gio.MountOperation
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
newtype MountOperation = MountOperation (SP.ManagedPtr MountOperation)
deriving (MountOperation -> MountOperation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MountOperation -> MountOperation -> Bool
$c/= :: MountOperation -> MountOperation -> Bool
== :: MountOperation -> MountOperation -> Bool
$c== :: MountOperation -> MountOperation -> Bool
Eq)
instance SP.ManagedPtrNewtype MountOperation where
toManagedPtr :: MountOperation -> ManagedPtr MountOperation
toManagedPtr (MountOperation ManagedPtr MountOperation
p) = ManagedPtr MountOperation
p
foreign import ccall "gtk_mount_operation_get_type"
c_gtk_mount_operation_get_type :: IO B.Types.GType
instance B.Types.TypedObject MountOperation where
glibType :: IO GType
glibType = IO GType
c_gtk_mount_operation_get_type
instance B.Types.GObject MountOperation
class (SP.GObject o, O.IsDescendantOf MountOperation o) => IsMountOperation o
instance (SP.GObject o, O.IsDescendantOf MountOperation o) => IsMountOperation o
instance O.HasParentTypes MountOperation
type instance O.ParentTypes MountOperation = '[Gio.MountOperation.MountOperation, GObject.Object.Object]
toMountOperation :: (MIO.MonadIO m, IsMountOperation o) => o -> m MountOperation
toMountOperation :: forall (m :: * -> *) o.
(MonadIO m, IsMountOperation o) =>
o -> m MountOperation
toMountOperation = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr MountOperation -> MountOperation
MountOperation
instance B.GValue.IsGValue (Maybe MountOperation) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_mount_operation_get_type
gvalueSet_ :: Ptr GValue -> Maybe MountOperation -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MountOperation
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr MountOperation)
gvalueSet_ Ptr GValue
gv (P.Just MountOperation
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MountOperation
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe MountOperation)
gvalueGet_ Ptr GValue
gv = do
Ptr MountOperation
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr MountOperation)
if Ptr MountOperation
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr MountOperation -> MountOperation
MountOperation Ptr MountOperation
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveMountOperationMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveMountOperationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMountOperationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMountOperationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMountOperationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMountOperationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMountOperationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMountOperationMethod "isShowing" o = MountOperationIsShowingMethodInfo
ResolveMountOperationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMountOperationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMountOperationMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMountOperationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMountOperationMethod "reply" o = Gio.MountOperation.MountOperationReplyMethodInfo
ResolveMountOperationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMountOperationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMountOperationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMountOperationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMountOperationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMountOperationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMountOperationMethod "getAnonymous" o = Gio.MountOperation.MountOperationGetAnonymousMethodInfo
ResolveMountOperationMethod "getChoice" o = Gio.MountOperation.MountOperationGetChoiceMethodInfo
ResolveMountOperationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMountOperationMethod "getDomain" o = Gio.MountOperation.MountOperationGetDomainMethodInfo
ResolveMountOperationMethod "getIsTcryptHiddenVolume" o = Gio.MountOperation.MountOperationGetIsTcryptHiddenVolumeMethodInfo
ResolveMountOperationMethod "getIsTcryptSystemVolume" o = Gio.MountOperation.MountOperationGetIsTcryptSystemVolumeMethodInfo
ResolveMountOperationMethod "getParent" o = MountOperationGetParentMethodInfo
ResolveMountOperationMethod "getPassword" o = Gio.MountOperation.MountOperationGetPasswordMethodInfo
ResolveMountOperationMethod "getPasswordSave" o = Gio.MountOperation.MountOperationGetPasswordSaveMethodInfo
ResolveMountOperationMethod "getPim" o = Gio.MountOperation.MountOperationGetPimMethodInfo
ResolveMountOperationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMountOperationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMountOperationMethod "getScreen" o = MountOperationGetScreenMethodInfo
ResolveMountOperationMethod "getUsername" o = Gio.MountOperation.MountOperationGetUsernameMethodInfo
ResolveMountOperationMethod "setAnonymous" o = Gio.MountOperation.MountOperationSetAnonymousMethodInfo
ResolveMountOperationMethod "setChoice" o = Gio.MountOperation.MountOperationSetChoiceMethodInfo
ResolveMountOperationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMountOperationMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMountOperationMethod "setDomain" o = Gio.MountOperation.MountOperationSetDomainMethodInfo
ResolveMountOperationMethod "setIsTcryptHiddenVolume" o = Gio.MountOperation.MountOperationSetIsTcryptHiddenVolumeMethodInfo
ResolveMountOperationMethod "setIsTcryptSystemVolume" o = Gio.MountOperation.MountOperationSetIsTcryptSystemVolumeMethodInfo
ResolveMountOperationMethod "setParent" o = MountOperationSetParentMethodInfo
ResolveMountOperationMethod "setPassword" o = Gio.MountOperation.MountOperationSetPasswordMethodInfo
ResolveMountOperationMethod "setPasswordSave" o = Gio.MountOperation.MountOperationSetPasswordSaveMethodInfo
ResolveMountOperationMethod "setPim" o = Gio.MountOperation.MountOperationSetPimMethodInfo
ResolveMountOperationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMountOperationMethod "setScreen" o = MountOperationSetScreenMethodInfo
ResolveMountOperationMethod "setUsername" o = Gio.MountOperation.MountOperationSetUsernameMethodInfo
ResolveMountOperationMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMountOperationMethod t MountOperation, O.OverloadedMethod info MountOperation p) => OL.IsLabel t (MountOperation -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveMountOperationMethod t MountOperation, O.OverloadedMethod info MountOperation p, R.HasField t MountOperation p) => R.HasField t MountOperation p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveMountOperationMethod t MountOperation, O.OverloadedMethodInfo info MountOperation) => OL.IsLabel t (O.MethodProxy info MountOperation) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getMountOperationIsShowing :: (MonadIO m, IsMountOperation o) => o -> m Bool
getMountOperationIsShowing :: forall (m :: * -> *) o.
(MonadIO m, IsMountOperation o) =>
o -> m Bool
getMountOperationIsShowing o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"is-showing"
#if defined(ENABLE_OVERLOADING)
data MountOperationIsShowingPropertyInfo
instance AttrInfo MountOperationIsShowingPropertyInfo where
type AttrAllowedOps MountOperationIsShowingPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint MountOperationIsShowingPropertyInfo = IsMountOperation
type AttrSetTypeConstraint MountOperationIsShowingPropertyInfo = (~) ()
type AttrTransferTypeConstraint MountOperationIsShowingPropertyInfo = (~) ()
type AttrTransferType MountOperationIsShowingPropertyInfo = ()
type AttrGetType MountOperationIsShowingPropertyInfo = Bool
type AttrLabel MountOperationIsShowingPropertyInfo = "is-showing"
type AttrOrigin MountOperationIsShowingPropertyInfo = MountOperation
attrGet = getMountOperationIsShowing
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.isShowing"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#g:attr:isShowing"
})
#endif
getMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m Gtk.Window.Window
getMountOperationParent :: forall (m :: * -> *) o.
(MonadIO m, IsMountOperation o) =>
o -> m Window
getMountOperationParent o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMountOperationParent" forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"parent" ManagedPtr Window -> Window
Gtk.Window.Window
setMountOperationParent :: (MonadIO m, IsMountOperation o, Gtk.Window.IsWindow a) => o -> a -> m ()
setMountOperationParent :: forall (m :: * -> *) o a.
(MonadIO m, IsMountOperation o, IsWindow a) =>
o -> a -> m ()
setMountOperationParent o
obj a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (forall a. a -> Maybe a
Just a
val)
constructMountOperationParent :: (IsMountOperation o, MIO.MonadIO m, Gtk.Window.IsWindow a) => a -> m (GValueConstruct o)
constructMountOperationParent :: forall o (m :: * -> *) a.
(IsMountOperation o, MonadIO m, IsWindow a) =>
a -> m (GValueConstruct o)
constructMountOperationParent a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"parent" (forall a. a -> Maybe a
P.Just a
val)
clearMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m ()
clearMountOperationParent :: forall (m :: * -> *) o.
(MonadIO m, IsMountOperation o) =>
o -> m ()
clearMountOperationParent o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (forall a. Maybe a
Nothing :: Maybe Gtk.Window.Window)
#if defined(ENABLE_OVERLOADING)
data MountOperationParentPropertyInfo
instance AttrInfo MountOperationParentPropertyInfo where
type AttrAllowedOps MountOperationParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MountOperationParentPropertyInfo = IsMountOperation
type AttrSetTypeConstraint MountOperationParentPropertyInfo = Gtk.Window.IsWindow
type AttrTransferTypeConstraint MountOperationParentPropertyInfo = Gtk.Window.IsWindow
type AttrTransferType MountOperationParentPropertyInfo = Gtk.Window.Window
type AttrGetType MountOperationParentPropertyInfo = Gtk.Window.Window
type AttrLabel MountOperationParentPropertyInfo = "parent"
type AttrOrigin MountOperationParentPropertyInfo = MountOperation
attrGet = getMountOperationParent
attrSet = setMountOperationParent
attrTransfer _ v = do
unsafeCastTo Gtk.Window.Window v
attrConstruct = constructMountOperationParent
attrClear = clearMountOperationParent
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.parent"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#g:attr:parent"
})
#endif
getMountOperationScreen :: (MonadIO m, IsMountOperation o) => o -> m Gdk.Screen.Screen
getMountOperationScreen :: forall (m :: * -> *) o.
(MonadIO m, IsMountOperation o) =>
o -> m Screen
getMountOperationScreen o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMountOperationScreen" forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"screen" ManagedPtr Screen -> Screen
Gdk.Screen.Screen
setMountOperationScreen :: (MonadIO m, IsMountOperation o, Gdk.Screen.IsScreen a) => o -> a -> m ()
setMountOperationScreen :: forall (m :: * -> *) o a.
(MonadIO m, IsMountOperation o, IsScreen a) =>
o -> a -> m ()
setMountOperationScreen o
obj a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"screen" (forall a. a -> Maybe a
Just a
val)
constructMountOperationScreen :: (IsMountOperation o, MIO.MonadIO m, Gdk.Screen.IsScreen a) => a -> m (GValueConstruct o)
constructMountOperationScreen :: forall o (m :: * -> *) a.
(IsMountOperation o, MonadIO m, IsScreen a) =>
a -> m (GValueConstruct o)
constructMountOperationScreen a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"screen" (forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data MountOperationScreenPropertyInfo
instance AttrInfo MountOperationScreenPropertyInfo where
type AttrAllowedOps MountOperationScreenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MountOperationScreenPropertyInfo = IsMountOperation
type AttrSetTypeConstraint MountOperationScreenPropertyInfo = Gdk.Screen.IsScreen
type AttrTransferTypeConstraint MountOperationScreenPropertyInfo = Gdk.Screen.IsScreen
type AttrTransferType MountOperationScreenPropertyInfo = Gdk.Screen.Screen
type AttrGetType MountOperationScreenPropertyInfo = Gdk.Screen.Screen
type AttrLabel MountOperationScreenPropertyInfo = "screen"
type AttrOrigin MountOperationScreenPropertyInfo = MountOperation
attrGet = getMountOperationScreen
attrSet = setMountOperationScreen
attrTransfer _ v = do
unsafeCastTo Gdk.Screen.Screen v
attrConstruct = constructMountOperationScreen
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.screen"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#g:attr:screen"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MountOperation
type instance O.AttributeList MountOperation = MountOperationAttributeList
type MountOperationAttributeList = ('[ '("anonymous", Gio.MountOperation.MountOperationAnonymousPropertyInfo), '("choice", Gio.MountOperation.MountOperationChoicePropertyInfo), '("domain", Gio.MountOperation.MountOperationDomainPropertyInfo), '("isShowing", MountOperationIsShowingPropertyInfo), '("isTcryptHiddenVolume", Gio.MountOperation.MountOperationIsTcryptHiddenVolumePropertyInfo), '("isTcryptSystemVolume", Gio.MountOperation.MountOperationIsTcryptSystemVolumePropertyInfo), '("parent", MountOperationParentPropertyInfo), '("password", Gio.MountOperation.MountOperationPasswordPropertyInfo), '("passwordSave", Gio.MountOperation.MountOperationPasswordSavePropertyInfo), '("pim", Gio.MountOperation.MountOperationPimPropertyInfo), '("screen", MountOperationScreenPropertyInfo), '("username", Gio.MountOperation.MountOperationUsernamePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
mountOperationParent :: AttrLabelProxy "parent"
mountOperationParent = AttrLabelProxy
mountOperationScreen :: AttrLabelProxy "screen"
mountOperationScreen = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList MountOperation = MountOperationSignalList
type MountOperationSignalList = ('[ '("aborted", Gio.MountOperation.MountOperationAbortedSignalInfo), '("askPassword", Gio.MountOperation.MountOperationAskPasswordSignalInfo), '("askQuestion", Gio.MountOperation.MountOperationAskQuestionSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("reply", Gio.MountOperation.MountOperationReplySignalInfo), '("showProcesses", Gio.MountOperation.MountOperationShowProcessesSignalInfo), '("showUnmountProgress", Gio.MountOperation.MountOperationShowUnmountProgressSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_mount_operation_new" gtk_mount_operation_new ::
Ptr Gtk.Window.Window ->
IO (Ptr MountOperation)
mountOperationNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
Maybe (a)
-> m MountOperation
mountOperationNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWindow a) =>
Maybe a -> m MountOperation
mountOperationNew Maybe a
parent = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr Window
maybeParent <- case Maybe a
parent of
Maybe a
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just a
jParent -> do
Ptr Window
jParent' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jParent
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr MountOperation
result <- Ptr Window -> IO (Ptr MountOperation)
gtk_mount_operation_new Ptr Window
maybeParent
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"mountOperationNew" Ptr MountOperation
result
MountOperation
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr MountOperation -> MountOperation
MountOperation) Ptr MountOperation
result
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
parent forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return MountOperation
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_mount_operation_get_parent" gtk_mount_operation_get_parent ::
Ptr MountOperation ->
IO (Ptr Gtk.Window.Window)
mountOperationGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
a
-> m Gtk.Window.Window
mountOperationGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMountOperation a) =>
a -> m Window
mountOperationGetParent a
op = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr MountOperation
op' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
op
Ptr Window
result <- Ptr MountOperation -> IO (Ptr Window)
gtk_mount_operation_get_parent Ptr MountOperation
op'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"mountOperationGetParent" Ptr Window
result
Window
result' <- (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
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
op
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data MountOperationGetParentMethodInfo
instance (signature ~ (m Gtk.Window.Window), MonadIO m, IsMountOperation a) => O.OverloadedMethod MountOperationGetParentMethodInfo a signature where
overloadedMethod = mountOperationGetParent
instance O.OverloadedMethodInfo MountOperationGetParentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.mountOperationGetParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#v:mountOperationGetParent"
})
#endif
foreign import ccall "gtk_mount_operation_get_screen" gtk_mount_operation_get_screen ::
Ptr MountOperation ->
IO (Ptr Gdk.Screen.Screen)
mountOperationGetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
a
-> m Gdk.Screen.Screen
mountOperationGetScreen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMountOperation a) =>
a -> m Screen
mountOperationGetScreen a
op = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr MountOperation
op' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
op
Ptr Screen
result <- Ptr MountOperation -> IO (Ptr Screen)
gtk_mount_operation_get_screen Ptr MountOperation
op'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"mountOperationGetScreen" Ptr Screen
result
Screen
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
op
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'
#if defined(ENABLE_OVERLOADING)
data MountOperationGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsMountOperation a) => O.OverloadedMethod MountOperationGetScreenMethodInfo a signature where
overloadedMethod = mountOperationGetScreen
instance O.OverloadedMethodInfo MountOperationGetScreenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.mountOperationGetScreen",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#v:mountOperationGetScreen"
})
#endif
foreign import ccall "gtk_mount_operation_is_showing" gtk_mount_operation_is_showing ::
Ptr MountOperation ->
IO CInt
mountOperationIsShowing ::
(B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
a
-> m Bool
mountOperationIsShowing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMountOperation a) =>
a -> m Bool
mountOperationIsShowing a
op = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr MountOperation
op' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
op
CInt
result <- Ptr MountOperation -> IO CInt
gtk_mount_operation_is_showing Ptr MountOperation
op'
let result' :: Bool
result' = (forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
op
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MountOperationIsShowingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMountOperation a) => O.OverloadedMethod MountOperationIsShowingMethodInfo a signature where
overloadedMethod = mountOperationIsShowing
instance O.OverloadedMethodInfo MountOperationIsShowingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.mountOperationIsShowing",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#v:mountOperationIsShowing"
})
#endif
foreign import ccall "gtk_mount_operation_set_parent" gtk_mount_operation_set_parent ::
Ptr MountOperation ->
Ptr Gtk.Window.Window ->
IO ()
mountOperationSetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsMountOperation a, Gtk.Window.IsWindow b) =>
a
-> Maybe (b)
-> m ()
mountOperationSetParent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsMountOperation a, IsWindow b) =>
a -> Maybe b -> m ()
mountOperationSetParent a
op Maybe b
parent = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr MountOperation
op' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
op
Ptr Window
maybeParent <- case Maybe b
parent of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jParent -> do
Ptr Window
jParent' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jParent
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr MountOperation -> Ptr Window -> IO ()
gtk_mount_operation_set_parent Ptr MountOperation
op' Ptr Window
maybeParent
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
op
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
parent forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MountOperationSetParentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsMountOperation a, Gtk.Window.IsWindow b) => O.OverloadedMethod MountOperationSetParentMethodInfo a signature where
overloadedMethod = mountOperationSetParent
instance O.OverloadedMethodInfo MountOperationSetParentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.mountOperationSetParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#v:mountOperationSetParent"
})
#endif
foreign import ccall "gtk_mount_operation_set_screen" gtk_mount_operation_set_screen ::
Ptr MountOperation ->
Ptr Gdk.Screen.Screen ->
IO ()
mountOperationSetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsMountOperation a, Gdk.Screen.IsScreen b) =>
a
-> b
-> m ()
mountOperationSetScreen :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsMountOperation a, IsScreen b) =>
a -> b -> m ()
mountOperationSetScreen a
op b
screen = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr MountOperation
op' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
op
Ptr Screen
screen' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
screen
Ptr MountOperation -> Ptr Screen -> IO ()
gtk_mount_operation_set_screen Ptr MountOperation
op' Ptr Screen
screen'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
op
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
screen
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MountOperationSetScreenMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsMountOperation a, Gdk.Screen.IsScreen b) => O.OverloadedMethod MountOperationSetScreenMethodInfo a signature where
overloadedMethod = mountOperationSetScreen
instance O.OverloadedMethodInfo MountOperationSetScreenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.MountOperation.mountOperationSetScreen",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.39/docs/GI-Gtk-Objects-MountOperation.html#v:mountOperationSetScreen"
})
#endif