Adds a function to be called whenever Clutter is processing a new frame.
If the function returns
false it is automatically removed from the list of repaint functions and will not be called again.
This function is guaranteed to be called from within the same thread that called main , and while the Clutter lock is being held; the function will be called within the main loop, so it is imperative that it does not block, otherwise the frame time budget may be lost.
A repaint function is useful to ensure that an update of the scenegraph is performed before the scenegraph is repainted; for instance, uploading a frame from a video into a Texture. By default, a repaint function added using this function will be invoked prior to the frame being processed.
Adding a repaint function does not automatically ensure that a new frame will be queued.
When the repaint function is removed (either because it returned
false or because
remove_repaint_func has been called) the
function will be called, if any is set.
See also: add_repaint_func_full
the function to be called within the paint cycle
data to be passed to the function, or
function to be called when removing the repaint function, or
the ID (greater than 0) of the repaint function. You can use the returned integer to remove the repaint function by calling remove_repaint_func.