Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
VolumeMonitor
is for listing the user interesting devices and volumes
on the computer. In other words, what a file selector or file manager
would show in a sidebar.
VolumeMonitor
is not
[thread-default-context aware][g-main-context-push-thread-default],
and so should not be used other than from the main thread, with no
thread-default-context active.
In order to receive updates about volumes and mounts monitored through GVFS, a main loop must be running.
Synopsis
- newtype VolumeMonitor = VolumeMonitor (ManagedPtr VolumeMonitor)
- class (GObject o, IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o
- toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor
- volumeMonitorAdoptOrphanMount :: (HasCallStack, MonadIO m, IsMount a) => a -> m Volume
- volumeMonitorGet :: (HasCallStack, MonadIO m) => m VolumeMonitor
- volumeMonitorGetConnectedDrives :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Drive]
- volumeMonitorGetMountForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m Mount
- volumeMonitorGetMounts :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Mount]
- volumeMonitorGetVolumeForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m Volume
- volumeMonitorGetVolumes :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Volume]
- type C_VolumeMonitorDriveChangedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
- type VolumeMonitorDriveChangedCallback = Drive -> IO ()
- afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorDriveChanged :: MonadIO m => VolumeMonitorDriveChangedCallback -> m (GClosure C_VolumeMonitorDriveChangedCallback)
- mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
- noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback
- onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
- wrap_VolumeMonitorDriveChangedCallback :: VolumeMonitorDriveChangedCallback -> C_VolumeMonitorDriveChangedCallback
- type C_VolumeMonitorDriveConnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
- type VolumeMonitorDriveConnectedCallback = Drive -> IO ()
- afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorDriveConnected :: MonadIO m => VolumeMonitorDriveConnectedCallback -> m (GClosure C_VolumeMonitorDriveConnectedCallback)
- mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback)
- noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback
- onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
- wrap_VolumeMonitorDriveConnectedCallback :: VolumeMonitorDriveConnectedCallback -> C_VolumeMonitorDriveConnectedCallback
- type C_VolumeMonitorDriveDisconnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
- type VolumeMonitorDriveDisconnectedCallback = Drive -> IO ()
- afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorDriveDisconnected :: MonadIO m => VolumeMonitorDriveDisconnectedCallback -> m (GClosure C_VolumeMonitorDriveDisconnectedCallback)
- mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback)
- noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback
- onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
- wrap_VolumeMonitorDriveDisconnectedCallback :: VolumeMonitorDriveDisconnectedCallback -> C_VolumeMonitorDriveDisconnectedCallback
- type C_VolumeMonitorDriveEjectButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
- type VolumeMonitorDriveEjectButtonCallback = Drive -> IO ()
- afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
- genClosure_VolumeMonitorDriveEjectButton :: MonadIO m => VolumeMonitorDriveEjectButtonCallback -> m (GClosure C_VolumeMonitorDriveEjectButtonCallback)
- mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback)
- noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback
- onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
- wrap_VolumeMonitorDriveEjectButtonCallback :: VolumeMonitorDriveEjectButtonCallback -> C_VolumeMonitorDriveEjectButtonCallback
- type C_VolumeMonitorDriveStopButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
- type VolumeMonitorDriveStopButtonCallback = Drive -> IO ()
- afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
- genClosure_VolumeMonitorDriveStopButton :: MonadIO m => VolumeMonitorDriveStopButtonCallback -> m (GClosure C_VolumeMonitorDriveStopButtonCallback)
- mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback)
- noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback
- onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
- wrap_VolumeMonitorDriveStopButtonCallback :: VolumeMonitorDriveStopButtonCallback -> C_VolumeMonitorDriveStopButtonCallback
- type C_VolumeMonitorMountAddedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
- type VolumeMonitorMountAddedCallback = Mount -> IO ()
- afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorMountAdded :: MonadIO m => VolumeMonitorMountAddedCallback -> m (GClosure C_VolumeMonitorMountAddedCallback)
- mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback)
- noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback
- onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
- wrap_VolumeMonitorMountAddedCallback :: VolumeMonitorMountAddedCallback -> C_VolumeMonitorMountAddedCallback
- type C_VolumeMonitorMountChangedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
- type VolumeMonitorMountChangedCallback = Mount -> IO ()
- afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorMountChanged :: MonadIO m => VolumeMonitorMountChangedCallback -> m (GClosure C_VolumeMonitorMountChangedCallback)
- mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback)
- noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback
- onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
- wrap_VolumeMonitorMountChangedCallback :: VolumeMonitorMountChangedCallback -> C_VolumeMonitorMountChangedCallback
- type C_VolumeMonitorMountPreUnmountCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
- type VolumeMonitorMountPreUnmountCallback = Mount -> IO ()
- afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
- genClosure_VolumeMonitorMountPreUnmount :: MonadIO m => VolumeMonitorMountPreUnmountCallback -> m (GClosure C_VolumeMonitorMountPreUnmountCallback)
- mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback)
- noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback
- onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
- wrap_VolumeMonitorMountPreUnmountCallback :: VolumeMonitorMountPreUnmountCallback -> C_VolumeMonitorMountPreUnmountCallback
- type C_VolumeMonitorMountRemovedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
- type VolumeMonitorMountRemovedCallback = Mount -> IO ()
- afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorMountRemoved :: MonadIO m => VolumeMonitorMountRemovedCallback -> m (GClosure C_VolumeMonitorMountRemovedCallback)
- mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback)
- noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback
- onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
- wrap_VolumeMonitorMountRemovedCallback :: VolumeMonitorMountRemovedCallback -> C_VolumeMonitorMountRemovedCallback
- type C_VolumeMonitorVolumeAddedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
- type VolumeMonitorVolumeAddedCallback = Volume -> IO ()
- afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorVolumeAdded :: MonadIO m => VolumeMonitorVolumeAddedCallback -> m (GClosure C_VolumeMonitorVolumeAddedCallback)
- mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
- noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback
- onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
- wrap_VolumeMonitorVolumeAddedCallback :: VolumeMonitorVolumeAddedCallback -> C_VolumeMonitorVolumeAddedCallback
- type C_VolumeMonitorVolumeChangedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
- type VolumeMonitorVolumeChangedCallback = Volume -> IO ()
- afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorVolumeChanged :: MonadIO m => VolumeMonitorVolumeChangedCallback -> m (GClosure C_VolumeMonitorVolumeChangedCallback)
- mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback)
- noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback
- onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
- wrap_VolumeMonitorVolumeChangedCallback :: VolumeMonitorVolumeChangedCallback -> C_VolumeMonitorVolumeChangedCallback
- type C_VolumeMonitorVolumeRemovedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
- type VolumeMonitorVolumeRemovedCallback = Volume -> IO ()
- afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
- genClosure_VolumeMonitorVolumeRemoved :: MonadIO m => VolumeMonitorVolumeRemovedCallback -> m (GClosure C_VolumeMonitorVolumeRemovedCallback)
- mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback)
- noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback
- onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
- wrap_VolumeMonitorVolumeRemovedCallback :: VolumeMonitorVolumeRemovedCallback -> C_VolumeMonitorVolumeRemovedCallback
Exported types
newtype VolumeMonitor Source #
Memory-managed wrapper type.
Instances
Eq VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor (==) :: VolumeMonitor -> VolumeMonitor -> Bool # (/=) :: VolumeMonitor -> VolumeMonitor -> Bool # | |
IsGValue VolumeMonitor Source # | Convert |
Defined in GI.Gio.Objects.VolumeMonitor toGValue :: VolumeMonitor -> IO GValue # fromGValue :: GValue -> IO VolumeMonitor # | |
ManagedPtrNewtype VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor | |
TypedObject VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor | |
GObject VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor | |
HasParentTypes VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor | |
type ParentTypes VolumeMonitor Source # | |
Defined in GI.Gio.Objects.VolumeMonitor |
class (GObject o, IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o Source #
Type class for types which can be safely cast to VolumeMonitor
, for instance with toVolumeMonitor
.
Instances
(GObject o, IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o Source # | |
Defined in GI.Gio.Objects.VolumeMonitor |
toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor Source #
Cast to VolumeMonitor
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
adoptOrphanMount
volumeMonitorAdoptOrphanMount Source #
:: (HasCallStack, MonadIO m, IsMount a) | |
=> a |
|
-> m Volume | Returns: the |
Deprecated: (Since version 2.20)Instead of using this function, VolumeMonitor
implementations should instead create shadow mounts with the URI ofthe mount they intend to adopt. See the proxy volume monitor ingvfs for an example of this. Also see mountIsShadowed
,mountShadow
and mountUnshadow
functions.
This function should be called by any VolumeMonitor
implementation when a new Mount
object is created that is not
associated with a Volume
object. It must be called just before
emitting the mountAdded
signal.
If the return value is not Nothing
, the caller must associate the
returned Volume
object with the Mount
. This involves returning
it in its mountGetVolume
implementation. The caller must
also listen for the "removed" signal on the returned object
and give up its reference when handling that signal
Similarly, if implementing volumeMonitorAdoptOrphanMount
,
the implementor must take a reference to mount
and return it in
its volumeGetMount
implemented. Also, the implementor must
listen for the "unmounted" signal on mount
and give up its
reference upon handling that signal.
There are two main use cases for this function.
One is when implementing a user space file system driver that reads
blocks of a block device that is already represented by the native
volume monitor (for example a CD Audio file system driver). Such
a driver will generate its own Mount
object that needs to be
associated with the Volume
object that represents the volume.
The other is for implementing a VolumeMonitor
whose sole purpose
is to return Volume
objects representing entries in the users
"favorite servers" list or similar.
get
:: (HasCallStack, MonadIO m) | |
=> m VolumeMonitor | Returns: a reference to the |
Gets the volume monitor used by gio.
getConnectedDrives
volumeMonitorGetConnectedDrives Source #
:: (HasCallStack, MonadIO m, IsVolumeMonitor a) | |
=> a |
|
-> m [Drive] |
Gets a list of drives connected to the system.
The returned list should be freed with g_list_free()
, after
its elements have been unreffed with objectUnref
.
getMountForUuid
volumeMonitorGetMountForUuid Source #
:: (HasCallStack, MonadIO m, IsVolumeMonitor a) | |
=> a |
|
-> Text |
|
-> m Mount | Returns: a |
Finds a Mount
object by its UUID (see mountGetUuid
)
getMounts
volumeMonitorGetMounts Source #
:: (HasCallStack, MonadIO m, IsVolumeMonitor a) | |
=> a |
|
-> m [Mount] |
Gets a list of the mounts on the system.
The returned list should be freed with g_list_free()
, after
its elements have been unreffed with objectUnref
.
getVolumeForUuid
volumeMonitorGetVolumeForUuid Source #
:: (HasCallStack, MonadIO m, IsVolumeMonitor a) | |
=> a |
|
-> Text |
|
-> m Volume | Returns: a |
Finds a Volume
object by its UUID (see volumeGetUuid
)
getVolumes
volumeMonitorGetVolumes Source #
:: (HasCallStack, MonadIO m, IsVolumeMonitor a) | |
=> a |
|
-> m [Volume] |
Gets a list of the volumes on the system.
The returned list should be freed with g_list_free()
, after
its elements have been unreffed with objectUnref
.
Signals
driveChanged
type C_VolumeMonitorDriveChangedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorDriveChangedCallback Source #
Emitted when a drive changes.
afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #driveChanged callback
genClosure_VolumeMonitorDriveChanged :: MonadIO m => VolumeMonitorDriveChangedCallback -> m (GClosure C_VolumeMonitorDriveChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorDriveChangedCallback
.
noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorDriveChangedCallback
onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #driveChanged callback
wrap_VolumeMonitorDriveChangedCallback :: VolumeMonitorDriveChangedCallback -> C_VolumeMonitorDriveChangedCallback Source #
driveConnected
type C_VolumeMonitorDriveConnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorDriveConnectedCallback Source #
Emitted when a drive is connected to the system.
afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveConnected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #driveConnected callback
genClosure_VolumeMonitorDriveConnected :: MonadIO m => VolumeMonitorDriveConnectedCallback -> m (GClosure C_VolumeMonitorDriveConnectedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorDriveConnectedCallback
.
noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorDriveConnectedCallback
onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveConnected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #driveConnected callback
wrap_VolumeMonitorDriveConnectedCallback :: VolumeMonitorDriveConnectedCallback -> C_VolumeMonitorDriveConnectedCallback Source #
driveDisconnected
type C_VolumeMonitorDriveDisconnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorDriveDisconnectedCallback Source #
Emitted when a drive is disconnected from the system.
afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveDisconnected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #driveDisconnected callback
genClosure_VolumeMonitorDriveDisconnected :: MonadIO m => VolumeMonitorDriveDisconnectedCallback -> m (GClosure C_VolumeMonitorDriveDisconnectedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorDriveDisconnectedCallback
.
noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorDriveDisconnectedCallback
onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveDisconnected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #driveDisconnected callback
wrap_VolumeMonitorDriveDisconnectedCallback :: VolumeMonitorDriveDisconnectedCallback -> C_VolumeMonitorDriveDisconnectedCallback Source #
driveEjectButton
type C_VolumeMonitorDriveEjectButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorDriveEjectButtonCallback Source #
Emitted when the eject button is pressed on drive
.
Since: 2.18
afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveEjectButton signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #driveEjectButton callback
genClosure_VolumeMonitorDriveEjectButton :: MonadIO m => VolumeMonitorDriveEjectButtonCallback -> m (GClosure C_VolumeMonitorDriveEjectButtonCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorDriveEjectButtonCallback
.
noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorDriveEjectButtonCallback
onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveEjectButton signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #driveEjectButton callback
wrap_VolumeMonitorDriveEjectButtonCallback :: VolumeMonitorDriveEjectButtonCallback -> C_VolumeMonitorDriveEjectButtonCallback Source #
driveStopButton
type C_VolumeMonitorDriveStopButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorDriveStopButtonCallback Source #
Emitted when the stop button is pressed on drive
.
Since: 2.22
afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveStopButton signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #driveStopButton callback
genClosure_VolumeMonitorDriveStopButton :: MonadIO m => VolumeMonitorDriveStopButtonCallback -> m (GClosure C_VolumeMonitorDriveStopButtonCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorDriveStopButtonCallback
.
noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorDriveStopButtonCallback
onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId Source #
Connect a signal handler for the driveStopButton signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #driveStopButton callback
wrap_VolumeMonitorDriveStopButtonCallback :: VolumeMonitorDriveStopButtonCallback -> C_VolumeMonitorDriveStopButtonCallback Source #
mountAdded
type C_VolumeMonitorMountAddedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorMountAddedCallback Source #
Emitted when a mount is added.
afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #mountAdded callback
genClosure_VolumeMonitorMountAdded :: MonadIO m => VolumeMonitorMountAddedCallback -> m (GClosure C_VolumeMonitorMountAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorMountAddedCallback
.
noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorMountAddedCallback
onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #mountAdded callback
wrap_VolumeMonitorMountAddedCallback :: VolumeMonitorMountAddedCallback -> C_VolumeMonitorMountAddedCallback Source #
Wrap a VolumeMonitorMountAddedCallback
into a C_VolumeMonitorMountAddedCallback
.
mountChanged
type C_VolumeMonitorMountChangedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorMountChangedCallback Source #
Emitted when a mount changes.
afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #mountChanged callback
genClosure_VolumeMonitorMountChanged :: MonadIO m => VolumeMonitorMountChangedCallback -> m (GClosure C_VolumeMonitorMountChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorMountChangedCallback
.
noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorMountChangedCallback
onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #mountChanged callback
wrap_VolumeMonitorMountChangedCallback :: VolumeMonitorMountChangedCallback -> C_VolumeMonitorMountChangedCallback Source #
mountPreUnmount
type C_VolumeMonitorMountPreUnmountCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorMountPreUnmountCallback Source #
May be emitted when a mount is about to be removed.
This signal depends on the backend and is only emitted if GIO was used to unmount.
afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountPreUnmount signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #mountPreUnmount callback
genClosure_VolumeMonitorMountPreUnmount :: MonadIO m => VolumeMonitorMountPreUnmountCallback -> m (GClosure C_VolumeMonitorMountPreUnmountCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorMountPreUnmountCallback
.
noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorMountPreUnmountCallback
onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountPreUnmount signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #mountPreUnmount callback
wrap_VolumeMonitorMountPreUnmountCallback :: VolumeMonitorMountPreUnmountCallback -> C_VolumeMonitorMountPreUnmountCallback Source #
mountRemoved
type C_VolumeMonitorMountRemovedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorMountRemovedCallback Source #
Emitted when a mount is removed.
afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #mountRemoved callback
genClosure_VolumeMonitorMountRemoved :: MonadIO m => VolumeMonitorMountRemovedCallback -> m (GClosure C_VolumeMonitorMountRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorMountRemovedCallback
.
noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorMountRemovedCallback
onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the mountRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #mountRemoved callback
wrap_VolumeMonitorMountRemovedCallback :: VolumeMonitorMountRemovedCallback -> C_VolumeMonitorMountRemovedCallback Source #
volumeAdded
type C_VolumeMonitorVolumeAddedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorVolumeAddedCallback Source #
Emitted when a mountable volume is added to the system.
afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #volumeAdded callback
genClosure_VolumeMonitorVolumeAdded :: MonadIO m => VolumeMonitorVolumeAddedCallback -> m (GClosure C_VolumeMonitorVolumeAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorVolumeAddedCallback
.
noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorVolumeAddedCallback
onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #volumeAdded callback
wrap_VolumeMonitorVolumeAddedCallback :: VolumeMonitorVolumeAddedCallback -> C_VolumeMonitorVolumeAddedCallback Source #
volumeChanged
type C_VolumeMonitorVolumeChangedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorVolumeChangedCallback Source #
Emitted when mountable volume is changed.
afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #volumeChanged callback
genClosure_VolumeMonitorVolumeChanged :: MonadIO m => VolumeMonitorVolumeChangedCallback -> m (GClosure C_VolumeMonitorVolumeChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorVolumeChangedCallback
.
noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorVolumeChangedCallback
onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #volumeChanged callback
wrap_VolumeMonitorVolumeChangedCallback :: VolumeMonitorVolumeChangedCallback -> C_VolumeMonitorVolumeChangedCallback Source #
volumeRemoved
type C_VolumeMonitorVolumeRemovedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type VolumeMonitorVolumeRemovedCallback Source #
Emitted when a mountable volume is removed from the system.
afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
volumeMonitor #volumeRemoved callback
genClosure_VolumeMonitorVolumeRemoved :: MonadIO m => VolumeMonitorVolumeRemovedCallback -> m (GClosure C_VolumeMonitorVolumeRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_VolumeMonitorVolumeRemovedCallback
.
noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
VolumeMonitorVolumeRemovedCallback
onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the volumeRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
volumeMonitor #volumeRemoved callback