diff options
| author | Joakim Verona | 2012-08-01 13:16:20 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-08-01 13:16:20 +0200 |
| commit | 610ba6f8ddf2298849cad522b6952bc694f0e63f (patch) | |
| tree | 64548d6651c0501eb5838c566a6902d500228b5f /src/window.h | |
| parent | 55fa71b3d9bb8609ca3cbb56f92c776ad8724a69 (diff) | |
| parent | 069bac5e5b55c0f63bd2764e727108d2b48b2643 (diff) | |
| download | emacs-610ba6f8ddf2298849cad522b6952bc694f0e63f.tar.gz emacs-610ba6f8ddf2298849cad522b6952bc694f0e63f.zip | |
upstream
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 150 |
1 files changed, 79 insertions, 71 deletions
diff --git a/src/window.h b/src/window.h index 10cabed979b..ece58d2cf97 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -86,142 +86,150 @@ struct cursor_pos | |||
| 86 | int hpos, vpos; | 86 | int hpos, vpos; |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | /* Most code should use this macro to access Lisp fields in struct window. */ | ||
| 90 | |||
| 91 | #define WVAR(w, field) ((w)->INTERNAL_FIELD (field)) | ||
| 92 | |||
| 89 | struct window | 93 | struct window |
| 90 | { | 94 | { |
| 91 | /* This is for Lisp; the terminal code does not refer to it. */ | 95 | /* This is for Lisp; the terminal code does not refer to it. */ |
| 92 | struct vectorlike_header header; | 96 | struct vectorlike_header header; |
| 93 | 97 | ||
| 94 | /* The frame this window is on. */ | 98 | /* The frame this window is on. */ |
| 95 | Lisp_Object frame; | 99 | Lisp_Object INTERNAL_FIELD (frame); |
| 96 | 100 | ||
| 97 | /* Following (to right or down) and preceding (to left or up) child | 101 | /* Following (to right or down) and preceding (to left or up) child |
| 98 | at same level of tree. */ | 102 | at same level of tree. */ |
| 99 | Lisp_Object next, prev; | 103 | Lisp_Object INTERNAL_FIELD (next); |
| 104 | Lisp_Object INTERNAL_FIELD (prev); | ||
| 100 | 105 | ||
| 101 | /* First child of this window: vchild is used if this is a vertical | 106 | /* First child of this window: vchild is used if this is a vertical |
| 102 | combination, hchild if this is a horizontal combination. Of the | 107 | combination, hchild if this is a horizontal combination. Of the |
| 103 | fields vchild, hchild and buffer, one and only one is non-nil | 108 | fields vchild, hchild and buffer, one and only one is non-nil |
| 104 | unless the window is dead. */ | 109 | unless the window is dead. */ |
| 105 | Lisp_Object hchild, vchild; | 110 | Lisp_Object INTERNAL_FIELD (hchild); |
| 111 | Lisp_Object INTERNAL_FIELD (vchild); | ||
| 106 | 112 | ||
| 107 | /* The window this one is a child of. */ | 113 | /* The window this one is a child of. */ |
| 108 | Lisp_Object parent; | 114 | Lisp_Object INTERNAL_FIELD (parent); |
| 109 | 115 | ||
| 110 | /* The upper left corner coordinates of this window, as integers | 116 | /* The upper left corner coordinates of this window, as integers |
| 111 | relative to upper left corner of frame = 0, 0. */ | 117 | relative to upper left corner of frame = 0, 0. */ |
| 112 | Lisp_Object left_col; | 118 | Lisp_Object INTERNAL_FIELD (left_col); |
| 113 | Lisp_Object top_line; | 119 | Lisp_Object INTERNAL_FIELD (top_line); |
| 114 | 120 | ||
| 115 | /* The size of the window. */ | 121 | /* The size of the window. */ |
| 116 | Lisp_Object total_lines; | 122 | Lisp_Object INTERNAL_FIELD (total_lines); |
| 117 | Lisp_Object total_cols; | 123 | Lisp_Object INTERNAL_FIELD (total_cols); |
| 118 | 124 | ||
| 119 | /* The normal size of the window. */ | 125 | /* The normal size of the window. */ |
| 120 | Lisp_Object normal_lines; | 126 | Lisp_Object INTERNAL_FIELD (normal_lines); |
| 121 | Lisp_Object normal_cols; | 127 | Lisp_Object INTERNAL_FIELD (normal_cols); |
| 122 | 128 | ||
| 123 | /* New sizes of the window. */ | 129 | /* New sizes of the window. */ |
| 124 | Lisp_Object new_total; | 130 | Lisp_Object INTERNAL_FIELD (new_total); |
| 125 | Lisp_Object new_normal; | 131 | Lisp_Object INTERNAL_FIELD (new_normal); |
| 126 | 132 | ||
| 127 | /* The buffer displayed in this window. Of the fields vchild, | 133 | /* The buffer displayed in this window. Of the fields vchild, |
| 128 | hchild and buffer, one and only one is non-nil unless the window | 134 | hchild and buffer, one and only one is non-nil unless the window |
| 129 | is dead. */ | 135 | is dead. */ |
| 130 | Lisp_Object buffer; | 136 | Lisp_Object INTERNAL_FIELD (buffer); |
| 131 | 137 | ||
| 132 | /* A marker pointing to where in the text to start displaying. | 138 | /* A marker pointing to where in the text to start displaying. |
| 133 | BIDI Note: This is the _logical-order_ start, i.e. the smallest | 139 | BIDI Note: This is the _logical-order_ start, i.e. the smallest |
| 134 | buffer position visible in the window, not necessarily the | 140 | buffer position visible in the window, not necessarily the |
| 135 | character displayed in the top left corner of the window. */ | 141 | character displayed in the top left corner of the window. */ |
| 136 | Lisp_Object start; | 142 | Lisp_Object INTERNAL_FIELD (start); |
| 137 | 143 | ||
| 138 | /* A marker pointing to where in the text point is in this window, | 144 | /* A marker pointing to where in the text point is in this window, |
| 139 | used only when the window is not selected. | 145 | used only when the window is not selected. |
| 140 | This exists so that when multiple windows show one buffer | 146 | This exists so that when multiple windows show one buffer |
| 141 | each one can have its own value of point. */ | 147 | each one can have its own value of point. */ |
| 142 | Lisp_Object pointm; | 148 | Lisp_Object INTERNAL_FIELD (pointm); |
| 143 | 149 | ||
| 144 | /* No permanent meaning; used by save-window-excursion's | 150 | /* No permanent meaning; used by save-window-excursion's |
| 145 | bookkeeping. */ | 151 | bookkeeping. */ |
| 146 | Lisp_Object temslot; | 152 | Lisp_Object INTERNAL_FIELD (temslot); |
| 147 | 153 | ||
| 148 | /* This window's vertical scroll bar. This field is only for use | 154 | /* This window's vertical scroll bar. This field is only for use |
| 149 | by the window-system-dependent code which implements the | 155 | by the window-system-dependent code which implements the |
| 150 | scroll bars; it can store anything it likes here. If this | 156 | scroll bars; it can store anything it likes here. If this |
| 151 | window is newly created and we haven't displayed a scroll bar in | 157 | window is newly created and we haven't displayed a scroll bar in |
| 152 | it yet, or if the frame doesn't have any scroll bars, this is nil. */ | 158 | it yet, or if the frame doesn't have any scroll bars, this is nil. */ |
| 153 | Lisp_Object vertical_scroll_bar; | 159 | Lisp_Object INTERNAL_FIELD (vertical_scroll_bar); |
| 154 | 160 | ||
| 155 | /* Width of left and right marginal areas. A value of nil means | 161 | /* Width of left and right marginal areas. A value of nil means |
| 156 | no margin. */ | 162 | no margin. */ |
| 157 | Lisp_Object left_margin_cols, right_margin_cols; | 163 | Lisp_Object INTERNAL_FIELD (left_margin_cols); |
| 164 | Lisp_Object INTERNAL_FIELD (right_margin_cols); | ||
| 158 | 165 | ||
| 159 | /* Width of left and right fringes. | 166 | /* Width of left and right fringes. |
| 160 | A value of nil or t means use frame values. */ | 167 | A value of nil or t means use frame values. */ |
| 161 | Lisp_Object left_fringe_width, right_fringe_width; | 168 | Lisp_Object INTERNAL_FIELD (left_fringe_width); |
| 169 | Lisp_Object INTERNAL_FIELD (right_fringe_width); | ||
| 162 | 170 | ||
| 163 | /* Pixel width of scroll bars. | 171 | /* Pixel width of scroll bars. |
| 164 | A value of nil or t means use frame values. */ | 172 | A value of nil or t means use frame values. */ |
| 165 | Lisp_Object scroll_bar_width; | 173 | Lisp_Object INTERNAL_FIELD (scroll_bar_width); |
| 166 | 174 | ||
| 167 | /* Type of vertical scroll bar. A value of nil means | 175 | /* Type of vertical scroll bar. A value of nil means |
| 168 | no scroll bar. A value of t means use frame value. */ | 176 | no scroll bar. A value of t means use frame value. */ |
| 169 | Lisp_Object vertical_scroll_bar_type; | 177 | Lisp_Object INTERNAL_FIELD (vertical_scroll_bar_type); |
| 170 | 178 | ||
| 171 | /* Z - the buffer position of the last glyph in the current matrix | 179 | /* Z - the buffer position of the last glyph in the current matrix |
| 172 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 180 | of W. Only valid if WINDOW_END_VALID is not nil. */ |
| 173 | Lisp_Object window_end_pos; | 181 | Lisp_Object INTERNAL_FIELD (window_end_pos); |
| 174 | /* Glyph matrix row of the last glyph in the current matrix | 182 | /* Glyph matrix row of the last glyph in the current matrix |
| 175 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 183 | of W. Only valid if WINDOW_END_VALID is not nil. */ |
| 176 | Lisp_Object window_end_vpos; | 184 | Lisp_Object INTERNAL_FIELD (window_end_vpos); |
| 177 | /* t if window_end_pos is truly valid. | 185 | /* t if window_end_pos is truly valid. |
| 178 | This is nil if nontrivial redisplay is preempted | 186 | This is nil if nontrivial redisplay is preempted |
| 179 | since in that case the frame image that window_end_pos | 187 | since in that case the frame image that window_end_pos |
| 180 | did not get onto the frame. */ | 188 | did not get onto the frame. */ |
| 181 | Lisp_Object window_end_valid; | 189 | Lisp_Object INTERNAL_FIELD (window_end_valid); |
| 182 | 190 | ||
| 183 | /* Display-table to use for displaying chars in this window. | 191 | /* Display-table to use for displaying chars in this window. |
| 184 | Nil means use the buffer's own display-table. */ | 192 | Nil means use the buffer's own display-table. */ |
| 185 | Lisp_Object display_table; | 193 | Lisp_Object INTERNAL_FIELD (display_table); |
| 186 | 194 | ||
| 187 | /* Non-nil usually means window is marked as dedicated. | 195 | /* Non-nil usually means window is marked as dedicated. |
| 188 | Note Lisp code may set this to something beyond Qnil | 196 | Note Lisp code may set this to something beyond Qnil |
| 189 | and Qt, so bitfield can't be used here. */ | 197 | and Qt, so bitfield can't be used here. */ |
| 190 | Lisp_Object dedicated; | 198 | Lisp_Object INTERNAL_FIELD (dedicated); |
| 191 | 199 | ||
| 192 | /* Line number and position of a line somewhere above the top of the | 200 | /* Line number and position of a line somewhere above the top of the |
| 193 | screen. If this field is nil, it means we don't have a base | 201 | screen. If this field is nil, it means we don't have a base |
| 194 | line. */ | 202 | line. */ |
| 195 | Lisp_Object base_line_number; | 203 | Lisp_Object INTERNAL_FIELD (base_line_number); |
| 196 | /* If this field is nil, it means we don't have a base line. | 204 | /* If this field is nil, it means we don't have a base line. |
| 197 | If it is a buffer, it means don't display the line number | 205 | If it is a buffer, it means don't display the line number |
| 198 | as long as the window shows that buffer. */ | 206 | as long as the window shows that buffer. */ |
| 199 | Lisp_Object base_line_pos; | 207 | Lisp_Object INTERNAL_FIELD (base_line_pos); |
| 200 | 208 | ||
| 201 | /* If we have highlighted the region (or any part of it), | 209 | /* If we have highlighted the region (or any part of it), |
| 202 | this is the mark position that we used, as an integer. */ | 210 | this is the mark position that we used, as an integer. */ |
| 203 | Lisp_Object region_showing; | 211 | Lisp_Object INTERNAL_FIELD (region_showing); |
| 204 | 212 | ||
| 205 | /* The column number currently displayed in this window's mode line, | 213 | /* The column number currently displayed in this window's mode line, |
| 206 | or nil if column numbers are not being displayed. */ | 214 | or nil if column numbers are not being displayed. */ |
| 207 | Lisp_Object column_number_displayed; | 215 | Lisp_Object INTERNAL_FIELD (column_number_displayed); |
| 208 | 216 | ||
| 209 | /* If redisplay in this window goes beyond this buffer position, | 217 | /* If redisplay in this window goes beyond this buffer position, |
| 210 | must run the redisplay-end-trigger-hook. */ | 218 | must run the redisplay-end-trigger-hook. */ |
| 211 | Lisp_Object redisplay_end_trigger; | 219 | Lisp_Object INTERNAL_FIELD (redisplay_end_trigger); |
| 212 | 220 | ||
| 213 | /* t means this window's child windows are not (re-)combined. */ | 221 | /* t means this window's child windows are not (re-)combined. */ |
| 214 | Lisp_Object combination_limit; | 222 | Lisp_Object INTERNAL_FIELD (combination_limit); |
| 215 | 223 | ||
| 216 | /* Alist of <buffer, window-start, window-point> triples listing | 224 | /* Alist of <buffer, window-start, window-point> triples listing |
| 217 | buffers previously shown in this window. */ | 225 | buffers previously shown in this window. */ |
| 218 | Lisp_Object prev_buffers; | 226 | Lisp_Object INTERNAL_FIELD (prev_buffers); |
| 219 | 227 | ||
| 220 | /* List of buffers re-shown in this window. */ | 228 | /* List of buffers re-shown in this window. */ |
| 221 | Lisp_Object next_buffers; | 229 | Lisp_Object INTERNAL_FIELD (next_buffers); |
| 222 | 230 | ||
| 223 | /* An alist with parameters. */ | 231 | /* An alist with parameters. */ |
| 224 | Lisp_Object window_parameters; | 232 | Lisp_Object INTERNAL_FIELD (window_parameters); |
| 225 | 233 | ||
| 226 | /* No Lisp data may follow below this point without changing | 234 | /* No Lisp data may follow below this point without changing |
| 227 | mark_object in alloc.c. The member current_matrix must be the | 235 | mark_object in alloc.c. The member current_matrix must be the |
| @@ -388,13 +396,13 @@ struct window | |||
| 388 | This includes scroll bars and fringes. */ | 396 | This includes scroll bars and fringes. */ |
| 389 | 397 | ||
| 390 | #define WINDOW_TOTAL_COLS(W) \ | 398 | #define WINDOW_TOTAL_COLS(W) \ |
| 391 | (XFASTINT ((W)->total_cols)) | 399 | (XFASTINT (WVAR (W, total_cols))) |
| 392 | 400 | ||
| 393 | /* Return the height of window W in canonical line units. | 401 | /* Return the height of window W in canonical line units. |
| 394 | This includes header and mode lines, if any. */ | 402 | This includes header and mode lines, if any. */ |
| 395 | 403 | ||
| 396 | #define WINDOW_TOTAL_LINES(W) \ | 404 | #define WINDOW_TOTAL_LINES(W) \ |
| 397 | (XFASTINT ((W)->total_lines)) | 405 | (XFASTINT (WVAR (W, total_lines))) |
| 398 | 406 | ||
| 399 | /* Return the total pixel width of window W. */ | 407 | /* Return the total pixel width of window W. */ |
| 400 | 408 | ||
| @@ -422,7 +430,7 @@ struct window | |||
| 422 | This includes a left-hand scroll bar, if any. */ | 430 | This includes a left-hand scroll bar, if any. */ |
| 423 | 431 | ||
| 424 | #define WINDOW_LEFT_EDGE_COL(W) \ | 432 | #define WINDOW_LEFT_EDGE_COL(W) \ |
| 425 | (XFASTINT ((W)->left_col)) | 433 | (XFASTINT (WVAR (W, left_col))) |
| 426 | 434 | ||
| 427 | /* Return the canonical frame column before which window W ends. | 435 | /* Return the canonical frame column before which window W ends. |
| 428 | This includes a right-hand scroll bar, if any. */ | 436 | This includes a right-hand scroll bar, if any. */ |
| @@ -434,7 +442,7 @@ struct window | |||
| 434 | This includes a header line, if any. */ | 442 | This includes a header line, if any. */ |
| 435 | 443 | ||
| 436 | #define WINDOW_TOP_EDGE_LINE(W) \ | 444 | #define WINDOW_TOP_EDGE_LINE(W) \ |
| 437 | (XFASTINT ((W)->top_line)) | 445 | (XFASTINT (WVAR (W, top_line))) |
| 438 | 446 | ||
| 439 | /* Return the canonical frame line before which window W ends. | 447 | /* Return the canonical frame line before which window W ends. |
| 440 | This includes a mode line, if any. */ | 448 | This includes a mode line, if any. */ |
| @@ -460,14 +468,14 @@ struct window | |||
| 460 | /* 1 if W is a menu bar window. */ | 468 | /* 1 if W is a menu bar window. */ |
| 461 | 469 | ||
| 462 | #define WINDOW_MENU_BAR_P(W) \ | 470 | #define WINDOW_MENU_BAR_P(W) \ |
| 463 | (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \ | 471 | (WINDOWP (FVAR (WINDOW_XFRAME (W), menu_bar_window)) \ |
| 464 | && (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window)) | 472 | && (W) == XWINDOW (FVAR (WINDOW_XFRAME (W), menu_bar_window))) |
| 465 | 473 | ||
| 466 | /* 1 if W is a tool bar window. */ | 474 | /* 1 if W is a tool bar window. */ |
| 467 | 475 | ||
| 468 | #define WINDOW_TOOL_BAR_P(W) \ | 476 | #define WINDOW_TOOL_BAR_P(W) \ |
| 469 | (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \ | 477 | (WINDOWP (FVAR (WINDOW_XFRAME (W), tool_bar_window)) \ |
| 470 | && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window)) | 478 | && (W) == XWINDOW (FVAR (WINDOW_XFRAME (W), tool_bar_window))) |
| 471 | 479 | ||
| 472 | /* Return the frame y-position at which window W starts. | 480 | /* Return the frame y-position at which window W starts. |
| 473 | This includes a header line, if any. */ | 481 | This includes a header line, if any. */ |
| @@ -539,31 +547,31 @@ struct window | |||
| 539 | /* Width of left margin area in columns. */ | 547 | /* Width of left margin area in columns. */ |
| 540 | 548 | ||
| 541 | #define WINDOW_LEFT_MARGIN_COLS(W) \ | 549 | #define WINDOW_LEFT_MARGIN_COLS(W) \ |
| 542 | (NILP ((W)->left_margin_cols) \ | 550 | (NILP (WVAR (W, left_margin_cols)) \ |
| 543 | ? 0 \ | 551 | ? 0 \ |
| 544 | : XINT ((W)->left_margin_cols)) | 552 | : XINT (WVAR (W, left_margin_cols))) |
| 545 | 553 | ||
| 546 | /* Width of right marginal area in columns. */ | 554 | /* Width of right marginal area in columns. */ |
| 547 | 555 | ||
| 548 | #define WINDOW_RIGHT_MARGIN_COLS(W) \ | 556 | #define WINDOW_RIGHT_MARGIN_COLS(W) \ |
| 549 | (NILP ((W)->right_margin_cols) \ | 557 | (NILP (WVAR (W, right_margin_cols)) \ |
| 550 | ? 0 \ | 558 | ? 0 \ |
| 551 | : XINT ((W)->right_margin_cols)) | 559 | : XINT (WVAR (W, right_margin_cols))) |
| 552 | 560 | ||
| 553 | /* Width of left margin area in pixels. */ | 561 | /* Width of left margin area in pixels. */ |
| 554 | 562 | ||
| 555 | #define WINDOW_LEFT_MARGIN_WIDTH(W) \ | 563 | #define WINDOW_LEFT_MARGIN_WIDTH(W) \ |
| 556 | (NILP ((W)->left_margin_cols) \ | 564 | (NILP (WVAR (W, left_margin_cols)) \ |
| 557 | ? 0 \ | 565 | ? 0 \ |
| 558 | : (XINT ((W)->left_margin_cols) \ | 566 | : (XINT (WVAR (W, left_margin_cols)) \ |
| 559 | * WINDOW_FRAME_COLUMN_WIDTH (W))) | 567 | * WINDOW_FRAME_COLUMN_WIDTH (W))) |
| 560 | 568 | ||
| 561 | /* Width of right marginal area in pixels. */ | 569 | /* Width of right marginal area in pixels. */ |
| 562 | 570 | ||
| 563 | #define WINDOW_RIGHT_MARGIN_WIDTH(W) \ | 571 | #define WINDOW_RIGHT_MARGIN_WIDTH(W) \ |
| 564 | (NILP ((W)->right_margin_cols) \ | 572 | (NILP (WVAR (W, right_margin_cols)) \ |
| 565 | ? 0 \ | 573 | ? 0 \ |
| 566 | : (XINT ((W)->right_margin_cols) \ | 574 | : (XINT (WVAR (W, right_margin_cols)) \ |
| 567 | * WINDOW_FRAME_COLUMN_WIDTH (W))) | 575 | * WINDOW_FRAME_COLUMN_WIDTH (W))) |
| 568 | 576 | ||
| 569 | /* Total width of fringes reserved for drawing truncation bitmaps, | 577 | /* Total width of fringes reserved for drawing truncation bitmaps, |
| @@ -573,8 +581,8 @@ struct window | |||
| 573 | able to split windows horizontally nicely. */ | 581 | able to split windows horizontally nicely. */ |
| 574 | 582 | ||
| 575 | #define WINDOW_FRINGE_COLS(W) \ | 583 | #define WINDOW_FRINGE_COLS(W) \ |
| 576 | ((INTEGERP ((W)->left_fringe_width) \ | 584 | ((INTEGERP (WVAR (W, left_fringe_width)) \ |
| 577 | || INTEGERP ((W)->right_fringe_width)) \ | 585 | || INTEGERP (WVAR (W, right_fringe_width))) \ |
| 578 | ? ((WINDOW_LEFT_FRINGE_WIDTH (W) \ | 586 | ? ((WINDOW_LEFT_FRINGE_WIDTH (W) \ |
| 579 | + WINDOW_RIGHT_FRINGE_WIDTH (W) \ | 587 | + WINDOW_RIGHT_FRINGE_WIDTH (W) \ |
| 580 | + WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \ | 588 | + WINDOW_FRAME_COLUMN_WIDTH (W) - 1) \ |
| @@ -596,13 +604,13 @@ struct window | |||
| 596 | /* Pixel-width of the left and right fringe. */ | 604 | /* Pixel-width of the left and right fringe. */ |
| 597 | 605 | ||
| 598 | #define WINDOW_LEFT_FRINGE_WIDTH(W) \ | 606 | #define WINDOW_LEFT_FRINGE_WIDTH(W) \ |
| 599 | (INTEGERP ((W)->left_fringe_width) \ | 607 | (INTEGERP (WVAR (W, left_fringe_width)) \ |
| 600 | ? XFASTINT ((W)->left_fringe_width) \ | 608 | ? XFASTINT (WVAR (W, left_fringe_width)) \ |
| 601 | : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W))) | 609 | : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W))) |
| 602 | 610 | ||
| 603 | #define WINDOW_RIGHT_FRINGE_WIDTH(W) \ | 611 | #define WINDOW_RIGHT_FRINGE_WIDTH(W) \ |
| 604 | (INTEGERP ((W)->right_fringe_width) \ | 612 | (INTEGERP (WVAR (W, right_fringe_width)) \ |
| 605 | ? XFASTINT ((W)->right_fringe_width) \ | 613 | ? XFASTINT (WVAR (W, right_fringe_width)) \ |
| 606 | : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W))) | 614 | : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W))) |
| 607 | 615 | ||
| 608 | /* Total width of fringes in pixels. */ | 616 | /* Total width of fringes in pixels. */ |
| @@ -619,36 +627,36 @@ struct window | |||
| 619 | and which side they are on. */ | 627 | and which side they are on. */ |
| 620 | 628 | ||
| 621 | #define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w) \ | 629 | #define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w) \ |
| 622 | (EQ ((w)->vertical_scroll_bar_type, Qt) \ | 630 | (EQ (WVAR (w, vertical_scroll_bar_type), Qt) \ |
| 623 | ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w)) \ | 631 | ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w)) \ |
| 624 | : EQ ((w)->vertical_scroll_bar_type, Qleft) \ | 632 | : EQ (WVAR (w, vertical_scroll_bar_type), Qleft) \ |
| 625 | ? vertical_scroll_bar_left \ | 633 | ? vertical_scroll_bar_left \ |
| 626 | : EQ ((w)->vertical_scroll_bar_type, Qright) \ | 634 | : EQ (WVAR (w, vertical_scroll_bar_type), Qright) \ |
| 627 | ? vertical_scroll_bar_right \ | 635 | ? vertical_scroll_bar_right \ |
| 628 | : vertical_scroll_bar_none) \ | 636 | : vertical_scroll_bar_none) \ |
| 629 | 637 | ||
| 630 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR(w) \ | 638 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR(w) \ |
| 631 | (EQ ((w)->vertical_scroll_bar_type, Qt) \ | 639 | (EQ (WVAR (w, vertical_scroll_bar_type), Qt) \ |
| 632 | ? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w)) \ | 640 | ? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w)) \ |
| 633 | : !NILP ((w)->vertical_scroll_bar_type)) | 641 | : !NILP (WVAR (w, vertical_scroll_bar_type))) |
| 634 | 642 | ||
| 635 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w) \ | 643 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w) \ |
| 636 | (EQ ((w)->vertical_scroll_bar_type, Qt) \ | 644 | (EQ (WVAR (w, vertical_scroll_bar_type), Qt) \ |
| 637 | ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w)) \ | 645 | ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w)) \ |
| 638 | : EQ ((w)->vertical_scroll_bar_type, Qleft)) | 646 | : EQ (WVAR (w, vertical_scroll_bar_type), Qleft)) |
| 639 | 647 | ||
| 640 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w) \ | 648 | #define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w) \ |
| 641 | (EQ ((w)->vertical_scroll_bar_type, Qt) \ | 649 | (EQ (WVAR (w, vertical_scroll_bar_type), Qt) \ |
| 642 | ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))\ | 650 | ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))\ |
| 643 | : EQ ((w)->vertical_scroll_bar_type, Qright)) | 651 | : EQ (WVAR (w, vertical_scroll_bar_type), Qright)) |
| 644 | 652 | ||
| 645 | /* Width that a scroll bar in window W should have, if there is one. | 653 | /* Width that a scroll bar in window W should have, if there is one. |
| 646 | Measured in pixels. If scroll bars are turned off, this is still | 654 | Measured in pixels. If scroll bars are turned off, this is still |
| 647 | nonzero. */ | 655 | nonzero. */ |
| 648 | 656 | ||
| 649 | #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \ | 657 | #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w) \ |
| 650 | (INTEGERP ((w)->scroll_bar_width) \ | 658 | (INTEGERP (WVAR (w, scroll_bar_width)) \ |
| 651 | ? XFASTINT ((w)->scroll_bar_width) \ | 659 | ? XFASTINT (WVAR (w, scroll_bar_width)) \ |
| 652 | : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w))) | 660 | : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w))) |
| 653 | 661 | ||
| 654 | /* Width that a scroll bar in window W should have, if there is one. | 662 | /* Width that a scroll bar in window W should have, if there is one. |
| @@ -656,8 +664,8 @@ struct window | |||
| 656 | this is still nonzero. */ | 664 | this is still nonzero. */ |
| 657 | 665 | ||
| 658 | #define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \ | 666 | #define WINDOW_CONFIG_SCROLL_BAR_COLS(w) \ |
| 659 | (INTEGERP ((w)->scroll_bar_width) \ | 667 | (INTEGERP (WVAR (w, scroll_bar_width)) \ |
| 660 | ? ((XFASTINT ((w)->scroll_bar_width) \ | 668 | ? ((XFASTINT (WVAR (w, scroll_bar_width)) \ |
| 661 | + WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \ | 669 | + WINDOW_FRAME_COLUMN_WIDTH (w) - 1) \ |
| 662 | / WINDOW_FRAME_COLUMN_WIDTH (w)) \ | 670 | / WINDOW_FRAME_COLUMN_WIDTH (w)) \ |
| 663 | : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w))) | 671 | : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w))) |
| @@ -880,7 +888,7 @@ struct glyph *get_phys_cursor_glyph (struct window *w); | |||
| 880 | /* Value is non-zero if WINDOW is a live window. */ | 888 | /* Value is non-zero if WINDOW is a live window. */ |
| 881 | 889 | ||
| 882 | #define WINDOW_LIVE_P(WINDOW) \ | 890 | #define WINDOW_LIVE_P(WINDOW) \ |
| 883 | (WINDOWP ((WINDOW)) && !NILP (XWINDOW ((WINDOW))->buffer)) | 891 | (WINDOWP ((WINDOW)) && !NILP (WVAR (XWINDOW ((WINDOW)), buffer))) |
| 884 | 892 | ||
| 885 | 893 | ||
| 886 | /* These used to be in lisp.h. */ | 894 | /* These used to be in lisp.h. */ |