matthiasm wrote:
>> A thread that opens a socket will execute callbacks based on incoming
>> messages. Those callbacks have to update widget values. Is it possible
>> to make a message queue using FLTK's event handlers? I really don't
>> like the idea of replacing Fl::run with a loop that polls a condition
>> variable, but don't know of another way to do it.
>
> No need for that. At least under OS X and UNix, you can open a pipe and
> make FLTK react to messages sent to that file handle by using
> Fl::add_fd, etc. . But that is pretty much exactly what Fl::lock() does
> for you anyways.
Yeah, add_fd() is probably what you want.
I use add_fd() for pipes to fork()ed off executables here:
http://seriss.com/people/erco/fltk/#Fltk-tty
add_fd() is the way to go for unix environments.
For Windows, probably not.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk