>                I need to exit from application after some inactivity time.
> How can I implement this? Is there any method's to do such thing. My
> application consists of input, output box's, browser, buttons and choices
> box's.  Am using FLTK 1.3.0 and ARM processor based linux platform.


There's not really any mechanism in fltk to detect inactivity - this might be 
easier done from the host OS, which presumably does know which applications are 
being scheduled, and then have it kill the process after a period of inactivity.

However, if you are keen to try and do it from within fltk (and what follows is 
speculative...) I'd suggest deriving your own window for the apps main window, 
and in its handle() method keep a note of any mouse movements (enter / leave / 
click / etc.) or keyboard events that get sent to your app.

Then, have a Fl::add_timeout(); function that fires off (say every 10 seconds 
or whatever) and checks to see if the outer window has flagged any activity. It 
can then count up, and after (say) 10 periods of inactivity it can hide all the 
app windows and allow the app to expire.

Something like that anyway...

I'm sure others will have alternate (and very possibly better!) suggestions.



SELEX Galileo Ltd
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

Reply via email to