Re: Rolling your own event handler

>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.


Follow-Ups: References: