Mail Archives: djgpp/1997/09/30/22:02:35
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
- Raw text -