www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/30/22:02:35

Date: Wed, 1 Oct 1997 09:59:42 +0800 (GMT)
From: Orlando Andico <orly AT dilnet DOT upd DOT edu DOT ph>
To: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>
cc: djgpp AT delorie DOT com
Subject: Linux portability Q!
In-Reply-To: <3.0.16.19970930152449.2c2feada@hem1.passagen.se>
Message-ID: <Pine.SGI.3.96.971001095742.19525C-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019