package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Volume/index.html

Module Wrappers.Volume

type t = [ `volume ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val should_automount : t -> bool

Returns whether the volume should be automatically mounted.

val mount_finish : t -> [ `async_result ] Gobject.obj -> (bool, GError.t) result

Finishes mounting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.

If the mount operation succeeded, g_volume_get_mount() on @volume is guaranteed to return the mount right after calling this function; there's no need to listen for the 'mount-added' signal on #GVolumeMonitor.

val get_uuid : t -> string option

Gets the UUID for the @volume. The reference is typically based on the file system UUID for the volume in question and should be considered an opaque string. Returns %NULL if there is no UUID available.

val get_symbolic_icon : t -> [ `icon ] Gobject.obj

Gets the symbolic icon for @volume.

val get_sort_key : t -> string option

Gets the sort key for @volume, if any.

val get_name : t -> string

Gets the name of @volume.

val get_mount : t -> [ `mount ] Gobject.obj option

Gets the mount for the @volume.

val get_identifier : t -> string -> string option

Gets the identifier of the given kind for @volume. See the introduction(#volume-identifiers) for more information about volume identifiers.

val get_icon : t -> [ `icon ] Gobject.obj

Gets the icon for @volume.

val get_drive : t -> [ `drive ] Gobject.obj option

Gets the drive for the @volume.

val get_activation_root : t -> [ `file ] Gobject.obj option

Gets the activation root for a #GVolume if it is known ahead of mount time. Returns %NULL otherwise. If not %NULL and if @volume is mounted, then the result of g_mount_get_root() on the #GMount object obtained from g_volume_get_mount() will always either be equal or a prefix of what this function returns. In other words, in code

|<!-- language="C" --> GMount *mount; GFile *mount_root GFile *volume_activation_root; mount = g_volume_get_mount (volume); // mounted, so never NULL mount_root = g_mount_get_root (mount); volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL | then the expression |<!-- language="C" --> (g_file_has_prefix (volume_activation_root, mount_root) || g_file_equal (volume_activation_root, mount_root)) | will always be %TRUE.

Activation roots are typically used in #GVolumeMonitor implementations to find the underlying mount to shadow, see g_mount_is_shadowed() for more details.

val enumerate_identifiers : t -> string array

Gets the kinds of identifiers(#volume-identifiers) that @volume has. Use g_volume_get_identifier() to obtain the identifiers themselves.

val eject_with_operation_finish : t -> [ `async_result ] Gobject.obj -> (bool, GError.t) result

Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.

val eject_finish : t -> [ `async_result ] Gobject.obj -> (bool, GError.t) result

Finishes ejecting a volume. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.

val can_mount : t -> bool

Checks if a volume can be mounted.

val can_eject : t -> bool

Checks if a volume can be ejected.

val on_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_removed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id