gi-gio-2.0.35: Gio bindings

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

GI.Gio.Interfaces.Mount

Contents

- Exported types
- Methods
  - canEject
  - canUnmount
  - eject
  - ejectFinish
  - ejectWithOperation
  - ejectWithOperationFinish
  - getDefaultLocation
  - getDrive
  - getIcon
  - getName
  - getRoot
  - getSortKey
  - getSymbolicIcon
  - getUuid
  - getVolume
  - guessContentType
  - guessContentTypeFinish
  - guessContentTypeSync
  - isShadowed
  - remount
  - remountFinish
  - shadow
  - unmount
  - unmountFinish
  - unmountWithOperation
  - unmountWithOperationFinish
  - unshadow
- Signals
  - changed
  - preUnmount
  - unmounted

Description

The `GMount` interface represents a user-visible mount, such as a mounted file system.

`GMount` is a ‘mounted’ filesystem that you can access. Mounted is in quotes because it’s not the same as a UNIX mount, it might be a GVFS mount, but you can still access the files on it if you use GIO.

A `GMount` might be associated with a `Volume` (such as a USB flash drive) which hosts it.

Unmounting a `GMount` instance is an asynchronous operation. For more information about asynchronous operations, see `AsyncResult` and `Task`. To unmount a `GMount` instance, first call `mountUnmountWithOperation` with (at least) the `GMount` instance and a [type`gio`.AsyncReadyCallback]. The callback will be fired when the operation has resolved (either with success or failure), and a `AsyncResult` structure will be passed to the callback. That callback should then call `mountUnmountWithOperationFinish` with the `GMount` and the `AsyncResult` data to see if the operation was completed successfully. If an `error` is present when `mountUnmountWithOperationFinish` is called, then it will be filled with any error information.

Note, when porting from GnomeVFS, `GMount` is the moral equivalent of `GnomeVFSVolume`.

Synopsis

- newtype Mount = Mount (ManagedPtr Mount)
- class (GObject o, IsDescendantOf Mount o) => IsMount o
- toMount :: (MonadIO m, IsMount o) => o -> m Mount
- mountCanEject :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool
- mountCanUnmount :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool
- mountEject :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- mountEjectFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()
- mountEjectWithOperation :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- mountEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()
- mountGetDefaultLocation :: (HasCallStack, MonadIO m, IsMount a) => a -> m File
- mountGetDrive :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Drive)
- mountGetIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon
- mountGetName :: (HasCallStack, MonadIO m, IsMount a) => a -> m Text
- mountGetRoot :: (HasCallStack, MonadIO m, IsMount a) => a -> m File
- mountGetSortKey :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text)
- mountGetSymbolicIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon
- mountGetUuid :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text)
- mountGetVolume :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Volume)
- mountGuessContentType :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- mountGuessContentTypeFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m [Text]
- mountGuessContentTypeSync :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> m [Text]
- mountIsShadowed :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool
- mountRemount :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountMountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- mountRemountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()
- mountShadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m ()
- mountUnmount :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- mountUnmountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()
- mountUnmountWithOperation :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- mountUnmountWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()
- mountUnshadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m ()
- type MountChangedCallback = IO ()
- afterMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId
- onMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId
- type MountPreUnmountCallback = IO ()
- afterMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId
- onMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId
- type MountUnmountedCallback = IO ()
- afterMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId
- onMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId

# Exported types

newtype Mount Source #

Memory-managed wrapper type.

Constructors

Mount (ManagedPtr Mount) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Mount o) => IsMount o Source #

Type class for types which can be safely cast to `Mount`, for instance with `toMount`.

#### Instances

Instances details

(GObject o, IsDescendantOf Mount o) => IsMount o Source # |
Instance details Defined in GI.Gio.Interfaces.Mount

toMount :: (MonadIO m, IsMount o) => o -> m Mount Source #

Cast to `Mount`, 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, canEject, canUnmount, eject, ejectFinish, ejectWithOperation, ejectWithOperationFinish, forceFloating, freezeNotify, getv, guessContentType, guessContentTypeFinish, guessContentTypeSync, isFloating, isShadowed, notify, notifyByPspec, ref, refSink, remount, remountFinish, runDispose, shadow, stealData, stealQdata, thawNotify, unmount, unmountFinish, unmountWithOperation, unmountWithOperationFinish, unref, unshadow, watchClosure.

#### Getters

getData, getDefaultLocation, getDrive, getIcon, getName, getProperty, getQdata, getRoot, getSortKey, getSymbolicIcon, getUuid, getVolume.

#### Setters

setData, setDataFull, setProperty.

## canEject

mountCanEject Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m Bool | Returns: `True` if the `mount` can be ejected.

Checks if `mount` can be ejected.

## canUnmount

mountCanUnmount Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m Bool | Returns: `True` if the `mount` can be unmounted.

Checks if `mount` can be unmounted.

## eject

