Subject: Re: XCheckTypedEvent in CLX
From: (Rob Warnock)
Date: Wed, 02 Feb 2005 06:07:36 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Trent Buck  <geragohpx@tznvy.pbz> wrote:
| As an exercise, I'm rewriting a little X11 window mangler (in C / Xlib)
| in CL / CLX.
| I've worked out most everything, except how to duplicate
| XCheckTypedEvent functionality.  From the man page:
|     The XCheckTypedEvent function searches the event queue and then any
|     events available on the server connection for the first event that
|     matches the specified type.  If it finds a match, XCheckTypedEvent
|     removes that event, copies it into the specified XEvent structure,
|     and returns True.  The other events in the queue are not discarded.
|     If the event is not available, XCheckTypedEvent returns False, and
|     the out- put buffer will have been flushed.
| AFAICT, I need to write a process-event loop or similar.  Any
| suggestions?

Look in the CLX source distribution. The "trapezoid.lisp" example
[in CMUCL-19a it's in "src/clx/test/trapezoid.lisp"] has a simple
event loop that might serve as an example...


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607