nanogui@linuxhacker.org

nanogui@linuxhacker.org


Subject: Re: Dealing with timeouts...
From: Greg Haerr
Date: Wed, 8 Mar 2000 09:53:51 -0700

: Something like:
: struct Timeout {
: void * func_to_call;
: void * some_data; /* maybe a union here? */
: time_t how_log;
: }

Shane,
    This would be a good idea, except, on inspection, 
fltk completely handles timeouts, and in it's own way.
The reason the clock doesn't spin without running
the mouse is that I coded up a quick GetMessage,
because Microwindows doesn't have PeekMessage,
which is what fltk coded.  In that loop, fltk completely
handles timeouts itself.

So, the proper solution is to write PeekMessage,
rather than recode fltk.  (Basically, the porting issue
here is mostly Microwindows, since fltk already
runs on Win32, and Microwindows is supposed to
emulate Win32.  So really all the work is implementing 
the calls fltk makes, rather than rewriting fltk, which
can cause any number of unforseen side effects)

I will have a version of PeekMessage tonight.

Regards,

Greg



nanogui@linuxhacker.org