add


Description:

public void add (owned SourceFunc<T> func, int priority = DEFAULT, Cancellable? cancellable = null) throws Error

Add a callback to be executed in the idle queue

The callback will be added to the idle queue once per event until it returns false. Note that this means it is possible that the callback will be executed again after it returns false, since another event could be triggered (causing the callback to be added to the idle queue again) before the callback is actually executed.

Parameters:

func the callback to add
priority the priority of the callback
cancellable optional cancellable for removing the callback