These functions allow one to register and remove a function that is called whenever Gtk has nothing else to do. In other words, these are background tasks that have less priority than timers and user interface events.
gtkAddIdle(f, data=NULL)
gtkRemoveIdle(id)
data
is given.
The function should return a logical value.
If it returns FALSE
, the timer is removed.
If it returns TRUE
, the timer is re-registered and will be called
after interval
milliseconds.
f
when it is invoked. This can be used to
parameterize the function to have different functions.
The same effect can be obtained using closures.
gtkAddTimeout
.gtkAddTimeout
returns an object
of class "GtkIdleId"
.
This is an integer giving the identifier
returned by the low-level Gtk interface.
gtkAddTimeout
gtkRemoveTimeout
gtkAddCallback