From 27c7dc9056f7b84561fa83f2472828896917f9d9 Mon Sep 17 00:00:00 2001 From: engelsman Date: Sun, 22 Mar 2009 16:41:18 +0000 Subject: converted html tags to doxygen commands in documentation/src/advanced.dox git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/src/advanced.dox | 46 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'documentation/src') diff --git a/documentation/src/advanced.dox b/documentation/src/advanced.dox index 17afa9147..4afc929b4 100644 --- a/documentation/src/advanced.dox +++ b/documentation/src/advanced.dox @@ -11,25 +11,22 @@ that will help you to get the most out of FLTK. FLTK supports multithreaded application using a locking mechanism based on "pthreads". We do not provide a threading interface as part of the library. However a simple example how threads can be implemented -for all supported platforms can be found in test/threads.h -and test/threads.cxx. +for all supported platforms can be found in \p test/threads.h +and \p test/threads.cxx. To use the locking mechanism, FLTK must be compiled with ---enable-threads set during the configure +\p --enable-threads set during the \p configure process. IDE-based versions of FLTK are automatically compiled with locking enabled if possible. -In main(), call -Fl::lock() before -Fl::run() or -Fl::wait() -to start the runtime +In \p main(), call +Fl::lock() before +Fl::run() or +Fl::wait() to start the runtime multithreading support for your program. All callbacks and derived -functions like handle() and draw() will now be properly +functions like \p handle() and \p draw() will now be properly locked: -} - \code int main() { Fl::lock(); @@ -44,8 +41,7 @@ locked: You can now start as many threads as you like. From within a thread (other than the main thread) FLTK calls must be wrapped -with calls to Fl::lock() -and Fl::unlock(): +with calls to Fl::lock() and Fl::unlock(): \code Fl::lock(); // avoid conflicting calls @@ -54,7 +50,7 @@ and Fl::unlock(): \endcode You can send messages from child threads to the main thread -using Fl::awake(msg):

+using Fl::awake(void* message): \code void *msg; // "msg" is a pointer to your message @@ -63,7 +59,7 @@ using Fl::awake(msg):

You can also tell the main thread to call a function for you as soon as possible by using -Fl::awake(callback, userdata):

+Fl::awake(Fl_Awake_Handler cb, void* userdata): \code void do_something(void *userdata) { @@ -82,27 +78,27 @@ open or close windows. The safe thing to do is to adhere to the following rules for threads on all operating systems: -\li Don't show() or hide()anything that contains - widgets derived from Fl_Window, including dialogs, file - choosers, subwindows or Fl_GL_Windows +\li Don't \p show() or \p hide() anything that contains + widgets derived from Fl_Window, including dialogs, file + choosers, subwindows or Fl_Gl_Window's -\li Don't call Fl::wait(), Fl::flush() or any +\li Don't call Fl::wait(), Fl::flush() or any related methods that will handle system messages \li Don't start or cancel timers \li Don't change window decorations or titles -\li The make_current() method may or may not work well for - regular windows, but should always work for Fl_GL_Windows +\li The \p make_current() method may or may not work well for + regular windows, but should always work for Fl_Gl_Window's to allow for high speed rendering on graphics cards with multiple pipelines See also: -void awake(void *message), -void lock(), -void *thread_message(), -void unlock(). +Fl::awake(void* message), +Fl::lock(), +Fl::thread_message(), +Fl::unlock(). \htmlonly
-- cgit v1.2.3