Johann 'Myrkraverk' Oskarsson writes:
Is there any way to hook into the event loop? Either with lisp
code, or C.
I have some things I'd like to do, but doing it well requires some way
to add stuff into the event loop,
There are all kinds of ways to hook into the event loop.
pre-command-hook, post-command-hook, handle-pre-motion-command, and
handle-post-motion-command. And pre-idle-hook. You can process the
some of the extent loop yourself with next-extent and dispatch-extent,
and the next-command-event and dispatch-non-command-extents.
Without knowing what you're trying to do (what events you need to
handle and how quickly, under what circumstances), all I can do is
point you at them.
I wouldn't recommend messing with adding stuff to the C code until
you've tried all the hooks at the Lisp level, except it's safe to
subdivide the event types to provide more information to the Lisp
level, as long as you're careful to preserve the semantics of platform
specific events you're *not* interested in. However, the event loop
is timing- and logic-sensitive. The consequences changing it are hard
to predict, and problems often manifest only under infrequent
circumstances; there are few good tests for them.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta