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;
if (glyph < end
&& STRINGP (glyph->object)
- && XSTRING (glyph->object)->intervals
+ && STRING_INTERVALS (glyph->object)
&& glyph->charpos >= 0
- && glyph->charpos < XSTRING (glyph->object)->size)
+ && glyph->charpos < SCHARS (glyph->object))
{
/* If we're on a string with `help-echo' text property,
arrange for the help to be displayed. This is done by
if (NILP (b))
b = make_number (0);
if (NILP (e))
- e = make_number (XSTRING (object)->size - 1);
+ e = make_number (SCHARS (object) - 1);
fast_find_string_pos (w, XINT (b), object,
&dpyinfo->mouse_face_beg_col,
&dpyinfo->mouse_face_beg_row,
/* Try text properties. */
if (STRINGP (object)
&& charpos >= 0
- && charpos < XSTRING (object)->size)
+ && charpos < SCHARS (object))
{
help = Fget_text_property (make_number (charpos),
Qhelp_echo, object);
}
/* 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;
}
/* We may get paint messages even though the client
area is clipped - these are not expose events. */
DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f,
- XSTRING (f->name)->data));
+ SDATA (f->name)));
}
else if (f->async_visible != 1)
{
f->async_iconified = 0;
SET_FRAME_GARBAGED (f);
DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
- XSTRING (f->name)->data));
+ SDATA (f->name)));
/* WM_PAINT serves as MapNotify as well, so report
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++;
if (!FRAME_OBSCURED_P (f))
{
DebPrint (("frame %p (%s) obscured\n", f,
- XSTRING (f->name)->data));
+ SDATA (f->name)));
}
}
else
{
SET_FRAME_GARBAGED (f);
DebPrint (("obscured frame %p (%s) found to be visible\n", f,
- XSTRING (f->name)->data));
+ SDATA (f->name)));
/* Force a redisplay sooner or later. */
record_asynch_buffer_change ();
if (NILP (icon))
hicon = LoadIcon (hinst, EMACS_CLASS);
else if (STRINGP (icon))
- hicon = LoadImage (NULL, (LPCTSTR) XSTRING (icon)->data, IMAGE_ICON, 0, 0,
+ hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_LOADFROMFILE);
else if (SYMBOLP (icon))
{
to do. */
return fontset_name (fontset);
- result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data));
+ result = x_new_font (f, (SDATA (fontset_ascii (fontset))));
if (!STRINGP (result))
/* Can't load ASCII font. */
dpyinfo->name_list_element = XCAR (w32_display_name_list);
dpyinfo->w32_id_name
- = (char *) xmalloc (XSTRING (Vinvocation_name)->size
- + XSTRING (Vsystem_name)->size
+ = (char *) xmalloc (SCHARS (Vinvocation_name)
+ + SCHARS (Vsystem_name)
+ 2);
sprintf (dpyinfo->w32_id_name, "%s@%s",
- XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data);
+ SDATA (Vinvocation_name), SDATA (Vsystem_name));
/* Default Console mode values - overridden when running in GUI mode
with values obtained from system metrics. */