<GMainLoop>

<GMainLoop>

Description

The GMainLoop struct is an opaque data type representing the main event loop of a GLib or GTK+ application.

Functions

get-context

(define-values (%return) (main-loop:get-context self))

Returns the GMainContext of loop.

Parameters

loop

a GMainLoop.

Passed as self

is-running?

(define-values (%return) (main-loop:is-running? self))

Checks to see if the main loop is currently being run via g_main_loop_run().

Parameters

loop

a GMainLoop.

Passed as self

quit

(define-values () (main-loop:quit self))

Stops a GMainLoop from running. Any calls to g_main_loop_run() for the loop will return.

Note that sources that have already been dispatched when g_main_loop_quit() is called will still be executed.

Parameters

loop

a GMainLoop

Passed as self

ref

(define-values (%return) (main-loop:ref self))

Increases the reference count on a GMainLoop object by one.

Parameters

loop

a GMainLoop

Passed as self

run

(define-values () (main-loop:run self))

Runs a main loop until g_main_loop_quit() is called on the loop. If this is called for the thread of the loop's GMainContext, it will process events from the loop, otherwise it will simply wait.

Parameters

loop

a GMainLoop

Passed as self

unref

(define-values () (main-loop:unref self))

Decreases the reference count on a GMainLoop object by one. If the result is zero, free the loop and free all associated memory.

Parameters

loop

a GMainLoop

Passed as self

main-loop:new

(define-values (%return) (main-loop:new context is-running))

Undocumented

Parameters

context

Passed as context

is_running

Passed as is-running