along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
+#define DISPEXTERN_INLINE EXTERN_INLINE
+
#include <signal.h>
#include <stdio.h>
#include <ctype.h>
"%"pMu": window %p (`%s')%s\n%s",
history_tick++,
w,
- ((BUFFERP (WVAR (w, buffer))
- && STRINGP (BVAR (XBUFFER (WVAR (w, buffer)), name)))
- ? SSDATA (BVAR (XBUFFER (WVAR (w, buffer)), name))
+ ((BUFFERP (WGET (w, buffer))
+ && STRINGP (BVAR (XBUFFER (WGET (w, buffer)), name)))
+ ? SSDATA (BVAR (XBUFFER (WGET (w, buffer)), name))
: "???"),
paused_p ? " ***paused***" : "",
msg);
if (NUMBERP (margin))
{
- int width = XFASTINT (WVAR (w, total_cols));
+ int width = XFASTINT (WGET (w, total_cols));
double d = max (0, XFLOATINT (margin));
d = min (width / 2 - 1, d);
n = (int) ((double) total_glyphs / width * d);
the matrix means preventing redisplay. */
if (matrix->pool == NULL)
{
- left = margin_glyphs_to_reserve (w, dim.width, WVAR (w, left_margin_cols));
- right = margin_glyphs_to_reserve (w, dim.width, WVAR (w, right_margin_cols));
+ left = margin_glyphs_to_reserve (w, dim.width, WGET (w, left_margin_cols));
+ right = margin_glyphs_to_reserve (w, dim.width, WGET (w, right_margin_cols));
eassert (left >= 0 && right >= 0);
marginal_areas_changed_p = (left != matrix->left_margin_glyphs
|| right != matrix->right_margin_glyphs);
if (w)
{
left = margin_glyphs_to_reserve (w, dim.width,
- WVAR (w, left_margin_cols));
+ WGET (w, left_margin_cols));
right = margin_glyphs_to_reserve (w, dim.width,
- WVAR (w, right_margin_cols));
+ WGET (w, right_margin_cols));
}
else
left = right = 0;
/* Window end is invalid, if inside of the rows that
are invalidated below. */
- if (INTEGERP (WVAR (w, window_end_vpos))
- && XFASTINT (WVAR (w, window_end_vpos)) >= i)
- WVAR (w, window_end_valid) = Qnil;
+ if (INTEGERP (WGET (w, window_end_vpos))
+ && XFASTINT (WGET (w, window_end_vpos)) >= i)
+ WSET (w, window_end_valid, Qnil);
while (i < matrix->nrows)
matrix->rows[i++].enabled_p = 0;
/* Clear the matrix of the menu bar window, if such a window exists.
The menu bar window is currently used to display menus on X when
no toolkit support is compiled in. */
- if (WINDOWP (FVAR (f, menu_bar_window)))
- clear_glyph_matrix (XWINDOW (FVAR (f, menu_bar_window))->current_matrix);
+ if (WINDOWP (FGET (f, menu_bar_window)))
+ clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->current_matrix);
/* Clear the matrix of the tool-bar window, if any. */
- if (WINDOWP (FVAR (f, tool_bar_window)))
- clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->current_matrix);
+ if (WINDOWP (FGET (f, tool_bar_window)))
+ clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->current_matrix);
/* Clear current window matrices. */
eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
if (f->desired_matrix)
clear_glyph_matrix (f->desired_matrix);
- if (WINDOWP (FVAR (f, menu_bar_window)))
- clear_glyph_matrix (XWINDOW (FVAR (f, menu_bar_window))->desired_matrix);
+ if (WINDOWP (FGET (f, menu_bar_window)))
+ clear_glyph_matrix (XWINDOW (FGET (f, menu_bar_window))->desired_matrix);
- if (WINDOWP (FVAR (f, tool_bar_window)))
- clear_glyph_matrix (XWINDOW (FVAR (f, tool_bar_window))->desired_matrix);
+ if (WINDOWP (FGET (f, tool_bar_window)))
+ clear_glyph_matrix (XWINDOW (FGET (f, tool_bar_window))->desired_matrix);
/* Do it for window matrices. */
eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
+ if (!NILP (WGET (w, hchild)))
{
- eassert (WINDOWP (WVAR (w, hchild)));
- clear_window_matrices (XWINDOW (WVAR (w, hchild)), desired_p);
+ eassert (WINDOWP (WGET (w, hchild)));
+ clear_window_matrices (XWINDOW (WGET (w, hchild)), desired_p);
}
- else if (!NILP (WVAR (w, vchild)))
+ else if (!NILP (WGET (w, vchild)))
{
- eassert (WINDOWP (WVAR (w, vchild)));
- clear_window_matrices (XWINDOW (WVAR (w, vchild)), desired_p);
+ eassert (WINDOWP (WGET (w, vchild)));
+ clear_window_matrices (XWINDOW (WGET (w, vchild)), desired_p);
}
else
{
else
{
clear_glyph_matrix (w->current_matrix);
- WVAR (w, window_end_valid) = Qnil;
+ WSET (w, window_end_valid, Qnil);
}
}
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
clear_glyph_row (row);
row->y = y;
row->ascent = row->phys_ascent = 0;
- row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (WVAR (w, frame)));
+ row->height = row->phys_height = FRAME_LINE_HEIGHT (XFRAME (WGET (w, frame)));
row->visible_height = row->height;
if (row->y < min_y)
struct glyph_row *row = matrix->rows;
struct glyph_row *last_text_row = NULL;
struct buffer *saved = current_buffer;
- struct buffer *buffer = XBUFFER (WVAR (w, buffer));
+ struct buffer *buffer = XBUFFER (WGET (w, buffer));
int c;
/* This can sometimes happen for a fresh window. */
points to the mini-buffer window, if any, which is arranged
vertically below other windows. */
in_horz_combination_p
- = (!NILP (WVAR (XWINDOW (window), parent))
- && !NILP (WVAR (XWINDOW (WVAR (XWINDOW (window), parent)), hchild)));
+ = (!NILP (WGET (XWINDOW (window), parent))
+ && !NILP (WGET (XWINDOW (WGET (XWINDOW (window), parent)), hchild)));
/* For WINDOW and all windows on the same level. */
do
/* Get the dimension of the window sub-matrix for W, depending
on whether this is a combination or a leaf window. */
- if (!NILP (WVAR (w, hchild)))
- dim = allocate_matrices_for_frame_redisplay (WVAR (w, hchild), x, y,
+ if (!NILP (WGET (w, hchild)))
+ dim = allocate_matrices_for_frame_redisplay (WGET (w, hchild), x, y,
dim_only_p,
window_change_flags);
- else if (!NILP (WVAR (w, vchild)))
- dim = allocate_matrices_for_frame_redisplay (WVAR (w, vchild), x, y,
+ else if (!NILP (WGET (w, vchild)))
+ dim = allocate_matrices_for_frame_redisplay (WGET (w, vchild), x, y,
dim_only_p,
window_change_flags);
else
|| dim.width != w->desired_matrix->matrix_w
|| dim.height != w->desired_matrix->matrix_h
|| (margin_glyphs_to_reserve (w, dim.width,
- WVAR (w, left_margin_cols))
+ WGET (w, left_margin_cols))
!= w->desired_matrix->left_margin_glyphs)
|| (margin_glyphs_to_reserve (w, dim.width,
- WVAR (w, right_margin_cols))
+ WGET (w, right_margin_cols))
!= w->desired_matrix->right_margin_glyphs))
*window_change_flags |= CHANGED_LEAF_MATRIX;
hmax = max (hmax, dim.height);
/* Next window on same level. */
- window = WVAR (w, next);
+ window = WGET (w, next);
}
while (!NILP (window));
required_matrix_height (struct window *w)
{
#ifdef HAVE_WINDOW_SYSTEM
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
if (FRAME_WINDOW_P (f))
{
required_matrix_width (struct window *w)
{
#ifdef HAVE_WINDOW_SYSTEM
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
if (FRAME_WINDOW_P (f))
{
int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f);
}
#endif /* HAVE_WINDOW_SYSTEM */
- return XINT (WVAR (w, total_cols));
+ return XINT (WGET (w, total_cols));
}
{
while (w)
{
- if (!NILP (WVAR (w, vchild)))
- allocate_matrices_for_window_redisplay (XWINDOW (WVAR (w, vchild)));
- else if (!NILP (WVAR (w, hchild)))
- allocate_matrices_for_window_redisplay (XWINDOW (WVAR (w, hchild)));
+ if (!NILP (WGET (w, vchild)))
+ allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, vchild)));
+ else if (!NILP (WGET (w, hchild)))
+ allocate_matrices_for_window_redisplay (XWINDOW (WGET (w, hchild)));
else
{
/* W is a leaf window. */
adjust_glyph_matrix (w, w->current_matrix, 0, 0, dim);
}
- w = NILP (WVAR (w, next)) ? NULL : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? NULL : XWINDOW (WGET (w, next));
}
}
adjust_frame_glyphs_initially (void)
{
struct frame *sf = SELECTED_FRAME ();
- struct window *root = XWINDOW (FVAR (sf, root_window));
- struct window *mini = XWINDOW (WVAR (root, next));
+ struct window *root = XWINDOW (FGET (sf, root_window));
+ struct window *mini = XWINDOW (WGET (root, next));
int frame_lines = FRAME_LINES (sf);
int frame_cols = FRAME_COLS (sf);
int top_margin = FRAME_TOP_MARGIN (sf);
/* Do it for the root window. */
- XSETFASTINT (WVAR (root, top_line), top_margin);
- XSETFASTINT (WVAR (root, total_lines), frame_lines - 1 - top_margin);
- XSETFASTINT (WVAR (root, total_cols), frame_cols);
+ WSET (root, top_line, make_number (top_margin));
+ WSET (root, total_lines, make_number (frame_lines - 1 - top_margin));
+ WSET (root, total_cols, make_number (frame_cols));
/* Do it for the mini-buffer window. */
- XSETFASTINT (WVAR (mini, top_line), frame_lines - 1);
- XSETFASTINT (WVAR (mini, total_lines), 1);
- XSETFASTINT (WVAR (mini, total_cols), frame_cols);
+ WSET (mini, top_line, make_number (frame_lines - 1));
+ WSET (mini, total_lines, make_number (1));
+ WSET (mini, total_cols, make_number (frame_cols));
adjust_frame_glyphs (sf);
glyphs_initialized_initially_p = 1;
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
+ if (!NILP (WGET (w, hchild)))
{
- if (showing_window_margins_p (XWINDOW (WVAR (w, hchild))))
+ if (showing_window_margins_p (XWINDOW (WGET (w, hchild))))
return 1;
}
- else if (!NILP (WVAR (w, vchild)))
+ else if (!NILP (WGET (w, vchild)))
{
- if (showing_window_margins_p (XWINDOW (WVAR (w, vchild))))
+ if (showing_window_margins_p (XWINDOW (WGET (w, vchild))))
return 1;
}
- else if (!NILP (WVAR (w, left_margin_cols))
- || !NILP (WVAR (w, right_margin_cols)))
+ else if (!NILP (WGET (w, left_margin_cols))
+ || !NILP (WGET (w, right_margin_cols)))
return 1;
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
return 0;
}
{
struct window *w;
- for (; !NILP (window); window = WVAR (w, next))
+ for (; !NILP (window); window = WGET (w, next))
{
w = XWINDOW (window);
- if (!NILP (WVAR (w, hchild)))
- fake_current_matrices (WVAR (w, hchild));
- else if (!NILP (WVAR (w, vchild)))
- fake_current_matrices (WVAR (w, vchild));
+ if (!NILP (WGET (w, hchild)))
+ fake_current_matrices (WGET (w, hchild));
+ else if (!NILP (WGET (w, vchild)))
+ fake_current_matrices (WGET (w, vchild));
else
{
int i;
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
struct glyph_matrix *m = w->current_matrix;
struct glyph_matrix *fm = f->current_matrix;
{
/* Allocate a dummy window if not already done. */
struct window *w;
- if (NILP (FVAR (f, menu_bar_window)))
+ if (NILP (FGET (f, menu_bar_window)))
{
- FVAR (f, menu_bar_window) = make_window ();
- w = XWINDOW (FVAR (f, menu_bar_window));
- XSETFRAME (WVAR (w, frame), f);
+ Lisp_Object frame;
+ FSET (f, menu_bar_window, make_window ());
+ w = XWINDOW (FGET (f, menu_bar_window));
+ XSETFRAME (frame, f);
+ WSET (w, frame, frame);
w->pseudo_window_p = 1;
}
else
- w = XWINDOW (FVAR (f, menu_bar_window));
+ w = XWINDOW (FGET (f, menu_bar_window));
/* Set window dimensions to frame dimensions and allocate or
adjust glyph matrices of W. */
- XSETFASTINT (WVAR (w, top_line), 0);
- XSETFASTINT (WVAR (w, left_col), 0);
- XSETFASTINT (WVAR (w, total_lines), FRAME_MENU_BAR_LINES (f));
- XSETFASTINT (WVAR (w, total_cols), FRAME_TOTAL_COLS (f));
+ WSET (w, top_line, make_number (0));
+ WSET (w, left_col, make_number (0));
+ WSET (w, total_lines, make_number (FRAME_MENU_BAR_LINES (f)));
+ WSET (w, total_cols, make_number (FRAME_TOTAL_COLS (f)));
allocate_matrices_for_window_redisplay (w);
}
#endif /* not USE_X_TOOLKIT && not USE_GTK */
/* Allocate/ reallocate matrices of the tool bar window. If we
don't have a tool bar window yet, make one. */
struct window *w;
- if (NILP (FVAR (f, tool_bar_window)))
+ if (NILP (FGET (f, tool_bar_window)))
{
- FVAR (f, tool_bar_window) = make_window ();
- w = XWINDOW (FVAR (f, tool_bar_window));
- XSETFRAME (WVAR (w, frame), f);
+ Lisp_Object frame;
+ FSET (f, tool_bar_window, make_window ());
+ w = XWINDOW (FGET (f, tool_bar_window));
+ XSETFRAME (frame, f);
+ WSET (w, frame, frame);
w->pseudo_window_p = 1;
}
else
- w = XWINDOW (FVAR (f, tool_bar_window));
+ w = XWINDOW (FGET (f, tool_bar_window));
- XSETFASTINT (WVAR (w, top_line), FRAME_MENU_BAR_LINES (f));
- XSETFASTINT (WVAR (w, left_col), 0);
- XSETFASTINT (WVAR (w, total_lines), FRAME_TOOL_BAR_LINES (f));
- XSETFASTINT (WVAR (w, total_cols), FRAME_TOTAL_COLS (f));
+ WSET (w, top_line, make_number (FRAME_MENU_BAR_LINES (f)));
+ WSET (w, left_col, make_number (0));
+ WSET (w, total_lines, make_number (FRAME_TOOL_BAR_LINES (f)));
+ WSET (w, total_cols, make_number (FRAME_TOTAL_COLS (f)));
allocate_matrices_for_window_redisplay (w);
}
#endif
f->glyphs_initialized_p = 0;
/* Release window sub-matrices. */
- if (!NILP (FVAR (f, root_window)))
- free_window_matrices (XWINDOW (FVAR (f, root_window)));
+ if (!NILP (FGET (f, root_window)))
+ free_window_matrices (XWINDOW (FGET (f, root_window)));
/* Free the dummy window for menu bars without X toolkit and its
glyph matrices. */
- if (!NILP (FVAR (f, menu_bar_window)))
+ if (!NILP (FGET (f, menu_bar_window)))
{
- struct window *w = XWINDOW (FVAR (f, menu_bar_window));
+ struct window *w = XWINDOW (FGET (f, menu_bar_window));
free_glyph_matrix (w->desired_matrix);
free_glyph_matrix (w->current_matrix);
w->desired_matrix = w->current_matrix = NULL;
- FVAR (f, menu_bar_window) = Qnil;
+ FSET (f, menu_bar_window, Qnil);
}
/* Free the tool bar window and its glyph matrices. */
- if (!NILP (FVAR (f, tool_bar_window)))
+ if (!NILP (FGET (f, tool_bar_window)))
{
- struct window *w = XWINDOW (FVAR (f, tool_bar_window));
+ struct window *w = XWINDOW (FGET (f, tool_bar_window));
free_glyph_matrix (w->desired_matrix);
free_glyph_matrix (w->current_matrix);
w->desired_matrix = w->current_matrix = NULL;
- FVAR (f, tool_bar_window) = Qnil;
+ FSET (f, tool_bar_window, Qnil);
}
/* Release frame glyph matrices. Reset fields to zero in
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- free_window_matrices (XWINDOW (WVAR (w, hchild)));
- else if (!NILP (WVAR (w, vchild)))
- free_window_matrices (XWINDOW (WVAR (w, vchild)));
+ if (!NILP (WGET (w, hchild)))
+ free_window_matrices (XWINDOW (WGET (w, hchild)));
+ else if (!NILP (WGET (w, vchild)))
+ free_window_matrices (XWINDOW (WGET (w, vchild)));
else
{
/* This is a leaf window. Free its memory and reset fields
}
/* Next window on same level. */
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- build_frame_matrix_from_window_tree (matrix, XWINDOW (WVAR (w, hchild)));
- else if (!NILP (WVAR (w, vchild)))
- build_frame_matrix_from_window_tree (matrix, XWINDOW (WVAR (w, vchild)));
+ if (!NILP (WGET (w, hchild)))
+ build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, hchild)));
+ else if (!NILP (WGET (w, vchild)))
+ build_frame_matrix_from_window_tree (matrix, XWINDOW (WGET (w, vchild)));
else
build_frame_matrix_from_leaf_window (matrix, w);
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
/* Convert the glyph's specified face to a realized (cache) face. */
if (lface_id > 0)
{
- int face_id = merge_faces (XFRAME (WVAR (w, frame)),
+ int face_id = merge_faces (XFRAME (WGET (w, frame)),
Qt, lface_id, DEFAULT_FACE_ID);
SET_GLYPH_FACE (*glyph, face_id);
}
/* If we are called on frame matrices, perform analogous operations
for window matrices. */
if (frame_matrix_frame)
- mirror_make_current (XWINDOW (FVAR (frame_matrix_frame, root_window)), row);
+ mirror_make_current (XWINDOW (FGET (frame_matrix_frame, root_window)), row);
}
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- mirror_make_current (XWINDOW (WVAR (w, hchild)), frame_row);
- else if (!NILP (WVAR (w, vchild)))
- mirror_make_current (XWINDOW (WVAR (w, vchild)), frame_row);
+ if (!NILP (WGET (w, hchild)))
+ mirror_make_current (XWINDOW (WGET (w, hchild)), frame_row);
+ else if (!NILP (WGET (w, vchild)))
+ mirror_make_current (XWINDOW (WGET (w, vchild)), frame_row);
else
{
/* Row relative to window W. Don't use FRAME_TO_WINDOW_VPOS
}
}
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
/* Do the same for window matrices, if MATRIX is a frame matrix. */
if (frame_matrix_frame)
- mirror_line_dance (XWINDOW (FVAR (frame_matrix_frame, root_window)),
+ mirror_line_dance (XWINDOW (FGET (frame_matrix_frame, root_window)),
unchanged_at_top, nlines, copy_from, retained_p);
}
static void
sync_window_with_frame_matrix_rows (struct window *w)
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
struct glyph_row *window_row, *window_row_end, *frame_row;
int left, right, x, width;
/* Preconditions: W must be a leaf window on a tty frame. */
- eassert (NILP (WVAR (w, hchild)) && NILP (WVAR (w, vchild)));
+ eassert (NILP (WGET (w, hchild)) && NILP (WGET (w, vchild)));
eassert (!FRAME_WINDOW_P (f));
- left = margin_glyphs_to_reserve (w, 1, WVAR (w, left_margin_cols));
- right = margin_glyphs_to_reserve (w, 1, WVAR (w, right_margin_cols));
+ left = margin_glyphs_to_reserve (w, 1, WGET (w, left_margin_cols));
+ right = margin_glyphs_to_reserve (w, 1, WGET (w, right_margin_cols));
x = w->current_matrix->matrix_x;
width = w->current_matrix->matrix_w;
while (w && !found)
{
- if (!NILP (WVAR (w, hchild)))
- found = frame_row_to_window (XWINDOW (WVAR (w, hchild)), row);
- else if (!NILP (WVAR (w, vchild)))
- found = frame_row_to_window (XWINDOW (WVAR (w, vchild)), row);
+ if (!NILP (WGET (w, hchild)))
+ found = frame_row_to_window (XWINDOW (WGET (w, hchild)), row);
+ else if (!NILP (WGET (w, vchild)))
+ found = frame_row_to_window (XWINDOW (WGET (w, vchild)), row);
else if (row >= WINDOW_TOP_EDGE_LINE (w)
&& row < WINDOW_BOTTOM_EDGE_LINE (w))
found = w;
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
return found;
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- mirror_line_dance (XWINDOW (WVAR (w, hchild)), unchanged_at_top,
+ if (!NILP (WGET (w, hchild)))
+ mirror_line_dance (XWINDOW (WGET (w, hchild)), unchanged_at_top,
nlines, copy_from, retained_p);
- else if (!NILP (WVAR (w, vchild)))
- mirror_line_dance (XWINDOW (WVAR (w, vchild)), unchanged_at_top,
+ else if (!NILP (WGET (w, vchild)))
+ mirror_line_dance (XWINDOW (WGET (w, vchild)), unchanged_at_top,
nlines, copy_from, retained_p);
else
{
{
/* A copy between windows. This is an infrequent
case not worth optimizing. */
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
struct window *root = XWINDOW (FRAME_ROOT_WINDOW (f));
struct window *w2;
struct glyph_matrix *m2;
}
/* Next window on same level. */
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- check_window_matrix_pointers (XWINDOW (WVAR (w, hchild)));
- else if (!NILP (WVAR (w, vchild)))
- check_window_matrix_pointers (XWINDOW (WVAR (w, vchild)));
+ if (!NILP (WGET (w, hchild)))
+ check_window_matrix_pointers (XWINDOW (WGET (w, hchild)));
+ else if (!NILP (WGET (w, vchild)))
+ check_window_matrix_pointers (XWINDOW (WGET (w, vchild)));
else
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
check_matrix_pointers (w->desired_matrix, f->desired_matrix);
check_matrix_pointers (w->current_matrix, f->current_matrix);
}
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
static int
window_to_frame_vpos (struct window *w, int vpos)
{
- eassert (!FRAME_WINDOW_P (XFRAME (WVAR (w, frame))));
+ eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
vpos += WINDOW_TOP_EDGE_LINE (w);
- eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (WVAR (w, frame))));
+ eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (WGET (w, frame))));
return vpos;
}
static int
window_to_frame_hpos (struct window *w, int hpos)
{
- eassert (!FRAME_WINDOW_P (XFRAME (WVAR (w, frame))));
+ eassert (!FRAME_WINDOW_P (XFRAME (WGET (w, frame))));
hpos += WINDOW_LEFT_EDGE_COL (w);
return hpos;
}
{
/* 1 means display has been paused because of pending input. */
int paused_p;
- struct window *root_window = XWINDOW (FVAR (f, root_window));
+ struct window *root_window = XWINDOW (FGET (f, root_window));
if (redisplay_dont_pause)
force_p = 1;
/* Update the menu bar on X frames that don't have toolkit
support. */
- if (WINDOWP (FVAR (f, menu_bar_window)))
- update_window (XWINDOW (FVAR (f, menu_bar_window)), 1);
+ if (WINDOWP (FGET (f, menu_bar_window)))
+ update_window (XWINDOW (FGET (f, menu_bar_window)), 1);
/* Update the tool-bar window, if present. */
- if (WINDOWP (FVAR (f, tool_bar_window)))
+ if (WINDOWP (FGET (f, tool_bar_window)))
{
- struct window *w = XWINDOW (FVAR (f, tool_bar_window));
+ struct window *w = XWINDOW (FGET (f, tool_bar_window));
/* Update tool-bar window. */
if (w->must_be_updated_p)
/* Swap tool-bar strings. We swap because we want to
reuse strings. */
- tem = FVAR (f, current_tool_bar_string);
- FVAR (f, current_tool_bar_string) = FVAR (f,
- desired_tool_bar_string);
- FVAR (f, desired_tool_bar_string) = tem;
+ tem = FGET (f, current_tool_bar_string);
+ FSET (f, current_tool_bar_string,
+ FGET (f, desired_tool_bar_string));
+ FSET (f, desired_tool_bar_string, tem);
}
}
while (w && !paused_p)
{
- if (!NILP (WVAR (w, hchild)))
- paused_p |= update_window_tree (XWINDOW (WVAR (w, hchild)), force_p);
- else if (!NILP (WVAR (w, vchild)))
- paused_p |= update_window_tree (XWINDOW (WVAR (w, vchild)), force_p);
+ if (!NILP (WGET (w, hchild)))
+ paused_p |= update_window_tree (XWINDOW (WGET (w, hchild)), force_p);
+ else if (!NILP (WGET (w, vchild)))
+ paused_p |= update_window_tree (XWINDOW (WGET (w, vchild)), force_p);
else if (w->must_be_updated_p)
paused_p |= update_window (w, force_p);
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
return paused_p;
struct glyph *glyph = ¤t_row->glyphs[TEXT_AREA][i - 1];
int left, right;
- rif->get_glyph_overhangs (glyph, XFRAME (WVAR (w, frame)),
+ rif->get_glyph_overhangs (glyph, XFRAME (WGET (w, frame)),
&left, &right);
can_skip_p = (right == 0 && !abort_skipping);
}
int left, right;
rif->get_glyph_overhangs (current_glyph,
- XFRAME (WVAR (w, frame)),
+ XFRAME (WGET (w, frame)),
&left, &right);
while (left > 0 && i > 0)
{
/* Update display of the left margin area, if there is one. */
if (!desired_row->full_width_p
- && !NILP (WVAR (w, left_margin_cols)))
+ && !NILP (WGET (w, left_margin_cols)))
{
changed_p = 1;
update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
/* Update display of the right margin area, if there is one. */
if (!desired_row->full_width_p
- && !NILP (WVAR (w, right_margin_cols)))
+ && !NILP (WGET (w, right_margin_cols)))
{
changed_p = 1;
update_marginal_area (w, RIGHT_MARGIN_AREA, vpos);
static void
set_window_cursor_after_update (struct window *w)
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
struct redisplay_interface *rif = FRAME_RIF (f);
int cx, cy, vpos, hpos;
{
while (w)
{
- if (!NILP (WVAR (w, hchild)))
- set_window_update_flags (XWINDOW (WVAR (w, hchild)), on_p);
- else if (!NILP (WVAR (w, vchild)))
- set_window_update_flags (XWINDOW (WVAR (w, vchild)), on_p);
+ if (!NILP (WGET (w, hchild)))
+ set_window_update_flags (XWINDOW (WGET (w, hchild)), on_p);
+ else if (!NILP (WGET (w, vchild)))
+ set_window_update_flags (XWINDOW (WGET (w, vchild)), on_p);
else
w->must_be_updated_p = on_p;
- w = NILP (WVAR (w, next)) ? 0 : XWINDOW (WVAR (w, next));
+ w = NILP (WGET (w, next)) ? 0 : XWINDOW (WGET (w, next));
}
}
int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
- if (INTEGERP (WVAR (w, left_margin_cols)))
- x += XFASTINT (WVAR (w, left_margin_cols));
+ if (INTEGERP (WGET (w, left_margin_cols)))
+ x += XFASTINT (WGET (w, left_margin_cols));
/* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */
cursor_to (f, y, x);
/* We used to set current_buffer directly here, but that does the
wrong thing with `face-remapping-alist' (bug#2044). */
- Fset_buffer (WVAR (w, buffer));
+ Fset_buffer (WGET (w, buffer));
itdata = bidi_shelve_cache ();
- SET_TEXT_POS_FROM_MARKER (startp, WVAR (w, start));
+ SET_TEXT_POS_FROM_MARKER (startp, WGET (w, start));
CHARPOS (startp) = min (ZV, max (BEGV, CHARPOS (startp)));
BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp)));
start_display (&it, w, startp);
*dx = x0 + it.first_visible_x - it.current_x;
*dy = *y - it.current_y;
- string = WVAR (w, buffer);
+ string = WGET (w, buffer);
if (STRINGP (it.string))
string = it.string;
*pos = it.current;
if (STRINGP (it.string))
BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos));
else
- BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (WVAR (w, buffer)),
+ BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (WGET (w, buffer)),
CHARPOS (pos->pos));
}
if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
FrameCols (FRAME_TTY (f)) = newwidth;
- if (WINDOWP (FVAR (f, tool_bar_window)))
- XSETFASTINT (WVAR (XWINDOW (FVAR (f, tool_bar_window)), total_cols), newwidth);
+ if (WINDOWP (FGET (f, tool_bar_window)))
+ WSET (XWINDOW (FGET (f, tool_bar_window)),
+ total_cols, make_number (newwidth));
}
FRAME_LINES (f) = newheight;
goto changed;
if (vecp == end)
goto changed;
- if (!EQ (*vecp++, FVAR (XFRAME (frame), name)))
+ if (!EQ (*vecp++, FGET (XFRAME (frame), name)))
goto changed;
}
/* Check that the buffer info matches. */
FOR_EACH_FRAME (tail, frame)
{
*vecp++ = frame;
- *vecp++ = FVAR (XFRAME (frame), name);
+ *vecp++ = FGET (XFRAME (frame), name);
}
for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
{