Up: GLib Reference


3.1 GLib Main loop

— Function: g-source-remove
     (g-source-remove source-id)
source-id
An integer identifier of the source.

Removes the source with the given source-id from the default main context.

— Constant: +g-priority-high+

Use this for high priority event sources. It is not used within GLib or GTK+.

— Constant: +g-priority-default+

Use this for default priority event sources. In GLib this priority is used when adding timeout functions with g_timeout_add(). In GDK this priority is used for events from the X server.

— Constant: +g-priority-high-idle+

Use this for high priority idle functions. GTK+ uses (+ 10 +g-priority-high-idle+) for resizing operations, and (+ 20 +g-priority-high-idle+) for redrawing operations. (This is done to ensure that any pending resizes are processed before any pending redraws, so that widgets are not redrawn twice unnecessarily.)

— Constant: +g-priority-default-idle+

Use this for default priority idle functions. In GLib this priority is used when adding idle functions with g_idle_add().

— Constant: +g-priority-low+

Use this for very low priority background tasks. It is not used within GLib or GTK+.