diff options
| author | Dmitry Antipov | 2012-11-02 14:34:26 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-11-02 14:34:26 +0400 |
| commit | b9e9df47f2886bb4b6b67aea8eeb0b015258a063 (patch) | |
| tree | 0223e720b05e2fe607708a1658d0cbbd14f05e8f /src/window.h | |
| parent | c574bc3409143d0eb3aea1fe3161fac28de7e366 (diff) | |
| download | emacs-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.h | 9 |
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 | ||
| 980 | extern Lisp_Object Qwindowp, Qwindow_live_p; | 988 | extern Lisp_Object Qwindowp, Qwindow_live_p; |
| 981 | extern Lisp_Object Vwindow_list; | 989 | extern Lisp_Object Vwindow_list; |
| 982 | 990 | ||
| 983 | extern struct window *decode_live_window (Lisp_Object); | 991 | extern struct window *decode_live_window (Lisp_Object); |
| 992 | extern struct window *decode_any_window (Lisp_Object); | ||
| 984 | extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); | 993 | extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); |
| 985 | extern void mark_window_cursors_off (struct window *); | 994 | extern void mark_window_cursors_off (struct window *); |
| 986 | extern int window_internal_height (struct window *); | 995 | extern int window_internal_height (struct window *); |