Previous: , Up: Event Types   [Contents][Index]

13.11.8 Declaring Event Types

CLX uses the declare-event macro to define the event slot symbols that access the contents of X events. Most client applications do not need to use declare-event because the declarations for all core X events are already defined by CLX. Programmers using extensions to the X protocol can use declare-event to allow CLX to handle new event types returned by an extended X server.

Macro: declare-event event-codes &rest slot-declarations

Defines a mapping between event slot symbols and the data items in event messages received from an X server.

The event-codes argument gives the event type keyword for the event described. If several event types share the same slots, then event-codes can be a list of event type keywords. slot-declarations is a list containing an element for each event data item. The order of slot-declarations corresponds to the order of event data items defined by the X protocol.

Each element of slot-declarations is a list of the form (type slot-name*), where type is a Common Lisp type specifier and slot-name is a slot name symbol. The effect of such a list is to declare that the next data items in the event have the given data type and are associated with the given slot-name symbols. slot-name can also be a list of slot name symbols; in this case, each symbol in the list is an alias that refers to the same event data item.


An event type keyword or a list of event type keywords.


A list of clauses defining event slot symbols.

Previous: , Up: Event Types   [Contents][Index]