From 6e9a1630357a21c6ef6357cdde324ae89a565826 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 8 Feb 2007 23:04:20 +0000 Subject: Add handler for thread messages (STR #1536) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'documentation/Fl.html') diff --git a/documentation/Fl.html b/documentation/Fl.html index 281ef7b8a..24d5be118 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -126,6 +126,7 @@ state information and global methods for the current application.

  • selection_owner
  • set_abort
  • set_atclose
  • +
  • set_awake_cb
  • set_boxtype
  • set_color
  • set_font
  • @@ -390,17 +391,11 @@ 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 wait() call to -terminate so that the main thread can retrieve the message and -any pending redraws can be processed. +

    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 awake() will overwrite the same -message pointer. -thread_message() only returns -the last message stored by the last awake() call. +

    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. -

    See also: multithreading +

    See also: multithreading.

    void background2(uchar, uchar, uchar);

    @@ -1174,6 +1169,10 @@ 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