summaryrefslogtreecommitdiff
path: root/documentation/Fl.html
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2007-02-08 23:04:20 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2007-02-08 23:04:20 +0000
commit6e9a1630357a21c6ef6357cdde324ae89a565826 (patch)
treeefc85bf8e365b2da7f6dd91e56f78fb5e4574604 /documentation/Fl.html
parent057e542c395a8cc5391ee57a215c2c644a2fbd0b (diff)
Add handler for thread messages (STR #1536)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation/Fl.html')
-rw-r--r--documentation/Fl.html17
1 files changed, 8 insertions, 9 deletions
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.</P>
<LI><A HREF="#Fl.selection_owner">selection_owner</A></LI>
<LI><A HREF="#Fl.set_abort">set_abort</A></LI>
<LI><A HREF="#Fl.set_atclose">set_atclose</A></LI>
+ <LI><A HREF="#Fl.set_awake_cb">set_awake_cb</A></LI>
<LI><A HREF="#Fl.set_boxtype">set_boxtype</A></LI>
<LI><A HREF="#Fl.set_color">set_color</A></LI>
<LI><A HREF="#Fl.set_font">set_font</A></LI>
@@ -390,17 +391,11 @@ argument on the command-line. You can change the message by setting the
<H4><A NAME="Fl.awake">void awake(void *p);</A></H4>
-<P>The <TT>awake()</TT> method sends a message pointer to the
-main thread, causing any pending <TT>wait()</TT> call to
-terminate so that the main thread can retrieve the message and
-any pending redraws can be processed.
+<P>The <TT>awake()</TT> method sends a message pointer to the main thread, causing any pending <A HREF="#Fl.wait"><TT>Fl::wait()</TT></A> call to terminate so that the main thread can retrieve the message and any pending redraws can be processed.
-<P>Multiple calls to <TT>awake()</TT> will overwrite the same
-message pointer.
-<A HREF="#Fl.thread_message"><TT>thread_message()</TT></A> only returns
-the last message stored by the last <TT>awake()</TT> call.
+<P>Multiple calls to <TT>Fl::awake()</TT> 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 <A HREF="#Fl.thread_message"><TT>Fl::thread_message()</TT></A> function. Use the <A HREF="#Fl.set_awake_cb"><TT>Fl::set_awake_cb()</TT></A> function to register your own thread message handler that is called for every message received by the main thread.
-<P>See also: <a href="advanced.html#multithreading">multithreading</a>
+<P>See also: <a href="advanced.html#multithreading">multithreading</a>.
<H4><A NAME="Fl.background2">void background2(uchar, uchar, uchar);</A></H4>
@@ -1174,6 +1169,10 @@ of this.</I>
<H4><A NAME="Fl.set_atclose">void set_atclose(void (*f)(Fl_Window*,void*));</A></H4>
+<H4><A NAME="Fl.set_awake_cb">void set_awake_cb(void (*cb)(void*));</A></H4>
+
+<P>Sets a function to handle thread messages sent via the <A HREF="#Fl.awake"><TT>Fl::awake()</TT></A> function.</P>
+
<H4><A NAME="Fl.set_boxtype">void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);<BR>
void set_boxtype(Fl_Boxtype, Fl_Boxtype from);</A></H4>