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/Drive/index.html

Module Wrappers.Drive

type t = [ `drive ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val stop_finish : t -> [ `async_result ] Gobject.obj -> (bool, GError.t) result

Finishes stopping a drive.

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

Finishes starting a drive.

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

Finishes an operation started with g_drive_poll_for_media() on a drive.

val is_removable : t -> bool

Checks if the #GDrive and/or its media is considered removable by the user. See g_drive_is_media_removable().

val is_media_removable : t -> bool

Checks if the @drive supports removable media.

val is_media_check_automatic : t -> bool

Checks if @drive is capable of automatically detecting media changes.

val has_volumes : t -> bool

Check if @drive has any mountable volumes.

val has_media : t -> bool

Checks if the @drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details.

val get_volumes : t -> [ `volume ] Gobject.obj list

Get a list of mountable volumes for @drive.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

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

Gets the icon for @drive.

val get_start_stop_type : t -> Gio_enums.drivestartstoptype

Gets a hint about how a drive can be started/stopped.

val get_sort_key : t -> string option

Gets the sort key for @drive, if any.

val get_name : t -> string

Gets the name of @drive.

val get_identifier : t -> string -> string option

Gets the identifier of the given kind for @drive. The only identifier currently available is %G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.

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

Gets the icon for @drive.

val enumerate_identifiers : t -> string array

Gets the kinds of identifiers that @drive has. Use g_drive_get_identifier() to obtain the identifiers themselves.

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

Finishes ejecting a drive. 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 drive.

val can_stop : t -> bool

Checks if a drive can be stopped.

val can_start_degraded : t -> bool

Checks if a drive can be started degraded.

val can_start : t -> bool

Checks if a drive can be started.

val can_poll_for_media : t -> bool

Checks if a drive can be polled for media changes.

val can_eject : t -> bool

Checks if a drive can be ejected.

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