From c33c7ff0b85c02633890a9548a18402247cf6e82 Mon Sep 17 00:00:00 2001
From: Michael R Sweet The second version takes a when bitfield, with the bits
@@ -214,23 +214,22 @@ zero from its handle() method. Exactly which ones may change
in future versions, however.
Warning: this can absorb all your machine's time! You can have multiple idle callbacks. To remove an idle callback use Fl::remove_idle(). Only Fl::wait() calls the idle callbacks. Fl::wait(time)
-, Fl::check(), and Fl::ready() ignore them so that
-these functions may be called by the idle callbacks themselves without
-having to worry about recursion. Fl::wait() and Fl::check() call idle callbacks,
+but Fl::ready() does not. The idle callback can call any FLTK functions. However if you call
-something that calls Fl::wait() (such as a message pop-up) you
-should first remove the idle callback so that it does not recurse.
static void Fl::add_fd(int fd, int when, void (*cb)(int, void *),
void * = 0)
static void Fl::remove_fd(int)
- Add file descriptor fd to listen to. When the fd
- becomes ready for reading the callback is done. The callback is
+Add file descriptor fd to listen to. When the fd
+becomes ready for reading the callback is done. The callback is
passed the fd and the arbitrary void * argument.
Fl::wait() will return immediately after calling the callback.
static Fl::add_idle(void (*cb)(void *), void *)
- Adds a callback function that is called by Fl::wait() when
+Adds a callback function that is called by Fl::wait() when
there is nothing to do. This can be used for background processing.
This code will print "TICK" each second on stdout, no matter what else the user or program does:
-- cgit v1.2.3