gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.MountOperation

Contents

- Exported types
- Methods
  - getDisplay
  - getParent
  - isShowing
  - new
  - setDisplay
  - setParent
- Properties
  - display
  - isShowing
  - parent

Description

Asks the user for passwords and other information required to mount a volume.

`GtkMountOperation` is needed when mounting volumes: It is an implementation of `GMountOperation` that can be used with GIO functions for mounting volumes such as `fileMountEnclosingVolume`, `fileMountMountable`, `volumeMount`, `mountUnmountWithOperation` and others.

When necessary, `GtkMountOperation` shows dialogs to let the user enter passwords, ask questions or show processes blocking unmount.

Synopsis

- newtype MountOperation = MountOperation (ManagedPtr MountOperation)
- class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o
- toMountOperation :: (MonadIO m, IsMountOperation o) => o -> m MountOperation
- mountOperationGetDisplay :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Display
- mountOperationGetParent :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Window)
- mountOperationIsShowing :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool
- mountOperationNew :: (HasCallStack, MonadIO m, IsWindow a) => Maybe a -> m MountOperation
- mountOperationSetDisplay :: (HasCallStack, MonadIO m, IsMountOperation a, IsDisplay b) => a -> b -> m ()
- mountOperationSetParent :: (HasCallStack, MonadIO m, IsMountOperation a, IsWindow b) => a -> Maybe b -> m ()
- constructMountOperationDisplay :: (IsMountOperation o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getMountOperationDisplay :: (MonadIO m, IsMountOperation o) => o -> m Display
- setMountOperationDisplay :: (MonadIO m, IsMountOperation o, IsDisplay a) => o -> a -> m ()
- getMountOperationIsShowing :: (MonadIO m, IsMountOperation o) => o -> m Bool
- clearMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m ()
- constructMountOperationParent :: (IsMountOperation o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o)
- getMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Window)
- setMountOperationParent :: (MonadIO m, IsMountOperation o, IsWindow a) => o -> a -> m ()

# Exported types

newtype MountOperation Source #

Memory-managed wrapper type.

Constructors

MountOperation (ManagedPtr MountOperation) |

#### Instances

Instances details

Eq MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation Methods (==) :: MountOperation -> MountOperation -> Bool Source # (/=) :: MountOperation -> MountOperation -> Bool Source #
GObject MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation
ManagedPtrNewtype MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation Methods toManagedPtr :: MountOperation -> ManagedPtr MountOperation Source #
TypedObject MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation Methods glibType :: IO GType Source #
HasParentTypes MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation
IsGValue (Maybe MountOperation) Source # | Convert `MountOperation` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.MountOperation Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe MountOperation -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe MountOperation) Source #
type ParentTypes MountOperation Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation type ParentTypes MountOperation = '[MountOperation, Object]

class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o Source #

Type class for types which can be safely cast to `MountOperation`, for instance with `toMountOperation`.

#### Instances

Instances details

(GObject o, IsDescendantOf MountOperation o) => IsMountOperation o Source # |
Instance details Defined in GI.Gtk.Objects.MountOperation

toMountOperation :: (MonadIO m, IsMountOperation o) => o -> m MountOperation Source #

Cast to `MountOperation`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isShowing, notify, notifyByPspec, ref, refSink, reply, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAnonymous, getChoice, getData, getDisplay, getDomain, getIsTcryptHiddenVolume, getIsTcryptSystemVolume, getParent, getPassword, getPasswordSave, getPim, getProperty, getQdata, getUsername.

#### Setters

setAnonymous, setChoice, setData, setDataFull, setDisplay, setDomain, setIsTcryptHiddenVolume, setIsTcryptSystemVolume, setParent, setPassword, setPasswordSave, setPim, setProperty, setUsername.

## getDisplay

mountOperationGetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsMountOperation a) |
=> a | `op`: a `GtkMountOperation`
-> m Display | Returns: the display on which windows of `op` are shown

Gets the display on which windows of the `GtkMountOperation` will be shown.

## getParent

mountOperationGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsMountOperation a) |
=> a | `op`: a `GtkMountOperation`
-> m (Maybe Window) | Returns: the transient parent for windows shown by `op`

Gets the transient parent used by the `GtkMountOperation`.

## isShowing

mountOperationIsShowing Source #

Arguments

:: (HasCallStack, MonadIO m, IsMountOperation a) |
=> a | `op`: a `GtkMountOperation`
-> m Bool | Returns: `True` if `op` is currently displaying a window

Returns whether the `GtkMountOperation` is currently displaying a window.

## new

mountOperationNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> Maybe a | `parent`: transient parent of the window
-> m MountOperation | Returns: a new `GtkMountOperation`

Creates a new `GtkMountOperation`.

## setDisplay

mountOperationSetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsMountOperation a, IsDisplay b) |
=> a | `op`: a `GtkMountOperation`
-> b | `display`: a `GdkDisplay`
-> m () |

Sets the display to show windows of the `GtkMountOperation` on.

## setParent

mountOperationSetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsMountOperation a, IsWindow b) |
=> a | `op`: a `GtkMountOperation`
-> Maybe b | `parent`: transient parent of the window
-> m () |

Sets the transient parent for windows shown by the `GtkMountOperation`.

# Properties

## display

The display where dialogs will be shown.

constructMountOperationDisplay :: (IsMountOperation o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`display`” property. This is rarely needed directly, but it is used by `new`.

getMountOperationDisplay :: (MonadIO m, IsMountOperation o) => o -> m Display Source #

Get the value of the “`display`” property. When overloading is enabled, this is equivalent to

    get mountOperation #display

setMountOperationDisplay :: (MonadIO m, IsMountOperation o, IsDisplay a) => o -> a -> m () Source #

Set the value of the “`display`” property. When overloading is enabled, this is equivalent to

    set mountOperation [ #display := value ]

## isShowing

Whether a dialog is currently shown.

getMountOperationIsShowing :: (MonadIO m, IsMountOperation o) => o -> m Bool Source #

Get the value of the “`is-showing`” property. When overloading is enabled, this is equivalent to

    get mountOperation #isShowing

## parent

The parent window.

clearMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m () Source #

Set the value of the “`parent`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #parent

constructMountOperationParent :: (IsMountOperation o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`parent`” property. This is rarely needed directly, but it is used by `new`.

getMountOperationParent :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Window) Source #

Get the value of the “`parent`” property. When overloading is enabled, this is equivalent to

    get mountOperation #parent

setMountOperationParent :: (MonadIO m, IsMountOperation o, IsWindow a) => o -> a -> m () Source #

Set the value of the “`parent`” property. When overloading is enabled, this is equivalent to

    set mountOperation [ #parent := value ]