Learn R Programming

RGtk2 (version 2.20.31)

gtkAddTimeout: Control a periodic/timer function

Description

DEPRECATED!! (compatibility wrappers for RGtk 1!)

These functions allow one to register and remove a function that is called periodically at a fixed interval.

Usage

gtkAddTimeout(interval, f, data=NULL) gtkRemoveTimeout(id)

Arguments

interval
the number of milliseconds to wait before invoking the call.
f
the function should take one or zero arguments depending on whether the argument 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.
data
a value, which if specified, will be passed to the function 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.
id
the object identifying the timer function in Gtk that was returned by a call to gtkAddTimeout.

Value

gtkAddTimeout returns an object of class "GtkTimeoutId". This is an integer giving the identifier returned by the low-level Gtk interface.

See Also

gtkAddIdle gtkRemoveIdle gtkAddCallback