aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov2012-11-02 14:34:26 +0400
committerDmitry Antipov2012-11-02 14:34:26 +0400
commitb9e9df47f2886bb4b6b67aea8eeb0b015258a063 (patch)
tree0223e720b05e2fe607708a1658d0cbbd14f05e8f /src/window.h
parentc574bc3409143d0eb3aea1fe3161fac28de7e366 (diff)
downloademacs-b9e9df47f2886bb4b6b67aea8eeb0b015258a063.tar.gz
emacs-b9e9df47f2886bb4b6b67aea8eeb0b015258a063.zip
Window-related stuff cleanup here and there.
* dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p): Use decode_any_window. * fringe.c (Ffringe_bitmaps_at_pos): Likewise. * xdisp.c (Fformat_mode_line): Likewise. * font.c (Ffont_at): Use decode_live_window. * indent.c (Fcompute_motion, Fvertical_motion): Likewise. * window.c (decode_next_window_args): Likewise. (decode_any_window): Remove static. * window.h (decode_any_window): Add prototype. * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here... * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P, respectively.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h
index 115b361194c..2a12226c0aa 100644
--- a/src/window.h
+++ b/src/window.h
@@ -970,17 +970,26 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
970 || !NILP (XWINDOW (WINDOW)->vchild) \ 970 || !NILP (XWINDOW (WINDOW)->vchild) \
971 || !NILP (XWINDOW (WINDOW)->hchild))) 971 || !NILP (XWINDOW (WINDOW)->hchild)))
972 972
973/* A window of any sort, leaf or interior, is "valid" if one
974 of its buffer, vchild, or hchild members is non-nil. */
975#define CHECK_VALID_WINDOW(WINDOW) \
976 CHECK_TYPE (WINDOW_VALID_P (WINDOW), Qwindow_valid_p, WINDOW)
973 977
974/* Value is non-zero if WINDOW is a live window. */ 978/* Value is non-zero if WINDOW is a live window. */
975#define WINDOW_LIVE_P(WINDOW) \ 979#define WINDOW_LIVE_P(WINDOW) \
976 (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->buffer)) 980 (WINDOWP (WINDOW) && !NILP (XWINDOW (WINDOW)->buffer))
977 981
982/* A window is "live" if and only if it shows a buffer. */
983#define CHECK_LIVE_WINDOW(WINDOW) \
984 CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW)
985
978/* These used to be in lisp.h. */ 986/* These used to be in lisp.h. */
979 987
980extern Lisp_Object Qwindowp, Qwindow_live_p; 988extern Lisp_Object Qwindowp, Qwindow_live_p;
981extern Lisp_Object Vwindow_list; 989extern Lisp_Object Vwindow_list;
982 990
983extern struct window *decode_live_window (Lisp_Object); 991extern struct window *decode_live_window (Lisp_Object);
992extern struct window *decode_any_window (Lisp_Object);
984extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); 993extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool);
985extern void mark_window_cursors_off (struct window *); 994extern void mark_window_cursors_off (struct window *);
986extern int window_internal_height (struct window *); 995extern int window_internal_height (struct window *);