aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
authorKenichi Handa2012-08-22 18:05:50 +0900
committerKenichi Handa2012-08-22 18:05:50 +0900
commitfabc1281e9cde34ff9a19d843316d2ceca8647ad (patch)
treef38f13cab3ec6c32ab8ab49ea2e60f64969a0d22 /src/window.h
parent4ff819d728960bf5e52b72501c606f4bb3fde028 (diff)
parent842e3a93aa3a0826cb4148376e54cd1527d10901 (diff)
downloademacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.tar.gz
emacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.zip
merge trunk
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h80
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
25INLINE_HEADER_BEGIN
26#ifndef WINDOW_INLINE
27# define WINDOW_INLINE INLINE
28#endif
29
25extern Lisp_Object Qleft, Qright; 30extern 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
93struct window 94struct 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. */
354WINDOW_INLINE void
355wset_buffer (struct window *w, Lisp_Object val)
356{
357 w->buffer = val;
358}
359WINDOW_INLINE void
360wset_frame (struct window *w, Lisp_Object val)
361{
362 w->frame = val;
363}
364WINDOW_INLINE void
365wset_left_col (struct window *w, Lisp_Object val)
366{
367 w->left_col = val;
368}
369WINDOW_INLINE void
370wset_next (struct window *w, Lisp_Object val)
371{
372 w->next = val;
373}
374WINDOW_INLINE void
375wset_prev (struct window *w, Lisp_Object val)
376{
377 w->prev = val;
378}
379WINDOW_INLINE void
380wset_redisplay_end_trigger (struct window *w, Lisp_Object val)
381{
382 w->redisplay_end_trigger = val;
383}
384WINDOW_INLINE void
385wset_top_line (struct window *w, Lisp_Object val)
386{
387 w->top_line = val;
388}
389WINDOW_INLINE void
390wset_total_cols (struct window *w, Lisp_Object val)
391{
392 w->total_cols = val;
393}
394WINDOW_INLINE void
395wset_total_lines (struct window *w, Lisp_Object val)
396{
397 w->total_lines = val;
398}
399WINDOW_INLINE void
400wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
401{
402 w->vertical_scroll_bar = val;
403}
404WINDOW_INLINE void
405wset_window_end_pos (struct window *w, Lisp_Object val)
406{
407 w->window_end_pos = val;
408}
409WINDOW_INLINE void
410wset_window_end_valid (struct window *w, Lisp_Object val)
411{
412 w->window_end_valid = val;
413}
414WINDOW_INLINE void
415wset_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);
916extern void syms_of_window (void); 986extern void syms_of_window (void);
917extern void keys_of_window (void); 987extern void keys_of_window (void);
918 988
989INLINE_HEADER_END
990
919#endif /* not WINDOW_H_INCLUDED */ 991#endif /* not WINDOW_H_INCLUDED */