Date: Wed, 1 Oct 1997 09:59:42 +0800 (GMT) From: Orlando Andico To: Peter Palotas cc: djgpp AT delorie DOT com Subject: Linux portability Q! In-Reply-To: <3.0.16.19970930152449.2c2feada@hem1.passagen.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 30 Sep 1997, Peter Palotas wrote: > Under Linux, Is it possible to have a a function called every time a > mouse-event occurs, like the int 33h callback function, prolly not. because there are two ways to handle the mouse under linux: using gpm (on the console) and handling it as an XEvent when running under X. the latter is more portable (works will all UNIX'es). don't know zip about gpm. > or have a function > called at a constant rate, like hooking the timerinterrupt? this is easy. you use this function called setitimer() and register a signal handler. at the countdown interval (which you set, under linux the resolution is 10ms, unless you're using RTlinux), the signal handler gets called. afaik i think this also works under djgpp. ------------------------------------------------------------------- Orlando Alcantara Andico WWW: http://www2.mozcom.com/~orly/ Email: orly AT mozcom DOT com ICBM: 14 30 00 N 120 59 00 E POTS: (+632) 932-2385