Page 195 Table of Contents Index Page 197
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 22. EXTENDED STREAM INPUT

timestamp, and the modifier key state (a quantity that indicates which modifier keys were held
down on the keyboard at the time the event occurred). Pointer button event objects also store
the pointer object, the button that was clicked on the pointer, the window the pointer was over
and the x and y position within that window. Keyboard gestures store the key name.

In some contexts, the object used to represent a user gesture is referred to as an gesture object.
An gesture object might be exactly the same as an event object, or might contain less information.
For example, for a keyboard gesture that corresponds to a standard printing character, it may
be enough to represent the gesture object as a character.

=> define-gesture-name name type gesture-spec [Macro]
Defines a new gesture named by the symbol name. type is the type of gesture being created,
and must be one of the symbols described below. gesture-spec specifies the physical gesture that
corresponds to the named gesture; its syntax depends on the value of type. define-gesture-
name
must expand into a call to add-gesture-name.

None of the arguments to define-gesture-name is evaluated.

=> add-gesture-name name type gesture-spec &key unique [Function]
Adds a gesture named by the symbol name to the set of gesture names. type is the type of
gesture being created, and must be one of the symbols described below. gesture-spec specifies
the physical gesture that corresponds to the named gesture; its syntax depends on the value of
type.

If unique is true, all old gestures named by name are first removed. unique defaults to nil.

When type is :keyboard, gesture-spec is a list of the form (key-name . modifier-key-names).
key-name is the name of a non-modifier key on the keyboard (see below). modifier-key-names is
a (possibly empty) list of modifier key names (:shift, :control, :meta, :super, and :hyper).

For the standard Common Lisp characters (the 95 ASCII printing characters including #\Space),
key-name is the character object itself. For the other "semi-standard" characters, key-name is
a keyword symbol naming the character (:newline, :linefeed, :return, :tab, :backspace,
:page, and :rubout). CLIM implementations may extend the set of key names on a per-port
basic, but should choose a port-specific package. For example, the Genera port might such
gestures as include clim-genera:help and clim-genera:complete.

The names of the modifier keys have been chosen to be uniform across all platforms, even though
not all platforms will have keys on the keyboard with these names. The per-port part of a CLIM
implementation must simply choose a sensible mapping from the modifier key names to the
names of the keys on the keyboard. For example, a CLIM implementation on the Macintosh
might map :meta to the Command shift key, and :super to the Option shift key.

When type is :pointer-button, :pointer-button-press, or :pointer-button-release, gesture-
spec
is a list of the form (button-name . modifier-key-names). button is the name of a pointer
button (:left, :middle, or :right), and modifier-key-names is as above.

CLIM implementations are permitted to have other values of type as an extension, such as


Page 195 Table of Contents Index Page 197
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E