[Prev][Next][Index][Thread]
Re: Rolling your own event handler
-
To: www-lib@w3.org
-
Subject: Re: Rolling your own event handler
-
From: "Tom Gaskins" <tag@hpcvlx.cv.hp.com>
-
Date: Tue, 9 Jan 1996 09:32:56 -0800
-
From tag@hpcvlx.cv.hp.com Tue Jan 9 12: 33:01 1996
-
In-Reply-To: Henrik Frystyk Nielsen <frystyk@w3.org> "Re: Rolling your own event handler" (Jan 8, 8:49pm)
-
Message-Id: <9601090932.ZM11531@hpcvlx.cv.hp.com>
-
References: <9601090149.AA05596@www20>
-
X-Mailer: Z-Mail (3.2.0 06sep94)
>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
>events.
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.
Tom
Follow-Ups:
References: