Mercurial > emacs
comparison src/termhooks.h @ 2186:82e8ee492593
(selection_request_event, selection_clear_event): New event kinds.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 15 Mar 1993 05:43:15 +0000 |
parents | 9e30cf115e63 |
children | 3e8799eff918 |
comparison
equal
deleted
inserted
replaced
2185:5bf3a379d7b5 | 2186:82e8ee492593 |
---|---|
188 /* Expedient hack: only provide the below definitions to files that | 188 /* Expedient hack: only provide the below definitions to files that |
189 are prepared to handle lispy things. XINT is defined iff lisp.h | 189 are prepared to handle lispy things. XINT is defined iff lisp.h |
190 has been included before this file. */ | 190 has been included before this file. */ |
191 #ifdef XINT | 191 #ifdef XINT |
192 | 192 |
193 /* The keyboard input buffer is an array of these structures. Each one | 193 enum event_kind |
194 represents some sort of input event - a keystroke, a mouse click, or | 194 { |
195 a window system event. These get turned into their lispy forms when | 195 no_event, /* nothing happened. This should never |
196 they are removed from the event queue. */ | |
197 | |
198 struct input_event { | |
199 | |
200 /* What kind of event was this? */ | |
201 enum { | |
202 no_event, /* nothing happened. This should never | |
203 actually appear in the event queue. */ | 196 actually appear in the event queue. */ |
204 ascii_keystroke, /* The ASCII code is in .code. | 197 ascii_keystroke, /* The ASCII code is in .code. |
205 .frame_or_window is the frame in | 198 .frame_or_window is the frame in |
206 which the key was typed. | 199 which the key was typed. |
207 Note that this includes meta-keys, and | 200 Note that this includes meta-keys, and |
208 the modifiers field of the event | 201 the modifiers field of the event |
209 is unused. | 202 is unused. |
210 .timestamp gives a timestamp (in | 203 .timestamp gives a timestamp (in |
211 milliseconds) for the keystroke. */ | 204 milliseconds) for the keystroke. */ |
212 non_ascii_keystroke, /* .code is a number identifying the | 205 non_ascii_keystroke, /* .code is a number identifying the |
213 function key. A code N represents | 206 function key. A code N represents |
214 a key whose name is | 207 a key whose name is |
215 function_key_names[N]; function_key_names | 208 function_key_names[N]; function_key_names |
216 is a table in keyboard.c to which you | 209 is a table in keyboard.c to which you |
217 should feel free to add missing keys. | 210 should feel free to add missing keys. |
219 modifier keys. | 212 modifier keys. |
220 .frame_or_window is the frame in | 213 .frame_or_window is the frame in |
221 which the key was typed. | 214 which the key was typed. |
222 .timestamp gives a timestamp (in | 215 .timestamp gives a timestamp (in |
223 milliseconds) for the keystroke. */ | 216 milliseconds) for the keystroke. */ |
224 mouse_click, /* The button number is in .code; it must | 217 mouse_click, /* The button number is in .code; it must |
225 be >= 0 and < NUM_MOUSE_BUTTONS, defined | 218 be >= 0 and < NUM_MOUSE_BUTTONS, defined |
226 below. | 219 below. |
227 .modifiers holds the state of the | 220 .modifiers holds the state of the |
228 modifier keys. | 221 modifier keys. |
229 .x and .y give the mouse position, | 222 .x and .y give the mouse position, |
230 in characters, within the window. | 223 in characters, within the window. |
231 .frame_or_window gives the frame | 224 .frame_or_window gives the frame |
232 the mouse click occurred in. | 225 the mouse click occurred in. |
233 .timestamp gives a timestamp (in | 226 .timestamp gives a timestamp (in |
234 milliseconds) for the click. */ | 227 milliseconds) for the click. */ |
235 scroll_bar_click, /* .code gives the number of the mouse button | 228 scroll_bar_click, /* .code gives the number of the mouse button |
236 that was clicked. | 229 that was clicked. |
237 .modifiers holds the state of the modifier | 230 .modifiers holds the state of the modifier |
238 keys. | 231 keys. |
239 .part is a lisp symbol indicating which | 232 .part is a lisp symbol indicating which |
240 part of the scroll bar got clicked. | 233 part of the scroll bar got clicked. |
243 length of the scroll bar. | 236 length of the scroll bar. |
244 .frame_or_window gives the window | 237 .frame_or_window gives the window |
245 whose scroll bar was clicked in. | 238 whose scroll bar was clicked in. |
246 .timestamp gives a timestamp (in | 239 .timestamp gives a timestamp (in |
247 milliseconds) for the click. */ | 240 milliseconds) for the click. */ |
248 } kind; | 241 selection_request_event, /* Another X client wants a selection from us. |
242 See `struct selection_event'. */ | |
243 selection_clear_event, /* Another X client cleared our selection. */ | |
244 }; | |
245 | |
246 /* If a struct input_event has a kind which is selection_request_event | |
247 or selection_clear_event, then its contents are really described | |
248 by `struct selection_event'; see xterm.h. */ | |
249 | |
250 /* The keyboard input buffer is an array of these structures. Each one | |
251 represents some sort of input event - a keystroke, a mouse click, or | |
252 a window system event. These get turned into their lispy forms when | |
253 they are removed from the event queue. */ | |
254 | |
255 struct input_event { | |
256 | |
257 /* What kind of event was this? */ | |
258 enum event_kind kind; | |
249 | 259 |
250 Lisp_Object code; | 260 Lisp_Object code; |
251 enum scroll_bar_part part; | 261 enum scroll_bar_part part; |
252 | 262 |
253 /* This field is copied into a vector while the event is in the queue, | 263 /* This field is copied into a vector while the event is in the queue, |
257 int modifiers; /* See enum below for interpretation. */ | 267 int modifiers; /* See enum below for interpretation. */ |
258 | 268 |
259 Lisp_Object x, y; | 269 Lisp_Object x, y; |
260 unsigned long timestamp; | 270 unsigned long timestamp; |
261 }; | 271 }; |
262 | 272 |
263 /* This is used in keyboard.c, to tell how many buttons we will need | 273 /* This is used in keyboard.c, to tell how many buttons we will need |
264 to track the positions of. */ | 274 to track the positions of. */ |
265 #define NUM_MOUSE_BUTTONS (5) | 275 #define NUM_MOUSE_BUTTONS (5) |
266 | 276 |
267 /* Bits in the modifiers member of the input_event structure. | 277 /* Bits in the modifiers member of the input_event structure. |