From 76affdbfd3e3cd191c16aca52e2e9944eb9d9520 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 8 Dec 2001 21:24:07 +0000 Subject: Add docos for the thread methods (awake, lock, thread_message, and unlock) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1825 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/Fl.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'documentation') diff --git a/documentation/Fl.html b/documentation/Fl.html index 21257a8c4..03fe903b9 100644 --- a/documentation/Fl.html +++ b/documentation/Fl.html @@ -35,6 +35,7 @@ state information and global methods for the current application.

  • arg
  • args
  • atclose
  • +
  • awake
  • background2
  • background
  • belowmouse
  • @@ -88,6 +89,7 @@ state information and global methods for the current application.

  • has_check
  • has_idle
  • has_timeout
  • +
  • lock
  • modal
  • next_window
  • own_colormap
  • @@ -114,6 +116,8 @@ state information and global methods for the current application.

  • set_idle
  • set_labeltype
  • test_shortcut
  • +
  • thread_message
  • +
  • unlock
  • version
  • visible_focus
  • visual
  • @@ -297,6 +301,13 @@ argument on the command-line. You can change the message by setting the

    void (*atclose)(Fl_Window*,void*);

    +

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

    void background2(uchar, uchar, uchar);

    Changes fl_color(FL_WHITE) and the same colors as @@ -742,6 +753,25 @@ widget uses the event.

    Returns true if the timeout exists and has not been called yet. +

    void lock();

    + +

    The lock() method blocks the current thread until it +can safely access FLTK widgets and data. Child threads should +call this method prior to updating any widgets or accessing +data. The main thread must call lock() to initialize +the threading support in FLTK. + +

    Child threads must call unlock() when they are done +accessing FLTK. + +

    When the wait() method is waiting +for input or timeouts, child threads are given access to FLTK. +Similarly, when the main thread needs to do processing, it will +wait until all child threads have called unlock() before processing +additional data. +

    Fl_Window* modal();

    Returns the top-most modal() window currently shown. @@ -962,6 +992,19 @@ FL_SHORTCUT, against a shortcut value (described in Fl_Widget::test_shortcut(). +

    void *thread_message();

    + +

    The thread_message() method returns the last message +that was sent from a child by the awake() method. + +

    void unlock();

    + +

    The unlock() method releases the lock that was set +using the lock() method. Child +threads should call this method as soon as they are finished +accessing FLTK. +

    double version();

    Returns the compiled-in value of the FL_VERSION constant. This -- cgit v1.2.3