x_update_window_end (struct window *w, int cursor_on_p,
int mouse_face_overwritten_p)
{
- Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
+ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
if (!w->pseudo_window_p)
{
overhead is very small. */
if (windows_or_buffers_changed
&& desired_row->full_width_p
- && (f = XFRAME (WGET (w, frame)),
+ && (f = XFRAME (w->frame),
width = FRAME_INTERNAL_BORDER_WIDTH (f),
width != 0)
&& (height = desired_row->visible_height,
break;
default:
- abort ();
+ emacs_abort ();
}
if (!s->for_overlaps)
if (! FRAME_W32_P (f))
return;
- abort ();
+ emacs_abort ();
}
if (! FRAME_W32_P (f))
return;
- abort ();
+ emacs_abort ();
}
static void
x_scroll_run (struct window *w, struct run *run)
{
- struct frame *f = XFRAME (WGET (w, frame));
+ struct frame *f = XFRAME (w->frame);
int x, y, width, height, from_y, to_y, bottom_y;
HWND hwnd = FRAME_W32_WINDOW (f);
HRGN expect_dirty;
: dpyinfo->w32_focus_frame);
if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame))
{
- FSET (dpyinfo->w32_focus_frame, focus_frame, Qnil);
+ fset_focus_frame (dpyinfo->w32_focus_frame, Qnil);
dpyinfo->x_highlight_frame = dpyinfo->w32_focus_frame;
}
}
frame = XCAR (tail);
/* All elements of Vframe_list should be frames. */
if (! FRAMEP (frame))
- abort ();
+ emacs_abort ();
/* Scan this frame's scroll bar list for a scroll bar with the
right window ID. */
bar->next = FRAME_SCROLL_BARS (f);
bar->prev = Qnil;
XSETVECTOR (barobj, bar);
- FSET (f, scroll_bars, barobj);
+ fset_scroll_bars (f, barobj);
if (! NILP (bar->next))
XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
/* Dissociate this scroll bar from its window. */
- WSET (XWINDOW (bar->window), vertical_scroll_bar, Qnil);
+ wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
UNBLOCK_INPUT;
}
w32_set_vertical_scroll_bar (struct window *w,
int portion, int whole, int position)
{
- struct frame *f = XFRAME (WGET (w, frame));
+ struct frame *f = XFRAME (w->frame);
Lisp_Object barobj;
struct scroll_bar *bar;
int top, height, left, sb_left, width, sb_width;
|| WINDOW_RIGHT_MARGIN_COLS (w) == 0));
/* Does the scroll bar exist yet? */
- if (NILP (WGET (w, vertical_scroll_bar)))
+ if (NILP (w->vertical_scroll_bar))
{
HDC hdc;
BLOCK_INPUT;
/* It may just need to be moved and resized. */
HWND hwnd;
- bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
+ bar = XSCROLL_BAR (w->vertical_scroll_bar);
hwnd = SCROLL_BAR_W32_WINDOW (bar);
/* If already correctly positioned, do nothing. */
w32_set_scroll_bar_thumb (bar, portion, position, whole);
XSETVECTOR (barobj, bar);
- WSET (w, vertical_scroll_bar, barobj);
+ wset_vertical_scroll_bar (w, barobj);
}
{
Lisp_Object bar;
bar = FRAME_SCROLL_BARS (frame);
- FSET (frame, scroll_bars, XSCROLL_BAR (bar)->next);
+ fset_scroll_bars (frame, XSCROLL_BAR (bar)->next);
XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
XSCROLL_BAR (bar)->prev = Qnil;
if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
- FSET (frame, condemned_scroll_bars, bar);
+ fset_condemned_scroll_bars (frame, bar);
}
}
struct frame *f;
/* We can't redeem this window's scroll bar if it doesn't have one. */
- if (NILP (WGET (window, vertical_scroll_bar)))
- abort ();
+ if (NILP (window->vertical_scroll_bar))
+ emacs_abort ();
- bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
+ bar = XSCROLL_BAR (window->vertical_scroll_bar);
/* Unlink it from the condemned list. */
f = XFRAME (WINDOW_FRAME (window));
{
/* If the prev pointer is nil, it must be the first in one of
the lists. */
- if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
+ if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
/* It's not condemned. Everything's fine. */
return;
else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
- WGET (window, vertical_scroll_bar)))
- FSET (f, condemned_scroll_bars, bar->next);
+ window->vertical_scroll_bar))
+ fset_condemned_scroll_bars (f, bar->next);
else
/* If its prev pointer is nil, it must be at the front of
one or the other! */
- abort ();
+ emacs_abort ();
}
else
XSCROLL_BAR (bar->prev)->next = bar->next;
bar->next = FRAME_SCROLL_BARS (f);
bar->prev = Qnil;
XSETVECTOR (barobj, bar);
- FSET (f, scroll_bars, barobj);
+ fset_scroll_bars (f, barobj);
if (! NILP (bar->next))
XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
}
/* Clear out the condemned list now so we won't try to process any
more events on the hapless scroll bars. */
- FSET (f, condemned_scroll_bars, Qnil);
+ fset_condemned_scroll_bars (f, Qnil);
for (; ! NILP (bar); bar = next)
{
struct input_event *emacs_event)
{
if (! WINDOWP (bar->window))
- abort ();
+ emacs_abort ();
emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
emacs_event->code = 0;
/* 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,
- SDATA (FGET (f, name))));
+ 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,
- SDATA (FGET (f, name))));
+ SDATA (f->name)));
/* WM_PAINT serves as MapNotify as well, so report
visibility changes properly. */
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FGET (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
create event iff we don't leave the
selected frame. */
&& (focus_follows_mouse
- || (EQ (WGET (XWINDOW (window), frame),
- WGET (XWINDOW (selected_window), frame)))))
+ || (EQ (XWINDOW (window)->frame,
+ XWINDOW (selected_window)->frame))))
{
inev.kind = SELECT_WINDOW_EVENT;
inev.frame_or_window = window;
construct_mouse_click (&inev, &msg, f);
/* Is this in the tool-bar? */
- if (WINDOWP (FGET (f, tool_bar_window))
- && WINDOW_TOTAL_LINES (XWINDOW (FGET (f, tool_bar_window))))
+ if (WINDOWP (f->tool_bar_window)
+ && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
{
Lisp_Object window;
int x = XFASTINT (inev.x);
window = window_from_coordinates (f, x, y, 0, 1);
- if (EQ (window, FGET (f, tool_bar_window)))
+ if (EQ (window, f->tool_bar_window))
{
w32_handle_tool_bar_click (f, &inev);
tool_bar_p = 1;
if (!FRAME_OBSCURED_P (f))
{
DebPrint (("frame %p (%s) obscured\n", f,
- SDATA (FGET (f, name))));
+ SDATA (f->name)));
}
}
else
{
SET_FRAME_GARBAGED (f);
DebPrint (("obscured frame %p (%s) found to be visible\n", f,
- SDATA (FGET (f, name))));
+ SDATA (f->name)));
/* Force a redisplay sooner or later. */
record_asynch_buffer_change ();
x_draw_bar_cursor (struct window *w, struct glyph_row *row,
int width, enum text_cursor_kinds kind)
{
- struct frame *f = XFRAME (WGET (w, frame));
+ struct frame *f = XFRAME (w->frame);
struct glyph *cursor_glyph;
/* If cursor is out of bounds, don't draw garbage. This can happen
break;
default:
- abort ();
+ emacs_abort ();
}
}
}
/* Check if we need to resize the frame due to a fullscreen request.
- If so needed, resize the frame. */
+ If so needed, resize the frame. */
static void
x_check_fullscreen (struct frame *f)
{
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
- /* Wait for the change of frame size to occur */
+ /* Wait for the change of frame size to occur. */
f->want_fullscreen |= FULLSCREEN_WAIT;
}
}
SET_FRAME_GARBAGED (f);
/* If cursor was outside the new size, mark it as off. */
- mark_window_cursors_off (XWINDOW (FGET (f, root_window)));
+ mark_window_cursors_off (XWINDOW (f->root_window));
/* Clear out any recollection of where the mouse highlighting was,
since it might be in a place that's outside the new frame size.
terminal like X does. */
terminal->kboard = xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
- KVAR (terminal->kboard, Vwindow_system) = intern ("w32");
+ kset_window_system (terminal->kboard, intern ("w32"));
terminal->kboard->next_kboard = all_kboards;
all_kboards = terminal->kboard;
/* Don't let the initial kboard remain current longer than necessary.