/* The window this one is a child of. */
Lisp_Object parent;
- /* The upper left corner coordinates of this window, as integers
- relative to upper left corner of frame = 0, 0. */
- Lisp_Object left_col;
- Lisp_Object top_line;
-
- /* The size of the window. */
- Lisp_Object total_lines;
- Lisp_Object total_cols;
-
- /* The normal size of the window. */
+ /* The normal size of the window. These are fractions, but we do
+ not use C doubles to avoid creating new Lisp_Float objects while
+ interfacing Lisp in Fwindow_normal_size. */
Lisp_Object normal_lines;
Lisp_Object normal_cols;
- /* New sizes of the window. */
+ /* New sizes of the window. Note that Lisp code may set new_normal
+ to something beyond an integer, so C int can't be used here. */
Lisp_Object new_total;
Lisp_Object new_normal;
/* Number saying how recently window was selected. */
int use_time;
+ /* The upper left corner coordinates of this window,
+ relative to upper left corner of frame = 0, 0. */
+ int left_col;
+ int top_line;
+
+ /* The size of the window. */
+ int total_lines;
+ int total_cols;
+
/* Number of columns display within the window is scrolled to the left. */
ptrdiff_t hscroll;
w->frame = val;
}
WINDOW_INLINE void
-wset_left_col (struct window *w, Lisp_Object val)
-{
- w->left_col = val;
-}
-WINDOW_INLINE void
wset_next (struct window *w, Lisp_Object val)
{
w->next = val;
w->redisplay_end_trigger = val;
}
WINDOW_INLINE void
-wset_top_line (struct window *w, Lisp_Object val)
-{
- w->top_line = val;
-}
-WINDOW_INLINE void
-wset_total_cols (struct window *w, Lisp_Object val)
-{
- w->total_cols = val;
-}
-WINDOW_INLINE void
-wset_total_lines (struct window *w, Lisp_Object val)
-{
- w->total_lines = val;
-}
-WINDOW_INLINE void
wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
{
w->vertical_scroll_bar = val;
/* Return the width of window W in canonical column units.
This includes scroll bars and fringes. */
-#define WINDOW_TOTAL_COLS(W) \
- (XFASTINT (W->total_cols))
+#define WINDOW_TOTAL_COLS(W) (W)->total_cols
/* Return the height of window W in canonical line units.
This includes header and mode lines, if any. */
-#define WINDOW_TOTAL_LINES(W) \
- (XFASTINT (W->total_lines))
+#define WINDOW_TOTAL_LINES(W) (W)->total_lines
/* Return the total pixel width of window W. */
/* Return the canonical frame column at which window W starts.
This includes a left-hand scroll bar, if any. */
-#define WINDOW_LEFT_EDGE_COL(W) \
- (XFASTINT (W->left_col))
+#define WINDOW_LEFT_EDGE_COL(W) (W)->left_col
/* Return the canonical frame column before which window W ends.
This includes a right-hand scroll bar, if any. */
/* Return the canonical frame line at which window W starts.
This includes a header line, if any. */
-#define WINDOW_TOP_EDGE_LINE(W) \
- (XFASTINT (W->top_line))
+#define WINDOW_TOP_EDGE_LINE(W) (W)->top_line
/* Return the canonical frame line before which window W ends.
This includes a mode line, if any. */