Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3b8f9651
Commit
3b8f9651
authored
Jun 13, 2002
by
Pavel Janík
Browse files
Rename enum event_kind items.
parent
df3eebcb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
135 additions
and
135 deletions
+135
-135
src/keyboard.c
src/keyboard.c
+49
-49
src/macterm.c
src/macterm.c
+13
-13
src/msdos.c
src/msdos.c
+3
-3
src/termhooks.h
src/termhooks.h
+25
-25
src/w32menu.c
src/w32menu.c
+1
-1
src/w32term.c
src/w32term.c
+16
-16
src/xmenu.c
src/xmenu.c
+1
-1
src/xsmfns.c
src/xsmfns.c
+10
-10
src/xterm.c
src/xterm.c
+17
-17
No files found.
src/keyboard.c
View file @
3b8f9651
...
@@ -505,7 +505,7 @@ static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
...
@@ -505,7 +505,7 @@ static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
queue. That way, they'll be dequeued as dead frames or windows,
queue. That way, they'll be dequeued as dead frames or windows,
but still valid Lisp objects.
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) == kbd_buffer[i].frame_or_window.
AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */
AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */
...
@@ -3330,10 +3330,10 @@ void
...
@@ -3330,10 +3330,10 @@ void
kbd_buffer_store_event (event)
kbd_buffer_store_event (event)
register struct input_event *event;
register struct input_event *event;
{
{
if (event->kind ==
no_event
)
if (event->kind ==
NO_EVENT
)
abort ();
abort ();
if (event->kind ==
ascii_keystroke
)
if (event->kind ==
ASCII_KEYSTROKE_EVENT
)
{
{
register int c = event->code & 0377;
register int c = event->code & 0377;
...
@@ -3366,7 +3366,7 @@ kbd_buffer_store_event (event)
...
@@ -3366,7 +3366,7 @@ kbd_buffer_store_event (event)
if (event_to_kboard (sp) == kb)
if (event_to_kboard (sp) == kb)
{
{
sp->kind =
no_event
;
sp->kind =
NO_EVENT
;
sp->frame_or_window = Qnil;
sp->frame_or_window = Qnil;
sp->arg = Qnil;
sp->arg = Qnil;
}
}
...
@@ -3400,11 +3400,11 @@ kbd_buffer_store_event (event)
...
@@ -3400,11 +3400,11 @@ kbd_buffer_store_event (event)
return;
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. */
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_fetch_ptr != kbd_store_ptr
&& kbd_store_ptr->kind ==
buffer_switch_event
)
&& kbd_store_ptr->kind ==
BUFFER_SWITCH_EVENT
)
return;
return;
if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE)
if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE)
...
@@ -3418,12 +3418,12 @@ kbd_buffer_store_event (event)
...
@@ -3418,12 +3418,12 @@ kbd_buffer_store_event (event)
{
{
int idx;
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
prone to assign individual members for other events, in case
the input_event structure is changed. --2000-07-13, gerd. */
the input_event structure is changed. --2000-07-13, gerd. */
struct input_event *sp = kbd_store_ptr;
struct input_event *sp = kbd_store_ptr;
sp->kind = event->kind;
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,
/* We must not use the ordinary copying code for this case,
since `part' is an enum and copying it might not copy enough
since `part' is an enum and copying it might not copy enough
...
@@ -3507,7 +3507,7 @@ kbd_buffer_store_help_event (frame, help)
...
@@ -3507,7 +3507,7 @@ kbd_buffer_store_help_event (frame, help)
/* Discard any mouse events in the event buffer by setting them to
/* Discard any mouse events in the event buffer by setting them to
no_event
. */
NO_EVENT
. */
void
void
discard_mouse_events ()
discard_mouse_events ()
{
{
...
@@ -3517,22 +3517,22 @@ discard_mouse_events ()
...
@@ -3517,22 +3517,22 @@ discard_mouse_events ()
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
sp = kbd_buffer;
sp = kbd_buffer;
if (sp->kind ==
mouse_click
if (sp->kind ==
MOUSE_CLICK_EVENT
#ifdef WINDOWSNT
#ifdef WINDOWSNT
|| sp->kind ==
w
32_
scroll_bar_click
|| sp->kind ==
W
32_
SCROLL_BAR_CLICK_EVENT
#endif
#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
/* 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
the input queue, possibly leaving the input queue empty if there
are no real input events. */
are no real input events. */
...
@@ -3543,7 +3543,7 @@ kbd_buffer_events_waiting (discard)
...
@@ -3543,7 +3543,7 @@ kbd_buffer_events_waiting (discard)
struct input_event *sp;
struct input_event *sp;
for (sp = kbd_fetch_ptr;
for (sp = kbd_fetch_ptr;
sp != kbd_store_ptr && sp->kind ==
no_event
;
sp != kbd_store_ptr && sp->kind ==
NO_EVENT
;
++sp)
++sp)
{
{
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
if (sp == kbd_buffer + KBD_BUFFER_SIZE)
...
@@ -3553,7 +3553,7 @@ kbd_buffer_events_waiting (discard)
...
@@ -3553,7 +3553,7 @@ kbd_buffer_events_waiting (discard)
if (discard)
if (discard)
kbd_fetch_ptr = sp;
kbd_fetch_ptr = sp;
return sp != kbd_store_ptr && sp->kind !=
no_event
;
return sp != kbd_store_ptr && sp->kind !=
NO_EVENT
;
}
}
...
@@ -3566,7 +3566,7 @@ clear_event (event)
...
@@ -3566,7 +3566,7 @@ clear_event (event)
int idx = 2 * (event - kbd_buffer);
int idx = 2 * (event - kbd_buffer);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
event->kind =
no_event
;
event->kind =
NO_EVENT
;
}
}
...
@@ -3671,7 +3671,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3671,7 +3671,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
/* These two kinds of events get special handling
/* These two kinds of events get special handling
and don't actually appear to the command loop.
and don't actually appear to the command loop.
We return nil for them. */
We return nil for them. */
if (event->kind ==
selection_request_event
)
if (event->kind ==
SELECTION_REQUEST_EVENT
)
{
{
#ifdef HAVE_X11
#ifdef HAVE_X11
struct input_event copy;
struct input_event copy;
...
@@ -3690,7 +3690,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3690,7 +3690,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
#endif
#endif
}
}
else if (event->kind ==
selection_clear_event
)
else if (event->kind ==
SELECTION_CLEAR_EVENT
)
{
{
#ifdef HAVE_X11
#ifdef HAVE_X11
struct input_event copy;
struct input_event copy;
...
@@ -3707,7 +3707,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3707,7 +3707,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
#endif
#endif
}
}
#if defined (HAVE_X11) || defined (HAVE_NTGUI) || defined (MAC_OS)
#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)). */
/* Make an event (delete-frame (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
obj = Fcons (event->frame_or_window, Qnil);
...
@@ -3716,14 +3716,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3716,14 +3716,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
}
}
#endif
#endif
#if defined (HAVE_X11) || defined (HAVE_NTGUI)
#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)). */
/* Make an event (iconify-frame (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
obj = Fcons (event->frame_or_window, Qnil);
obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
}
}
else if (event->kind ==
deiconify_event
)
else if (event->kind ==
DEICONIFY_EVENT
)
{
{
/* Make an event (make-frame-visible (FRAME)). */
/* Make an event (make-frame-visible (FRAME)). */
obj = Fcons (event->frame_or_window, Qnil);
obj = Fcons (event->frame_or_window, Qnil);
...
@@ -3731,14 +3731,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3731,14 +3731,14 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
}
}
#endif
#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. */
/* The value doesn't matter here; only the type is tested. */
XSETBUFFER (obj, current_buffer);
XSETBUFFER (obj, current_buffer);
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
}
}
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS)
#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;
kbd_fetch_ptr = event + 1;
input_pending = readable_events (0);
input_pending = readable_events (0);
...
@@ -3747,7 +3747,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3747,7 +3747,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
}
}
#endif
#endif
#ifdef WINDOWSNT
#ifdef WINDOWSNT
else if (event->kind ==
language_change_event
)
else if (event->kind ==
LANGUAGE_CHANGE_EVENT
)
{
{
/* Make an event (language-change (FRAME CHARSET LCID)). */
/* Make an event (language-change (FRAME CHARSET LCID)). */
obj = Fcons (event->modifiers, Qnil);
obj = Fcons (event->modifiers, Qnil);
...
@@ -3757,7 +3757,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3757,7 +3757,7 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
}
}
#endif
#endif
else if (event->kind ==
save_session_event
)
else if (event->kind ==
SAVE_SESSION_EVENT
)
{
{
obj = Fcons (Qsave_session, Qnil);
obj = Fcons (Qsave_session, Qnil);
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
...
@@ -3768,9 +3768,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
...
@@ -3768,9 +3768,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
(They shouldn't otherwise be found in the buffer,
(They shouldn't otherwise be found in the buffer,
but on some machines it appears they do show up
but on some machines it appears they do show up
even without MULTI_KBOARD.) */
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. */
mouse events during a popup-menu call. */
else if (event->kind ==
no_event
)
else if (event->kind ==
NO_EVENT
)
kbd_fetch_ptr = event + 1;
kbd_fetch_ptr = event + 1;
else if (event->kind == HELP_EVENT)
else if (event->kind == HELP_EVENT)
{
{
...
@@ -3938,7 +3938,7 @@ swallow_events (do_display)
...
@@ -3938,7 +3938,7 @@ swallow_events (do_display)
/* These two kinds of events get special handling
/* These two kinds of events get special handling
and don't actually appear to the command loop. */
and don't actually appear to the command loop. */
if (event->kind ==
selection_request_event
)
if (event->kind ==
SELECTION_REQUEST_EVENT
)
{
{
#ifdef HAVE_X11
#ifdef HAVE_X11
struct input_event copy;
struct input_event copy;
...
@@ -3957,7 +3957,7 @@ swallow_events (do_display)
...
@@ -3957,7 +3957,7 @@ swallow_events (do_display)
#endif
#endif
}
}
else if (event->kind ==
selection_clear_event
)
else if (event->kind ==
SELECTION_CLEAR_EVENT
)
{
{
#ifdef HAVE_X11
#ifdef HAVE_X11
struct input_event copy;
struct input_event copy;
...
@@ -4724,7 +4724,7 @@ make_lispy_event (event)
...
@@ -4724,7 +4724,7 @@ make_lispy_event (event)
switch (SWITCH_ENUM_CAST (event->kind))
switch (SWITCH_ENUM_CAST (event->kind))
{
{
/* A simple keystroke. */
/* A simple keystroke. */
case
ascii_keystroke
:
case
ASCII_KEYSTROKE_EVENT
:
{
{
Lisp_Object lispy_c;
Lisp_Object lispy_c;
int c = event->code & 0377;
int c = event->code & 0377;
...
@@ -4748,7 +4748,7 @@ make_lispy_event (event)
...
@@ -4748,7 +4748,7 @@ make_lispy_event (event)
return lispy_c;
return lispy_c;
}
}
case
multibyte_char_keystroke
:
case
MULTIBYTE_CHAR_KEYSTROKE_EVENT
:
{
{
Lisp_Object lispy_c;
Lisp_Object lispy_c;
...
@@ -4758,7 +4758,7 @@ make_lispy_event (event)
...
@@ -4758,7 +4758,7 @@ make_lispy_event (event)
/* A function key. The symbol may need to have modifier prefixes
/* A function key. The symbol may need to have modifier prefixes
tacked onto it. */
tacked onto it. */
case
non_ascii_keystroke
:
case
NON_ASCII_KEYSTROKE_EVENT
:
button_down_time = 0;
button_down_time = 0;
for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
...
@@ -4820,9 +4820,9 @@ make_lispy_event (event)
...
@@ -4820,9 +4820,9 @@ make_lispy_event (event)
#ifdef HAVE_MOUSE
#ifdef HAVE_MOUSE
/* A mouse click. Figure out where it is, decide whether it's
/* A mouse click. Figure out where it is, decide whether it's
a press, click or drag, and build the appropriate structure. */
a press, click or drag, and build the appropriate structure. */
case
mouse_click
:
case
MOUSE_CLICK_EVENT
:
#ifndef USE_TOOLKIT_SCROLL_BARS
#ifndef USE_TOOLKIT_SCROLL_BARS
case
scroll_bar_click
:
case
SCROLL_BAR_CLICK_EVENT
:
#endif
#endif
{
{
int button = event->code;
int button = event->code;
...
@@ -4835,7 +4835,7 @@ make_lispy_event (event)
...
@@ -4835,7 +4835,7 @@ make_lispy_event (event)
position = Qnil;
position = Qnil;
/* Build the position as appropriate for this mouse click. */
/* Build the position as appropriate for this mouse click. */
if (event->kind ==
mouse_click
)
if (event->kind ==
MOUSE_CLICK_EVENT
)
{
{
int part;
int part;
struct frame *f = XFRAME (event->frame_or_window);
struct frame *f = XFRAME (event->frame_or_window);
...
@@ -5165,7 +5165,7 @@ make_lispy_event (event)
...
@@ -5165,7 +5165,7 @@ make_lispy_event (event)
index of type `enum scroll_bar_part' which we can use as an
index of type `enum scroll_bar_part' which we can use as an
index in scroll_bar_parts to get the appropriate symbol. */
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;
Lisp_Object position, head, window, portion_whole, part;
...
@@ -5196,7 +5196,7 @@ make_lispy_event (event)
...
@@ -5196,7 +5196,7 @@ make_lispy_event (event)
#endif /* USE_TOOLKIT_SCROLL_BARS */
#endif /* USE_TOOLKIT_SCROLL_BARS */
#ifdef WINDOWSNT
#ifdef WINDOWSNT
case
w
32_
scroll_bar_click
:
case
W
32_
SCROLL_BAR_CLICK_EVENT
:
{
{
int button = event->code;
int button = event->code;
int is_double;
int is_double;
...
@@ -5239,7 +5239,7 @@ make_lispy_event (event)
...
@@ -5239,7 +5239,7 @@ make_lispy_event (event)
Qnil));
Qnil));
}
}
}
}
case
mouse_wheel
:
case
MOUSE_WHEEL_EVENT
:
{
{
int part;
int part;
FRAME_PTR f = XFRAME (event->frame_or_window);
FRAME_PTR f = XFRAME (event->frame_or_window);
...
@@ -5312,7 +5312,7 @@ make_lispy_event (event)
...
@@ -5312,7 +5312,7 @@ make_lispy_event (event)
}
}
#endif /* WINDOWSNT */
#endif /* WINDOWSNT */
case
drag_n_drop
:
case
DRAG_N_DROP_EVENT
:
{
{
int part;
int part;
FRAME_PTR f;
FRAME_PTR f;
...
@@ -5418,7 +5418,7 @@ make_lispy_event (event)
...
@@ -5418,7 +5418,7 @@ make_lispy_event (event)
/* A user signal. */
/* A user signal. */
return *lispy_user_signals[event->code];
return *lispy_user_signals[event->code];
case
save_session_event
:
case
SAVE_SESSION_EVENT
:
return Qsave_session;
return Qsave_session;
/* The 'kind' field of the event is something we don't recognize. */
/* The 'kind' field of the event is something we don't recognize. */
...
@@ -6194,7 +6194,7 @@ gobble_input (expected)
...
@@ -6194,7 +6194,7 @@ gobble_input (expected)
#endif
#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. */
so that read_key_sequence will notice the new current buffer. */
void
void
...
@@ -6203,7 +6203,7 @@ record_asynch_buffer_change ()
...
@@ -6203,7 +6203,7 @@ record_asynch_buffer_change ()
struct input_event event;
struct input_event event;
Lisp_Object tem;
Lisp_Object tem;
event.kind =
buffer_switch_event
;
event.kind =
BUFFER_SWITCH_EVENT
;
event.frame_or_window = Qnil;
event.frame_or_window = Qnil;
event.arg = Qnil;
event.arg = Qnil;
...
@@ -6358,7 +6358,7 @@ read_avail_input (expected)
...
@@ -6358,7 +6358,7 @@ read_avail_input (expected)
#endif /* no FIONREAD */
#endif /* no FIONREAD */
for (i = 0; i < nread; i++)
for (i = 0; i < nread; i++)
{
{
buf[i].kind =
ascii_keystroke
;
buf[i].kind =
ASCII_KEYSTROKE_EVENT
;
buf[i].modifiers = 0;
buf[i].modifiers = 0;
if (meta_key == 1 && (cbuf[i] & 0x80))
if (meta_key == 1 && (cbuf[i] & 0x80))
buf[i].modifiers = meta_modifier;
buf[i].modifiers = meta_modifier;
...
@@ -6377,7 +6377,7 @@ read_avail_input (expected)
...
@@ -6377,7 +6377,7 @@ read_avail_input (expected)
kbd_buffer_store_event (&buf[i]);
kbd_buffer_store_event (&buf[i]);
/* Don't look at input that follows a C-g too closely.
/* Don't look at input that follows a C-g too closely.
This reduces lossage due to autorepeat on C-g. */
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)
&& buf[i].code == quit_char)
break;
break;
}
}
...
@@ -9822,10 +9822,10 @@ stuff_buffered_input (stuffstring)
...
@@ -9822,10 +9822,10 @@ stuff_buffered_input (stuffstring)
if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
kbd_fetch_ptr = kbd_buffer;
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);
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);
idx = 2 * (kbd_fetch_ptr - kbd_buffer);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
ASET (kbd_buffer_gcpro, idx + 1, Qnil);
...
...
src/macterm.c
View file @
3b8f9651
...
@@ -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
;
}
}
}