TimeoutPool
Object Hierarchy:
Description:
TimeoutPool is an opaque structure whose members cannot be directly accessed.
Namespace: Clutter
Package: clutter-1.0
Content:
Creation methods:
-
public TimeoutPool (int priority)
Creates a new timeout pool source. A timeout pool should be used when multiple timeout functions,
running at the same priority, are needed and the g_timeout_add API might lead to starvation of the time slice of the main
loop. A timeout pool allocates a single time slice of the main loop and runs every timeout function inside it. The timeout pool is
always sorted, so that the extraction of the next timeout function is a constant time operation.
Methods:
-
public uint add (uint fps, owned SourceFunc func)
Sets a function to be called at regular intervals, and puts it inside the pool. The
function is repeatedly called until it returns false, at which point the timeout is automatically destroyed and the
function won't be called again. If notify is not null, the notify function will be called. The
first call to func will be at the end of interval.
-
public void remove (uint id_)
Removes a timeout function with id_ from the timeout pool. The id is the same returned when
adding a function to the timeout pool with add.