mountEject Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) |
=> a | `mount`: a `Mount`.
-> [MountUnmountFlags] | `flags`: flags affecting the unmount if required for eject
-> Maybe b | `cancellable`: optional `Cancellable` object, `Nothing` to ignore.
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`, or `Nothing`.
-> m () |

Deprecated: (Since version 2.22)Use `mountEjectWithOperation` instead.

Ejects a mount. This is an asynchronous operation, and is finished by calling `mountEjectFinish` with the `mount` and `AsyncResult` data returned in the `callback`.

## ejectFinish

mountEjectFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`.
-> b | `result`: a `AsyncResult`.
-> m () | (Can throw `GError`)

Deprecated: (Since version 2.22)Use `mountEjectWithOperationFinish` instead.

Finishes ejecting a mount. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned.

## ejectWithOperation

mountEjectWithOperation Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) |
=> a | `mount`: a `Mount`.
-> [MountUnmountFlags] | `flags`: flags affecting the unmount if required for eject
-> Maybe b | `mountOperation`: a `MountOperation` or `Nothing` to avoid user interaction.
-> Maybe c | `cancellable`: optional `Cancellable` object, `Nothing` to ignore.
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`, or `Nothing`.
-> m () |

Ejects a mount. This is an asynchronous operation, and is finished by calling `mountEjectWithOperationFinish` with the `mount` and `AsyncResult` data returned in the `callback`.

Since: 2.22

## ejectWithOperationFinish

mountEjectWithOperationFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`.
-> b | `result`: a `AsyncResult`.
-> m () | (Can throw `GError`)

Finishes ejecting a mount. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned.

Since: 2.22

## getDefaultLocation

mountGetDefaultLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m File | Returns: a `File`. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the default location of `mount`. The default location of the given `mount` is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume).

## getDrive

mountGetDrive Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m (Maybe Drive) | Returns: a `Drive` or `Nothing` if `mount` is not associated with a volume or a drive. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the drive for the `mount`.

This is a convenience method for getting the `Volume` and then using that object to get the `Drive`.

## getIcon

mountGetIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m Icon | Returns: a `Icon`. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the icon for `mount`.

## getName

mountGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m Text | Returns: the name for the given `mount`. The returned string should be freed with `free` when no longer needed.

Gets the name of `mount`.

## getRoot

mountGetRoot Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m File | Returns: a `File`. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the root directory on `mount`.

## getSortKey

mountGetSortKey Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: A `Mount`.
-> m (Maybe Text) | Returns: Sorting key for `mount` or `Nothing` if no such key is available.

Gets the sort key for `mount`, if any.

Since: 2.32

## getSymbolicIcon

mountGetSymbolicIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m Icon | Returns: a `Icon`. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the symbolic icon for `mount`.

Since: 2.34

## getUuid

mountGetUuid Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m (Maybe Text) | Returns: the UUID for `mount` or `Nothing` if no UUID can be computed. The returned string should be freed with `free` when no longer needed.

Gets the UUID for the `mount`. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns `Nothing` if there is no UUID available.

## getVolume

mountGetVolume Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: a `Mount`.
-> m (Maybe Volume) | Returns: a `Volume` or `Nothing` if `mount` is not associated with a volume. The returned object should be unreffed with `objectUnref` when no longer needed.

Gets the volume for the `mount`.

## guessContentType

mountGuessContentType Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) |
=> a | `mount`: a `Mount`
-> Bool | `forceRescan`: Whether to force a rescan of the content. Otherwise a cached result will be used if available
-> Maybe b | `cancellable`: optional `Cancellable` object, `Nothing` to ignore
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`
-> m () |

Tries to guess the type of content stored on `mount`. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.

This is an asynchronous operation (see `mountGuessContentTypeSync` for the synchronous version), and is finished by calling `mountGuessContentTypeFinish` with the `mount` and `AsyncResult` data returned in the `callback`.

Since: 2.18

## guessContentTypeFinish

mountGuessContentTypeFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`
-> b | `result`: a `AsyncResult`
-> m [Text] | Returns: a `Nothing`-terminated array of content types or `Nothing` on error. Caller should free this array with `strfreev` when done with it. (Can throw `GError`)

Finishes guessing content types of `mount`. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned. In particular, you may get an `IOErrorEnumNotSupported` if the mount does not support content guessing.

Since: 2.18

## guessContentTypeSync

mountGuessContentTypeSync Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) |
=> a | `mount`: a `Mount`
-> Bool | `forceRescan`: Whether to force a rescan of the content. Otherwise a cached result will be used if available
-> Maybe b | `cancellable`: optional `Cancellable` object, `Nothing` to ignore
-> m [Text] | Returns: a `Nothing`-terminated array of content types or `Nothing` on error. Caller should free this array with `strfreev` when done with it. (Can throw `GError`)

Tries to guess the type of content stored on `mount`. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.

This is a synchronous operation and as such may block doing IO; see `mountGuessContentType` for the asynchronous version.

Since: 2.18

## isShadowed

mountIsShadowed Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: A `Mount`.
-> m Bool | Returns: `True` if `mount` is shadowed.

