comparison src/termhooks.h @ 45803:9484de301252

Rename enum event_kind items.
author Pavel Janík <Pavel@Janik.cz>
date Thu, 13 Jun 2002 14:59:38 +0000
parents b7f9e859425a
children a8e027c9c403
comparison
equal deleted inserted replaced
45802:d4c9f3bd6dfa 45803:9484de301252
199 has been included before this file. */ 199 has been included before this file. */
200 #ifdef CONSP 200 #ifdef CONSP
201 201
202 enum event_kind 202 enum event_kind
203 { 203 {
204 no_event, /* nothing happened. This should never 204 NO_EVENT, /* nothing happened. This should never
205 actually appear in the event queue. */ 205 actually appear in the event queue. */
206 206
207 ascii_keystroke, /* The ASCII code is in .code, perhaps 207 ASCII_KEYSTROKE_EVENT, /* The ASCII code is in .code, perhaps
208 with modifiers applied. 208 with modifiers applied.
209 .modifiers holds the state of the 209 .modifiers holds the state of the
210 modifier keys. 210 modifier keys.
211 .frame_or_window is the frame in 211 .frame_or_window is the frame in
212 which the key was typed. 212 which the key was typed.
213 .timestamp gives a timestamp (in 213 .timestamp gives a timestamp (in
214 milliseconds) for the keystroke. */ 214 milliseconds) for the keystroke. */
215 multibyte_char_keystroke, /* The multibye char code is in .code, 215 MULTIBYTE_CHAR_KEYSTROKE_EVENT, /* The multibyte char code is in .code,
216 perhaps with modifiers applied. 216 perhaps with modifiers applied.
217 The others are the same as 217 The others are the same as
218 ascii_keystroke. This type of event 218 ASCII_KEYSTROKE_EVENT. This type of event
219 is generated only when we are using 219 is generated only when we are using
220 XIM on X window. */ 220 XIM on X window. */
221 non_ascii_keystroke, /* .code is a number identifying the 221 NON_ASCII_KEYSTROKE_EVENT, /* .code is a number identifying the
222 function key. A code N represents 222 function key. A code N represents
223 a key whose name is 223 a key whose name is
224 function_key_names[N]; function_key_names 224 function_key_names[N]; function_key_names
225 is a table in keyboard.c to which you 225 is a table in keyboard.c to which you
226 should feel free to add missing keys. 226 should feel free to add missing keys.
228 modifier keys. 228 modifier keys.
229 .frame_or_window is the frame in 229 .frame_or_window is the frame in
230 which the key was typed. 230 which the key was typed.
231 .timestamp gives a timestamp (in 231 .timestamp gives a timestamp (in
232 milliseconds) for the keystroke. */ 232 milliseconds) for the keystroke. */
233 timer_event, /* A timer fired. */ 233 TIMER_EVENT, /* A timer fired. */
234 mouse_click, /* The button number is in .code; it must 234 MOUSE_CLICK_EVENT, /* The button number is in .code; it must
235 be >= 0 and < NUM_MOUSE_BUTTONS, defined 235 be >= 0 and < NUM_MOUSE_BUTTONS, defined
236 below. 236 below.
237 .modifiers holds the state of the 237 .modifiers holds the state of the
238 modifier keys. 238 modifier keys.
239 .x and .y give the mouse position, 239 .x and .y give the mouse position,
241 .frame_or_window gives the frame 241 .frame_or_window gives the frame
242 the mouse click occurred in. 242 the mouse click occurred in.
243 .timestamp gives a timestamp (in 243 .timestamp gives a timestamp (in
244 milliseconds) for the click. */ 244 milliseconds) for the click. */
245 #ifdef WINDOWSNT 245 #ifdef WINDOWSNT
246 mouse_wheel, /* A mouse-wheel event is generated 246 MOUSE_WHEEL_EVENT, /* A mouse-wheel event is generated
247 on WINDOWSNT by a 247 on WINDOWSNT by a
248 wheel on a mouse (e.g., MS Intellimouse). 248 wheel on a mouse (e.g., MS Intellimouse).
249 The event contains a delta that corresponds 249 The event contains a delta that corresponds
250 to the amount and direction that the wheel 250 to the amount and direction that the wheel
251 is rotated. This delta is typically 251 is rotated. This delta is typically
257 in characters, within the window. 257 in characters, within the window.
258 .frame_or_window gives the frame 258 .frame_or_window gives the frame
259 the wheel event occurred in. 259 the wheel event occurred in.
260 .timestamp gives a timestamp (in 260 .timestamp gives a timestamp (in
261 milliseconds) for the wheel event. */ 261 milliseconds) for the wheel event. */
262 language_change_event, /* A language_change event is generated 262 LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is generated
263 on WINDOWSNT when the keyboard layout 263 on WINDOWSNT when the keyboard layout
264 or input language is changed by the 264 or input language is changed by the
265 user. */ 265 user. */
266 #endif 266 #endif
267 scroll_bar_click, /* .code gives the number of the mouse button 267 SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button
268 that was clicked. 268 that was clicked.
269 .modifiers holds the state of the modifier 269 .modifiers holds the state of the modifier
270 keys. 270 keys.
271 .part is a lisp symbol indicating which 271 .part is a lisp symbol indicating which
272 part of the scroll bar got clicked. 272 part of the scroll bar got clicked.
276 .frame_or_window gives the window 276 .frame_or_window gives the window
277 whose scroll bar was clicked in. 277 whose scroll bar was clicked in.
278 .timestamp gives a timestamp (in 278 .timestamp gives a timestamp (in
279 milliseconds) for the click. */ 279 milliseconds) for the click. */
280 #ifdef WINDOWSNT 280 #ifdef WINDOWSNT
281 w32_scroll_bar_click, /* as for scroll_bar_click, but only generated 281 W32_SCROLL_BAR_CLICK_EVENT, /* as for SCROLL_BAR_CLICK, but only generated
282 by MS-Windows scroll bar controls. */ 282 by MS-Windows scroll bar controls. */
283 #endif 283 #endif
284 selection_request_event, /* Another X client wants a selection from us. 284 SELECTION_REQUEST_EVENT, /* Another X client wants a selection from us.
285 See `struct selection_event'. */ 285 See `struct selection_event'. */
286 selection_clear_event, /* Another X client cleared our selection. */ 286 SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */
287 buffer_switch_event, /* A process filter has switched buffers. */ 287 BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */
288 delete_window_event, /* An X client said "delete this window". */ 288 DELETE_WINDOW_EVENT, /* An X client said "delete this window". */
289 MENU_BAR_EVENT, /* An event generated by the menu bar. 289 MENU_BAR_EVENT, /* An event generated by the menu bar.
290 The frame_or_window field's cdr holds the 290 The frame_or_window field's cdr holds the
291 Lisp-level event value. 291 Lisp-level event value.
292 (Only the toolkit version uses these.) */ 292 (Only the toolkit version uses these.) */
293 iconify_event, /* An X client iconified this window. */ 293 ICONIFY_EVENT, /* An X client iconified this window. */
294 deiconify_event, /* An X client deiconified this window. */ 294 DEICONIFY_EVENT, /* An X client deiconified this window. */
295 menu_bar_activate_event, /* A button press in the menu bar 295 MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar
296 (toolkit version only). */ 296 (toolkit version only). */
297 drag_n_drop, /* A drag-n-drop event is generated when 297 DRAG_N_DROP_EVENT, /* A drag-n-drop event is generated when
298 files selected outside of Emacs are dropped 298 files selected outside of Emacs are dropped
299 onto an Emacs window. 299 onto an Emacs window.
300 Currently used only on Windows NT. 300 Currently used only on Windows NT.
301 .modifiers holds the state of the 301 .modifiers holds the state of the
302 modifier keys. 302 modifier keys.
328 /* Generated when mouse moves over window not currently selected. */ 328 /* Generated when mouse moves over window not currently selected. */
329 SELECT_WINDOW_EVENT, 329 SELECT_WINDOW_EVENT,
330 330
331 /* Queued from XTread_socket when session manager sends 331 /* Queued from XTread_socket when session manager sends
332 save yourself before shutdown. */ 332 save yourself before shutdown. */
333 save_session_event 333 SAVE_SESSION_EVENT
334 }; 334 };
335 335
336 /* If a struct input_event has a kind which is selection_request_event 336 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
337 or selection_clear_event, then its contents are really described 337 or SELECTION_CLEAR_EVENT, then its contents are really described
338 by `struct selection_event'; see xterm.h. */ 338 by `struct selection_event'; see xterm.h. */
339 339
340 /* The keyboard input buffer is an array of these structures. Each one 340 /* The keyboard input buffer is an array of these structures. Each one
341 represents some sort of input event - a keystroke, a mouse click, or 341 represents some sort of input event - a keystroke, a mouse click, or
342 a window system event. These get turned into their lispy forms when 342 a window system event. These get turned into their lispy forms when
345 struct input_event 345 struct input_event
346 { 346 {
347 /* What kind of event was this? */ 347 /* What kind of event was this? */
348 enum event_kind kind; 348 enum event_kind kind;
349 349
350 /* For an ascii_keystroke and multibyte_char_keystroke, this is the 350 /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
351 character. 351 this is the character.
352 For a non_ascii_keystroke, this is the keysym code. 352 For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
353 For a mouse event, this is the button number. */ 353 For a mouse event, this is the button number. */
354 /* In WindowsNT, for a mouse wheel event, this is the delta. */ 354 /* In WindowsNT, for a mouse wheel event, this is the delta. */
355 int code; 355 int code;
356 enum scroll_bar_part part; 356 enum scroll_bar_part part;
357 357