Next Prev Up

12.4 Managing the Event Queue

The following paragraphs describe CLX functions and macros used to:


queue-event display event-key &rest event-slots &key :append-p & allow-other-keys Function
     
display
A display.
event-key
Specifies the type of event placed in the queue.
event-slots
Keyword-value pairs that describe the contents of an event.
:append-p
If true, the event is placed at the tail of the queue; otherwise, the event is placed at the head of the queue.

Places an event of the type given by event-key into the event queue. When :append-p is true, the event is placed at the tail of the queue; otherwise, the event is placed at the head of the queue. The actual event-slots passed depend on the event type. The keyword symbols used for each event type are event slot names defined by the declare-event macro and are described in paragraph 12.12.8, Declaring Event Types.


discard-current-event display Function
     
display
A display.

Discards the current event for the display. Returns nil when the event queue is empty; otherwise, returns t . This function provides extra flexibility for discarding events, but it should be used carefully; use event-cond instead, if possible. Typically, discard-current-event is called inside a handler function or a clause of an event-case form and is followed by another call to process-event, event-case , or event-cond.

discarded-p
Type boolean.

event-listen display & optional (timeout 0) Function
     
display
A display.
timeout
The number of seconds to wait for events.

Returns the number of events queued locally. If the event queue is empty, event-listen waits for an event to arrive. If timeout is non-nil and no event arrives within the specified timeout interval (given in seconds), event-listen returns nil; if timeout is nil , event-listen will not return until an event arrives.

event-count
Type (or null integer).

with-event-queue display &body body Macro
     
display
A display.
body
Forms to execute.

Executes the body in a critical region in which the executing client process has exclusive access to the event queue.


Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997