* window.h (struct window): Convert left_col, top_line, total_lines
[bpt/emacs.git] / src / window.h
index 4af8dbf..4f6374b 100644 (file)
@@ -112,20 +112,14 @@ struct window
     /* 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;
 
@@ -221,6 +215,15 @@ struct window
     /* 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;
 
@@ -354,11 +357,6 @@ wset_frame (struct window *w, Lisp_Object val)
   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;
@@ -374,21 +372,6 @@ wset_redisplay_end_trigger (struct window *w, Lisp_Object 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;
@@ -461,14 +444,12 @@ wset_next_buffers (struct window *w, Lisp_Object 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.  */
 
@@ -495,8 +476,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 /* 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.  */
@@ -507,8 +487,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 /* 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.  */