Function
GLibidle_add_full
since: 2.0
Declaration [src]
guint
g_idle_add_full (
gint priority,
GSourceFunc function,
gpointer data,
GDestroyNotify notify
)
Description [src]
Adds a function to be called whenever there are no higher priority events pending.
If the function returns G_SOURCE_REMOVE or FALSE it is automatically
removed from the list of event sources and will not be called again.
See mainloop memory management for details
on how to handle the return value and memory management of data.
This internally creates a main loop source using g_idle_source_new()
and attaches it to the global GMainContext using g_source_attach(), so
the callback will be invoked in whichever thread is running that main
context. You can do these steps manually if you need greater control or to
use a custom main context.
Available since: 2.0
This method is renamed to g_idle_add() in language bindings
Parameters
priority-
Type:
gintThe priority of the idle source. Typically this will be in the range between
G_PRIORITY_DEFAULT_IDLEandG_PRIORITY_HIGH_IDLE. function-
Type:
GSourceFuncFunction to call.
data-
Type:
gpointerData to pass to
function.The argument can be NULL.The data is owned by the caller of the function. notify-
Type:
GDestroyNotifyFunction to call when the idle is removed, or
NULL.The argument can be NULL.