Commit 3b8f9651 authored by Pavel Janík's avatar Pavel Janík

Rename enum event_kind items.

parent df3eebcb
This diff is collapsed.
...@@ -6765,7 +6765,7 @@ construct_mouse_click (result, event, f) ...@@ -6765,7 +6765,7 @@ construct_mouse_click (result, event, f)
{ {
Point mouseLoc; Point mouseLoc;
result->kind = mouse_click; result->kind = MOUSE_CLICK_EVENT;
result->code = 0; /* only one mouse button */ result->code = 0; /* only one mouse button */
result->timestamp = event->when; result->timestamp = event->when;
result->modifiers = event->what == mouseDown ? down_modifier : up_modifier; result->modifiers = event->what == mouseDown ? down_modifier : up_modifier;
...@@ -8712,7 +8712,7 @@ deactivate_scroll_bars (frame) ...@@ -8712,7 +8712,7 @@ deactivate_scroll_bars (frame)
} }
/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind /* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
is set to something other than no_event, it is enqueued. is set to something other than NO_EVENT, it is enqueued.
This may be called from a signal handler, so we have to ignore GC This may be called from a signal handler, so we have to ignore GC
mark bits. */ mark bits. */
...@@ -8727,7 +8727,7 @@ x_scroll_bar_handle_click (bar, part_code, er, bufp) ...@@ -8727,7 +8727,7 @@ x_scroll_bar_handle_click (bar, part_code, er, bufp)
if (! GC_WINDOWP (bar->window)) if (! GC_WINDOWP (bar->window))
abort (); abort ();
bufp->kind = scroll_bar_click; bufp->kind = SCROLL_BAR_CLICK_EVENT;
bufp->frame_or_window = bar->window; bufp->frame_or_window = bar->window;
bufp->arg = Qnil; bufp->arg = Qnil;
...@@ -12334,7 +12334,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12334,7 +12334,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
GlobalToLocal (&mouse_loc); GlobalToLocal (&mouse_loc);
bufp->code = 0; /* only one mouse button */ bufp->code = 0; /* only one mouse button */
bufp->kind = scroll_bar_click; bufp->kind = SCROLL_BAR_CLICK_EVENT;
bufp->frame_or_window = tracked_scroll_bar->window; bufp->frame_or_window = tracked_scroll_bar->window;
bufp->part = scroll_bar_handle; bufp->part = scroll_bar_handle;
bufp->modifiers = up_modifier; bufp->modifiers = up_modifier;
...@@ -12359,7 +12359,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12359,7 +12359,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
struct frame *f = ((mac_output *) struct frame *f = ((mac_output *)
GetWRefCon (FrontWindow ()))->mFP; GetWRefCon (FrontWindow ()))->mFP;
saved_menu_event_location = er.where; saved_menu_event_location = er.where;
bufp->kind = menu_bar_activate_event; bufp->kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
count++; count++;
} }
...@@ -12421,7 +12421,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12421,7 +12421,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
} }
else else
{ {
bufp->kind = mouse_click; bufp->kind = MOUSE_CLICK_EVENT;
XSETFRAME (bufp->frame_or_window, mwp->mFP); XSETFRAME (bufp->frame_or_window, mwp->mFP);
if (er.what == mouseDown) if (er.what == mouseDown)
mouse_tracking_in_progress mouse_tracking_in_progress
...@@ -12460,7 +12460,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12460,7 +12460,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
case inGoAway: case inGoAway:
if (TrackGoAway (window_ptr, er.where)) if (TrackGoAway (window_ptr, er.where))
{ {
bufp->kind = delete_window_event; bufp->kind = DELETE_WINDOW_EVENT;
XSETFRAME (bufp->frame_or_window, XSETFRAME (bufp->frame_or_window,
((mac_output *) GetWRefCon (window_ptr))->mFP); ((mac_output *) GetWRefCon (window_ptr))->mFP);
count++; count++;
...@@ -12502,12 +12502,12 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12502,12 +12502,12 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
if (keycode == 0x33) /* delete key (charCode translated to 0x8) */ if (keycode == 0x33) /* delete key (charCode translated to 0x8) */
{ {
bufp->code = 0x7f; bufp->code = 0x7f;
bufp->kind = ascii_keystroke; bufp->kind = ASCII_KEYSTROKE_EVENT;
} }
else if (keycode_to_xkeysym (keycode, &xkeysym)) else if (keycode_to_xkeysym (keycode, &xkeysym))
{ {
bufp->code = 0xff00 | xkeysym; bufp->code = 0xff00 | xkeysym;
bufp->kind = non_ascii_keystroke; bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
} }
else else
{ {
...@@ -12528,7 +12528,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12528,7 +12528,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
} }
else else
bufp->code = er.message & charCodeMask; bufp->code = er.message & charCodeMask;
bufp->kind = ascii_keystroke; bufp->kind = ASCII_KEYSTROKE_EVENT;
} }
} }
...@@ -12539,7 +12539,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12539,7 +12539,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
Mac keyboard to be used to enter non-ASCII iso-latin-1 Mac keyboard to be used to enter non-ASCII iso-latin-1
characters directly. */ characters directly. */
if (mac_keyboard_text_encoding != kTextEncodingMacRoman if (mac_keyboard_text_encoding != kTextEncodingMacRoman
&& bufp->kind == ascii_keystroke && bufp->code >= 128) && bufp->kind == ASCII_KEYSTROKE_EVENT && bufp->code >= 128)
{ {
static TECObjectRef converter = NULL; static TECObjectRef converter = NULL;
OSStatus the_err = noErr; OSStatus the_err = noErr;
...@@ -12610,7 +12610,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12610,7 +12610,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
AEProcessAppleEvent(&er); AEProcessAppleEvent(&er);
/* Build a drag_n_drop type event as is done in /* Build a DRAG_N_DROP_EVENT type event as is done in
constuct_drag_n_drop in w32term.c. */ constuct_drag_n_drop in w32term.c. */
if (!NILP (drag_and_drop_file_list)) if (!NILP (drag_and_drop_file_list))
{ {
...@@ -12624,7 +12624,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) ...@@ -12624,7 +12624,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected)
else else
f = ((mac_output *) GetWRefCon (wp))->mFP; f = ((mac_output *) GetWRefCon (wp))->mFP;
bufp->kind = drag_n_drop; bufp->kind = DRAG_N_DROP_EVENT;
bufp->code = 0; bufp->code = 0;
bufp->timestamp = er.when * (1000 / 60); bufp->timestamp = er.when * (1000 / 60);
/* ticks to milliseconds */ /* ticks to milliseconds */
......
...@@ -3362,9 +3362,9 @@ dos_rawgetc () ...@@ -3362,9 +3362,9 @@ dos_rawgetc ()
} }
if (code >= 0x100) if (code >= 0x100)
event.kind = non_ascii_keystroke; event.kind = NON_ASCII_KEYSTROKE_EVENT;
else else
event.kind = ascii_keystroke; event.kind = ASCII_KEYSTROKE_EVENT;
event.code = code; event.code = code;
event.modifiers = modifiers; event.modifiers = modifiers;
event.frame_or_window = selected_frame; event.frame_or_window = selected_frame;
...@@ -3473,7 +3473,7 @@ dos_rawgetc () ...@@ -3473,7 +3473,7 @@ dos_rawgetc ()
} }
} }
event.kind = mouse_click; event.kind = MOUSE_CLICK_EVENT;
event.code = button_num; event.code = button_num;
event.modifiers = dos_get_modifiers (0) event.modifiers = dos_get_modifiers (0)
| (press ? down_modifier : up_modifier); | (press ? down_modifier : up_modifier);
......
...@@ -201,10 +201,10 @@ extern void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME)); ...@@ -201,10 +201,10 @@ extern void (*judge_scroll_bars_hook) P_ ((struct frame *FRAME));
enum event_kind enum event_kind
{ {
no_event, /* nothing happened. This should never NO_EVENT, /* nothing happened. This should never
actually appear in the event queue. */ actually appear in the event queue. */
ascii_keystroke, /* The ASCII code is in .code, perhaps ASCII_KEYSTROKE_EVENT, /* The ASCII code is in .code, perhaps
with modifiers applied. with modifiers applied.
.modifiers holds the state of the .modifiers holds the state of the
modifier keys. modifier keys.
...@@ -212,13 +212,13 @@ enum event_kind ...@@ -212,13 +212,13 @@ enum event_kind
which the key was typed. which the key was typed.
.timestamp gives a timestamp (in .timestamp gives a timestamp (in
milliseconds) for the keystroke. */ milliseconds) for the keystroke. */
multibyte_char_keystroke, /* The multibye char code is in .code, MULTIBYTE_CHAR_KEYSTROKE_EVENT, /* The multibyte char code is in .code,
perhaps with modifiers applied. perhaps with modifiers applied.
The others are the same as The others are the same as
ascii_keystroke. This type of event ASCII_KEYSTROKE_EVENT. This type of event
is generated only when we are using is generated only when we are using
XIM on X window. */ XIM on X window. */
non_ascii_keystroke, /* .code is a number identifying the NON_ASCII_KEYSTROKE_EVENT, /* .code is a number identifying the
function key. A code N represents function key. A code N represents
a key whose name is a key whose name is
function_key_names[N]; function_key_names function_key_names[N]; function_key_names
...@@ -230,8 +230,8 @@ enum event_kind ...@@ -230,8 +230,8 @@ enum event_kind
which the key was typed. which the key was typed.
.timestamp gives a timestamp (in .timestamp gives a timestamp (in
milliseconds) for the keystroke. */ milliseconds) for the keystroke. */
timer_event, /* A timer fired. */ TIMER_EVENT, /* A timer fired. */
mouse_click, /* The button number is in .code; it must MOUSE_CLICK_EVENT, /* The button number is in .code; it must
be >= 0 and < NUM_MOUSE_BUTTONS, defined be >= 0 and < NUM_MOUSE_BUTTONS, defined
below. below.
.modifiers holds the state of the .modifiers holds the state of the
...@@ -243,7 +243,7 @@ enum event_kind ...@@ -243,7 +243,7 @@ enum event_kind
.timestamp gives a timestamp (in .timestamp gives a timestamp (in
milliseconds) for the click. */ milliseconds) for the click. */
#ifdef WINDOWSNT #ifdef WINDOWSNT
mouse_wheel, /* A mouse-wheel event is generated MOUSE_WHEEL_EVENT, /* A mouse-wheel event is generated
on WINDOWSNT by a on WINDOWSNT by a
wheel on a mouse (e.g., MS Intellimouse). wheel on a mouse (e.g., MS Intellimouse).
The event contains a delta that corresponds The event contains a delta that corresponds
...@@ -259,12 +259,12 @@ enum event_kind ...@@ -259,12 +259,12 @@ enum event_kind
the wheel event occurred in. the wheel event occurred in.
.timestamp gives a timestamp (in .timestamp gives a timestamp (in
milliseconds) for the wheel event. */ milliseconds) for the wheel event. */
language_change_event, /* A language_change event is generated LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is generated
on WINDOWSNT when the keyboard layout on WINDOWSNT when the keyboard layout
or input language is changed by the or input language is changed by the
user. */ user. */
#endif #endif
scroll_bar_click, /* .code gives the number of the mouse button SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button
that was clicked. that was clicked.
.modifiers holds the state of the modifier .modifiers holds the state of the modifier
keys. keys.
...@@ -278,23 +278,23 @@ enum event_kind ...@@ -278,23 +278,23 @@ enum event_kind
.timestamp gives a timestamp (in .timestamp gives a timestamp (in
milliseconds) for the click. */ milliseconds) for the click. */
#ifdef WINDOWSNT #ifdef WINDOWSNT
w32_scroll_bar_click, /* as for scroll_bar_click, but only generated W32_SCROLL_BAR_CLICK_EVENT, /* as for SCROLL_BAR_CLICK, but only generated
by MS-Windows scroll bar controls. */ by MS-Windows scroll bar controls. */
#endif #endif
selection_request_event, /* Another X client wants a selection from us. SELECTION_REQUEST_EVENT, /* Another X client wants a selection from us.
See `struct selection_event'. */ See `struct selection_event'. */
selection_clear_event, /* Another X client cleared our selection. */ SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */
buffer_switch_event, /* A process filter has switched buffers. */ BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */
delete_window_event, /* An X client said "delete this window". */ DELETE_WINDOW_EVENT, /* An X client said "delete this window". */
MENU_BAR_EVENT, /* An event generated by the menu bar. MENU_BAR_EVENT, /* An event generated by the menu bar.
The frame_or_window field's cdr holds the The frame_or_window field's cdr holds the
Lisp-level event value. Lisp-level event value.
(Only the toolkit version uses these.) */ (Only the toolkit version uses these.) */
iconify_event, /* An X client iconified this window. */ ICONIFY_EVENT, /* An X client iconified this window. */
deiconify_event, /* An X client deiconified this window. */ DEICONIFY_EVENT, /* An X client deiconified this window. */
menu_bar_activate_event, /* A button press in the menu bar MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar
(toolkit version only). */ (toolkit version only). */
drag_n_drop, /* A drag-n-drop event is generated when DRAG_N_DROP_EVENT, /* A drag-n-drop event is generated when
files selected outside of Emacs are dropped files selected outside of Emacs are dropped
onto an Emacs window. onto an Emacs window.
Currently used only on Windows NT. Currently used only on Windows NT.
...@@ -330,11 +330,11 @@ enum event_kind ...@@ -330,11 +330,11 @@ enum event_kind
/* Queued from XTread_socket when session manager sends /* Queued from XTread_socket when session manager sends
save yourself before shutdown. */ save yourself before shutdown. */
save_session_event SAVE_SESSION_EVENT
}; };
/* If a struct input_event has a kind which is selection_request_event /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
or selection_clear_event, then its contents are really described or SELECTION_CLEAR_EVENT, then its contents are really described
by `struct selection_event'; see xterm.h. */ by `struct selection_event'; see xterm.h. */
/* The keyboard input buffer is an array of these structures. Each one /* The keyboard input buffer is an array of these structures. Each one
...@@ -347,9 +347,9 @@ struct input_event ...@@ -347,9 +347,9 @@ struct input_event
/* What kind of event was this? */ /* What kind of event was this? */
enum event_kind kind; enum event_kind kind;
/* For an ascii_keystroke and multibyte_char_keystroke, this is the /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
character. this is the character.
For a non_ascii_keystroke, this is the keysym code. For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
For a mouse event, this is the button number. */ For a mouse event, this is the button number. */
/* In WindowsNT, for a mouse wheel event, this is the delta. */ /* In WindowsNT, for a mouse wheel event, this is the delta. */
int code; int code;
......
...@@ -935,7 +935,7 @@ on the left of the dialog box and all following items on the right. ...@@ -935,7 +935,7 @@ on the left of the dialog box and all following items on the right.
/* Activate the menu bar of frame F. /* Activate the menu bar of frame F.
This is called from keyboard.c when it gets the This is called from keyboard.c when it gets the
menu_bar_activate_event out of the Emacs event queue. MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
To activate the menu bar, we signal to the input thread that it can To activate the menu bar, we signal to the input thread that it can
return from the WM_INITMENU message, allowing the normal Windows return from the WM_INITMENU message, allowing the normal Windows
......
...@@ -6188,9 +6188,9 @@ construct_mouse_click (result, msg, f) ...@@ -6188,9 +6188,9 @@ construct_mouse_click (result, msg, f)
parse_button (msg->msg.message, HIWORD (msg->msg.wParam), parse_button (msg->msg.message, HIWORD (msg->msg.wParam),
&button, &up); &button, &up);
/* Make the event type no_event; we'll change that when we decide /* Make the event type NO_EVENT; we'll change that when we decide
otherwise. */ otherwise. */
result->kind = mouse_click; result->kind = MOUSE_CLICK_EVENT;
result->code = button; result->code = button;
result->timestamp = msg->msg.time; result->timestamp = msg->msg.time;
result->modifiers = (msg->dwModifiers result->modifiers = (msg->dwModifiers
...@@ -6212,7 +6212,7 @@ construct_mouse_wheel (result, msg, f) ...@@ -6212,7 +6212,7 @@ construct_mouse_wheel (result, msg, f)
struct frame *f; struct frame *f;
{ {
POINT p; POINT p;
result->kind = mouse_wheel; result->kind = MOUSE_WHEEL_EVENT;
result->code = (short) HIWORD (msg->msg.wParam); result->code = (short) HIWORD (msg->msg.wParam);
result->timestamp = msg->msg.time; result->timestamp = msg->msg.time;
result->modifiers = msg->dwModifiers; result->modifiers = msg->dwModifiers;
...@@ -6240,7 +6240,7 @@ construct_drag_n_drop (result, msg, f) ...@@ -6240,7 +6240,7 @@ construct_drag_n_drop (result, msg, f)
char *name; char *name;
int i, len; int i, len;
result->kind = drag_n_drop; result->kind = DRAG_N_DROP_EVENT;
result->code = 0; result->code = 0;
result->timestamp = msg->msg.time; result->timestamp = msg->msg.time;
result->modifiers = msg->dwModifiers; result->modifiers = msg->dwModifiers;
...@@ -8319,7 +8319,7 @@ w32_judge_scroll_bars (f) ...@@ -8319,7 +8319,7 @@ w32_judge_scroll_bars (f)
} }
/* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind /* Handle a mouse click on the scroll bar BAR. If *EMACS_EVENT's kind
is set to something other than no_event, it is enqueued. is set to something other than NO_EVENT, it is enqueued.
This may be called from a signal handler, so we have to ignore GC This may be called from a signal handler, so we have to ignore GC
mark bits. */ mark bits. */
...@@ -8333,7 +8333,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event) ...@@ -8333,7 +8333,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event)
if (! GC_WINDOWP (bar->window)) if (! GC_WINDOWP (bar->window))
abort (); abort ();
emacs_event->kind = w32_scroll_bar_click; emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
emacs_event->code = 0; emacs_event->code = 0;
/* not really meaningful to distinguish up/down */ /* not really meaningful to distinguish up/down */
emacs_event->modifiers = msg->dwModifiers; emacs_event->modifiers = msg->dwModifiers;
...@@ -8433,7 +8433,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event) ...@@ -8433,7 +8433,7 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event)
} }
/* fall through */ /* fall through */
default: default:
emacs_event->kind = no_event; emacs_event->kind = NO_EVENT;
return FALSE; return FALSE;
} }
...@@ -8634,7 +8634,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8634,7 +8634,7 @@ w32_read_socket (sd, bufp, numchars, expected)
visibility changes properly. */ visibility changes properly. */
if (f->iconified) if (f->iconified)
{ {
bufp->kind = deiconify_event; bufp->kind = DEICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp++; bufp++;
...@@ -8672,7 +8672,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8672,7 +8672,7 @@ w32_read_socket (sd, bufp, numchars, expected)
if (numchars == 0) if (numchars == 0)
abort (); abort ();
bufp->kind = language_change_event; bufp->kind = LANGUAGE_CHANGE_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp->code = msg.msg.wParam; bufp->code = msg.msg.wParam;
...@@ -8698,7 +8698,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8698,7 +8698,7 @@ w32_read_socket (sd, bufp, numchars, expected)
if (temp_index == sizeof temp_buffer / sizeof (short)) if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0; temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam; temp_buffer[temp_index++] = msg.msg.wParam;
bufp->kind = non_ascii_keystroke; bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
bufp->code = msg.msg.wParam; bufp->code = msg.msg.wParam;
bufp->modifiers = msg.dwModifiers; bufp->modifiers = msg.dwModifiers;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
...@@ -8725,7 +8725,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8725,7 +8725,7 @@ w32_read_socket (sd, bufp, numchars, expected)
if (temp_index == sizeof temp_buffer / sizeof (short)) if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0; temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam; temp_buffer[temp_index++] = msg.msg.wParam;
bufp->kind = ascii_keystroke; bufp->kind = ASCII_KEYSTROKE_EVENT;
bufp->code = msg.msg.wParam; bufp->code = msg.msg.wParam;
bufp->modifiers = msg.dwModifiers; bufp->modifiers = msg.dwModifiers;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
...@@ -8799,7 +8799,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8799,7 +8799,7 @@ w32_read_socket (sd, bufp, numchars, expected)
int button; int button;
int up; int up;
emacs_event.kind = no_event; emacs_event.kind = NO_EVENT;
if (dpyinfo->grabbed && last_mouse_frame if (dpyinfo->grabbed && last_mouse_frame
&& FRAME_LIVE_P (last_mouse_frame)) && FRAME_LIVE_P (last_mouse_frame))
...@@ -8991,7 +8991,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -8991,7 +8991,7 @@ w32_read_socket (sd, bufp, numchars, expected)
f->async_visible = 0; f->async_visible = 0;
f->async_iconified = 1; f->async_iconified = 1;
bufp->kind = iconify_event; bufp->kind = ICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp++; bufp++;
...@@ -9021,7 +9021,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -9021,7 +9021,7 @@ w32_read_socket (sd, bufp, numchars, expected)
f->output_data.w32->left_pos = x; f->output_data.w32->left_pos = x;
f->output_data.w32->top_pos = y; f->output_data.w32->top_pos = y;
bufp->kind = deiconify_event; bufp->kind = DEICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp++; bufp++;
...@@ -9169,7 +9169,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -9169,7 +9169,7 @@ w32_read_socket (sd, bufp, numchars, expected)
if (numchars == 0) if (numchars == 0)
abort (); abort ();
bufp->kind = delete_window_event; bufp->kind = DELETE_WINDOW_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp++; bufp++;
...@@ -9186,7 +9186,7 @@ w32_read_socket (sd, bufp, numchars, expected) ...@@ -9186,7 +9186,7 @@ w32_read_socket (sd, bufp, numchars, expected)
if (numchars == 0) if (numchars == 0)
abort (); abort ();
bufp->kind = menu_bar_activate_event; bufp->kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (bufp->frame_or_window, f); XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil; bufp->arg = Qnil;
bufp++; bufp++;
......
...@@ -1105,7 +1105,7 @@ popup_get_selection (initial_event, dpyinfo, id) ...@@ -1105,7 +1105,7 @@ popup_get_selection (initial_event, dpyinfo, id)
/* Activate the menu bar of frame F. /* Activate the menu bar of frame F.
This is called from keyboard.c when it gets the This is called from keyboard.c when it gets the
menu_bar_activate_event out of the Emacs event queue. MENU_BAR_ACTIVATE_EVENT out of the Emacs event queue.
To activate the menu bar, we use the X button-press event To activate the menu bar, we use the X button-press event
that was saved in saved_menu_event. that was saved in saved_menu_event.
......
...@@ -57,15 +57,15 @@ Boston, MA 02111-1307, USA. */ ...@@ -57,15 +57,15 @@ Boston, MA 02111-1307, USA. */
extern Lisp_Object Vuser_login_name; extern Lisp_Object Vuser_login_name;
/* This is the event used when save_session occurs */ /* This is the event used when SAVE_SESSION_EVENT occurs. */
static struct input_event emacs_event; static struct input_event emacs_event;
/* The descriptor that we use to check for data from the session manager. */ /* The descriptor that we use to check for data from the session manager. */
static int ice_fd = -1; static int ice_fd = -1;
/* A flag that says if we are in shutdown interactions or not. */ /* A flag that says if we are in shutdown interactions or not. */
static int doing_interact = False; static int doing_interact = False;
...@@ -98,7 +98,7 @@ Lisp_Object Vx_session_previous_id; ...@@ -98,7 +98,7 @@ Lisp_Object Vx_session_previous_id;
open to a session manager, just return 0. open to a session manager, just return 0.
Otherwise returns the number of events stored in buffer BUFP, Otherwise returns the number of events stored in buffer BUFP,
which can hold up to *NUMCHARS characters. At most one event is which can hold up to *NUMCHARS characters. At most one event is
stored, an save_session_event. */ stored, an SAVE_SESSION_EVENT. */
int int
x_session_check_input (bufp, numchars) x_session_check_input (bufp, numchars)
struct input_event *bufp; struct input_event *bufp;
...@@ -117,9 +117,9 @@ x_session_check_input (bufp, numchars) ...@@ -117,9 +117,9 @@ x_session_check_input (bufp, numchars)
/* Reset this so wo can check kind after callbacks have been called by /* Reset this so wo can check kind after callbacks have been called by
IceProcessMessages. The smc_interact_CB sets the kind to IceProcessMessages. The smc_interact_CB sets the kind to
save_session_event, but we don't know beforehand if that callback SAVE_SESSION_EVENT, but we don't know beforehand if that callback
will be called. */ will be called. */
emacs_event.kind = no_event; emacs_event.kind = NO_EVENT;
if (select (ice_fd+1, &read_fds, if (select (ice_fd+1, &read_fds,
(SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0) (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
...@@ -135,8 +135,8 @@ x_session_check_input (bufp, numchars) ...@@ -135,8 +135,8 @@ x_session_check_input (bufp, numchars)
/* Check if smc_interact_CB was called and we shall generate a /* Check if smc_interact_CB was called and we shall generate a
save_session event. */ SAVE_SESSION_EVENT. */
if (*numchars > 0 && emacs_event.kind != no_event) if (*numchars > 0 && emacs_event.kind != NO_EVENT)
{ {
bcopy (&emacs_event, bufp, sizeof (struct input_event)); bcopy (&emacs_event, bufp, sizeof (struct input_event));
bufp++; bufp++;
...@@ -156,7 +156,7 @@ x_session_have_connection () ...@@ -156,7 +156,7 @@ x_session_have_connection ()
} }
/* This is called when the session manager says it is OK to interact with the /* This is called when the session manager says it is OK to interact with the
user. Here we set the kind to save_session so an event is generated. user. Here we set the kind to SAVE_SESSION_EVENT so an event is generated.