W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1996

Re: Rolling your own event handler

From: Tom Gaskins <tag@hpcvlx.cv.hp.com>
Date: Tue, 9 Jan 1996 09:32:56 -0800
Message-Id: <9601090932.ZM11531@hpcvlx.cv.hp.com>
To: www-lib@w3.org
>Remember that many platforms allow for redirection of user events to a socket.
>This can for example be done by the X library in which case the internal
>library eventloop can be used directly simply by registring a socket for user

Yes, but the X/Xt event loop handles "timers" (keyed off the select call) and
perhaps other services that an X or Xt/Xm programmer wouldn't want to give up.

Rather than handing event control to HT and telling HT to listen for X input,
perhaps one could use the normal X event/input control and tell X/Xt to listen
for HT input. A program can use XtAppAddInput (' not sure what the Xlib call
is) to have X listen for input on an HT file descriptor, assuming one knows
that file descriptor. Alternatively, and this is what I've done for the time
being, one can modify HTEvent_loop to return after some number of iterations
through the loop. The loop can be invoked at whatever frequency is needed, in
response to Xt timer or work-proc callbacks.

Received on Tuesday, 9 January 1996 12:33:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:46 UTC