Determines if `mount` is shadowed. Applications or libraries should avoid displaying `mount` in the user interface if it is shadowed.

A mount is said to be shadowed if there exists one or more user visible objects (currently `Mount` objects) with a root that is inside the root of `mount`.

One application of shadow mounts is when exposing a single file system that is used to address several logical volumes. In this situation, a `VolumeMonitor` implementation would create two `Volume` objects (for example, one for the camera functionality of the device and one for a SD card reader on the device) with activation URIs `gphoto2://[usb:001,002]/store1/` and `gphoto2://[usb:001,002]/store2/`. When the underlying mount (with root `gphoto2://[usb:001,002]/`) is mounted, said `VolumeMonitor` implementation would create two `Mount` objects (each with their root matching the corresponding volume activation root) that would shadow the original mount.

The proxy monitor in GVfs 2.26 and later, automatically creates and manage shadow mounts (and shadows the underlying mount) if the activation root on a `Volume` is set.

Since: 2.20

## remount

mountRemount Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) |
=> a | `mount`: a `Mount`.
-> [MountMountFlags] | `flags`: flags affecting the operation
-> Maybe b | `mountOperation`: a `MountOperation` or `Nothing` to avoid user interaction.
-> Maybe c | `cancellable`: optional `Cancellable` object, `Nothing` to ignore.
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`, or `Nothing`.
-> m () |

Remounts a mount. This is an asynchronous operation, and is finished by calling `mountRemountFinish` with the `mount` and `GAsyncResults` data returned in the `callback`.

Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted.

## remountFinish

mountRemountFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`.
-> b | `result`: a `AsyncResult`.
-> m () | (Can throw `GError`)

Finishes remounting a mount. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned.

## shadow

mountShadow Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: A `Mount`.
-> m () |

Increments the shadow count on `mount`. Usually used by `VolumeMonitor` implementations when creating a shadow mount for `mount`, see `mountIsShadowed` for more information. The caller will need to emit the Mount::changed signal on `mount` manually.

Since: 2.20

## unmount

mountUnmount Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) |
=> a | `mount`: a `Mount`.
-> [MountUnmountFlags] | `flags`: flags affecting the operation
-> Maybe b | `cancellable`: optional `Cancellable` object, `Nothing` to ignore.
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`, or `Nothing`.
-> m () |

Deprecated: (Since version 2.22)Use `mountUnmountWithOperation` instead.

Unmounts a mount. This is an asynchronous operation, and is finished by calling `mountUnmountFinish` with the `mount` and `AsyncResult` data returned in the `callback`.

## unmountFinish

mountUnmountFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`.
-> b | `result`: a `AsyncResult`.
-> m () | (Can throw `GError`)

Deprecated: (Since version 2.22)Use `mountUnmountWithOperationFinish` instead.

Finishes unmounting a mount. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned.

## unmountWithOperation

mountUnmountWithOperation Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) |
=> a | `mount`: a `Mount`.
-> [MountUnmountFlags] | `flags`: flags affecting the operation
-> Maybe b | `mountOperation`: a `MountOperation` or `Nothing` to avoid user interaction.
-> Maybe c | `cancellable`: optional `Cancellable` object, `Nothing` to ignore.
-> Maybe AsyncReadyCallback | `callback`: a `AsyncReadyCallback`, or `Nothing`.
-> m () |

Unmounts a mount. This is an asynchronous operation, and is finished by calling `mountUnmountWithOperationFinish` with the `mount` and `AsyncResult` data returned in the `callback`.

Since: 2.22

## unmountWithOperationFinish

mountUnmountWithOperationFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) |
=> a | `mount`: a `Mount`.
-> b | `result`: a `AsyncResult`.
-> m () | (Can throw `GError`)

Finishes unmounting a mount. If any errors occurred during the operation, `error` will be set to contain the errors and `False` will be returned.

Since: 2.22

## unshadow

mountUnshadow Source #

Arguments

:: (HasCallStack, MonadIO m, IsMount a) |
=> a | `mount`: A `Mount`.
-> m () |

Decrements the shadow count on `mount`. Usually used by `VolumeMonitor` implementations when destroying a shadow mount for `mount`, see `mountIsShadowed` for more information. The caller will need to emit the Mount::changed signal on `mount` manually.

Since: 2.20

# Signals

## changed

type MountChangedCallback = IO () Source #

Emitted when the mount has been changed.

afterMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after mount #changed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on mount #changed callback

## preUnmount

type MountPreUnmountCallback = IO () Source #

This signal may be emitted when the `Mount` is about to be unmounted.

This signal depends on the backend and is only emitted if GIO was used to unmount.

Since: 2.22

afterMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preUnmount signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after mount #preUnmount callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preUnmount signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on mount #preUnmount callback

## unmounted

type MountUnmountedCallback = IO () Source #

This signal is emitted when the `Mount` have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.

afterMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the unmounted signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after mount #unmounted callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the unmounted signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on mount #unmounted callback