gio-0.12.4: Binding to the GIO.

Portability | portable (depends on GHC)
Stability | alpha
Maintainer | gtk2hs-devel@lists.sourceforge.net
Safe Haskell | None

System.GIO.Volumes.VolumeMonitor

Contents

- Details
- Types
- Methods
- Signals

Description

Synopsis

- newtype VolumeMonitor = VolumeMonitor (ForeignPtr VolumeMonitor)
- class GObjectClass o => VolumeMonitorClass o
- volumeMonitorGet :: IO VolumeMonitor
- volumeMonitorGetConnectedDrives :: VolumeMonitorClass monitor => monitor -> IO [Drive]
- volumeMonitorGetVolumes :: VolumeMonitorClass monitor => monitor -> IO [Drive]
- volumeMonitorGetMounts :: VolumeMonitorClass monitor => monitor -> IO [Drive]
- volumeMonitorGetMountForUUID :: VolumeMonitorClass monitor => monitor -> String -> IO (Maybe Mount)
- volumeMonitorGetVolumeForUUID :: VolumeMonitorClass monitor => monitor -> String -> IO (Maybe Volume)
- vmDriveChanged :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())
- vmDriveConnected :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())
- vmDriveDisconnected :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())
- vmDriveEjectButton :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())
- vmDriveStopButton :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())
- vmMountAdded :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())
- vmMountChanged :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())
- vmMountPreUnmount :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())
- vmMountRemoved :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())
- vmVolumeAdded :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())
- vmVolumeChanged :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())
- vmVolumeRemoved :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())

# Details

`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, and so should not be used other than from the main thread, with no thread-default-context active.

# Types

newtype VolumeMonitor

Constructors

VolumeMonitor (ForeignPtr VolumeMonitor) |

Instances

Eq VolumeMonitor |
Ord VolumeMonitor |
GObjectClass VolumeMonitor |
VolumeMonitorClass VolumeMonitor |

class GObjectClass o => VolumeMonitorClass o

Instances

VolumeMonitorClass VolumeMonitor |

# Methods

volumeMonitorGet :: IO VolumeMonitor

Gets the volume monitor used by gio.

volumeMonitorGetConnectedDrives :: VolumeMonitorClass monitor => monitor -> IO [Drive]

Gets a list of drives connected to the system.

volumeMonitorGetVolumes :: VolumeMonitorClass monitor => monitor -> IO [Drive]

Gets a list of the volumes on the system.

volumeMonitorGetMounts :: VolumeMonitorClass monitor => monitor -> IO [Drive]

Gets a list of the mounts on the system.

volumeMonitorGetMountForUUID

Arguments

:: VolumeMonitorClass monitor |
=> monitor |
-> String | `uuid` the UUID to look for
-> IO (Maybe Mount) | returns a `Mount` or `Nothing` if no such mount is available.

Finds a `Mount` object by its UUID (see `mountGetUuid`

volumeMonitorGetVolumeForUUID

Arguments

:: VolumeMonitorClass monitor |
=> monitor |
-> String | `uuid` the UUID to look for
-> IO (Maybe Volume) | returns a `Volume` or `Nothing` if no such volume is available.

Finds a `Volume` object by its UUID (see `volumeGetUuid`)

# Signals

vmDriveChanged :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())

Emitted when a drive changes.

vmDriveConnected :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())

Emitted when a drive changes.

vmDriveDisconnected :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())

Emitted when a drive changes.

vmDriveEjectButton :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())

Emitted when the eject button is pressed on drive.

vmDriveStopButton :: VolumeMonitorClass monitor => Signal monitor (Drive -> IO ())

Emitted when the stop button is pressed on drive.

vmMountAdded :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())

Emitted when a mount is added.

vmMountChanged :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())

Emitted when a mount is changed.

vmMountPreUnmount :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())

Emitted when a mount is about to be removed.

vmMountRemoved :: VolumeMonitorClass monitor => Signal monitor (Mount -> IO ())

Emitted when a mount is removed.

vmVolumeAdded :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())

Emitted when a volume is added.

vmVolumeChanged :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())

Emitted when a volume is changed.

vmVolumeRemoved :: VolumeMonitorClass monitor => Signal monitor (Volume -> IO ())

Emitted when a volume is removed.