{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

This should not be accessed directly. Use the accessor functions below.
-}

module GI.Gtk.Objects.MountOperation
    ( 

-- * Exported types
    MountOperation(..)                      ,
    IsMountOperation                        ,
    toMountOperation                        ,
    noMountOperation                        ,


 -- * Methods
-- ** getParent #method:getParent#
    MountOperationGetParentMethodInfo       ,
    mountOperationGetParent                 ,


-- ** getScreen #method:getScreen#
    MountOperationGetScreenMethodInfo       ,
    mountOperationGetScreen                 ,


-- ** isShowing #method:isShowing#
    MountOperationIsShowingMethodInfo       ,
    mountOperationIsShowing                 ,


-- ** new #method:new#
    mountOperationNew                       ,


-- ** setParent #method:setParent#
    MountOperationSetParentMethodInfo       ,
    mountOperationSetParent                 ,


-- ** setScreen #method:setScreen#
    MountOperationSetScreenMethodInfo       ,
    mountOperationSetScreen                 ,




 -- * Properties
-- ** isShowing #attr:isShowing#
    MountOperationIsShowingPropertyInfo     ,
    getMountOperationIsShowing              ,


-- ** parent #attr:parent#
    MountOperationParentPropertyInfo        ,
    clearMountOperationParent               ,
    constructMountOperationParent           ,
    getMountOperationParent                 ,
    mountOperationParent                    ,
    setMountOperationParent                 ,


-- ** screen #attr:screen#
    MountOperationScreenPropertyInfo        ,
    constructMountOperationScreen           ,
    getMountOperationScreen                 ,
    mountOperationScreen                    ,
    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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 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 (ManagedPtr MountOperation)
foreign import ccall "gtk_mount_operation_get_type"
    c_gtk_mount_operation_get_type :: IO GType

instance GObject MountOperation where
    gobjectType _ = c_gtk_mount_operation_get_type
    

class GObject o => IsMountOperation o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError MountOperation a) =>
    IsMountOperation a
#endif
instance IsMountOperation MountOperation
instance Gio.MountOperation.IsMountOperation MountOperation
instance GObject.Object.IsObject MountOperation

toMountOperation :: IsMountOperation o => o -> IO MountOperation
toMountOperation = unsafeCastTo MountOperation

noMountOperation :: Maybe MountOperation
noMountOperation = Nothing

type family ResolveMountOperationMethod (t :: Symbol) (o :: *) :: * 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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveMountOperationMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    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 "getParent" o = MountOperationGetParentMethodInfo
    ResolveMountOperationMethod "getPassword" o = Gio.MountOperation.MountOperationGetPasswordMethodInfo
    ResolveMountOperationMethod "getPasswordSave" o = Gio.MountOperation.MountOperationGetPasswordSaveMethodInfo
    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 "setDomain" o = Gio.MountOperation.MountOperationSetDomainMethodInfo
    ResolveMountOperationMethod "setParent" o = MountOperationSetParentMethodInfo
    ResolveMountOperationMethod "setPassword" o = Gio.MountOperation.MountOperationSetPasswordMethodInfo
    ResolveMountOperationMethod "setPasswordSave" o = Gio.MountOperation.MountOperationSetPasswordSaveMethodInfo
    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.MethodInfo info MountOperation p) => O.IsLabelProxy t (MountOperation -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveMountOperationMethod t MountOperation, O.MethodInfo info MountOperation p) => O.IsLabel t (MountOperation -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- VVV Prop "is-showing"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getMountOperationIsShowing :: (MonadIO m, IsMountOperation 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 = IsMountOperation
    type AttrGetType MountOperationIsShowingPropertyInfo = Bool
    type AttrLabel MountOperationIsShowingPropertyInfo = "is-showing"
    type AttrOrigin MountOperationIsShowingPropertyInfo = MountOperation
    attrGet _ = getMountOperationIsShowing
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "parent"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Window"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just True)

getMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m Gtk.Window.Window
getMountOperationParent obj = liftIO $ checkUnexpectedNothing "getMountOperationParent" $ getObjectPropertyObject obj "parent" Gtk.Window.Window

setMountOperationParent :: (MonadIO m, IsMountOperation o, Gtk.Window.IsWindow a) => o -> a -> m ()
setMountOperationParent obj val = liftIO $ setObjectPropertyObject obj "parent" (Just val)

constructMountOperationParent :: (IsMountOperation o, Gtk.Window.IsWindow a) => a -> IO (GValueConstruct o)
constructMountOperationParent val = constructObjectPropertyObject "parent" (Just val)

clearMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m ()
clearMountOperationParent obj = liftIO $ setObjectPropertyObject obj "parent" (Nothing :: Maybe Gtk.Window.Window)

data MountOperationParentPropertyInfo
instance AttrInfo MountOperationParentPropertyInfo where
    type AttrAllowedOps MountOperationParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint MountOperationParentPropertyInfo = Gtk.Window.IsWindow
    type AttrBaseTypeConstraint MountOperationParentPropertyInfo = IsMountOperation
    type AttrGetType MountOperationParentPropertyInfo = Gtk.Window.Window
    type AttrLabel MountOperationParentPropertyInfo = "parent"
    type AttrOrigin MountOperationParentPropertyInfo = MountOperation
    attrGet _ = getMountOperationParent
    attrSet _ = setMountOperationParent
    attrConstruct _ = constructMountOperationParent
    attrClear _ = clearMountOperationParent

-- VVV Prop "screen"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Screen"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getMountOperationScreen :: (MonadIO m, IsMountOperation o) => o -> m Gdk.Screen.Screen
getMountOperationScreen obj = liftIO $ checkUnexpectedNothing "getMountOperationScreen" $ getObjectPropertyObject obj "screen" Gdk.Screen.Screen

setMountOperationScreen :: (MonadIO m, IsMountOperation o, Gdk.Screen.IsScreen a) => o -> a -> m ()
setMountOperationScreen obj val = liftIO $ setObjectPropertyObject obj "screen" (Just val)

constructMountOperationScreen :: (IsMountOperation o, Gdk.Screen.IsScreen a) => a -> IO (GValueConstruct o)
constructMountOperationScreen val = constructObjectPropertyObject "screen" (Just val)

data MountOperationScreenPropertyInfo
instance AttrInfo MountOperationScreenPropertyInfo where
    type AttrAllowedOps MountOperationScreenPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint MountOperationScreenPropertyInfo = Gdk.Screen.IsScreen
    type AttrBaseTypeConstraint MountOperationScreenPropertyInfo = IsMountOperation
    type AttrGetType MountOperationScreenPropertyInfo = Gdk.Screen.Screen
    type AttrLabel MountOperationScreenPropertyInfo = "screen"
    type AttrOrigin MountOperationScreenPropertyInfo = MountOperation
    attrGet _ = getMountOperationScreen
    attrSet _ = setMountOperationScreen
    attrConstruct _ = constructMountOperationScreen
    attrClear _ = undefined

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), '("parent", MountOperationParentPropertyInfo), '("password", Gio.MountOperation.MountOperationPasswordPropertyInfo), '("passwordSave", Gio.MountOperation.MountOperationPasswordSavePropertyInfo), '("screen", MountOperationScreenPropertyInfo), '("username", Gio.MountOperation.MountOperationUsernamePropertyInfo)] :: [(Symbol, *)])

mountOperationParent :: AttrLabelProxy "parent"
mountOperationParent = AttrLabelProxy

mountOperationScreen :: AttrLabelProxy "screen"
mountOperationScreen = AttrLabelProxy

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, *)])

