Fl::add_idle function

Hello all,

For some reason I need to use of Fl::add_idle function. This site introduces it but doesn't offer an example of how to use it.
http://www.fltk.org/documentation.php/doc-1.1/Fl.html#Fl.add_idle

May you please offer simplest example of it?
Last edited on
simplest example
1
2
3
4
5
6
void callback(void*)
{
    //do something
}
//...
add_idle(callback);
Thanks for the reply but apparently add_idle gets two arguments.
Second one is optional. Just like in other fucntions. As documentation states, it is passed to callback function when it is invoked.
OK. Thanks again.
Topic archived. No new replies allowed.