aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov2013-03-20 15:29:37 +0400
committerDmitry Antipov2013-03-20 15:29:37 +0400
commit5f24fa51a07664e81d4c710fe310d2c2fbea8bb5 (patch)
tree4d5681a0ae85865f263f6a29ea41dcf3e4ed41e8 /src/window.h
parent96061a21804d6f7ac3b1371470a288344f5f62cd (diff)
downloademacs-5f24fa51a07664e81d4c710fe310d2c2fbea8bb5.tar.gz
emacs-5f24fa51a07664e81d4c710fe310d2c2fbea8bb5.zip
* window.h (struct window): Convert left_col, top_line, total_lines
and total_cols from Lisp_Objects to integers. Adjust comments. (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines): Remove. (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL) (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion. * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c: Adjust users where appropriate.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h57
1 files changed, 18 insertions, 39 deletions
diff --git a/src/window.h b/src/window.h
index 4af8dbf1591..4f6374b9d3e 100644
--- a/src/window.h
+++ b/src/window.h
@@ -112,20 +112,14 @@ struct window
112 /* The window this one is a child of. */ 112 /* The window this one is a child of. */
113 Lisp_Object parent; 113 Lisp_Object parent;
114 114
115 /* The upper left corner coordinates of this window, as integers 115 /* The normal size of the window. These are fractions, but we do
116 relative to upper left corner of frame = 0, 0. */ 116 not use C doubles to avoid creating new Lisp_Float objects while
117 Lisp_Object left_col; 117 interfacing Lisp in Fwindow_normal_size. */
118 Lisp_Object top_line;
119
120 /* The size of the window. */
121 Lisp_Object total_lines;
122 Lisp_Object total_cols;
123
124 /* The normal size of the window. */
125 Lisp_Object normal_lines; 118 Lisp_Object normal_lines;
126 Lisp_Object normal_cols; 119 Lisp_Object normal_cols;
127 120
128 /* New sizes of the window. */ 121 /* New sizes of the window. Note that Lisp code may set new_normal
122 to something beyond an integer, so C int can't be used here. */
129 Lisp_Object new_total; 123 Lisp_Object new_total;
130 Lisp_Object new_normal; 124 Lisp_Object new_normal;
131 125
@@ -221,6 +215,15 @@ struct window
221 /* Number saying how recently window was selected. */ 215 /* Number saying how recently window was selected. */
222 int use_time; 216 int use_time;
223 217
218 /* The upper left corner coordinates of this window,
219 relative to upper left corner of frame = 0, 0. */
220 int left_col;
221 int top_line;
222
223 /* The size of the window. */
224 int total_lines;
225 int total_cols;
226
224 /* Number of columns display within the window is scrolled to the left. */ 227 /* Number of columns display within the window is scrolled to the left. */
225 ptrdiff_t hscroll; 228 ptrdiff_t hscroll;
226 229
@@ -354,11 +357,6 @@ wset_frame (struct window *w, Lisp_Object val)
354 w->frame = val; 357 w->frame = val;
355} 358}
356WINDOW_INLINE void 359WINDOW_INLINE void
357wset_left_col (struct window *w, Lisp_Object val)
358{
359 w->left_col = val;
360}
361WINDOW_INLINE void
362wset_next (struct window *w, Lisp_Object val) 360wset_next (struct window *w, Lisp_Object val)
363{ 361{
364 w->next = val; 362 w->next = val;
@@ -374,21 +372,6 @@ wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
374 w->redisplay_end_trigger = val; 372 w->redisplay_end_trigger = val;
375} 373}
376WINDOW_INLINE void 374WINDOW_INLINE void
377wset_top_line (struct window *w, Lisp_Object val)
378{
379 w->top_line = val;
380}
381WINDOW_INLINE void
382wset_total_cols (struct window *w, Lisp_Object val)
383{
384 w->total_cols = val;
385}
386WINDOW_INLINE void
387wset_total_lines (struct window *w, Lisp_Object val)
388{
389 w->total_lines = val;
390}
391WINDOW_INLINE void
392wset_vertical_scroll_bar (struct window *w, Lisp_Object val) 375wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
393{ 376{
394 w->vertical_scroll_bar = val; 377 w->vertical_scroll_bar = val;
@@ -461,14 +444,12 @@ wset_next_buffers (struct window *w, Lisp_Object val)
461/* Return the width of window W in canonical column units. 444/* Return the width of window W in canonical column units.
462 This includes scroll bars and fringes. */ 445 This includes scroll bars and fringes. */
463 446
464#define WINDOW_TOTAL_COLS(W) \ 447#define WINDOW_TOTAL_COLS(W) (W)->total_cols
465 (XFASTINT (W->total_cols))
466 448
467/* Return the height of window W in canonical line units. 449/* Return the height of window W in canonical line units.
468 This includes header and mode lines, if any. */ 450 This includes header and mode lines, if any. */
469 451
470#define WINDOW_TOTAL_LINES(W) \ 452#define WINDOW_TOTAL_LINES(W) (W)->total_lines
471 (XFASTINT (W->total_lines))
472 453
473/* Return the total pixel width of window W. */ 454/* Return the total pixel width of window W. */
474 455
@@ -495,8 +476,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
495/* Return the canonical frame column at which window W starts. 476/* Return the canonical frame column at which window W starts.
496 This includes a left-hand scroll bar, if any. */ 477 This includes a left-hand scroll bar, if any. */
497 478
498#define WINDOW_LEFT_EDGE_COL(W) \ 479#define WINDOW_LEFT_EDGE_COL(W) (W)->left_col
499 (XFASTINT (W->left_col))
500 480
501/* Return the canonical frame column before which window W ends. 481/* Return the canonical frame column before which window W ends.
502 This includes a right-hand scroll bar, if any. */ 482 This includes a right-hand scroll bar, if any. */
@@ -507,8 +487,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
507/* Return the canonical frame line at which window W starts. 487/* Return the canonical frame line at which window W starts.
508 This includes a header line, if any. */ 488 This includes a header line, if any. */
509 489
510#define WINDOW_TOP_EDGE_LINE(W) \ 490#define WINDOW_TOP_EDGE_LINE(W) (W)->top_line
511 (XFASTINT (W->top_line))
512 491
513/* Return the canonical frame line before which window W ends. 492/* Return the canonical frame line before which window W ends.
514 This includes a mode line, if any. */ 493 This includes a mode line, if any. */