>
> > Dear FLTK experts,
> > is there a straigthforward way of doing a timeout if no input=20
> > events occured for some timespan - lets say 5 minutes?
> >=20
> > i have to develop an application for a touchscreen terminal,=20
> > and it should timeout and return to a startscreen if no user=20
> > input happens for a while.
> > i could of course just check for myself if the mouse was=20
> > moved or the touchscreen (left mousebutton) was pressed and=20
> > reset a timer, but maybe there is some function in fltk that=20
> > does this already out of the box?
>
>
> I don't think there's any specific function for this - when I did
> something similar, I wrote a little wrapper function something like
> this: (dodgy pseudo code follows...)
>
> void reset_timeout(void){
> Fl::remove_timeout(...);
> Fl::add_timeout(300, ...);
> }
>
> And called that *often*, whenever there was some user-interaction that
> needed handling.
>
> When the timeout did fire, it's callback function took me back to an
> init screen.=20
> I guess that's something like what you need?
> Not elegant, but it did work...
>
>
yes, this is exactly what i need. thanks alot!
is there a way peek the Fltk event queue ? so that i could check if there are
any new events, and , if so, call reset_timeout ? i am aware about writing
one's own virtual handle function, but how to access the global event struct?
after a quick look at the docs i did not found something about peeking into the
event queue...
>
>
>
> SELEX Sensors and Airborne Systems Limited
> Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex=
> SS14 3EL
> A company registered in England & Wales. Company no. 02426132
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk