aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Janík2002-06-13 14:59:38 +0000
committerPavel Janík2002-06-13 14:59:38 +0000
commit3b8f9651533611460efda94051a280ad558fac0c (patch)
treeb50078de727f24fa11afa3b45b09a116c8136f1e /src
parentdf3eebcbcffcf9fd3d96796856e6272cb2bdc01f (diff)
downloademacs-3b8f9651533611460efda94051a280ad558fac0c.tar.gz
emacs-3b8f9651533611460efda94051a280ad558fac0c.zip
Rename enum event_kind items.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c98
-rw-r--r--src/macterm.c26
-rw-r--r--src/msdos.c6
-rw-r--r--src/termhooks.h50
-rw-r--r--src/w32menu.c2
-rw-r--r--src/w32term.c32
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xsmfns.c20
-rw-r--r--src/xterm.c34
9 files changed, 135 insertions, 135 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index c680473c79d..94588983024 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -505,7 +505,7 @@ static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
505 queue. That way, they'll be dequeued as dead frames or windows, 505 queue. That way, they'll be dequeued as dead frames or windows,
506 but still valid Lisp objects. 506 but still valid Lisp objects.
507 507
508 If kbd_buffer[i].kind != no_event, then 508 If kbd_buffer[i].kind != NO_EVENT, then
509 509
510 AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window. 510 AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window.
511 AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */ 511 AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */
@@ -3330,10 +3330,10 @@ void
3330kbd_buffer_store_event (event) 3330kbd_buffer_store_event (event)
3331 register struct input_event *event; 3331 register struct input_event *event;
3332{ 3332{
3333 if (event->kind == no_event) 3333 if (event->kind == NO_EVENT)
3334 abort (); 3334 abort ();
3335 3335
3336 if (event->kind == ascii_keystroke) 3336 if (event->kind == ASCII_KEYSTROKE_EVENT)
3337 { 3337 {
3338 register int c = event->code & 0377; 3338 register int c = event->code & 0377;
3339 3339
@@ -3366,7 +3366,7 @@ kbd_buffer_store_event (event)
3366 3366
3367 if (event_to_kboard (sp) == kb) 3367 if (event_to_kboard (sp) == kb)
3368 { 3368 {
3369 sp->kind = no_event; 3369 sp->kind = NO_EVENT;
3370 sp->frame_or_window = Qnil; 3370 sp->frame_or_window = Qnil;
3371 sp->arg = Qnil; 3371 sp->arg = Qnil;
3372 } 3372 }
@@ -3400,11 +3400,11 @@ kbd_buffer_store_event (event)
3400 return; 3400 return;
3401 } 3401 }
3402 } 3402 }
3403 /* Don't insert two buffer_switch_event's in a row. 3403 /* Don't insert two BUFFER_SWITCH_EVENT's in a row.
3404 Just ignore the second one. */ 3404 Just ignore the second one. */
3405 else if (event->kind == buffer_switch_event 3405 else if (event->kind == BUFFER_SWITCH_EVENT
3406 && kbd_fetch_ptr != kbd_store_ptr 3406 && kbd_fetch_ptr != kbd_store_ptr
3407 && kbd_store_ptr->kind == buffer_switch_event) 3407 && kbd_store_ptr->kind == BUFFER_SWITCH_EVENT)
3408 return; 3408 return;
3409 3409
3410 if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE) 3410 if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE)
@@ -3418,12 +3418,12 @@ kbd_buffer_store_event (event)
3418 { 3418 {
3419 int idx; 3419 int idx;
3420 3420
3421#if 0 /* The selection_request_event case looks bogus, and it's error 3421#if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
3422 prone to assign individual members for other events, in case 3422 prone to assign individual members for other events, in case
3423 the input_event structure is changed. --2000-07-13, gerd. */ 3423 the input_event structure is changed. --2000-07-13, gerd. */
3424 struct input_event *sp = kbd_store_ptr; 3424 struct input_event *sp = kbd_store_ptr;
3425 sp->kind = event->kind; 3425 sp->kind = event->kind;
3426 if (event->kind == selection_request_event) 3426 if (event->kind == SELECTION_REQUEST_EVENT)
3427 { 3427 {
3428 /* We must not use the ordinary copying code for this case, 3428 /* We must not use the ordinary copying code for this case,
3429 since `part' is an enum and copying it might not copy enough 3429 since `part' is an enum and copying it might not copy enough
@@ -3507,7 +3507,7 @@ kbd_buffer_store_help_event (frame, help)
3507 3507
3508 3508
3509/* Discard any mouse events in the event buffer by setting them to 3509/* Discard any mouse events in the event buffer by setting them to
3510 no_event. */ 3510 NO_EVENT. */
3511void 3511void
3512discard_mouse_events () 3512discard_mouse_events ()
3513{ 3513{
@@ -3517,22 +3517,22 @@ discard_mouse_events ()
3517 if (sp == kbd_buffer + KBD_BUFFER_SIZE) 3517 if (sp == kbd_buffer + KBD_BUFFER_SIZE)
3518 sp = kbd_buffer; 3518 sp = kbd_buffer;
3519 3519
3520 if (sp->kind == mouse_click 3520 if (sp->kind == MOUSE_CLICK_EVENT
3521#ifdef WINDOWSNT 3521#ifdef WINDOWSNT
3522 || sp->kind == w32_scroll_bar_click 3522 || sp->kind == W32_SCROLL_BAR_CLICK_EVENT
3523#endif 3523#endif
3524 || sp->kind == scroll_bar_click) 3524 || sp->kind == SCROLL_BAR_CLICK_EVENT)
3525 { 3525 {
3526 sp->kind = no_event; 3526 sp->kind = NO_EVENT;
3527 } 3527 }
3528 } 3528 }
3529} 3529}
3530 3530
3531 3531
3532/* Return non-zero if there are any real events waiting in the event 3532/* Return non-zero if there are any real events waiting in the event
3533 buffer, not counting `no_event's. 3533 buffer, not counting `NO_EVENT's.
3534 3534
3535 If DISCARD is non-zero, discard no_event events at the front of 3535 If DISCARD is non-zero, discard NO_EVENT events at the front of
3536 the input queue, possibly leaving the input queue empty if there 3536 the input queue, possibly leaving the input queue empty if there
3537 are no real input events. */ 3537 are no real input events. */
3538 3538
@@ -3543,7 +3543,7 @@ kbd_buffer_events_waiting (discard)
3543 struct input_event *sp; 3543 struct input_event *sp;
3544 3544
3545 for (sp = kbd_fetch_ptr; 3545 for (sp = kbd_fetch_ptr;
3546 sp != kbd_store_ptr && sp->kind == no_event; 3546 sp != kbd_store_ptr && sp->kind == NO_EVENT;
3547 ++sp) 3547 ++sp)
3548 { 3548 {
3549 if (sp == kbd_buffer + KBD_BUFFER_SIZE) 3549 if (sp == kbd_buffer + KBD_BUFFER_SIZE)
@@ -3553,7 +3553,7 @@ kbd_buffer_events_waiting (discard)
3553 if (discard) 3553 if (discard)
3554 kbd_fetch_ptr = sp; 3554 kbd_fetch_ptr = sp;
3555 3555
3556 return sp != kbd_store_ptr && sp->kind != no_event; 3556 return sp != kbd_store_ptr && sp->kind != NO_EVENT;
3557} 3557}
3558 3558
3559 3559
@@ -3566,7 +3566,7 @@ clear_event (event)
3566 int idx = 2 * (event - kbd_buffer); 3566 int idx = 2 * (event - kbd_buffer);
3567 ASET (kbd_buffer_gcpro, idx, Qnil); 3567 ASET (kbd_buffer_gcpro, idx, Qnil);
3568 ASET (kbd_buffer_gcpro, idx + 1, Qnil); 3568 ASET (kbd_buffer_gcpro, idx + 1, Qnil);
3569 event->kind = no_event; 3569 event->kind = NO_EVENT;
3570} 3570}
3571 3571
3572 3572
@@ -3671,7 +3671,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3671 /* These two kinds of events get special handling 3671 /* These two kinds of events get special handling
3672 and don't actually appear to the command loop. 3672 and don't actually appear to the command loop.
3673 We return nil for them. */ 3673 We return nil for them. */
3674 if (event->kind == selection_request_event) 3674 if (event->kind == SELECTION_REQUEST_EVENT)
3675 { 3675 {
3676#ifdef HAVE_X11 3676#ifdef HAVE_X11
3677 struct input_event copy; 3677 struct input_event copy;
@@ -3690,7 +3690,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3690#endif 3690#endif
3691 } 3691 }
3692 3692
3693 else if (event->kind == selection_clear_event) 3693 else if (event->kind == SELECTION_CLEAR_EVENT)
3694 { 3694 {
3695#ifdef HAVE_X11 3695#ifdef HAVE_X11
3696 struct input_event copy; 3696 struct input_event copy;
@@ -3707,7 +3707,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3707#endif 3707#endif
3708 } 3708 }
3709#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS) 3709#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
3710 else if (event->kind == delete_window_event) 3710 else if (event->kind == DELETE_WINDOW_EVENT)
3711 { 3711 {
3712 /* Make an event (delete-frame (FRAME)). */ 3712 /* Make an event (delete-frame (FRAME)). */
3713 obj = Fcons (event->frame_or_window, Qnil); 3713 obj = Fcons (event->frame_or_window, Qnil);
@@ -3716,14 +3716,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3716 } 3716 }
3717#endif 3717#endif
3718#if defined (HAVE_X11) || defined (HAVE_NTGUI) 3718#if defined (HAVE_X11) || defined (HAVE_NTGUI)
3719 else if (event->kind == iconify_event) 3719 else if (event->kind == ICONIFY_EVENT)
3720 { 3720 {
3721 /* Make an event (iconify-frame (FRAME)). */ 3721 /* Make an event (iconify-frame (FRAME)). */
3722 obj = Fcons (event->frame_or_window, Qnil); 3722 obj = Fcons (event->frame_or_window, Qnil);
3723 obj = Fcons (Qiconify_frame, Fcons (obj, Qnil)); 3723 obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
3724 kbd_fetch_ptr = event + 1; 3724 kbd_fetch_ptr = event + 1;
3725 } 3725 }
3726 else if (event->kind == deiconify_event) 3726 else if (event->kind == DEICONIFY_EVENT)
3727 { 3727 {
3728 /* Make an event (make-frame-visible (FRAME)). */ 3728 /* Make an event (make-frame-visible (FRAME)). */
3729 obj = Fcons (event->frame_or_window, Qnil); 3729 obj = Fcons (event->frame_or_window, Qnil);
@@ -3731,14 +3731,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3731 kbd_fetch_ptr = event + 1; 3731 kbd_fetch_ptr = event + 1;
3732 } 3732 }
3733#endif 3733#endif
3734 else if (event->kind == buffer_switch_event) 3734 else if (event->kind == BUFFER_SWITCH_EVENT)
3735 { 3735 {
3736 /* The value doesn't matter here; only the type is tested. */ 3736 /* The value doesn't matter here; only the type is tested. */
3737 XSETBUFFER (obj, current_buffer); 3737 XSETBUFFER (obj, current_buffer);
3738 kbd_fetch_ptr = event + 1; 3738 kbd_fetch_ptr = event + 1;
3739 } 3739 }
3740#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) 3740#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
3741 else if (event->kind == menu_bar_activate_event) 3741 else if (event->kind == MENU_BAR_ACTIVATE_EVENT)
3742 { 3742 {
3743 kbd_fetch_ptr = event + 1; 3743 kbd_fetch_ptr = event + 1;
3744 input_pending = readable_events (0); 3744 input_pending = readable_events (0);
@@ -3747,7 +3747,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3747 } 3747 }
3748#endif 3748#endif
3749#ifdef WINDOWSNT 3749#ifdef WINDOWSNT
3750 else if (event->kind == language_change_event) 3750 else if (event->kind == LANGUAGE_CHANGE_EVENT)
3751 { 3751 {
3752 /* Make an event (language-change (FRAME CHARSET LCID)). */ 3752 /* Make an event (language-change (FRAME CHARSET LCID)). */
3753 obj = Fcons (event->modifiers, Qnil); 3753 obj = Fcons (event->modifiers, Qnil);
@@ -3757,7 +3757,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3757 kbd_fetch_ptr = event + 1; 3757 kbd_fetch_ptr = event + 1;
3758 } 3758 }
3759#endif 3759#endif
3760 else if (event->kind == save_session_event) 3760 else if (event->kind == SAVE_SESSION_EVENT)
3761 { 3761 {
3762 obj = Fcons (Qsave_session, Qnil); 3762 obj = Fcons (Qsave_session, Qnil);
3763 kbd_fetch_ptr = event + 1; 3763 kbd_fetch_ptr = event + 1;
@@ -3768,9 +3768,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3768 (They shouldn't otherwise be found in the buffer, 3768 (They shouldn't otherwise be found in the buffer,
3769 but on some machines it appears they do show up 3769 but on some machines it appears they do show up
3770 even without MULTI_KBOARD.) */ 3770 even without MULTI_KBOARD.) */
3771 /* On Windows NT/9X, no_event is used to delete extraneous 3771 /* On Windows NT/9X, NO_EVENT is used to delete extraneous
3772 mouse events during a popup-menu call. */ 3772 mouse events during a popup-menu call. */
3773 else if (event->kind == no_event) 3773 else if (event->kind == NO_EVENT)
3774 kbd_fetch_ptr = event + 1; 3774 kbd_fetch_ptr = event + 1;
3775 else if (event->kind == HELP_EVENT) 3775 else if (event->kind == HELP_EVENT)
3776 { 3776 {
@@ -3938,7 +3938,7 @@ swallow_events (do_display)
3938 3938
3939 /* These two kinds of events get special handling 3939 /* These two kinds of events get special handling
3940 and don't actually appear to the command loop. */ 3940 and don't actually appear to the command loop. */
3941 if (event->kind == selection_request_event) 3941 if (event->kind == SELECTION_REQUEST_EVENT)
3942 { 3942 {
3943#ifdef HAVE_X11 3943#ifdef HAVE_X11
3944 struct input_event copy; 3944 struct input_event copy;
@@ -3957,7 +3957,7 @@ swallow_events (do_display)
3957#endif 3957#endif
3958 } 3958 }
3959 3959
3960 else if (event->kind == selection_clear_event) 3960 else if (event->kind == SELECTION_CLEAR_EVENT)
3961 { 3961 {
3962#ifdef HAVE_X11 3962#ifdef HAVE_X11
3963 struct input_event copy; 3963 struct input_event copy;
@@ -4724,7 +4724,7 @@ make_lispy_event (event)
4724 switch (SWITCH_ENUM_CAST (event->kind)) 4724 switch (SWITCH_ENUM_CAST (event->kind))
4725 { 4725 {
4726 /* A simple keystroke. */ 4726 /* A simple keystroke. */
4727 case ascii_keystroke: 4727 case ASCII_KEYSTROKE_EVENT:
4728 { 4728 {
4729 Lisp_Object lispy_c; 4729 Lisp_Object lispy_c;
4730 int c = event->code & 0377; 4730 int c = event->code & 0377;
@@ -4748,7 +4748,7 @@ make_lispy_event (event)
4748 return lispy_c; 4748 return lispy_c;
4749 } 4749 }
4750 4750
4751 case multibyte_char_keystroke: 4751 case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
4752 { 4752 {
4753 Lisp_Object lispy_c; 4753 Lisp_Object lispy_c;
4754 4754
@@ -4758,7 +4758,7 @@ make_lispy_event (event)
4758 4758
4759 /* A function key. The symbol may need to have modifier prefixes 4759 /* A function key. The symbol may need to have modifier prefixes
4760 tacked onto it. */ 4760 tacked onto it. */
4761 case non_ascii_keystroke: 4761 case NON_ASCII_KEYSTROKE_EVENT:
4762 button_down_time = 0; 4762 button_down_time = 0;
4763 4763
4764 for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++) 4764 for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
@@ -4820,9 +4820,9 @@ make_lispy_event (event)
4820#ifdef HAVE_MOUSE 4820#ifdef HAVE_MOUSE
4821 /* A mouse click. Figure out where it is, decide whether it's 4821 /* A mouse click. Figure out where it is, decide whether it's
4822 a press, click or drag, and build the appropriate structure. */ 4822 a press, click or drag, and build the appropriate structure. */
4823 case mouse_click: 4823 case MOUSE_CLICK_EVENT:
4824#ifndef USE_TOOLKIT_SCROLL_BARS 4824#ifndef USE_TOOLKIT_SCROLL_BARS
4825 case scroll_bar_click: 4825 case SCROLL_BAR_CLICK_EVENT:
4826#endif 4826#endif
4827 { 4827 {
4828 int button = event->code; 4828 int button = event->code;
@@ -4835,7 +4835,7 @@ make_lispy_event (event)
4835 position = Qnil; 4835 position = Qnil;
4836 4836
4837 /* Build the position as appropriate for this mouse click. */ 4837 /* Build the position as appropriate for this mouse click. */
4838 if (event->kind == mouse_click) 4838 if (event->kind == MOUSE_CLICK_EVENT)
4839 { 4839 {
4840 int part; 4840 int part;
4841 struct frame *f = XFRAME (event->frame_or_window); 4841 struct frame *f = XFRAME (event->frame_or_window);
@@ -5165,7 +5165,7 @@ make_lispy_event (event)
5165 index of type `enum scroll_bar_part' which we can use as an 5165 index of type `enum scroll_bar_part' which we can use as an
5166 index in scroll_bar_parts to get the appropriate symbol. */ 5166 index in scroll_bar_parts to get the appropriate symbol. */
5167 5167
5168 case scroll_bar_click: 5168 case SCROLL_BAR_CLICK_EVENT:
5169 { 5169 {
5170 Lisp_Object position, head, window, portion_whole, part; 5170 Lisp_Object position, head, window, portion_whole, part;
5171 5171
@@ -5196,7 +5196,7 @@ make_lispy_event (event)
5196#endif /* USE_TOOLKIT_SCROLL_BARS */ 5196#endif /* USE_TOOLKIT_SCROLL_BARS */
5197 5197
5198#ifdef WINDOWSNT 5198#ifdef WINDOWSNT
5199 case w32_scroll_bar_click: 5199 case W32_SCROLL_BAR_CLICK_EVENT:
5200 { 5200 {
5201 int button = event->code; 5201 int button = event->code;
5202 int is_double; 5202 int is_double;
@@ -5239,7 +5239,7 @@ make_lispy_event (event)
5239 Qnil)); 5239 Qnil));
5240 } 5240 }
5241 } 5241 }
5242 case mouse_wheel: 5242 case MOUSE_WHEEL_EVENT:
5243 { 5243 {
5244 int part; 5244 int part;
5245 FRAME_PTR f = XFRAME (event->frame_or_window); 5245 FRAME_PTR f = XFRAME (event->frame_or_window);
@@ -5312,7 +5312,7 @@ make_lispy_event (event)
5312 } 5312 }
5313#endif /* WINDOWSNT */ 5313#endif /* WINDOWSNT */
5314 5314
5315 case drag_n_drop: 5315 case DRAG_N_DROP_EVENT:
5316 { 5316 {
5317 int part; 5317 int part;
5318 FRAME_PTR f; 5318 FRAME_PTR f;
@@ -5418,7 +5418,7 @@ make_lispy_event (event)
5418 /* A user signal. */ 5418 /* A user signal. */
5419 return *lispy_user_signals[event->code]; 5419 return *lispy_user_signals[event->code];
5420 5420
5421 case save_session_event: 5421 case SAVE_SESSION_EVENT:
5422 return Qsave_session; 5422 return Qsave_session;
5423 5423
5424 /* The 'kind' field of the event is something we don't recognize. */ 5424 /* The 'kind' field of the event is something we don't recognize. */
@@ -6194,7 +6194,7 @@ gobble_input (expected)
6194#endif 6194#endif
6195} 6195}
6196 6196
6197/* Put a buffer_switch_event in the buffer 6197/* Put a BUFFER_SWITCH_EVENT in the buffer
6198 so that read_key_sequence will notice the new current buffer. */ 6198 so that read_key_sequence will notice the new current buffer. */
6199 6199
6200void 6200void
@@ -6203,7 +6203,7 @@ record_asynch_buffer_change ()
6203 struct input_event event; 6203 struct input_event event;
6204 Lisp_Object tem; 6204 Lisp_Object tem;
6205 6205
6206 event.kind = buffer_switch_event; 6206 event.kind = BUFFER_SWITCH_EVENT;
6207 event.frame_or_window = Qnil; 6207 event.frame_or_window = Qnil;
6208 event.arg = Qnil; 6208 event.arg = Qnil;
6209 6209
@@ -6358,7 +6358,7 @@ read_avail_input (expected)
6358#endif /* no FIONREAD */ 6358#endif /* no FIONREAD */
6359 for (i = 0; i < nread; i++) 6359 for (i = 0; i < nread; i++)
6360 { 6360 {
6361 buf[i].kind = ascii_keystroke; 6361 buf[i].kind = ASCII_KEYSTROKE_EVENT;
6362 buf[i].modifiers = 0; 6362 buf[i].modifiers = 0;
6363 if (meta_key == 1 && (cbuf[i] & 0x80)) 6363 if (meta_key == 1 && (cbuf[i] & 0x80))
6364 buf[i].modifiers = meta_modifier; 6364 buf[i].modifiers = meta_modifier;
@@ -6377,7 +6377,7 @@ read_avail_input (expected)
6377 kbd_buffer_store_event (&buf[i]); 6377 kbd_buffer_store_event (&buf[i]);
6378 /* Don't look at input that follows a C-g too closely. 6378 /* Don't look at input that follows a C-g too closely.
6379 This reduces lossage due to autorepeat on C-g. */ 6379 This reduces lossage due to autorepeat on C-g. */
6380 if (buf[i].kind == ascii_keystroke 6380 if (buf[i].kind == ASCII_KEYSTROKE_EVENT
6381 && buf[i].code == quit_char) 6381 && buf[i].code == quit_char)
6382 break; 6382 break;
6383 } 6383 }
@@ -9822,10 +9822,10 @@ stuff_buffered_input (stuffstring)
9822 9822
9823 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) 9823 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
9824 kbd_fetch_ptr = kbd_buffer; 9824 kbd_fetch_ptr = kbd_buffer;
9825 if (kbd_fetch_ptr->kind == ascii_keystroke) 9825 if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT)
9826 stuff_char (kbd_fetch_ptr->code); 9826 stuff_char (kbd_fetch_ptr->code);
9827 9827
9828 kbd_fetch_ptr->kind = no_event; 9828 kbd_fetch_ptr->kind = NO_EVENT;
9829 idx = 2 * (kbd_fetch_ptr - kbd_buffer); 9829 idx = 2 * (kbd_fetch_ptr - kbd_buffer);
9830 ASET (kbd_buffer_gcpro, idx, Qnil); 9830 ASET (kbd_buffer_gcpro, idx, Qnil);
9831 ASET (kbd_buffer_gcpro, idx + 1, Qnil); 9831 ASET (kbd_buffer_gcpro, idx + 1, Qnil);
diff --git a/src/macterm.c b/src/macterm.c
index 15a63c58bd2..e25b4dc3b65 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -6765,7 +6765,7 @@ construct_mouse_click (result, event, f)
6765{ 6765{
6766 Point mouseLoc; 6766 Point mouseLoc;
6767 6767
6768 result->kind = mouse_click; 6768 result->kind = MOUSE_CLICK_EVENT;
6769 result->code = 0; /* only one mouse button */ 6769 result->code = 0; /* only one mouse button */
6770 result->timestamp = event->when; 6770 result->timestamp = event->when;
6771 result->modifiers = event->what == mouseDown ? down_modifier : up_modifier; 6771 result->modifiers = event->what == mouseDown ? down_modifier : up_modifier;
@@ -8712,7 +8712,7 @@ deactivate_scroll_bars (frame)
8712} 8712}
8713 8713
8714/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind 8714/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
8715 is set to something other than no_event, it is enqueued. 8715 is set to something other than NO_EVENT, it is enqueued.
8716 8716
8717 This may be called from a signal handler, so we have to ignore GC 8717 This may be called from a signal handler, so we have to ignore GC
8718 mark bits. */ 8718 mark bits. */
@@ -8727,7 +8727,7 @@ x_scroll_bar_handle_click (bar, part_code, er, bufp)
8727 if (! GC_WINDOWP (bar->window)) 8727 if (! GC_WINDOWP (bar->window))
8728 abort (); 8728 abort ();
8729 8729
8730 bufp->kind = scroll_bar_click; 8730 bufp->kind = SCROLL_BAR_CLICK_EVENT;
8731 bufp->frame_or_window = bar->window; 8731 bufp->frame_or_window = bar->window;
8732 bufp->arg = Qnil; 8732 bufp->arg = Qnil;
8733 8733
@@ -12334,7 +12334,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12334 GlobalToLocal (&mouse_loc); 12334 GlobalToLocal (&mouse_loc);
12335 12335
12336 bufp->code = 0; /* only one mouse button */ 12336 bufp->code = 0; /* only one mouse button */
12337 bufp->kind = scroll_bar_click; 12337 bufp->kind = SCROLL_BAR_CLICK_EVENT;
12338 bufp->frame_or_window = tracked_scroll_bar->window; 12338 bufp->frame_or_window = tracked_scroll_bar->window;
12339 bufp->part = scroll_bar_handle; 12339 bufp->part = scroll_bar_handle;
12340 bufp->modifiers = up_modifier; 12340 bufp->modifiers = up_modifier;
@@ -12359,7 +12359,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12359 struct frame *f = ((mac_output *) 12359 struct frame *f = ((mac_output *)
12360 GetWRefCon (FrontWindow ()))->mFP; 12360 GetWRefCon (FrontWindow ()))->mFP;
12361 saved_menu_event_location = er.where; 12361 saved_menu_event_location = er.where;
12362 bufp->kind = menu_bar_activate_event; 12362 bufp->kind = MENU_BAR_ACTIVATE_EVENT;
12363 XSETFRAME (bufp->frame_or_window, f); 12363 XSETFRAME (bufp->frame_or_window, f);
12364 count++; 12364 count++;
12365 } 12365 }
@@ -12421,7 +12421,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12421 } 12421 }
12422 else 12422 else
12423 { 12423 {
12424 bufp->kind = mouse_click; 12424 bufp->kind = MOUSE_CLICK_EVENT;
12425 XSETFRAME (bufp->frame_or_window, mwp->mFP); 12425 XSETFRAME (bufp->frame_or_window, mwp->mFP);
12426 if (er.what == mouseDown) 12426 if (er.what == mouseDown)
12427 mouse_tracking_in_progress 12427 mouse_tracking_in_progress
@@ -12460,7 +12460,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12460 case inGoAway: 12460 case inGoAway:
12461 if (TrackGoAway (window_ptr, er.where)) 12461 if (TrackGoAway (window_ptr, er.where))
12462 { 12462 {
12463 bufp->kind = delete_window_event; 12463 bufp->kind = DELETE_WINDOW_EVENT;
12464 XSETFRAME (bufp->frame_or_window, 12464 XSETFRAME (bufp->frame_or_window,
12465 ((mac_output *) GetWRefCon (window_ptr))->mFP); 12465 ((mac_output *) GetWRefCon (window_ptr))->mFP);
12466 count++; 12466 count++;
@@ -12502,12 +12502,12 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12502 if (keycode == 0x33) /* delete key (charCode translated to 0x8) */ 12502 if (keycode == 0x33) /* delete key (charCode translated to 0x8) */
12503 { 12503 {
12504 bufp->code = 0x7f; 12504 bufp->code = 0x7f;
12505 bufp->kind = ascii_keystroke; 12505 bufp->kind = ASCII_KEYSTROKE_EVENT;
12506 } 12506 }
12507 else if (keycode_to_xkeysym (keycode, &xkeysym)) 12507 else if (keycode_to_xkeysym (keycode, &xkeysym))
12508 { 12508 {
12509 bufp->code = 0xff00 | xkeysym; 12509 bufp->code = 0xff00 | xkeysym;
12510 bufp->kind = non_ascii_keystroke; 12510 bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
12511 } 12511 }
12512 else 12512 else
12513 { 12513 {
@@ -12528,7 +12528,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12528 } 12528 }
12529 else 12529 else
12530 bufp->code = er.message & charCodeMask; 12530 bufp->code = er.message & charCodeMask;
12531 bufp->kind = ascii_keystroke; 12531 bufp->kind = ASCII_KEYSTROKE_EVENT;
12532 } 12532 }
12533 } 12533 }
12534 12534
@@ -12539,7 +12539,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12539 Mac keyboard to be used to enter non-ASCII iso-latin-1 12539 Mac keyboard to be used to enter non-ASCII iso-latin-1
12540 characters directly. */ 12540 characters directly. */
12541 if (mac_keyboard_text_encoding != kTextEncodingMacRoman 12541 if (mac_keyboard_text_encoding != kTextEncodingMacRoman
12542 && bufp->kind == ascii_keystroke && bufp->code >= 128) 12542 && bufp->kind == ASCII_KEYSTROKE_EVENT && bufp->code >= 128)
12543 { 12543 {
12544 static TECObjectRef converter = NULL; 12544 static TECObjectRef converter = NULL;
12545 OSStatus the_err = noErr; 12545 OSStatus the_err = noErr;
@@ -12610,7 +12610,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12610 12610
12611 AEProcessAppleEvent(&er); 12611 AEProcessAppleEvent(&er);
12612 12612
12613 /* Build a drag_n_drop type event as is done in 12613 /* Build a DRAG_N_DROP_EVENT type event as is done in
12614 constuct_drag_n_drop in w32term.c. */ 12614 constuct_drag_n_drop in w32term.c. */
12615 if (!NILP (drag_and_drop_file_list)) 12615 if (!NILP (drag_and_drop_file_list))
12616 { 12616 {
@@ -12624,7 +12624,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
12624 else 12624 else
12625 f = ((mac_output *) GetWRefCon (wp))->mFP; 12625 f = ((mac_output *) GetWRefCon (wp))->mFP;
12626 12626
12627 bufp->kind = drag_n_drop; 12627 bufp->kind = DRAG_N_DROP_EVENT;
12628 bufp->code = 0; 12628 bufp->code = 0;
12629 bufp->timestamp = er.when * (1000 / 60); 12629 bufp->timestamp = er.when * (1000 / 60);
12630 /* ticks to milliseconds */ 12630 /* ticks to milliseconds */
diff --git a/src/msdos.c b/src/msdos.c
index 4cc3343eb09..df9f68468a6 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3362,9 +3362,9 @@ dos_rawgetc ()
3362 } 3362 }
3363 3363
3364 if (code >= 0x100) 3364 if (code >= 0x100)
3365 event.kind = non_ascii_keystroke; 3365 event.kind = NON_ASCII_KEYSTROKE_EVENT;
3366 else 3366 else
3367 event.kind = ascii_keystroke; 3367 event.kind = ASCII_KEYSTROKE_EVENT;
3368 event.code = code; 3368 event.code = code;
3369 event.modifiers = modifiers; 3369 event.modifiers = modifiers;
3370 event.frame_or_window = selected_frame; 3370 event.frame_or_window = selected_frame;
@@ -3473,7 +3473,7 @@ dos_rawgetc ()
3473 } 3473 }
3474 } 3474 }
3475 3475
3476 event.kind = mouse_click; 3476 event.kind = MOUSE_CLICK_EVENT;
3477 event.code = button_num; 3477 event.code = button_num;
3478 event.modifiers = dos_get_modifiers (0) 3478 event.modifiers = dos_get_modifiers (0)
3479 | (press ? down_modifier : up_modifier); 3479 | (press ? down_modifier : up_modifier);
diff --git a/src/termhooks.h b/src/termhooks.h
index 6e38747ed2a..63fa1f0ee3b 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -201,10 +201,10 @@ extern void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME));
201 201
202enum event_kind 202enum 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.
@@ -212,13 +212,13 @@ enum event_kind
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
@@ -230,8 +230,8 @@ enum event_kind
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
@@ -243,7 +243,7 @@ enum event_kind
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
@@ -259,12 +259,12 @@ enum event_kind
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.
@@ -278,23 +278,23 @@ enum event_kind
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.
@@ -330,11 +330,11 @@ enum event_kind
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
@@ -347,9 +347,9 @@ struct input_event
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;
diff --git a/src/w32menu.c b/src/w32menu.c
index ee1bbc54209..4f07c534425 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -935,7 +935,7 @@ on the left of the dialog box and all following items on the right.
935 935
936/* Activate the menu bar of frame F. 936/* Activate the menu bar of frame F.
937 This is called from keyboard.c when it gets the 937 This is called from keyboard.c when it gets the
938 menu_bar_activate_event out of the Emacs event queue. 938 MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
939 939
940 To activate the menu bar, we signal to the input thread that it can 940 To activate the menu bar, we signal to the input thread that it can
941 return from the WM_INITMENU message, allowing the normal Windows 941 return from the WM_INITMENU message, allowing the normal Windows
diff --git a/src/w32term.c b/src/w32term.c
index a61f19f5875..f8c3a7bd69b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6188,9 +6188,9 @@ construct_mouse_click (result, msg, f)
6188 parse_button (msg->msg.message, HIWORD (msg->msg.wParam), 6188 parse_button (msg->msg.message, HIWORD (msg->msg.wParam),
6189 &button, &up); 6189 &button, &up);
6190 6190
6191 /* Make the event type no_event; we'll change that when we decide 6191 /* Make the event type NO_EVENT; we'll change that when we decide
6192 otherwise. */ 6192 otherwise. */
6193 result->kind = mouse_click; 6193 result->kind = MOUSE_CLICK_EVENT;
6194 result->code = button; 6194 result->code = button;
6195 result->timestamp = msg->msg.time; 6195 result->timestamp = msg->msg.time;
6196 result->modifiers = (msg->dwModifiers 6196 result->modifiers = (msg->dwModifiers
@@ -6212,7 +6212,7 @@ construct_mouse_wheel (result, msg, f)
6212 struct frame *f; 6212 struct frame *f;
6213{ 6213{
6214 POINT p; 6214 POINT p;
6215 result->kind = mouse_wheel; 6215 result->kind = MOUSE_WHEEL_EVENT;
6216 result->code = (short) HIWORD (msg->msg.wParam); 6216 result->code = (short) HIWORD (msg->msg.wParam);
6217 result->timestamp = msg->msg.time; 6217 result->timestamp = msg->msg.time;
6218 result->modifiers = msg->dwModifiers; 6218 result->modifiers = msg->dwModifiers;
@@ -6240,7 +6240,7 @@ construct_drag_n_drop (result, msg, f)
6240 char *name; 6240 char *name;
6241 int i, len; 6241 int i, len;
6242 6242
6243 result->kind = drag_n_drop; 6243 result->kind = DRAG_N_DROP_EVENT;
6244 result->code = 0; 6244 result->code = 0;
6245 result->timestamp = msg->msg.time; 6245 result->timestamp = msg->msg.time;
6246 result->modifiers = msg->dwModifiers; 6246 result->modifiers = msg->dwModifiers;
@@ -8319,7 +8319,7 @@ w32_judge_scroll_bars (f)
8319} 8319}
8320 8320
8321/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind 8321/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
8322 is set to something other than no_event, it is enqueued. 8322 is set to something other than NO_EVENT, it is enqueued.
8323 8323
8324 This may be called from a signal handler, so we have to ignore GC 8324 This may be called from a signal handler, so we have to ignore GC
8325 mark bits. */ 8325 mark bits. */
@@ -8333,7 +8333,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event)
8333 if (! GC_WINDOWP (bar->window)) 8333 if (! GC_WINDOWP (bar->window))
8334 abort (); 8334 abort ();
8335 8335
8336 emacs_event->kind = w32_scroll_bar_click; 8336 emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
8337 emacs_event->code = 0; 8337 emacs_event->code = 0;
8338 /* not really meaningful to distinguish up/down */ 8338 /* not really meaningful to distinguish up/down */
8339 emacs_event->modifiers = msg->dwModifiers; 8339 emacs_event->modifiers = msg->dwModifiers;
@@ -8433,7 +8433,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event)
8433 } 8433 }
8434 /* fall through */ 8434 /* fall through */
8435 default: 8435 default:
8436 emacs_event->kind = no_event; 8436 emacs_event->kind = NO_EVENT;
8437 return FALSE; 8437 return FALSE;
8438 } 8438 }
8439 8439
@@ -8634,7 +8634,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8634 visibility changes properly. */ 8634 visibility changes properly. */
8635 if (f->iconified) 8635 if (f->iconified)
8636 { 8636 {
8637 bufp->kind = deiconify_event; 8637 bufp->kind = DEICONIFY_EVENT;
8638 XSETFRAME (bufp->frame_or_window, f); 8638 XSETFRAME (bufp->frame_or_window, f);
8639 bufp->arg = Qnil; 8639 bufp->arg = Qnil;
8640 bufp++; 8640 bufp++;
@@ -8672,7 +8672,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8672 if (numchars == 0) 8672 if (numchars == 0)
8673 abort (); 8673 abort ();
8674 8674
8675 bufp->kind = language_change_event; 8675 bufp->kind = LANGUAGE_CHANGE_EVENT;
8676 XSETFRAME (bufp->frame_or_window, f); 8676 XSETFRAME (bufp->frame_or_window, f);
8677 bufp->arg = Qnil; 8677 bufp->arg = Qnil;
8678 bufp->code = msg.msg.wParam; 8678 bufp->code = msg.msg.wParam;
@@ -8698,7 +8698,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8698 if (temp_index == sizeof temp_buffer / sizeof (short)) 8698 if (temp_index == sizeof temp_buffer / sizeof (short))
8699 temp_index = 0; 8699 temp_index = 0;
8700 temp_buffer[temp_index++] = msg.msg.wParam; 8700 temp_buffer[temp_index++] = msg.msg.wParam;
8701 bufp->kind = non_ascii_keystroke; 8701 bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
8702 bufp->code = msg.msg.wParam; 8702 bufp->code = msg.msg.wParam;
8703 bufp->modifiers = msg.dwModifiers; 8703 bufp->modifiers = msg.dwModifiers;
8704 XSETFRAME (bufp->frame_or_window, f); 8704 XSETFRAME (bufp->frame_or_window, f);
@@ -8725,7 +8725,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8725 if (temp_index == sizeof temp_buffer / sizeof (short)) 8725 if (temp_index == sizeof temp_buffer / sizeof (short))
8726 temp_index = 0; 8726 temp_index = 0;
8727 temp_buffer[temp_index++] = msg.msg.wParam; 8727 temp_buffer[temp_index++] = msg.msg.wParam;
8728 bufp->kind = ascii_keystroke; 8728 bufp->kind = ASCII_KEYSTROKE_EVENT;
8729 bufp->code = msg.msg.wParam; 8729 bufp->code = msg.msg.wParam;
8730 bufp->modifiers = msg.dwModifiers; 8730 bufp->modifiers = msg.dwModifiers;
8731 XSETFRAME (bufp->frame_or_window, f); 8731 XSETFRAME (bufp->frame_or_window, f);
@@ -8799,7 +8799,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8799 int button; 8799 int button;
8800 int up; 8800 int up;
8801 8801
8802 emacs_event.kind = no_event; 8802 emacs_event.kind = NO_EVENT;
8803 8803
8804 if (dpyinfo->grabbed && last_mouse_frame 8804 if (dpyinfo->grabbed && last_mouse_frame
8805 && FRAME_LIVE_P (last_mouse_frame)) 8805 && FRAME_LIVE_P (last_mouse_frame))
@@ -8991,7 +8991,7 @@ w32_read_socket (sd, bufp, numchars, expected)
8991 f->async_visible = 0; 8991 f->async_visible = 0;
8992 f->async_iconified = 1; 8992 f->async_iconified = 1;
8993 8993
8994 bufp->kind = iconify_event; 8994 bufp->kind = ICONIFY_EVENT;
8995 XSETFRAME (bufp->frame_or_window, f); 8995 XSETFRAME (bufp->frame_or_window, f);
8996 bufp->arg = Qnil; 8996 bufp->arg = Qnil;
8997 bufp++; 8997 bufp++;
@@ -9021,7 +9021,7 @@ w32_read_socket (sd, bufp, numchars, expected)
9021 f->output_data.w32->left_pos = x; 9021 f->output_data.w32->left_pos = x;
9022 f->output_data.w32->top_pos = y; 9022 f->output_data.w32->top_pos = y;
9023 9023
9024 bufp->kind = deiconify_event; 9024 bufp->kind = DEICONIFY_EVENT;
9025 XSETFRAME (bufp->frame_or_window, f); 9025 XSETFRAME (bufp->frame_or_window, f);
9026 bufp->arg = Qnil; 9026 bufp->arg = Qnil;
9027 bufp++; 9027 bufp++;
@@ -9169,7 +9169,7 @@ w32_read_socket (sd, bufp, numchars, expected)
9169 if (numchars == 0) 9169 if (numchars == 0)
9170 abort (); 9170 abort ();
9171 9171
9172 bufp->kind = delete_window_event; 9172 bufp->kind = DELETE_WINDOW_EVENT;
9173 XSETFRAME (bufp->frame_or_window, f); 9173 XSETFRAME (bufp->frame_or_window, f);
9174 bufp->arg = Qnil; 9174 bufp->arg = Qnil;
9175 bufp++; 9175 bufp++;
@@ -9186,7 +9186,7 @@ w32_read_socket (sd, bufp, numchars, expected)
9186 if (numchars == 0) 9186 if (numchars == 0)
9187 abort (); 9187 abort ();
9188 9188
9189 bufp->kind = menu_bar_activate_event; 9189 bufp->kind = MENU_BAR_ACTIVATE_EVENT;
9190 XSETFRAME (bufp->frame_or_window, f); 9190 XSETFRAME (bufp->frame_or_window, f);
9191 bufp->arg = Qnil; 9191 bufp->arg = Qnil;
9192 bufp++; 9192 bufp++;
diff --git a/src/xmenu.c b/src/xmenu.c
index 6ab1fad7a6f..1c5949ebb5d 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1105,7 +1105,7 @@ popup_get_selection (initial_event, dpyinfo, id)
1105 1105
1106/* Activate the menu bar of frame F. 1106/* Activate the menu bar of frame F.
1107 This is called from keyboard.c when it gets the 1107 This is called from keyboard.c when it gets the
1108 menu_bar_activate_event out of the Emacs event queue. 1108 MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
1109 1109
1110 To activate the menu bar, we use the X button-press event 1110 To activate the menu bar, we use the X button-press event
1111 that was saved in saved_menu_event. 1111 that was saved in saved_menu_event.
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 269f80c9518..44f083048e9 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -57,15 +57,15 @@ Boston, MA 02111-1307, USA. */
57 57
58extern Lisp_Object Vuser_login_name; 58extern Lisp_Object Vuser_login_name;
59 59
60/* This is the event used when save_session occurs */ 60/* This is the event used when SAVE_SESSION_EVENT occurs. */
61 61
62static struct input_event emacs_event; 62static struct input_event emacs_event;
63 63
64/* The descriptor that we use to check for data from the session manager. */ 64/* The descriptor that we use to check for data from the session manager. */
65 65
66static int ice_fd = -1; 66static int ice_fd = -1;
67 67
68/* A flag that says if we are in shutdown interactions or not. */ 68/* A flag that says if we are in shutdown interactions or not. */
69 69
70static int doing_interact = False; 70static int doing_interact = False;
71 71
@@ -98,7 +98,7 @@ Lisp_Object Vx_session_previous_id;
98 open to a session manager, just return 0. 98 open to a session manager, just return 0.
99 Otherwise returns the number of events stored in buffer BUFP, 99 Otherwise returns the number of events stored in buffer BUFP,
100 which can hold up to *NUMCHARS characters. At most one event is 100 which can hold up to *NUMCHARS characters. At most one event is
101 stored, an save_session_event. */ 101 stored, an SAVE_SESSION_EVENT. */
102int 102int
103x_session_check_input (bufp, numchars) 103x_session_check_input (bufp, numchars)
104 struct input_event *bufp; 104 struct input_event *bufp;
@@ -117,9 +117,9 @@ x_session_check_input (bufp, numchars)
117 117
118 /* Reset this so wo can check kind after callbacks have been called by 118 /* Reset this so wo can check kind after callbacks have been called by
119 IceProcessMessages. The smc_interact_CB sets the kind to 119 IceProcessMessages. The smc_interact_CB sets the kind to
120 save_session_event, but we don't know beforehand if that callback 120 SAVE_SESSION_EVENT, but we don't know beforehand if that callback
121 will be called. */ 121 will be called. */
122 emacs_event.kind = no_event; 122 emacs_event.kind = NO_EVENT;
123 123
124 if (select (ice_fd+1, &read_fds, 124 if (select (ice_fd+1, &read_fds,
125 (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0) 125 (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
@@ -135,8 +135,8 @@ x_session_check_input (bufp, numchars)
135 135
136 136
137 /* Check if smc_interact_CB was called and we shall generate a 137 /* Check if smc_interact_CB was called and we shall generate a
138 save_session event. */ 138 SAVE_SESSION_EVENT. */
139 if (*numchars > 0 && emacs_event.kind != no_event) 139 if (*numchars > 0 && emacs_event.kind != NO_EVENT)
140 { 140 {
141 bcopy (&emacs_event, bufp, sizeof (struct input_event)); 141 bcopy (&emacs_event, bufp, sizeof (struct input_event));
142 bufp++; 142 bufp++;
@@ -156,7 +156,7 @@ x_session_have_connection ()
156} 156}
157 157
158/* This is called when the session manager says it is OK to interact with the 158/* This is called when the session manager says it is OK to interact with the
159 user. Here we set the kind to save_session so an event is generated. 159 user. Here we set the kind to SAVE_SESSION_EVENT so an event is generated.
160 Then lisp code can interact with the user. */ 160 Then lisp code can interact with the user. */
161static void 161static void
162smc_interact_CB (smcConn, clientData) 162smc_interact_CB (smcConn, clientData)
@@ -164,7 +164,7 @@ smc_interact_CB (smcConn, clientData)
164 SmPointer clientData; 164 SmPointer clientData;
165{ 165{
166 doing_interact = True; 166 doing_interact = True;
167 emacs_event.kind = save_session_event; 167 emacs_event.kind = SAVE_SESSION_EVENT;
168} 168}
169 169
170/* This is called when the session manager tells us to save ourself. 170/* This is called when the session manager tells us to save ourself.
diff --git a/src/xterm.c b/src/xterm.c
index 77961b43229..b95abdf6c5f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6636,9 +6636,9 @@ construct_mouse_click (result, event, f)
6636 XButtonEvent *event; 6636 XButtonEvent *event;
6637 struct frame *f; 6637 struct frame *f;
6638{ 6638{
6639 /* Make the event type no_event; we'll change that when we decide 6639 /* Make the event type NO_EVENT; we'll change that when we decide
6640 otherwise. */ 6640 otherwise. */
6641 result->kind = mouse_click; 6641 result->kind = MOUSE_CLICK_EVENT;
6642 result->code = event->button - Button1; 6642 result->code = event->button - Button1;
6643 result->timestamp = event->time; 6643 result->timestamp = event->time;
6644 result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), 6644 result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
@@ -8325,7 +8325,7 @@ static Boolean xaw3d_pick_top;
8325/* Action hook installed via XtAppAddActionHook when toolkit scroll 8325/* Action hook installed via XtAppAddActionHook when toolkit scroll
8326 bars are used.. The hook is responsible for detecting when 8326 bars are used.. The hook is responsible for detecting when
8327 the user ends an interaction with the scroll bar, and generates 8327 the user ends an interaction with the scroll bar, and generates
8328 a `end-scroll' scroll_bar_click' event if so. */ 8328 a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so. */
8329 8329
8330static void 8330static void
8331xt_action_hook (widget, client_data, action_name, event, params, 8331xt_action_hook (widget, client_data, action_name, event, params,
@@ -8455,7 +8455,7 @@ x_scroll_bar_to_input_event (event, ievent)
8455 XSETWINDOW (window, w); 8455 XSETWINDOW (window, w);
8456 f = XFRAME (w->frame); 8456 f = XFRAME (w->frame);
8457 8457
8458 ievent->kind = scroll_bar_click; 8458 ievent->kind = SCROLL_BAR_CLICK_EVENT;
8459 ievent->frame_or_window = window; 8459 ievent->frame_or_window = window;
8460 ievent->arg = Qnil; 8460 ievent->arg = Qnil;
8461 ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f)); 8461 ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
@@ -9513,7 +9513,7 @@ x_scroll_bar_expose (bar, event)
9513} 9513}
9514 9514
9515/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind 9515/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
9516 is set to something other than no_event, it is enqueued. 9516 is set to something other than NO_EVENT, it is enqueued.
9517 9517
9518 This may be called from a signal handler, so we have to ignore GC 9518 This may be called from a signal handler, so we have to ignore GC
9519 mark bits. */ 9519 mark bits. */
@@ -9529,7 +9529,7 @@ x_scroll_bar_handle_click (bar, event, emacs_event)
9529 if (! GC_WINDOWP (bar->window)) 9529 if (! GC_WINDOWP (bar->window))
9530 abort (); 9530 abort ();
9531 9531
9532 emacs_event->kind = scroll_bar_click; 9532 emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
9533 emacs_event->code = event->xbutton.button - Button1; 9533 emacs_event->code = event->xbutton.button - Button1;
9534 emacs_event->modifiers 9534 emacs_event->modifiers
9535 = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO 9535 = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO
@@ -9896,7 +9896,7 @@ static struct x_display_info *next_noop_dpyinfo;
9896 bcopy (&event, f->output_data.x->saved_menu_event, size); \ 9896 bcopy (&event, f->output_data.x->saved_menu_event, size); \
9897 if (numchars >= 1) \ 9897 if (numchars >= 1) \
9898 { \ 9898 { \
9899 bufp->kind = menu_bar_activate_event; \ 9899 bufp->kind = MENU_BAR_ACTIVATE_EVENT; \
9900 XSETFRAME (bufp->frame_or_window, f); \ 9900 XSETFRAME (bufp->frame_or_window, f); \
9901 bufp->arg = Qnil; \ 9901 bufp->arg = Qnil; \
9902 bufp++; \ 9902 bufp++; \
@@ -10113,7 +10113,7 @@ XTread_socket (sd, bufp, numchars, expected)
10113 if (numchars == 0) 10113 if (numchars == 0)
10114 abort (); 10114 abort ();
10115 10115
10116 bufp->kind = delete_window_event; 10116 bufp->kind = DELETE_WINDOW_EVENT;
10117 XSETFRAME (bufp->frame_or_window, f); 10117 XSETFRAME (bufp->frame_or_window, f);
10118 bufp->arg = Qnil; 10118 bufp->arg = Qnil;
10119 bufp++; 10119 bufp++;
@@ -10203,7 +10203,7 @@ XTread_socket (sd, bufp, numchars, expected)
10203 if (numchars == 0) 10203 if (numchars == 0)
10204 abort (); 10204 abort ();
10205 10205
10206 bufp->kind = selection_clear_event; 10206 bufp->kind = SELECTION_CLEAR_EVENT;
10207 SELECTION_EVENT_DISPLAY (bufp) = eventp->display; 10207 SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
10208 SELECTION_EVENT_SELECTION (bufp) = eventp->selection; 10208 SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
10209 SELECTION_EVENT_TIME (bufp) = eventp->time; 10209 SELECTION_EVENT_TIME (bufp) = eventp->time;
@@ -10232,7 +10232,7 @@ XTread_socket (sd, bufp, numchars, expected)
10232 if (numchars == 0) 10232 if (numchars == 0)
10233 abort (); 10233 abort ();
10234 10234
10235 bufp->kind = selection_request_event; 10235 bufp->kind = SELECTION_REQUEST_EVENT;
10236 SELECTION_EVENT_DISPLAY (bufp) = eventp->display; 10236 SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
10237 SELECTION_EVENT_REQUESTOR (bufp) = eventp->requestor; 10237 SELECTION_EVENT_REQUESTOR (bufp) = eventp->requestor;
10238 SELECTION_EVENT_SELECTION (bufp) = eventp->selection; 10238 SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
@@ -10372,7 +10372,7 @@ XTread_socket (sd, bufp, numchars, expected)
10372 { 10372 {
10373 f->async_iconified = 1; 10373 f->async_iconified = 1;
10374 10374
10375 bufp->kind = iconify_event; 10375 bufp->kind = ICONIFY_EVENT;
10376 XSETFRAME (bufp->frame_or_window, f); 10376 XSETFRAME (bufp->frame_or_window, f);
10377 bufp->arg = Qnil; 10377 bufp->arg = Qnil;
10378 bufp++; 10378 bufp++;
@@ -10404,7 +10404,7 @@ XTread_socket (sd, bufp, numchars, expected)
10404 10404
10405 if (f->iconified) 10405 if (f->iconified)
10406 { 10406 {
10407 bufp->kind = deiconify_event; 10407 bufp->kind = DEICONIFY_EVENT;
10408 XSETFRAME (bufp->frame_or_window, f); 10408 XSETFRAME (bufp->frame_or_window, f);
10409 bufp->arg = Qnil; 10409 bufp->arg = Qnil;
10410 bufp++; 10410 bufp++;
@@ -10640,7 +10640,7 @@ XTread_socket (sd, bufp, numchars, expected)
10640 if (temp_index == sizeof temp_buffer / sizeof (short)) 10640 if (temp_index == sizeof temp_buffer / sizeof (short))
10641 temp_index = 0; 10641 temp_index = 0;
10642 temp_buffer[temp_index++] = keysym; 10642 temp_buffer[temp_index++] = keysym;
10643 bufp->kind = non_ascii_keystroke; 10643 bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
10644 bufp->code = keysym; 10644 bufp->code = keysym;
10645 XSETFRAME (bufp->frame_or_window, f); 10645 XSETFRAME (bufp->frame_or_window, f);
10646 bufp->arg = Qnil; 10646 bufp->arg = Qnil;
@@ -10703,8 +10703,8 @@ XTread_socket (sd, bufp, numchars, expected)
10703 nbytes - i, len); 10703 nbytes - i, len);
10704 10704
10705 bufp->kind = (SINGLE_BYTE_CHAR_P (c) 10705 bufp->kind = (SINGLE_BYTE_CHAR_P (c)
10706 ? ascii_keystroke 10706 ? ASCII_KEYSTROKE_EVENT
10707 : multibyte_char_keystroke); 10707 : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
10708 bufp->code = c; 10708 bufp->code = c;
10709 XSETFRAME (bufp->frame_or_window, f); 10709 XSETFRAME (bufp->frame_or_window, f);
10710 bufp->arg = Qnil; 10710 bufp->arg = Qnil;
@@ -11032,7 +11032,7 @@ XTread_socket (sd, bufp, numchars, expected)
11032 struct input_event emacs_event; 11032 struct input_event emacs_event;
11033 int tool_bar_p = 0; 11033 int tool_bar_p = 0;
11034 11034
11035 emacs_event.kind = no_event; 11035 emacs_event.kind = NO_EVENT;
11036 bzero (&compose_status, sizeof (compose_status)); 11036 bzero (&compose_status, sizeof (compose_status));
11037 11037
11038 if (dpyinfo->grabbed 11038 if (dpyinfo->grabbed
@@ -11098,7 +11098,7 @@ XTread_socket (sd, bufp, numchars, expected)
11098 dpyinfo->grabbed &= ~(1 << event.xbutton.button); 11098 dpyinfo->grabbed &= ~(1 << event.xbutton.button);
11099 } 11099 }
11100 11100
11101 if (numchars >= 1 && emacs_event.kind != no_event) 11101 if (numchars >= 1 && emacs_event.kind != NO_EVENT)
11102 { 11102 {
11103 bcopy (&emacs_event, bufp, sizeof (struct input_event)); 11103 bcopy (&emacs_event, bufp, sizeof (struct input_event));
11104 bufp++; 11104 bufp++;