Matthias Melcher wrote:
> You can read all about this in the documentation under "Advanced:
> threading"
>
> http://www.fltk.org/doc-1.3/advanced.html
>
> To call anything FLTK from a thread (except the functions I mentioned
> above), call
>
> Fl::lock();
> someWidget->value(someValue);
> someOtherWidget->color(FL_RED);
> someOtherWidget->redraw();
> Fl::unlock();
> Fl::awake();
Also, if you do need to call any of the "restricted" methods, you can do
so using the "advanced" forms of the Fl::awake(); call, in particular
you can use:
Fl::awake(Fl_Awake_Handler cb, void* userdata);
To trigger "forbidden" actions from a non-main thread.
(These changes are Thanks to Matthias, who implemented them!)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk