summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-10-03 00:01:09 +0000
committerJim Blandy <jimb@redhat.com>1992-10-03 00:01:09 +0000
commitbd0bf1057e9ad089ffcaad9797abcc61bc8af82e (patch)
treea8d413178d6686e38c1a80798b034ea012147dd3 /src/termhooks.h
parent12b4ada6756145585635288261dd3cfd972660a2 (diff)
downloademacs-bd0bf1057e9ad089ffcaad9797abcc61bc8af82e.tar.gz
* termhooks.h (struct input_event): Doc fix.
(NUM_MOUSE_BUTTONS): New constant. (click_modifier): New modifier. (NUM_MODIFIER_COMBOS): Removed.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 10d303100c4..695c5a316e5 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -101,7 +101,9 @@ struct input_event {
was typed.
.timestamp gives a timestamp (in
milliseconds) for the keystroke. */
- mouse_click, /* The button number is in .code.
+ mouse_click, /* The button number is in .code; it must
+ be >= 0 and < NUM_MOUSE_BUTTONS, defined
+ below.
.modifiers holds the state of the
modifier keys.
.x and .y give the mouse position,
@@ -153,25 +155,38 @@ struct input_event {
unsigned long timestamp;
};
+/* This is used in keyboard.c, to tell how many buttons we will need
+ to track the positions of. */
+#define NUM_MOUSE_BUTTONS (5)
+
/* Bits in the modifiers member of the input_event structure.
Note that reorder_modifiers assumes that the bits are in canonical
- order. */
+ order.
+
+ The modifiers applied to mouse clicks are rather ornate. The
+ window-system-specific code should store mouse clicks with
+ up_modifier or down_modifier set; the window-system independent
+ code turns all up_modifier events into either drag_modifier or
+ click_modifier. The click_modifier has no written representation
+ in the names of the symbols used as event heads, but it does appear
+ in the Qevent_symbol_components property of the event heads. */
enum {
- up_modifier = 1, /* This only applies to mouse buttons. */
+ up_modifier = 1, /* Only used on mouse buttons - always
+ turned into a click or a drag modifier
+ before lisp code sees the event. */
alt_modifier = 2, /* Under X, the XK_Alt_[LR] keysyms. */
ctrl_modifier = 4,
hyper_modifier= 8, /* Under X, the XK_Hyper_[LR] keysyms. */
meta_modifier = 16, /* Under X, the XK_Meta_[LR] keysyms. */
shift_modifier= 32,
super_modifier= 64, /* Under X, the XK_Super_[LR] keysyms. */
- down_modifier = 128, /* The window-system independent code finds
- it handy to have this modifier, but
- it is ignored in the event queue. */
- drag_modifier = 256, /* Same as down_modifier. */
+ down_modifier = 128, /* Only used on mouse buttons. */
+ drag_modifier = 256, /* This is never used in the event
+ queue; it's only used internally by
+ the window-system-independent code. */
+ click_modifier= 512, /* See drag_modifier. */
last_modifier /* This should always be one more than the
highest modifier bit defined. */
};
-#define NUM_MODIFIER_COMBOS ((last_modifier-1) << 1)
-
#endif