module GI.Gtk.Objects.MountOperation
(
MountOperation(..) ,
MountOperationK ,
toMountOperation ,
noMountOperation ,
mountOperationGetParent ,
mountOperationGetScreen ,
mountOperationIsShowing ,
mountOperationNew ,
mountOperationSetParent ,
mountOperationSetScreen ,
MountOperationIsShowingPropertyInfo ,
getMountOperationIsShowing ,
MountOperationParentPropertyInfo ,
constructMountOperationParent ,
getMountOperationParent ,
setMountOperationParent ,
MountOperationScreenPropertyInfo ,
constructMountOperationScreen ,
getMountOperationScreen ,
setMountOperationScreen ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.GObject as GObject
import qualified GI.Gdk as Gdk
import qualified GI.Gio as Gio
newtype MountOperation = MountOperation (ForeignPtr MountOperation)
foreign import ccall "gtk_mount_operation_get_type"
c_gtk_mount_operation_get_type :: IO GType
type instance ParentTypes MountOperation = MountOperationParentTypes
type MountOperationParentTypes = '[Gio.MountOperation, GObject.Object]
instance GObject MountOperation where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_gtk_mount_operation_get_type
class GObject o => MountOperationK o
instance (GObject o, IsDescendantOf MountOperation o) => MountOperationK o
toMountOperation :: MountOperationK o => o -> IO MountOperation
toMountOperation = unsafeCastTo MountOperation
noMountOperation :: Maybe MountOperation
noMountOperation = Nothing
getMountOperationIsShowing :: (MonadIO m, MountOperationK o) => o -> m Bool
getMountOperationIsShowing obj = liftIO $ getObjectPropertyBool obj "is-showing"
data MountOperationIsShowingPropertyInfo
instance AttrInfo MountOperationIsShowingPropertyInfo where
type AttrAllowedOps MountOperationIsShowingPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MountOperationIsShowingPropertyInfo = (~) ()
type AttrBaseTypeConstraint MountOperationIsShowingPropertyInfo = MountOperationK
type AttrGetType MountOperationIsShowingPropertyInfo = Bool
type AttrLabel MountOperationIsShowingPropertyInfo = "MountOperation::is-showing"
attrGet _ = getMountOperationIsShowing
attrSet _ = undefined
attrConstruct _ = undefined
getMountOperationParent :: (MonadIO m, MountOperationK o) => o -> m Window
getMountOperationParent obj = liftIO $ getObjectPropertyObject obj "parent" Window
setMountOperationParent :: (MonadIO m, MountOperationK o, WindowK a) => o -> a -> m ()
setMountOperationParent obj val = liftIO $ setObjectPropertyObject obj "parent" val
constructMountOperationParent :: (WindowK a) => a -> IO ([Char], GValue)
constructMountOperationParent val = constructObjectPropertyObject "parent" val
data MountOperationParentPropertyInfo
instance AttrInfo MountOperationParentPropertyInfo where
type AttrAllowedOps MountOperationParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MountOperationParentPropertyInfo = WindowK
type AttrBaseTypeConstraint MountOperationParentPropertyInfo = MountOperationK
type AttrGetType MountOperationParentPropertyInfo = Window
type AttrLabel MountOperationParentPropertyInfo = "MountOperation::parent"
attrGet _ = getMountOperationParent
attrSet _ = setMountOperationParent
attrConstruct _ = constructMountOperationParent
getMountOperationScreen :: (MonadIO m, MountOperationK o) => o -> m Gdk.Screen
getMountOperationScreen obj = liftIO $ getObjectPropertyObject obj "screen" Gdk.Screen
setMountOperationScreen :: (MonadIO m, MountOperationK o, Gdk.ScreenK a) => o -> a -> m ()
setMountOperationScreen obj val = liftIO $ setObjectPropertyObject obj "screen" val
constructMountOperationScreen :: (Gdk.ScreenK a) => a -> IO ([Char], GValue)
constructMountOperationScreen val = constructObjectPropertyObject "screen" val
data MountOperationScreenPropertyInfo
instance AttrInfo MountOperationScreenPropertyInfo where
type AttrAllowedOps MountOperationScreenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MountOperationScreenPropertyInfo = Gdk.ScreenK
type AttrBaseTypeConstraint MountOperationScreenPropertyInfo = MountOperationK
type AttrGetType MountOperationScreenPropertyInfo = Gdk.Screen
type AttrLabel MountOperationScreenPropertyInfo = "MountOperation::screen"
attrGet _ = getMountOperationScreen
attrSet _ = setMountOperationScreen
attrConstruct _ = constructMountOperationScreen
type instance AttributeList MountOperation = MountOperationAttributeList
type MountOperationAttributeList = ('[ '("anonymous", Gio.MountOperationAnonymousPropertyInfo), '("choice", Gio.MountOperationChoicePropertyInfo), '("domain", Gio.MountOperationDomainPropertyInfo), '("is-showing", MountOperationIsShowingPropertyInfo), '("parent", MountOperationParentPropertyInfo), '("password", Gio.MountOperationPasswordPropertyInfo), '("password-save", Gio.MountOperationPasswordSavePropertyInfo), '("screen", MountOperationScreenPropertyInfo), '("username", Gio.MountOperationUsernamePropertyInfo)] :: [(Symbol, *)])
type instance SignalList MountOperation = MountOperationSignalList
type MountOperationSignalList = ('[ '("aborted", Gio.MountOperationAbortedSignalInfo), '("ask-password", Gio.MountOperationAskPasswordSignalInfo), '("ask-question", Gio.MountOperationAskQuestionSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("reply", Gio.MountOperationReplySignalInfo), '("show-processes", Gio.MountOperationShowProcessesSignalInfo), '("show-unmount-progress", Gio.MountOperationShowUnmountProgressSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_mount_operation_new" gtk_mount_operation_new ::
Ptr Window ->
IO (Ptr MountOperation)
mountOperationNew ::
(MonadIO m, WindowK a) =>
Maybe (a) ->
m MountOperation
mountOperationNew parent = liftIO $ do
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
let jParent' = unsafeManagedPtrCastPtr jParent
return jParent'
result <- gtk_mount_operation_new maybeParent
checkUnexpectedReturnNULL "gtk_mount_operation_new" result
result' <- (wrapObject MountOperation) result
whenJust parent touchManagedPtr
return result'
foreign import ccall "gtk_mount_operation_get_parent" gtk_mount_operation_get_parent ::
Ptr MountOperation ->
IO (Ptr Window)
mountOperationGetParent ::
(MonadIO m, MountOperationK a) =>
a ->
m Window
mountOperationGetParent _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_mount_operation_get_parent _obj'
checkUnexpectedReturnNULL "gtk_mount_operation_get_parent" result
result' <- (newObject Window) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_mount_operation_get_screen" gtk_mount_operation_get_screen ::
Ptr MountOperation ->
IO (Ptr Gdk.Screen)
mountOperationGetScreen ::
(MonadIO m, MountOperationK a) =>
a ->
m Gdk.Screen
mountOperationGetScreen _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_mount_operation_get_screen _obj'
checkUnexpectedReturnNULL "gtk_mount_operation_get_screen" result
result' <- (newObject Gdk.Screen) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_mount_operation_is_showing" gtk_mount_operation_is_showing ::
Ptr MountOperation ->
IO CInt
mountOperationIsShowing ::
(MonadIO m, MountOperationK a) =>
a ->
m Bool
mountOperationIsShowing _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_mount_operation_is_showing _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_mount_operation_set_parent" gtk_mount_operation_set_parent ::
Ptr MountOperation ->
Ptr Window ->
IO ()
mountOperationSetParent ::
(MonadIO m, MountOperationK a, WindowK b) =>
a ->
Maybe (b) ->
m ()
mountOperationSetParent _obj parent = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
let jParent' = unsafeManagedPtrCastPtr jParent
return jParent'
gtk_mount_operation_set_parent _obj' maybeParent
touchManagedPtr _obj
whenJust parent touchManagedPtr
return ()
foreign import ccall "gtk_mount_operation_set_screen" gtk_mount_operation_set_screen ::
Ptr MountOperation ->
Ptr Gdk.Screen ->
IO ()
mountOperationSetScreen ::
(MonadIO m, MountOperationK a, Gdk.ScreenK b) =>
a ->
b ->
m ()
mountOperationSetScreen _obj screen = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let screen' = unsafeManagedPtrCastPtr screen
gtk_mount_operation_set_screen _obj' screen'
touchManagedPtr _obj
touchManagedPtr screen
return ()