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

Module Wrappers.File_monitor

type t = [ `file_monitor | `object_ ] Gobject.obj
val set_rate_limit : t -> int -> unit

Sets the rate limit to which the @monitor will report consecutive change events to the same file.

val is_cancelled : t -> bool

Returns whether the monitor is canceled.

val emit_event : t -> [ `file ] Gobject.obj -> [ `file ] Gobject.obj -> Gio_enums.filemonitorevent -> unit

Emits the #GFileMonitor::changed signal if a change has taken place. Should be called from file monitor implementations only.

Implementations are responsible to call this method from the thread-default main contextg-main-context-push-thread-default of the thread that the monitor was created in.

val cancel : t -> bool

Cancels a file monitor.

val get_cancelled : t -> bool

Get property: cancelled

val on_changed : ?after:bool -> t -> callback: (file:[ `file ] Gobject.obj -> other_file:[ `file ] Gobject.obj option -> event_type:Gio_enums.filemonitorevent -> unit) -> Gobject.Signal.handler_id