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.gtk/Ocgtk_gtk/Gtk/Wrappers/Directory_list/index.html

Module Wrappers.Directory_list

type t = [ `directory_list | `object_ ] Gobject.obj
val new_ : string option -> Ocgtk_gio.Gio.Wrappers.File.t option -> t

Create a new DirectoryList

val set_monitored : t -> bool -> unit

Sets whether the directory list will monitor the directory for changes.

If monitoring is enabled, the ::items-changed signal will be emitted when the directory contents change.

When monitoring is turned on after the initial creation of the directory list, the directory is reloaded to avoid missing files that appeared between the initial loading and when monitoring was turned on.

val set_io_priority : t -> int -> unit

Sets the IO priority to use while loading directories.

Setting the priority while @self is loading will reprioritize the ongoing load as soon as possible.

The default IO priority is %G_PRIORITY_DEFAULT, which is higher than the GTK redraw priority. If you are loading a lot of directories in parallel, lowering it to something like %G_PRIORITY_DEFAULT_IDLE may increase responsiveness.

val set_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option -> unit

Sets the @file to be enumerated and starts the enumeration.

If @file is %NULL, the result will be an empty list.

val set_attributes : t -> string option -> unit

Sets the @attributes to be enumerated and starts the enumeration.

If @attributes is %NULL, the list of file infos will still be created, it will just not contain any extra attributes.

val is_loading : t -> bool

Returns %TRUE if the children enumeration is currently in progress.

Files will be added to @self from time to time while loading is going on. The order in which are added is undefined and may change in between runs.

val get_monitored : t -> bool

Returns whether the directory list is monitoring the directory for changes.

val get_io_priority : t -> int

Gets the IO priority set via gtk_directory_list_set_io_priority().

val get_file : t -> Ocgtk_gio.Gio.Wrappers.File.t option

Gets the file whose children are currently enumerated.

val get_error : t -> GError.t option

Gets the loading error, if any.

If an error occurs during the loading process, the loading process will finish and this property allows querying the error that happened. This error will persist until a file is loaded again.

An error being set does not mean that no files were loaded, and all successfully queried files will remain in the list.

val get_attributes : t -> string option

Gets the attributes queried on the children.

val get_item_type : t -> Gobject.Type.t

Get property: item-type

val get_loading : t -> bool

Get property: loading

val get_n_items : t -> int

Get property: n-items