-- method MountOperation::new
-- method type : Constructor
-- Args : [Arg {argCName = "parent", argType = TInterface (Name {namespace = "Gtk", name = "Window"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "transient parent of the window, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "MountOperation"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_new" gtk_mount_operation_new :: 
    Ptr Gtk.Window.Window ->                -- parent : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO (Ptr MountOperation)

{- |
Creates a new 'GI.Gtk.Objects.MountOperation.MountOperation'

@since 2.14
-}
mountOperationNew ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Window.IsWindow a) =>
    Maybe (a)
    {- ^ /@parent@/: transient parent of the window, or 'Nothing' -}
    -> m MountOperation
    {- ^ __Returns:__ a new 'GI.Gtk.Objects.MountOperation.MountOperation' -}
mountOperationNew parent = liftIO $ do
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            jParent' <- unsafeManagedPtrCastPtr jParent
            return jParent'
    result <- gtk_mount_operation_new maybeParent
    checkUnexpectedReturnNULL "mountOperationNew" result
    result' <- (wrapObject MountOperation) result
    whenJust parent touchManagedPtr
    return result'

-- method MountOperation::get_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "op", argType = TInterface (Name {namespace = "Gtk", name = "MountOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkMountOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "Window"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_get_parent" gtk_mount_operation_get_parent :: 
    Ptr MountOperation ->                   -- op : TInterface (Name {namespace = "Gtk", name = "MountOperation"})
    IO (Ptr Gtk.Window.Window)

{- |
Gets the transient parent used by the 'GI.Gtk.Objects.MountOperation.MountOperation'

@since 2.14
-}
mountOperationGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
    a
    {- ^ /@op@/: a 'GI.Gtk.Objects.MountOperation.MountOperation' -}
    -> m Gtk.Window.Window
    {- ^ __Returns:__ the transient parent for windows shown by /@op@/ -}
mountOperationGetParent op = liftIO $ do
    op' <- unsafeManagedPtrCastPtr op
    result <- gtk_mount_operation_get_parent op'
    checkUnexpectedReturnNULL "mountOperationGetParent" result
    result' <- (newObject Gtk.Window.Window) result
    touchManagedPtr op
    return result'

data MountOperationGetParentMethodInfo
instance (signature ~ (m Gtk.Window.Window), MonadIO m, IsMountOperation a) => O.MethodInfo MountOperationGetParentMethodInfo a signature where
    overloadedMethod _ = mountOperationGetParent

-- method MountOperation::get_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "op", argType = TInterface (Name {namespace = "Gtk", name = "MountOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkMountOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Screen"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_get_screen" gtk_mount_operation_get_screen :: 
    Ptr MountOperation ->                   -- op : TInterface (Name {namespace = "Gtk", name = "MountOperation"})
    IO (Ptr Gdk.Screen.Screen)

{- |
Gets the screen on which windows of the 'GI.Gtk.Objects.MountOperation.MountOperation'
will be shown.

@since 2.14
-}
mountOperationGetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
    a
    {- ^ /@op@/: a 'GI.Gtk.Objects.MountOperation.MountOperation' -}
    -> m Gdk.Screen.Screen
    {- ^ __Returns:__ the screen on which windows of /@op@/ are shown -}
mountOperationGetScreen op = liftIO $ do
    op' <- unsafeManagedPtrCastPtr op
    result <- gtk_mount_operation_get_screen op'
    checkUnexpectedReturnNULL "mountOperationGetScreen" result
    result' <- (newObject Gdk.Screen.Screen) result
    touchManagedPtr op
    return result'

data MountOperationGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsMountOperation a) => O.MethodInfo MountOperationGetScreenMethodInfo a signature where
    overloadedMethod _ = mountOperationGetScreen

-- method MountOperation::is_showing
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "op", argType = TInterface (Name {namespace = "Gtk", name = "MountOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkMountOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_is_showing" gtk_mount_operation_is_showing :: 
    Ptr MountOperation ->                   -- op : TInterface (Name {namespace = "Gtk", name = "MountOperation"})
    IO CInt

{- |
Returns whether the 'GI.Gtk.Objects.MountOperation.MountOperation' is currently displaying
a window.

@since 2.14
-}
mountOperationIsShowing ::
    (B.CallStack.HasCallStack, MonadIO m, IsMountOperation a) =>
    a
    {- ^ /@op@/: a 'GI.Gtk.Objects.MountOperation.MountOperation' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@op@/ is currently displaying a window -}
mountOperationIsShowing op = liftIO $ do
    op' <- unsafeManagedPtrCastPtr op
    result <- gtk_mount_operation_is_showing op'
    let result' = (/= 0) result
    touchManagedPtr op
    return result'

data MountOperationIsShowingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMountOperation a) => O.MethodInfo MountOperationIsShowingMethodInfo a signature where
    overloadedMethod _ = mountOperationIsShowing

-- method MountOperation::set_parent
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "op", argType = TInterface (Name {namespace = "Gtk", name = "MountOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkMountOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Gtk", name = "Window"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "transient parent of the window, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_set_parent" gtk_mount_operation_set_parent :: 
    Ptr MountOperation ->                   -- op : TInterface (Name {namespace = "Gtk", name = "MountOperation"})
    Ptr Gtk.Window.Window ->                -- parent : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO ()

{- |
Sets the transient parent for windows shown by the
'GI.Gtk.Objects.MountOperation.MountOperation'.

@since 2.14
-}
mountOperationSetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsMountOperation a, Gtk.Window.IsWindow b) =>
    a
    {- ^ /@op@/: a 'GI.Gtk.Objects.MountOperation.MountOperation' -}
    -> Maybe (b)
    {- ^ /@parent@/: transient parent of the window, or 'Nothing' -}
    -> m ()
mountOperationSetParent op parent = liftIO $ do
    op' <- unsafeManagedPtrCastPtr op
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            jParent' <- unsafeManagedPtrCastPtr jParent
            return jParent'
    gtk_mount_operation_set_parent op' maybeParent
    touchManagedPtr op
    whenJust parent touchManagedPtr
    return ()

data MountOperationSetParentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsMountOperation a, Gtk.Window.IsWindow b) => O.MethodInfo MountOperationSetParentMethodInfo a signature where
    overloadedMethod _ = mountOperationSetParent

-- method MountOperation::set_screen
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "op", argType = TInterface (Name {namespace = "Gtk", name = "MountOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkMountOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_mount_operation_set_screen" gtk_mount_operation_set_screen :: 
    Ptr MountOperation ->                   -- op : TInterface (Name {namespace = "Gtk", name = "MountOperation"})
    Ptr Gdk.Screen.Screen ->                -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"})
    IO ()

{- |
Sets the screen to show windows of the 'GI.Gtk.Objects.MountOperation.MountOperation' on.

@since 2.14
-}
mountOperationSetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsMountOperation a, Gdk.Screen.IsScreen b) =>
    a
    {- ^ /@op@/: a 'GI.Gtk.Objects.MountOperation.MountOperation' -}
    -> b
    {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -}
    -> m ()
mountOperationSetScreen op screen = liftIO $ do
    op' <- unsafeManagedPtrCastPtr op
    screen' <- unsafeManagedPtrCastPtr screen
    gtk_mount_operation_set_screen op' screen'
    touchManagedPtr op
    touchManagedPtr screen
    return ()

data MountOperationSetScreenMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsMountOperation a, Gdk.Screen.IsScreen b) => O.MethodInfo MountOperationSetScreenMethodInfo a signature where
    overloadedMethod _ = mountOperationSetScreen