[ Version ( since = "2.74" ) ]
public uint add_once (owned 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, [const@GLib.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 [func@GLib.idle_add].
| function |
function to call |
| data |
data to pass to |
|
the ID (greater than 0) of the event source |