add_once


Description:

[ Version ( since = "2.74" ) ]
public uint add_once (SourceOnceFunc function)

Adds a function to be called whenever there are no higher priority events pending to the default main loop.

The function is given the default idle priority, g_priority_default_idle.

The function will only be called once and then the source will be automatically removed from the main context.

This function otherwise behaves like g_idle_add.

Parameters:

function

function to call

data

data to pass to function

Returns:

the ID (greater than 0) of the event source


Namespace: GLib.Idle
Package: glib-2.0