From c33c7ff0b85c02633890a9548a18402247cf6e82 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 22 Feb 1999 20:53:35 +0000 Subject: Now don't enable XDBE under SunOS or IRIX 6.3 or earlier. Added HP C++ compiler warning options. Added HP-UX check with (v)snprintf() - HP-UX has them, but doesn't have prototypes... git-svn-id: file:///fltk/svn/fltk/trunk@311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/functions.html | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'documentation/functions.html') diff --git a/documentation/functions.html b/documentation/functions.html index 257aae1db..e0996deed 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -185,8 +185,8 @@ subexpressions literally.
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.

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.

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.

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.

+something that calls Fl::wait() or Fl::check() (such +as a message pop-up) you should first remove the idle callback so that +it does not recurse.

static void Fl::add_timeout(float t, void (*cb)(void *),void *v=0)

- Add a one-shot timeout callback. The timeout will happen as soon as +Add a one-shot timeout callback. The timeout will happen as soon as possible after t seconds after the last time wait() - was called. The optional void * argument is passed to the +was called. The optional void * argument is passed to the callback.

This code will print "TICK" each second on stdout, no matter what else the user or program does:

-- cgit v1.2.3