From 18f2016b1f743068cd3d4bb9740845c2d55af3f3 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 20 Mar 2007 10:41:14 +0000 Subject: Removed the Fl::set_awake_cb API and documented the Fl::awake(function, data) API. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl.html | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'documentation/Fl.html') diff --git a/documentation/Fl.html b/documentation/Fl.html index 24d5be118..77ff43336 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -126,7 +126,6 @@ state information and global methods for the current application.

  • selection_owner
  • set_abort
  • set_atclose
  • -
  • set_awake_cb
  • set_boxtype
  • set_color
  • set_font
  • @@ -391,9 +390,24 @@ argument on the command-line. You can change the message by setting the

    void awake(void *p);

    -

    The awake() method sends a message pointer to the main thread, causing any pending Fl::wait() call to terminate so that the main thread can retrieve the message and any pending redraws can be processed. +

    int awake(void (*callback)(void*), void *userdata);

    -

    Multiple calls to Fl::awake() will queue multiple pointers for the main thread to process, up to a system-defined (typically several thousand) depth. The default message handler saves the last message which can be accessed using the Fl::thread_message() function. Use the Fl::set_awake_cb() function to register your own thread message handler that is called for every message received by the main thread. +

    The awake() method sends a message pointer to the main thread, +causing any pending Fl::wait() call to +terminate so that the main thread can retrieve the message and any pending +redraws can be processed. + +

    Multiple calls to Fl::awake() will queue multiple pointers +for the main thread to process, up to a system-defined (typically several +thousand) depth. The default message handler saves the last message which +can be accessed using the +Fl::thread_message() function. + +

    The second form of awake() registers a function that will be +called by the main thread during the next message handling cycle. +awake() will return 0 if the callback function was registered, +and -1 if registration failed. Over a thousand awake callbacks can be +registered simultaneously.

    See also: multithreading. @@ -1169,10 +1183,6 @@ of this.

    void set_atclose(void (*f)(Fl_Window*,void*));

    -

    void set_awake_cb(void (*cb)(void*));

    - -

    Sets a function to handle thread messages sent via the Fl::awake() function.

    -

    void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
    void set_boxtype(Fl_Boxtype, Fl_Boxtype from);

    -- cgit v1.2.3