Mercurial > emacs
comparison src/termhooks.h @ 1312:540110352c0d
* termhooks.h (struct input_event): Doc fix.
(NUM_MOUSE_BUTTONS): New constant.
(click_modifier): New modifier.
(NUM_MODIFIER_COMBOS): Removed.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 03 Oct 1992 00:01:09 +0000 |
parents | 407100cee78a |
children | 20862b54b932 |
comparison
equal
deleted
inserted
replaced
1311:339a82d29dfa | 1312:540110352c0d |
---|---|
99 modifier keys. | 99 modifier keys. |
100 .frame is the frame in which the key | 100 .frame is the frame in which the key |
101 was typed. | 101 was typed. |
102 .timestamp gives a timestamp (in | 102 .timestamp gives a timestamp (in |
103 milliseconds) for the keystroke. */ | 103 milliseconds) for the keystroke. */ |
104 mouse_click, /* The button number is in .code. | 104 mouse_click, /* The button number is in .code; it must |
105 be >= 0 and < NUM_MOUSE_BUTTONS, defined | |
106 below. | |
105 .modifiers holds the state of the | 107 .modifiers holds the state of the |
106 modifier keys. | 108 modifier keys. |
107 .x and .y give the mouse position, | 109 .x and .y give the mouse position, |
108 in characters, within the window. | 110 in characters, within the window. |
109 .frame gives the frame the mouse | 111 .frame gives the frame the mouse |
151 | 153 |
152 Lisp_Object x, y; | 154 Lisp_Object x, y; |
153 unsigned long timestamp; | 155 unsigned long timestamp; |
154 }; | 156 }; |
155 | 157 |
158 /* This is used in keyboard.c, to tell how many buttons we will need | |
159 to track the positions of. */ | |
160 #define NUM_MOUSE_BUTTONS (5) | |
161 | |
156 /* Bits in the modifiers member of the input_event structure. | 162 /* Bits in the modifiers member of the input_event structure. |
157 Note that reorder_modifiers assumes that the bits are in canonical | 163 Note that reorder_modifiers assumes that the bits are in canonical |
158 order. */ | 164 order. |
165 | |
166 The modifiers applied to mouse clicks are rather ornate. The | |
167 window-system-specific code should store mouse clicks with | |
168 up_modifier or down_modifier set; the window-system independent | |
169 code turns all up_modifier events into either drag_modifier or | |
170 click_modifier. The click_modifier has no written representation | |
171 in the names of the symbols used as event heads, but it does appear | |
172 in the Qevent_symbol_components property of the event heads. */ | |
159 enum { | 173 enum { |
160 up_modifier = 1, /* This only applies to mouse buttons. */ | 174 up_modifier = 1, /* Only used on mouse buttons - always |
175 turned into a click or a drag modifier | |
176 before lisp code sees the event. */ | |
161 alt_modifier = 2, /* Under X, the XK_Alt_[LR] keysyms. */ | 177 alt_modifier = 2, /* Under X, the XK_Alt_[LR] keysyms. */ |
162 ctrl_modifier = 4, | 178 ctrl_modifier = 4, |
163 hyper_modifier= 8, /* Under X, the XK_Hyper_[LR] keysyms. */ | 179 hyper_modifier= 8, /* Under X, the XK_Hyper_[LR] keysyms. */ |
164 meta_modifier = 16, /* Under X, the XK_Meta_[LR] keysyms. */ | 180 meta_modifier = 16, /* Under X, the XK_Meta_[LR] keysyms. */ |
165 shift_modifier= 32, | 181 shift_modifier= 32, |
166 super_modifier= 64, /* Under X, the XK_Super_[LR] keysyms. */ | 182 super_modifier= 64, /* Under X, the XK_Super_[LR] keysyms. */ |
167 down_modifier = 128, /* The window-system independent code finds | 183 down_modifier = 128, /* Only used on mouse buttons. */ |
168 it handy to have this modifier, but | 184 drag_modifier = 256, /* This is never used in the event |
169 it is ignored in the event queue. */ | 185 queue; it's only used internally by |
170 drag_modifier = 256, /* Same as down_modifier. */ | 186 the window-system-independent code. */ |
187 click_modifier= 512, /* See drag_modifier. */ | |
171 last_modifier /* This should always be one more than the | 188 last_modifier /* This should always be one more than the |
172 highest modifier bit defined. */ | 189 highest modifier bit defined. */ |
173 }; | 190 }; |
174 | 191 |
175 #define NUM_MODIFIER_COMBOS ((last_modifier-1) << 1) | |
176 | |
177 #endif | 192 #endif |