package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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.