diff options
| author | Kenichi Handa | 2012-08-22 18:05:50 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-08-22 18:05:50 +0900 |
| commit | fabc1281e9cde34ff9a19d843316d2ceca8647ad (patch) | |
| tree | f38f13cab3ec6c32ab8ab49ea2e60f64969a0d22 /src/window.h | |
| parent | 4ff819d728960bf5e52b72501c606f4bb3fde028 (diff) | |
| parent | 842e3a93aa3a0826cb4148376e54cd1527d10901 (diff) | |
| download | emacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.tar.gz emacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.zip | |
merge trunk
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 80 |
1 files changed, 76 insertions, 4 deletions
diff --git a/src/window.h b/src/window.h index 77b31dafd8b..28b9678b667 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -22,6 +22,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include "dispextern.h" | 23 | #include "dispextern.h" |
| 24 | 24 | ||
| 25 | INLINE_HEADER_BEGIN | ||
| 26 | #ifndef WINDOW_INLINE | ||
| 27 | # define WINDOW_INLINE INLINE | ||
| 28 | #endif | ||
| 29 | |||
| 25 | extern Lisp_Object Qleft, Qright; | 30 | extern Lisp_Object Qleft, Qright; |
| 26 | 31 | ||
| 27 | /* Windows are allocated as if they were vectors, but then the | 32 | /* Windows are allocated as if they were vectors, but then the |
| @@ -86,10 +91,6 @@ struct cursor_pos | |||
| 86 | int hpos, vpos; | 91 | int hpos, vpos; |
| 87 | }; | 92 | }; |
| 88 | 93 | ||
| 89 | /* Most code should use this macro to set Lisp fields in struct window. */ | ||
| 90 | |||
| 91 | #define WSET(w, field, value) ((w)->field = (value)) | ||
| 92 | |||
| 93 | struct window | 94 | struct window |
| 94 | { | 95 | { |
| 95 | /* This is for Lisp; the terminal code does not refer to it. */ | 96 | /* This is for Lisp; the terminal code does not refer to it. */ |
| @@ -348,6 +349,75 @@ struct window | |||
| 348 | ptrdiff_t window_end_bytepos; | 349 | ptrdiff_t window_end_bytepos; |
| 349 | }; | 350 | }; |
| 350 | 351 | ||
| 352 | /* Most code should use these functions to set Lisp fields in struct | ||
| 353 | window. */ | ||
| 354 | WINDOW_INLINE void | ||
| 355 | wset_buffer (struct window *w, Lisp_Object val) | ||
| 356 | { | ||
| 357 | w->buffer = val; | ||
| 358 | } | ||
| 359 | WINDOW_INLINE void | ||
| 360 | wset_frame (struct window *w, Lisp_Object val) | ||
| 361 | { | ||
| 362 | w->frame = val; | ||
| 363 | } | ||
| 364 | WINDOW_INLINE void | ||
| 365 | wset_left_col (struct window *w, Lisp_Object val) | ||
| 366 | { | ||
| 367 | w->left_col = val; | ||
| 368 | } | ||
| 369 | WINDOW_INLINE void | ||
| 370 | wset_next (struct window *w, Lisp_Object val) | ||
| 371 | { | ||
| 372 | w->next = val; | ||
| 373 | } | ||
| 374 | WINDOW_INLINE void | ||
| 375 | wset_prev (struct window *w, Lisp_Object val) | ||
| 376 | { | ||
| 377 | w->prev = val; | ||
| 378 | } | ||
| 379 | WINDOW_INLINE void | ||
| 380 | wset_redisplay_end_trigger (struct window *w, Lisp_Object val) | ||
| 381 | { | ||
| 382 | w->redisplay_end_trigger = val; | ||
| 383 | } | ||
| 384 | WINDOW_INLINE void | ||
| 385 | wset_top_line (struct window *w, Lisp_Object val) | ||
| 386 | { | ||
| 387 | w->top_line = val; | ||
| 388 | } | ||
| 389 | WINDOW_INLINE void | ||
| 390 | wset_total_cols (struct window *w, Lisp_Object val) | ||
| 391 | { | ||
| 392 | w->total_cols = val; | ||
| 393 | } | ||
| 394 | WINDOW_INLINE void | ||
| 395 | wset_total_lines (struct window *w, Lisp_Object val) | ||
| 396 | { | ||
| 397 | w->total_lines = val; | ||
| 398 | } | ||
| 399 | WINDOW_INLINE void | ||
| 400 | wset_vertical_scroll_bar (struct window *w, Lisp_Object val) | ||
| 401 | { | ||
| 402 | w->vertical_scroll_bar = val; | ||
| 403 | } | ||
| 404 | WINDOW_INLINE void | ||
| 405 | wset_window_end_pos (struct window *w, Lisp_Object val) | ||
| 406 | { | ||
| 407 | w->window_end_pos = val; | ||
| 408 | } | ||
| 409 | WINDOW_INLINE void | ||
| 410 | wset_window_end_valid (struct window *w, Lisp_Object val) | ||
| 411 | { | ||
| 412 | w->window_end_valid = val; | ||
| 413 | } | ||
| 414 | WINDOW_INLINE void | ||
| 415 | wset_window_end_vpos (struct window *w, Lisp_Object val) | ||
| 416 | { | ||
| 417 | w->window_end_vpos = val; | ||
| 418 | } | ||
| 419 | |||
| 420 | |||
| 351 | /* 1 if W is a minibuffer window. */ | 421 | /* 1 if W is a minibuffer window. */ |
| 352 | 422 | ||
| 353 | #define MINI_WINDOW_P(W) ((W)->mini) | 423 | #define MINI_WINDOW_P(W) ((W)->mini) |
| @@ -916,4 +986,6 @@ extern void init_window (void); | |||
| 916 | extern void syms_of_window (void); | 986 | extern void syms_of_window (void); |
| 917 | extern void keys_of_window (void); | 987 | extern void keys_of_window (void); |
| 918 | 988 | ||
| 989 | INLINE_HEADER_END | ||
| 990 | |||
| 919 | #endif /* not WINDOW_H_INCLUDED */ | 991 | #endif /* not WINDOW_H_INCLUDED */ |