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.common/Glib/Main/index.html

Module Glib.MainSource

The Main Event Loop

Sourcetype t

Main loop handle

Sourceval create : bool -> t

create is_running creates a new main loop. If is_running is true, the loop is immediately marked as running.

Sourceval run : t -> unit

run loop runs the main loop until quit is called.

Sourceval iteration : bool -> bool

iteration may_block runs a single iteration of the main context. If may_block is true, the iteration can block waiting for events. Returns true if events were processed.

Sourceval pending : unit -> bool

Returns true if events are pending in the main loop

Sourceval is_running : t -> bool

is_running loop returns true if the loop is currently running

Sourceval quit : t -> unit

quit loop stops a running main loop

Sourceval destroy : t -> unit

destroy loop decrements the reference count on the loop. When the reference count drops to zero, the loop is freed.