diff options
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 85 |
1 files changed, 35 insertions, 50 deletions
diff --git a/src/window.h b/src/window.h index 2a12226c0aa..dcef37abb4c 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Window definitions for GNU Emacs. | 1 | /* Window definitions for GNU Emacs. |
| 2 | Copyright (C) 1985-1986, 1993, 1995, 1997-2012 | 2 | Copyright (C) 1985-1986, 1993, 1995, 1997-2013 Free Software |
| 3 | Free Software Foundation, Inc. | 3 | Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -175,17 +175,13 @@ struct window | |||
| 175 | no scroll bar. A value of t means use frame value. */ | 175 | no scroll bar. A value of t means use frame value. */ |
| 176 | Lisp_Object vertical_scroll_bar_type; | 176 | Lisp_Object vertical_scroll_bar_type; |
| 177 | 177 | ||
| 178 | /* Z - the buffer position of the last glyph in the current matrix | 178 | /* Z - the buffer position of the last glyph in the current |
| 179 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 179 | matrix of W. Only valid if window_end_valid is nonzero. */ |
| 180 | Lisp_Object window_end_pos; | 180 | Lisp_Object window_end_pos; |
| 181 | |||
| 181 | /* Glyph matrix row of the last glyph in the current matrix | 182 | /* Glyph matrix row of the last glyph in the current matrix |
| 182 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 183 | of W. Only valid if window_end_valid is nonzero. */ |
| 183 | Lisp_Object window_end_vpos; | 184 | Lisp_Object window_end_vpos; |
| 184 | /* t if window_end_pos is truly valid. | ||
| 185 | This is nil if nontrivial redisplay is preempted | ||
| 186 | since in that case the frame image that window_end_pos | ||
| 187 | did not get onto the frame. */ | ||
| 188 | Lisp_Object window_end_valid; | ||
| 189 | 185 | ||
| 190 | /* Display-table to use for displaying chars in this window. | 186 | /* Display-table to use for displaying chars in this window. |
| 191 | Nil means use the buffer's own display-table. */ | 187 | Nil means use the buffer's own display-table. */ |
| @@ -196,23 +192,6 @@ struct window | |||
| 196 | and Qt, so bitfield can't be used here. */ | 192 | and Qt, so bitfield can't be used here. */ |
| 197 | Lisp_Object dedicated; | 193 | Lisp_Object dedicated; |
| 198 | 194 | ||
| 199 | /* Line number and position of a line somewhere above the top of the | ||
| 200 | screen. If this field is nil, it means we don't have a base | ||
| 201 | line. */ | ||
| 202 | Lisp_Object base_line_number; | ||
| 203 | /* If this field is nil, it means we don't have a base line. | ||
| 204 | If it is a buffer, it means don't display the line number | ||
| 205 | as long as the window shows that buffer. */ | ||
| 206 | Lisp_Object base_line_pos; | ||
| 207 | |||
| 208 | /* If we have highlighted the region (or any part of it), | ||
| 209 | this is the mark position that we used, as an integer. */ | ||
| 210 | Lisp_Object region_showing; | ||
| 211 | |||
| 212 | /* The column number currently displayed in this window's mode line, | ||
| 213 | or nil if column numbers are not being displayed. */ | ||
| 214 | Lisp_Object column_number_displayed; | ||
| 215 | |||
| 216 | /* If redisplay in this window goes beyond this buffer position, | 195 | /* If redisplay in this window goes beyond this buffer position, |
| 217 | must run the redisplay-end-trigger-hook. */ | 196 | must run the redisplay-end-trigger-hook. */ |
| 218 | Lisp_Object redisplay_end_trigger; | 197 | Lisp_Object redisplay_end_trigger; |
| @@ -242,9 +221,6 @@ struct window | |||
| 242 | /* Number saying how recently window was selected. */ | 221 | /* Number saying how recently window was selected. */ |
| 243 | int use_time; | 222 | int use_time; |
| 244 | 223 | ||
| 245 | /* Unique number of window assigned when it was created. */ | ||
| 246 | int sequence_number; | ||
| 247 | |||
| 248 | /* Number of columns display within the window is scrolled to the left. */ | 224 | /* Number of columns display within the window is scrolled to the left. */ |
| 249 | ptrdiff_t hscroll; | 225 | ptrdiff_t hscroll; |
| 250 | 226 | ||
| @@ -261,9 +237,22 @@ struct window | |||
| 261 | EMACS_INT last_overlay_modified; | 237 | EMACS_INT last_overlay_modified; |
| 262 | 238 | ||
| 263 | /* Value of point at that time. Since this is a position in a buffer, | 239 | /* Value of point at that time. Since this is a position in a buffer, |
| 264 | it should be positive. */ | 240 | it should be positive. */ |
| 265 | ptrdiff_t last_point; | 241 | ptrdiff_t last_point; |
| 266 | 242 | ||
| 243 | /* Line number and position of a line somewhere above the top of the | ||
| 244 | screen. If this field is zero, it means we don't have a base line. */ | ||
| 245 | ptrdiff_t base_line_number; | ||
| 246 | |||
| 247 | /* If this field is zero, it means we don't have a base line. | ||
| 248 | If it is -1, it means don't display the line number as long | ||
| 249 | as the window shows its buffer. */ | ||
| 250 | ptrdiff_t base_line_pos; | ||
| 251 | |||
| 252 | /* The column number currently displayed in this window's mode | ||
| 253 | line, or -1 if column numbers are not being displayed. */ | ||
| 254 | ptrdiff_t column_number_displayed; | ||
| 255 | |||
| 267 | /* Scaling factor for the glyph_matrix size calculation in this window. | 256 | /* Scaling factor for the glyph_matrix size calculation in this window. |
| 268 | Used if window contains many small images or uses proportional fonts, | 257 | Used if window contains many small images or uses proportional fonts, |
| 269 | as the normal may yield a matrix which is too small. */ | 258 | as the normal may yield a matrix which is too small. */ |
| @@ -290,7 +279,7 @@ struct window | |||
| 290 | /* Non-zero if this window is a minibuffer window. */ | 279 | /* Non-zero if this window is a minibuffer window. */ |
| 291 | unsigned mini : 1; | 280 | unsigned mini : 1; |
| 292 | 281 | ||
| 293 | /* Non-zero means must regenerate mode line of this window */ | 282 | /* Non-zero means must regenerate mode line of this window. */ |
| 294 | unsigned update_mode_line : 1; | 283 | unsigned update_mode_line : 1; |
| 295 | 284 | ||
| 296 | /* Non-nil if the buffer was "modified" when the window | 285 | /* Non-nil if the buffer was "modified" when the window |
| @@ -339,23 +328,27 @@ struct window | |||
| 339 | Otherwise draw them between margin areas and text. */ | 328 | Otherwise draw them between margin areas and text. */ |
| 340 | unsigned fringes_outside_margins : 1; | 329 | unsigned fringes_outside_margins : 1; |
| 341 | 330 | ||
| 331 | /* Nonzero if window_end_pos and window_end_vpos are truly valid. | ||
| 332 | This is zero if nontrivial redisplay is preempted since in that case | ||
| 333 | the frame image that window_end_pos did not get onto the frame. */ | ||
| 334 | unsigned window_end_valid : 1; | ||
| 335 | |||
| 342 | /* Amount by which lines of this window are scrolled in | 336 | /* Amount by which lines of this window are scrolled in |
| 343 | y-direction (smooth scrolling). */ | 337 | y-direction (smooth scrolling). */ |
| 344 | int vscroll; | 338 | int vscroll; |
| 345 | 339 | ||
| 346 | /* Z_BYTE - the buffer position of the last glyph in the current matrix of W. | 340 | /* If we have highlighted the region (or any part of it), the mark |
| 347 | Should be nonnegative, and only valid if window_end_valid is not nil. */ | 341 | (region start) position; otherwise zero. */ |
| 342 | ptrdiff_t region_showing; | ||
| 343 | |||
| 344 | /* Z_BYTE - buffer position of the last glyph in the current matrix of W. | ||
| 345 | Should be nonnegative, and only valid if window_end_valid is nonzero. */ | ||
| 348 | ptrdiff_t window_end_bytepos; | 346 | ptrdiff_t window_end_bytepos; |
| 349 | }; | 347 | }; |
| 350 | 348 | ||
| 351 | /* Most code should use these functions to set Lisp fields in struct | 349 | /* Most code should use these functions to set Lisp fields in struct |
| 352 | window. */ | 350 | window. */ |
| 353 | WINDOW_INLINE void | 351 | WINDOW_INLINE void |
| 354 | wset_buffer (struct window *w, Lisp_Object val) | ||
| 355 | { | ||
| 356 | w->buffer = val; | ||
| 357 | } | ||
| 358 | WINDOW_INLINE void | ||
| 359 | wset_frame (struct window *w, Lisp_Object val) | 352 | wset_frame (struct window *w, Lisp_Object val) |
| 360 | { | 353 | { |
| 361 | w->frame = val; | 354 | w->frame = val; |
| @@ -406,11 +399,6 @@ wset_window_end_pos (struct window *w, Lisp_Object val) | |||
| 406 | w->window_end_pos = val; | 399 | w->window_end_pos = val; |
| 407 | } | 400 | } |
| 408 | WINDOW_INLINE void | 401 | WINDOW_INLINE void |
| 409 | wset_window_end_valid (struct window *w, Lisp_Object val) | ||
| 410 | { | ||
| 411 | w->window_end_valid = val; | ||
| 412 | } | ||
| 413 | WINDOW_INLINE void | ||
| 414 | wset_window_end_vpos (struct window *w, Lisp_Object val) | 402 | wset_window_end_vpos (struct window *w, Lisp_Object val) |
| 415 | { | 403 | { |
| 416 | w->window_end_vpos = val; | 404 | w->window_end_vpos = val; |
| @@ -939,7 +927,7 @@ extern EMACS_INT minibuf_level; | |||
| 939 | extern int update_mode_lines; | 927 | extern int update_mode_lines; |
| 940 | 928 | ||
| 941 | /* Nonzero if window sizes or contents have changed since last | 929 | /* Nonzero if window sizes or contents have changed since last |
| 942 | redisplay that finished */ | 930 | redisplay that finished. */ |
| 943 | 931 | ||
| 944 | extern int windows_or_buffers_changed; | 932 | extern int windows_or_buffers_changed; |
| 945 | 933 | ||
| @@ -947,11 +935,6 @@ extern int windows_or_buffers_changed; | |||
| 947 | 935 | ||
| 948 | extern int cursor_type_changed; | 936 | extern int cursor_type_changed; |
| 949 | 937 | ||
| 950 | /* Number of windows displaying the selected buffer. Normally this is | ||
| 951 | 1, but it can be more. */ | ||
| 952 | |||
| 953 | extern int buffer_shared; | ||
| 954 | |||
| 955 | /* If *ROWS or *COLS are too small a size for FRAME, set them to the | 938 | /* If *ROWS or *COLS are too small a size for FRAME, set them to the |
| 956 | minimum allowable size. */ | 939 | minimum allowable size. */ |
| 957 | 940 | ||
| @@ -997,6 +980,8 @@ extern int window_body_cols (struct window *w); | |||
| 997 | extern void temp_output_buffer_show (Lisp_Object); | 980 | extern void temp_output_buffer_show (Lisp_Object); |
| 998 | extern void replace_buffer_in_windows (Lisp_Object); | 981 | extern void replace_buffer_in_windows (Lisp_Object); |
| 999 | extern void replace_buffer_in_windows_safely (Lisp_Object); | 982 | extern void replace_buffer_in_windows_safely (Lisp_Object); |
| 983 | /* This looks like a setter, but it is a bit special. */ | ||
| 984 | extern void wset_buffer (struct window *, Lisp_Object); | ||
| 1000 | extern void init_window_once (void); | 985 | extern void init_window_once (void); |
| 1001 | extern void init_window (void); | 986 | extern void init_window (void); |
| 1002 | extern void syms_of_window (void); | 987 | extern void syms_of_window (void); |