Re: Rolling your own event handler
Subject: Re: Rolling your own event handler
From: "Tom Gaskins" <email@example.com>
Date: Tue, 9 Jan 1996 09:32:56 -0800
From firstname.lastname@example.org Tue Jan 9 12: 33:01 1996
In-Reply-To: Henrik Frystyk Nielsen <email@example.com> "Re: Rolling your own event handler" (Jan 8, 8:49pm)
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
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.