queue. That way, they'll be dequeued as dead frames or windows,
but still valid Lisp objects.
- If kbd_buffer[i].kind != no_event, then
+ If kbd_buffer[i].kind != NO_EVENT, then
AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window.
AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */
kbd_buffer_store_event (event)
register struct input_event *event;
{
- if (event->kind == no_event)
+ if (event->kind == NO_EVENT)
abort ();
- if (event->kind == ascii_keystroke)
+ if (event->kind == ASCII_KEYSTROKE_EVENT)
{
register int c = event->code & 0377;
if (event_to_kboard (sp) == kb)
{
- sp->kind = no_event;
+ sp->kind = NO_EVENT;
sp->frame_or_window = Qnil;
sp->arg = Qnil;
}
return;
}
}
- /* Don't insert two buffer_switch_event's in a row.
+ /* Don't insert two BUFFER_SWITCH_EVENT's in a row.
Just ignore the second one. */
- else if (event->kind == buffer_switch_event
+ else if (event->kind == BUFFER_SWITCH_EVENT
&& kbd_fetch_ptr != kbd_store_ptr
- && kbd_store_ptr->kind == buffer_switch_event)
+ && kbd_store_ptr->kind == BUFFER_SWITCH_EVENT)
return;
if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE)
{
int idx;
-#if 0 /* The selection_request_event case looks bogus, and it's error
+#if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error
prone to assign individual members for other events, in case
the input_event structure is changed. --2000-07-13, gerd. */
struct input_event *sp = kbd_store_ptr;
sp->kind = event->kind;
- if (event->kind == selection_request_event)
+ if (event->kind == SELECTION_REQUEST_EVENT)
{
/* We must not use the ordinary copying code for this case,
since `part' is an enum and copying it might not copy enough
\f
/* Discard any mouse events in the event buffer by setting them to
- no_event. */
+ NO_EVENT. */
void
discard_mouse_events ()
{
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
sp = kbd_buffer;
- if (sp->kind == mouse_click
+ if (sp->kind == MOUSE_CLICK_EVENT
#ifdef WINDOWSNT
- || sp->kind == w32_scroll_bar_click
+ || sp->kind == W32_SCROLL_BAR_CLICK_EVENT
#endif
- || sp->kind == scroll_bar_click)
+ || sp->kind == SCROLL_BAR_CLICK_EVENT)
{
- sp->kind = no_event;
+ sp->kind = NO_EVENT;
}
}
}
/* Return non-zero if there are any real events waiting in the event
- buffer, not counting `no_event's.
+ buffer, not counting `NO_EVENT's.
- If DISCARD is non-zero, discard no_event events at the front of
+ If DISCARD is non-zero, discard NO_EVENT events at the front of
the input queue, possibly leaving the input queue empty if there
are no real input events. */
struct input_event *sp;
for (sp = kbd_fetch_ptr;
- sp != kbd_store_ptr && sp->kind == no_event;
+ sp != kbd_store_ptr && sp->kind == NO_EVENT;
++sp)
{
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
if (discard)
kbd_fetch_ptr = sp;
- return sp != kbd_store_ptr && sp->kind != no_event;
+ return sp != kbd_store_ptr && sp->kind != NO_EVENT;
}
\f
int idx = 2 * (event - kbd_buffer);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
- event->kind = no_event;
+ event->kind = NO_EVENT;
}
/* These two kinds of events get special handling
and don't actually appear to the command loop.
We return nil for them. */
- if (event->kind == selection_request_event)
+ if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
#endif
}
- else if (event->kind == selection_clear_event)
+ else if (event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
#endif
}
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
- else if (event->kind == delete_window_event)
+ else if (event->kind == DELETE_WINDOW_EVENT)
{
/* Make an event (delete-frame (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
}
#endif
#if defined (HAVE_X11) || defined (HAVE_NTGUI)
- else if (event->kind == iconify_event)
+ else if (event->kind == ICONIFY_EVENT)
{
/* Make an event (iconify-frame (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
kbd_fetch_ptr = event + 1;
}
- else if (event->kind == deiconify_event)
+ else if (event->kind == DEICONIFY_EVENT)
{
/* Make an event (make-frame-visible (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
kbd_fetch_ptr = event + 1;
}
#endif
- else if (event->kind == buffer_switch_event)
+ else if (event->kind == BUFFER_SWITCH_EVENT)
{
/* The value doesn't matter here; only the type is tested. */
XSETBUFFER (obj, current_buffer);
kbd_fetch_ptr = event + 1;
}
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
- else if (event->kind == menu_bar_activate_event)
+ else if (event->kind == MENU_BAR_ACTIVATE_EVENT)
{
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
}
#endif
#ifdef WINDOWSNT
- else if (event->kind == language_change_event)
+ else if (event->kind == LANGUAGE_CHANGE_EVENT)
{
/* Make an event (language-change (FRAME CHARSET LCID)). */
obj = Fcons (event->modifiers, Qnil);
kbd_fetch_ptr = event + 1;
}
#endif
- else if (event->kind == save_session_event)
+ else if (event->kind == SAVE_SESSION_EVENT)
{
obj = Fcons (Qsave_session, Qnil);
kbd_fetch_ptr = event + 1;
(They shouldn't otherwise be found in the buffer,
but on some machines it appears they do show up
even without MULTI_KBOARD.) */
- /* On Windows NT/9X, no_event is used to delete extraneous
+ /* On Windows NT/9X, NO_EVENT is used to delete extraneous
mouse events during a popup-menu call. */
- else if (event->kind == no_event)
+ else if (event->kind == NO_EVENT)
kbd_fetch_ptr = event + 1;
else if (event->kind == HELP_EVENT)
{
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
- if (event->kind == selection_request_event)
+ if (event->kind == SELECTION_REQUEST_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
#endif
}
- else if (event->kind == selection_clear_event)
+ else if (event->kind == SELECTION_CLEAR_EVENT)
{
#ifdef HAVE_X11
struct input_event copy;
switch (SWITCH_ENUM_CAST (event->kind))
{
/* A simple keystroke. */
- case ascii_keystroke:
+ case ASCII_KEYSTROKE_EVENT:
{
Lisp_Object lispy_c;
int c = event->code & 0377;
return lispy_c;
}
- case multibyte_char_keystroke:
+ case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
{
Lisp_Object lispy_c;
/* A function key. The symbol may need to have modifier prefixes
tacked onto it. */
- case non_ascii_keystroke:
+ case NON_ASCII_KEYSTROKE_EVENT:
button_down_time = 0;
for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
#ifdef HAVE_MOUSE
/* A mouse click. Figure out where it is, decide whether it's
a press, click or drag, and build the appropriate structure. */
- case mouse_click:
+ case MOUSE_CLICK_EVENT:
#ifndef USE_TOOLKIT_SCROLL_BARS
- case scroll_bar_click:
+ case SCROLL_BAR_CLICK_EVENT:
#endif
{
int button = event->code;
position = Qnil;
/* Build the position as appropriate for this mouse click. */
- if (event->kind == mouse_click)
+ if (event->kind == MOUSE_CLICK_EVENT)
{
int part;
struct frame *f = XFRAME (event->frame_or_window);
index of type `enum scroll_bar_part' which we can use as an
index in scroll_bar_parts to get the appropriate symbol. */
- case scroll_bar_click:
+ case SCROLL_BAR_CLICK_EVENT:
{
Lisp_Object position, head, window, portion_whole, part;
#endif /* USE_TOOLKIT_SCROLL_BARS */
#ifdef WINDOWSNT
- case w32_scroll_bar_click:
+ case W32_SCROLL_BAR_CLICK_EVENT:
{
int button = event->code;
int is_double;
Qnil));
}
}
- case mouse_wheel:
+ case MOUSE_WHEEL_EVENT:
{
int part;
FRAME_PTR f = XFRAME (event->frame_or_window);
}
#endif /* WINDOWSNT */
- case drag_n_drop:
+ case DRAG_N_DROP_EVENT:
{
int part;
FRAME_PTR f;
/* A user signal. */
return *lispy_user_signals[event->code];
- case save_session_event:
+ case SAVE_SESSION_EVENT:
return Qsave_session;
/* The 'kind' field of the event is something we don't recognize. */
#endif
}
-/* Put a buffer_switch_event in the buffer
+/* Put a BUFFER_SWITCH_EVENT in the buffer
so that read_key_sequence will notice the new current buffer. */
void
struct input_event event;
Lisp_Object tem;
- event.kind = buffer_switch_event;
+ event.kind = BUFFER_SWITCH_EVENT;
event.frame_or_window = Qnil;
event.arg = Qnil;
#endif /* no FIONREAD */
for (i = 0; i < nread; i++)
{
- buf[i].kind = ascii_keystroke;
+ buf[i].kind = ASCII_KEYSTROKE_EVENT;
buf[i].modifiers = 0;
if (meta_key == 1 && (cbuf[i] & 0x80))
buf[i].modifiers = meta_modifier;
kbd_buffer_store_event (&buf[i]);
/* Don't look at input that follows a C-g too closely.
This reduces lossage due to autorepeat on C-g. */
- if (buf[i].kind == ascii_keystroke
+ if (buf[i].kind == ASCII_KEYSTROKE_EVENT
&& buf[i].code == quit_char)
break;
}
if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
kbd_fetch_ptr = kbd_buffer;
- if (kbd_fetch_ptr->kind == ascii_keystroke)
+ if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT)
stuff_char (kbd_fetch_ptr->code);
- kbd_fetch_ptr->kind = no_event;
+ kbd_fetch_ptr->kind = NO_EVENT;
idx = 2 * (kbd_fetch_ptr - kbd_buffer);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
{
Point mouseLoc;
- result->kind = mouse_click;
+ result->kind = MOUSE_CLICK_EVENT;
result->code = 0; /* only one mouse button */
result->timestamp = event->when;
result->modifiers = event->what == mouseDown ? down_modifier : up_modifier;
}
/* 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
mark bits. */
if (! GC_WINDOWP (bar->window))
abort ();
- bufp->kind = scroll_bar_click;
+ bufp->kind = SCROLL_BAR_CLICK_EVENT;
bufp->frame_or_window = bar->window;
bufp->arg = Qnil;
GlobalToLocal (&mouse_loc);
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->part = scroll_bar_handle;
bufp->modifiers = up_modifier;
struct frame *f = ((mac_output *)
GetWRefCon (FrontWindow ()))->mFP;
saved_menu_event_location = er.where;
- bufp->kind = menu_bar_activate_event;
+ bufp->kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (bufp->frame_or_window, f);
count++;
}
}
else
{
- bufp->kind = mouse_click;
+ bufp->kind = MOUSE_CLICK_EVENT;
XSETFRAME (bufp->frame_or_window, mwp->mFP);
if (er.what == mouseDown)
mouse_tracking_in_progress
case inGoAway:
if (TrackGoAway (window_ptr, er.where))
{
- bufp->kind = delete_window_event;
+ bufp->kind = DELETE_WINDOW_EVENT;
XSETFRAME (bufp->frame_or_window,
((mac_output *) GetWRefCon (window_ptr))->mFP);
count++;
if (keycode == 0x33) /* delete key (charCode translated to 0x8) */
{
bufp->code = 0x7f;
- bufp->kind = ascii_keystroke;
+ bufp->kind = ASCII_KEYSTROKE_EVENT;
}
else if (keycode_to_xkeysym (keycode, &xkeysym))
{
bufp->code = 0xff00 | xkeysym;
- bufp->kind = non_ascii_keystroke;
+ bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
}
else
{
}
else
bufp->code = er.message & charCodeMask;
- bufp->kind = ascii_keystroke;
+ bufp->kind = ASCII_KEYSTROKE_EVENT;
}
}
Mac keyboard to be used to enter non-ASCII iso-latin-1
characters directly. */
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;
OSStatus the_err = noErr;
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. */
if (!NILP (drag_and_drop_file_list))
{
else
f = ((mac_output *) GetWRefCon (wp))->mFP;
- bufp->kind = drag_n_drop;
+ bufp->kind = DRAG_N_DROP_EVENT;
bufp->code = 0;
bufp->timestamp = er.when * (1000 / 60);
/* ticks to milliseconds */
}
if (code >= 0x100)
- event.kind = non_ascii_keystroke;
+ event.kind = NON_ASCII_KEYSTROKE_EVENT;
else
- event.kind = ascii_keystroke;
+ event.kind = ASCII_KEYSTROKE_EVENT;
event.code = code;
event.modifiers = modifiers;
event.frame_or_window = selected_frame;
}
}
- event.kind = mouse_click;
+ event.kind = MOUSE_CLICK_EVENT;
event.code = button_num;
event.modifiers = dos_get_modifiers (0)
| (press ? down_modifier : up_modifier);
enum event_kind
{
- no_event, /* nothing happened. This should never
+ NO_EVENT, /* nothing happened. This should never
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.
.modifiers holds the state of the
modifier keys.
which the key was typed.
.timestamp gives a timestamp (in
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.
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
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
a key whose name is
function_key_names[N]; function_key_names
which the key was typed.
.timestamp gives a timestamp (in
milliseconds) for the keystroke. */
- timer_event, /* A timer fired. */
- mouse_click, /* The button number is in .code; it must
+ TIMER_EVENT, /* A timer fired. */
+ MOUSE_CLICK_EVENT, /* The button number is in .code; it must
be >= 0 and < NUM_MOUSE_BUTTONS, defined
below.
.modifiers holds the state of the
.timestamp gives a timestamp (in
milliseconds) for the click. */
#ifdef WINDOWSNT
- mouse_wheel, /* A mouse-wheel event is generated
+ MOUSE_WHEEL_EVENT, /* A mouse-wheel event is generated
on WINDOWSNT by a
wheel on a mouse (e.g., MS Intellimouse).
The event contains a delta that corresponds
the wheel event occurred in.
.timestamp gives a timestamp (in
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
or input language is changed by the
user. */
#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.
.modifiers holds the state of the modifier
keys.
.timestamp gives a timestamp (in
milliseconds) for the click. */
#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. */
#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'. */
- selection_clear_event, /* Another X client cleared our selection. */
- buffer_switch_event, /* A process filter has switched buffers. */
- delete_window_event, /* An X client said "delete this window". */
+ SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */
+ BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */
+ DELETE_WINDOW_EVENT, /* An X client said "delete this window". */
MENU_BAR_EVENT, /* An event generated by the menu bar.
The frame_or_window field's cdr holds the
Lisp-level event value.
(Only the toolkit version uses these.) */
- iconify_event, /* An X client iconified this window. */
- deiconify_event, /* An X client deiconified this window. */
- menu_bar_activate_event, /* A button press in the menu bar
+ ICONIFY_EVENT, /* An X client iconified this window. */
+ DEICONIFY_EVENT, /* An X client deiconified this window. */
+ MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar
(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
onto an Emacs window.
Currently used only on Windows NT.
/* Queued from XTread_socket when session manager sends
save yourself before shutdown. */
- save_session_event
+ SAVE_SESSION_EVENT
};
-/* If a struct input_event has a kind which is selection_request_event
- or selection_clear_event, then its contents are really described
+/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
+ or SELECTION_CLEAR_EVENT, then its contents are really described
by `struct selection_event'; see xterm.h. */
/* The keyboard input buffer is an array of these structures. Each one
/* What kind of event was this? */
enum event_kind kind;
- /* For an ascii_keystroke and multibyte_char_keystroke, this is the
- character.
- For a non_ascii_keystroke, this is the keysym code.
+ /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
+ this is the character.
+ For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
For a mouse event, this is the button number. */
/* In WindowsNT, for a mouse wheel event, this is the delta. */
int code;
/* Activate the menu bar of frame F.
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
return from the WM_INITMENU message, allowing the normal Windows
parse_button (msg->msg.message, HIWORD (msg->msg.wParam),
&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. */
- result->kind = mouse_click;
+ result->kind = MOUSE_CLICK_EVENT;
result->code = button;
result->timestamp = msg->msg.time;
result->modifiers = (msg->dwModifiers
struct frame *f;
{
POINT p;
- result->kind = mouse_wheel;
+ result->kind = MOUSE_WHEEL_EVENT;
result->code = (short) HIWORD (msg->msg.wParam);
result->timestamp = msg->msg.time;
result->modifiers = msg->dwModifiers;
char *name;
int i, len;
- result->kind = drag_n_drop;
+ result->kind = DRAG_N_DROP_EVENT;
result->code = 0;
result->timestamp = msg->msg.time;
result->modifiers = msg->dwModifiers;
}
/* 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
mark bits. */
if (! GC_WINDOWP (bar->window))
abort ();
- emacs_event->kind = w32_scroll_bar_click;
+ emacs_event->kind = W32_SCROLL_BAR_CLICK_EVENT;
emacs_event->code = 0;
/* not really meaningful to distinguish up/down */
emacs_event->modifiers = msg->dwModifiers;
}
/* fall through */
default:
- emacs_event->kind = no_event;
+ emacs_event->kind = NO_EVENT;
return FALSE;
}
visibility changes properly. */
if (f->iconified)
{
- bufp->kind = deiconify_event;
+ bufp->kind = DEICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (numchars == 0)
abort ();
- bufp->kind = language_change_event;
+ bufp->kind = LANGUAGE_CHANGE_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp->code = msg.msg.wParam;
if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam;
- bufp->kind = non_ascii_keystroke;
+ bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
bufp->code = msg.msg.wParam;
bufp->modifiers = msg.dwModifiers;
XSETFRAME (bufp->frame_or_window, f);
if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0;
temp_buffer[temp_index++] = msg.msg.wParam;
- bufp->kind = ascii_keystroke;
+ bufp->kind = ASCII_KEYSTROKE_EVENT;
bufp->code = msg.msg.wParam;
bufp->modifiers = msg.dwModifiers;
XSETFRAME (bufp->frame_or_window, f);
int button;
int up;
- emacs_event.kind = no_event;
+ emacs_event.kind = NO_EVENT;
if (dpyinfo->grabbed && last_mouse_frame
&& FRAME_LIVE_P (last_mouse_frame))
f->async_visible = 0;
f->async_iconified = 1;
- bufp->kind = iconify_event;
+ bufp->kind = ICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
f->output_data.w32->left_pos = x;
f->output_data.w32->top_pos = y;
- bufp->kind = deiconify_event;
+ bufp->kind = DEICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (numchars == 0)
abort ();
- bufp->kind = delete_window_event;
+ bufp->kind = DELETE_WINDOW_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (numchars == 0)
abort ();
- bufp->kind = menu_bar_activate_event;
+ bufp->kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
/* Activate the menu bar of frame F.
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
that was saved in saved_menu_event.
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;
-/* 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;
-/* 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;
open to a session manager, just return 0.
Otherwise returns the number of events stored in buffer BUFP,
which can hold up to *NUMCHARS characters. At most one event is
- stored, an save_session_event. */
+ stored, an SAVE_SESSION_EVENT. */
int
x_session_check_input (bufp, numchars)
struct input_event *bufp;
/* Reset this so wo can check kind after callbacks have been called by
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. */
- emacs_event.kind = no_event;
+ emacs_event.kind = NO_EVENT;
if (select (ice_fd+1, &read_fds,
(SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
/* Check if smc_interact_CB was called and we shall generate a
- save_session event. */
- if (*numchars > 0 && emacs_event.kind != no_event)
+ SAVE_SESSION_EVENT. */
+ if (*numchars > 0 && emacs_event.kind != NO_EVENT)
{
bcopy (&emacs_event, bufp, sizeof (struct input_event));
bufp++;
}
/* 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.
Then lisp code can interact with the user. */
static void
smc_interact_CB (smcConn, clientData)
SmPointer clientData;
{
doing_interact = True;
- emacs_event.kind = save_session_event;
+ emacs_event.kind = SAVE_SESSION_EVENT;
}
/* This is called when the session manager tells us to save ourself.
XButtonEvent *event;
struct frame *f;
{
- /* 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. */
- result->kind = mouse_click;
+ result->kind = MOUSE_CLICK_EVENT;
result->code = event->button - Button1;
result->timestamp = event->time;
result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f),
/* Action hook installed via XtAppAddActionHook when toolkit scroll
bars are used.. The hook is responsible for detecting when
the user ends an interaction with the scroll bar, and generates
- a `end-scroll' scroll_bar_click' event if so. */
+ a `end-scroll' SCROLL_BAR_CLICK_EVENT' event if so. */
static void
xt_action_hook (widget, client_data, action_name, event, params,
XSETWINDOW (window, w);
f = XFRAME (w->frame);
- ievent->kind = scroll_bar_click;
+ ievent->kind = SCROLL_BAR_CLICK_EVENT;
ievent->frame_or_window = window;
ievent->arg = Qnil;
ievent->timestamp = XtLastTimestampProcessed (FRAME_X_DISPLAY (f));
}
/* 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
mark bits. */
if (! GC_WINDOWP (bar->window))
abort ();
- emacs_event->kind = scroll_bar_click;
+ emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
emacs_event->code = event->xbutton.button - Button1;
emacs_event->modifiers
= (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO
bcopy (&event, f->output_data.x->saved_menu_event, size); \
if (numchars >= 1) \
{ \
- bufp->kind = menu_bar_activate_event; \
+ bufp->kind = MENU_BAR_ACTIVATE_EVENT; \
XSETFRAME (bufp->frame_or_window, f); \
bufp->arg = Qnil; \
bufp++; \
if (numchars == 0)
abort ();
- bufp->kind = delete_window_event;
+ bufp->kind = DELETE_WINDOW_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (numchars == 0)
abort ();
- bufp->kind = selection_clear_event;
+ bufp->kind = SELECTION_CLEAR_EVENT;
SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
SELECTION_EVENT_TIME (bufp) = eventp->time;
if (numchars == 0)
abort ();
- bufp->kind = selection_request_event;
+ bufp->kind = SELECTION_REQUEST_EVENT;
SELECTION_EVENT_DISPLAY (bufp) = eventp->display;
SELECTION_EVENT_REQUESTOR (bufp) = eventp->requestor;
SELECTION_EVENT_SELECTION (bufp) = eventp->selection;
{
f->async_iconified = 1;
- bufp->kind = iconify_event;
+ bufp->kind = ICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (f->iconified)
{
- bufp->kind = deiconify_event;
+ bufp->kind = DEICONIFY_EVENT;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
bufp++;
if (temp_index == sizeof temp_buffer / sizeof (short))
temp_index = 0;
temp_buffer[temp_index++] = keysym;
- bufp->kind = non_ascii_keystroke;
+ bufp->kind = NON_ASCII_KEYSTROKE_EVENT;
bufp->code = keysym;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
nbytes - i, len);
bufp->kind = (SINGLE_BYTE_CHAR_P (c)
- ? ascii_keystroke
- : multibyte_char_keystroke);
+ ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
bufp->code = c;
XSETFRAME (bufp->frame_or_window, f);
bufp->arg = Qnil;
struct input_event emacs_event;
int tool_bar_p = 0;
- emacs_event.kind = no_event;
+ emacs_event.kind = NO_EVENT;
bzero (&compose_status, sizeof (compose_status));
if (dpyinfo->grabbed
dpyinfo->grabbed &= ~(1 << event.xbutton.button);
}
- if (numchars >= 1 && emacs_event.kind != no_event)
+ if (numchars >= 1 && emacs_event.kind != NO_EVENT)
{
bcopy (&emacs_event, bufp, sizeof (struct input_event));
bufp++;