idle_add


Description:

[ Version ( since = "3.6" ) ]
public uint idle_add (int priority, owned SourceFunc function)

Adds a function to be called whenever there are no higher priority events pending.

If function returns false it is automatically removed from the list of event sources and will not be called again.

This internally creates a main loop source using IdleSource and attaches it to this's own main_context using attach.

The priority is typically in the range between g_priority_default_idle and g_priority_high_idle.

Parameters:

this

a Session

priority

the priority of the idle source

function

a function to call

data

data to pass to function

notify

function to call when the idle is removed, or null

Returns:

the ID (greater than 0) of the event source