aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h200
1 files changed, 89 insertions, 111 deletions
diff --git a/src/window.h b/src/window.h
index acb8a5cabfa..e9040f816df 100644
--- a/src/window.h
+++ b/src/window.h
@@ -328,8 +328,9 @@ struct window
328 /* True if this window is a minibuffer window. */ 328 /* True if this window is a minibuffer window. */
329 bool_bf mini : 1; 329 bool_bf mini : 1;
330 330
331 /* Meaningful only if contents is a window, true if this 331 /* Meaningful for internal windows only: true if this window is a
332 internal window is used in horizontal combination. */ 332 horizontal combination, false if it is a vertical
333 combination. */
333 bool_bf horizontal : 1; 334 bool_bf horizontal : 1;
334 335
335 /* True means must regenerate mode line of this window. */ 336 /* True means must regenerate mode line of this window. */
@@ -481,15 +482,14 @@ wset_next_buffers (struct window *w, Lisp_Object val)
481/* True if W is a minibuffer window. */ 482/* True if W is a minibuffer window. */
482#define MINI_WINDOW_P(W) ((W)->mini) 483#define MINI_WINDOW_P(W) ((W)->mini)
483 484
484/* 1 if W is a non-only minibuffer window. */ 485/* True if W is a minibuffer window on a frame that contains at least
485/* The first check is redundant and the second overly complicated. */ 486 one other window. */
486#define MINI_NON_ONLY_WINDOW_P(W) \ 487#define MINI_NON_ONLY_WINDOW_P(W) \
487 (MINI_WINDOW_P (W) \ 488 (MINI_WINDOW_P (W) && !NILP ((W)->prev))
488 && (EQ (W->prev, FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))
489 489
490/* 1 if W is a minibuffer-only window. */ 490/* True if W is a minibuffer window that is alone on its frame. */
491#define MINI_ONLY_WINDOW_P(W) \ 491#define MINI_ONLY_WINDOW_P(W) \
492 (MINI_WINDOW_P (W) && NILP (W->prev)) 492 (MINI_WINDOW_P (W) && NILP ((W)->prev))
493 493
494/* General window layout: 494/* General window layout:
495 495
@@ -518,29 +518,34 @@ wset_next_buffers (struct window *w, Lisp_Object val)
518 518
519/* A handy macro. */ 519/* A handy macro. */
520 520
521/* Non-nil if W is leaf (carry the buffer). */ 521/* Non-nil if window W is leaf window (has a buffer). */
522
523#define WINDOW_LEAF_P(W) \ 522#define WINDOW_LEAF_P(W) \
524 (BUFFERP ((W)->contents)) 523 (BUFFERP ((W)->contents))
525 524
526/* Non-nil if W is internal. */ 525/* Non-nil if window W is internal (is a parent window). */
527#define WINDOW_INTERNAL_P(W) \ 526#define WINDOW_INTERNAL_P(W) \
528 (WINDOWP ((W)->contents)) 527 (WINDOWP ((W)->contents))
529 528
530/* True if W is a member of horizontal combination. */ 529/* True if window W is a horizontal combination of windows. */
531#define WINDOW_HORIZONTAL_COMBINATION_P(W) \ 530#define WINDOW_HORIZONTAL_COMBINATION_P(W) \
532 (WINDOW_INTERNAL_P (W) && (W)->horizontal) 531 (WINDOW_INTERNAL_P (W) && (W)->horizontal)
533 532
534/* True if W is a member of vertical combination. */ 533/* True if window W is a vertical combination of windows. */
535#define WINDOW_VERTICAL_COMBINATION_P(W) \ 534#define WINDOW_VERTICAL_COMBINATION_P(W) \
536 (WINDOW_INTERNAL_P (W) && !(W)->horizontal) 535 (WINDOW_INTERNAL_P (W) && !(W)->horizontal)
537 536
538/* WINDOW's XFRAME. */ 537/* Window W's XFRAME. */
539#define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W)))) 538#define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W))))
540 539
541/* Whether WINDOW is a pseudo window. */ 540/* Whether window W is a pseudo window. */
542#define WINDOW_PSEUDO_P(W) ((W)->pseudo_window_p) 541#define WINDOW_PSEUDO_P(W) ((W)->pseudo_window_p)
543 542
543/* Window W's buffer. */
544#define WINDOW_BUFFER(W) \
545 (WINDOW_LEAF_P(W) \
546 ? (W)->contents \
547 : Qnil) \
548
544/* Return the canonical column width of the frame of window W. */ 549/* Return the canonical column width of the frame of window W. */
545#define WINDOW_FRAME_COLUMN_WIDTH(W) \ 550#define WINDOW_FRAME_COLUMN_WIDTH(W) \
546 (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W)))) 551 (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
@@ -549,24 +554,24 @@ wset_next_buffers (struct window *w, Lisp_Object val)
549#define WINDOW_FRAME_LINE_HEIGHT(W) \ 554#define WINDOW_FRAME_LINE_HEIGHT(W) \
550 (FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W)))) 555 (FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
551 556
552/* Return the pixel width of window W. 557/* Return the pixel width of window W. This includes dividers, scroll
553 This includes scroll bars and fringes. */ 558 bars, fringes and margins, if any. */
554#define WINDOW_PIXEL_WIDTH(W) (W)->pixel_width 559#define WINDOW_PIXEL_WIDTH(W) (W)->pixel_width
555 560
556/* Return the pixel height of window W. 561/* Return the pixel height of window W. This includes dividers, scroll
557 This includes header and mode lines, if any. */ 562 bars, header and mode lines, if any. */
558#define WINDOW_PIXEL_HEIGHT(W) (W)->pixel_height 563#define WINDOW_PIXEL_HEIGHT(W) (W)->pixel_height
559 564
560/* Return the width of window W in canonical column units. 565/* Return the width of window W in canonical column units. This
561 This includes scroll bars and fringes. 566 includes dividers, scroll bars, fringes and margins, if any. The
562 This value is adjusted such that the sum of the widths of all child 567 value is adjusted such that the sum of the widths of all child
563 windows equals the width of their parent window. */ 568 windows equals the width of their parent window. */
564#define WINDOW_TOTAL_COLS(W) (W)->total_cols 569#define WINDOW_TOTAL_COLS(W) (W)->total_cols
565 570
566/* Return the height of window W in canonical line units. 571/* Return the height of window W in canonical line units. This includes
567 This includes header and mode lines, if any. 572 dividers, scroll bars, header and mode lines, if any. The value is
568 This value is adjusted such that the sum of the heights of all child 573 adjusted such that the sum of the heights of all child windows equals
569 windows equals the height of their parent window. */ 574 the height of their parent window. */
570#define WINDOW_TOTAL_LINES(W) (W)->total_lines 575#define WINDOW_TOTAL_LINES(W) (W)->total_lines
571 576
572/* The smallest acceptable dimensions for a window. Anything smaller 577/* The smallest acceptable dimensions for a window. Anything smaller
@@ -581,31 +586,63 @@ wset_next_buffers (struct window *w, Lisp_Object val)
581#define MIN_SAFE_WINDOW_PIXEL_HEIGHT(W) \ 586#define MIN_SAFE_WINDOW_PIXEL_HEIGHT(W) \
582 (WINDOW_FRAME_LINE_HEIGHT (W)) 587 (WINDOW_FRAME_LINE_HEIGHT (W))
583 588
589/* True if window W has no other windows to its left on its frame. */
590#define WINDOW_LEFTMOST_P(W) \
591 (WINDOW_LEFT_PIXEL_EDGE (W) == 0)
592
593/* True if window W has no other windows above it on its frame. */
594#define WINDOW_TOPMOST_P(W) \
595 (WINDOW_TOP_PIXEL_EDGE (W) == 0)
596
597/* True if window W has no other windows to its right on its frame. */
598#define WINDOW_RIGHTMOST_P(W) \
599 (WINDOW_RIGHT_PIXEL_EDGE (W) \
600 == (WINDOW_RIGHT_PIXEL_EDGE \
601 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
602
603/* True if window W has no other windows below it on its frame (the
604 minibuffer window is not counted in this respect unless W itself is a
605 minibuffer window). */
606#define WINDOW_BOTTOMMOST_P(W) \
607 (WINDOW_BOTTOM_PIXEL_EDGE (W) \
608 == (WINDOW_BOTTOM_PIXEL_EDGE \
609 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
610
611/* True if window W takes up the full width of its frame. */
612#define WINDOW_FULL_WIDTH_P(W) \
613 (WINDOW_PIXEL_WIDTH (W) \
614 == (WINDOW_PIXEL_WIDTH \
615 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
616
584/* Width of right divider of window W. */ 617/* Width of right divider of window W. */
585#define WINDOW_RIGHT_DIVIDER_WIDTH(W) \ 618#define WINDOW_RIGHT_DIVIDER_WIDTH(W) \
586 ((WINDOW_RIGHTMOST_P (W) || MINI_WINDOW_P (W)) \ 619 (WINDOW_RIGHTMOST_P (W) \
587 ? 0 \ 620 ? 0 : FRAME_RIGHT_DIVIDER_WIDTH (WINDOW_XFRAME (W)))
588 : FRAME_RIGHT_DIVIDER_WIDTH (WINDOW_XFRAME (W))) 621
622/* Width of bottom divider of window W. */
623#define WINDOW_BOTTOM_DIVIDER_WIDTH(W) \
624 (((WINDOW_BOTTOMMOST_P (W) \
625 && NILP ((XWINDOW (FRAME_ROOT_WINDOW \
626 (WINDOW_XFRAME (W))))->next)) \
627 || EQ ((W)->prev, FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))) \
628 || (W)->pseudo_window_p) \
629 ? 0 : FRAME_BOTTOM_DIVIDER_WIDTH (WINDOW_XFRAME (W)))
589 630
590/* Return the canonical frame column at which window W starts. 631/* Return the canonical frame column at which window W starts.
591 This includes a left-hand scroll bar, if any. */ 632 This includes a left-hand scroll bar, if any. */
592
593#define WINDOW_LEFT_EDGE_COL(W) (W)->left_col 633#define WINDOW_LEFT_EDGE_COL(W) (W)->left_col
594 634
595/* Return the canonical frame column before which window W ends. 635/* Return the canonical frame column before which window W ends.
596 This includes a right-hand scroll bar, if any. */ 636 This includes a right-hand scroll bar, if any. */
597
598#define WINDOW_RIGHT_EDGE_COL(W) \ 637#define WINDOW_RIGHT_EDGE_COL(W) \
599 (WINDOW_LEFT_EDGE_COL (W) + WINDOW_TOTAL_COLS (W)) 638 (WINDOW_LEFT_EDGE_COL (W) + WINDOW_TOTAL_COLS (W))
600 639
601/* Return the canonical frame line at which window W starts. 640/* Return the canonical frame line at which window W starts.
602 This includes a header line, if any. */ 641 This includes a header line, if any. */
603
604#define WINDOW_TOP_EDGE_LINE(W) (W)->top_line 642#define WINDOW_TOP_EDGE_LINE(W) (W)->top_line
605 643
606/* Return the canonical frame line before which window W ends. 644/* Return the canonical frame line before which window W ends.
607 This includes a mode line, if any. */ 645 This includes a mode line, if any. */
608
609#define WINDOW_BOTTOM_EDGE_LINE(W) \ 646#define WINDOW_BOTTOM_EDGE_LINE(W) \
610 (WINDOW_TOP_EDGE_LINE (W) + WINDOW_TOTAL_LINES (W)) 647 (WINDOW_TOP_EDGE_LINE (W) + WINDOW_TOTAL_LINES (W))
611 648
@@ -629,20 +666,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
629 666
630/* Return the frame x-position at which window W starts. 667/* Return the frame x-position at which window W starts.
631 This includes a left-hand scroll bar, if any. */ 668 This includes a left-hand scroll bar, if any. */
632
633#define WINDOW_LEFT_EDGE_X(W) \ 669#define WINDOW_LEFT_EDGE_X(W) \
634 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \ 670 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
635 + WINDOW_LEFT_PIXEL_EDGE (W)) 671 + WINDOW_LEFT_PIXEL_EDGE (W))
636 672
637/* Return the frame x- position before which window W ends. 673/* Return the frame x- position before which window W ends.
638 This includes a right-hand scroll bar, if any. */ 674 This includes a right-hand scroll bar, if any. */
639
640#define WINDOW_RIGHT_EDGE_X(W) \ 675#define WINDOW_RIGHT_EDGE_X(W) \
641 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \ 676 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
642 + WINDOW_RIGHT_PIXEL_EDGE (W)) 677 + WINDOW_RIGHT_PIXEL_EDGE (W))
643 678
644/* True if W is a menu bar window. */ 679/* True if W is a menu bar window. */
645
646#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) 680#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
647#define WINDOW_MENU_BAR_P(W) \ 681#define WINDOW_MENU_BAR_P(W) \
648 (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \ 682 (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \
@@ -661,72 +695,24 @@ wset_next_buffers (struct window *w, Lisp_Object val)
661#define WINDOW_TOOL_BAR_P(W) false 695#define WINDOW_TOOL_BAR_P(W) false
662#endif 696#endif
663 697
664/* Return the frame y-position at which window W starts. 698/* Return the frame y-position at which window W starts. */
665 This includes a header line, if any.
666
667 PXW: With a menu or tool bar this is not symmetric to the _X values
668 since it _does_ include the internal border width. */
669#define WINDOW_TOP_EDGE_Y(W) \ 699#define WINDOW_TOP_EDGE_Y(W) \
670 (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ 700 (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
671 ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ 701 ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
672 + WINDOW_TOP_PIXEL_EDGE (W)) 702 + WINDOW_TOP_PIXEL_EDGE (W))
673 703
674/* Return the frame y-position before which window W ends. 704/* Return the frame y-position before which window W ends. */
675 This includes a mode line, if any. */
676#define WINDOW_BOTTOM_EDGE_Y(W) \ 705#define WINDOW_BOTTOM_EDGE_Y(W) \
677 (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ 706 (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
678 ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ 707 ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
679 + WINDOW_BOTTOM_PIXEL_EDGE (W)) 708 + WINDOW_BOTTOM_PIXEL_EDGE (W))
680 709
681/* True if window W takes up the full width of its frame. */ 710/* Return the pixel value where the text (or left fringe) in window W
682#define WINDOW_FULL_WIDTH_P(W) \ 711 starts. */
683 (WINDOW_PIXEL_WIDTH (W) \
684 == (WINDOW_PIXEL_WIDTH \
685 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
686
687/* True if window W's has no other windows to its left in its frame. */
688
689#define WINDOW_LEFTMOST_P(W) \
690 (WINDOW_LEFT_PIXEL_EDGE (W) == 0)
691
692/* True if window W's has no other windows above in its frame. */
693#define WINDOW_TOPMOST_P(W) \
694 (WINDOW_TOP_PIXEL_EDGE (W) == 0)
695
696/* True if window W's has no other windows to its right in its frame. */
697#define WINDOW_RIGHTMOST_P(W) \
698 (WINDOW_RIGHT_PIXEL_EDGE (W) \
699 == (WINDOW_RIGHT_PIXEL_EDGE \
700 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
701
702/* True if window W's has no other windows below it in its frame
703 (the minibuffer window is not counted in this respect). */
704#define WINDOW_BOTTOMMOST_P(W) \
705 (WINDOW_BOTTOM_PIXEL_EDGE (W) \
706 == (WINDOW_BOTTOM_PIXEL_EDGE \
707 (XWINDOW (FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))) \
708
709/* Return the frame column at which the text (or left fringe) in
710 window W starts. This is different from the `LEFT_EDGE' because it
711 does not include a left-hand scroll bar if any. */
712#define WINDOW_BOX_LEFT_EDGE_COL(W) \
713 (WINDOW_LEFT_EDGE_COL (W) \
714 + WINDOW_LEFT_SCROLL_BAR_COLS (W))
715
716/* Return the pixel value where the text (or left fringe) in
717 window W starts. This is different from the `LEFT_EDGE' because it
718 does not include a left-hand scroll bar if any. */
719#define WINDOW_BOX_LEFT_PIXEL_EDGE(W) \ 712#define WINDOW_BOX_LEFT_PIXEL_EDGE(W) \
720 (WINDOW_LEFT_PIXEL_EDGE (W) \ 713 (WINDOW_LEFT_PIXEL_EDGE (W) \
721 + WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (W)) 714 + WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (W))
722 715
723/* Return the window column before which the text in window W ends.
724 This is different from WINDOW_RIGHT_EDGE_COL because it does not
725 include a scroll bar or window-separating line on the right edge. */
726#define WINDOW_BOX_RIGHT_EDGE_COL(W) \
727 (WINDOW_RIGHT_EDGE_COL (W) \
728 - WINDOW_RIGHT_SCROLL_BAR_COLS (W))
729
730/* Return the pixel value before which the text in window W ends. This 716/* Return the pixel value before which the text in window W ends. This
731 is different from the `RIGHT_EDGE' because it does not include a 717 is different from the `RIGHT_EDGE' because it does not include a
732 right-hand scroll bar or window-separating line on the right 718 right-hand scroll bar or window-separating line on the right
@@ -736,16 +722,16 @@ wset_next_buffers (struct window *w, Lisp_Object val)
736 - WINDOW_RIGHT_DIVIDER_WIDTH (W) \ 722 - WINDOW_RIGHT_DIVIDER_WIDTH (W) \
737 - WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (W)) 723 - WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (W))
738 724
739/* Return the frame position at which the text (or left fringe) in 725/* Return the frame x-position at which the text (or left fringe) in
740 window W starts. This is different from the `LEFT_EDGE' because it 726 window W starts. This does not include a left-hand scroll bar if
741 does not include a left-hand scroll bar if any. */ 727 any. */
742#define WINDOW_BOX_LEFT_EDGE_X(W) \ 728#define WINDOW_BOX_LEFT_EDGE_X(W) \
743 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \ 729 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
744 + WINDOW_BOX_LEFT_PIXEL_EDGE (W)) 730 + WINDOW_BOX_LEFT_PIXEL_EDGE (W))
745 731
746/* Return the window column before which the text in window W ends. 732/* Return the frame x-position before which the text in window W ends.
747 This is different from WINDOW_RIGHT_EDGE_COL because it does not 733 This does not include a scroll bar, divider or window-separating line
748 include a scroll bar or window-separating line on the right edge. */ 734 on the right edge. */
749#define WINDOW_BOX_RIGHT_EDGE_X(W) \ 735#define WINDOW_BOX_RIGHT_EDGE_X(W) \
750 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \ 736 (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
751 + WINDOW_BOX_RIGHT_PIXEL_EDGE (W)) 737 + WINDOW_BOX_RIGHT_PIXEL_EDGE (W))
@@ -899,16 +885,6 @@ wset_next_buffers (struct window *w, Lisp_Object val)
899 ? WINDOW_BOX_RIGHT_EDGE_X (W) \ 885 ? WINDOW_BOX_RIGHT_EDGE_X (W) \
900 : WINDOW_LEFT_EDGE_X (W)) 886 : WINDOW_LEFT_EDGE_X (W))
901 887
902/* Width of bottom divider of window W. */
903#define WINDOW_BOTTOM_DIVIDER_WIDTH(W) \
904 (((WINDOW_BOTTOMMOST_P (W) \
905 && NILP ((XWINDOW (FRAME_ROOT_WINDOW \
906 (WINDOW_XFRAME (W))))->next)) \
907 || EQ ((W)->prev, FRAME_ROOT_WINDOW (WINDOW_XFRAME (W))) \
908 || (W)->pseudo_window_p) \
909 ? 0 \
910 : FRAME_BOTTOM_DIVIDER_WIDTH (WINDOW_XFRAME (W)))
911
912/* Height that a scroll bar in window W should have, if there is one. 888/* Height that a scroll bar in window W should have, if there is one.
913 Measured in pixels. If scroll bars are turned off, this is still 889 Measured in pixels. If scroll bars are turned off, this is still
914 nonzero. */ 890 nonzero. */
@@ -942,22 +918,22 @@ wset_next_buffers (struct window *w, Lisp_Object val)
942/* Height in pixels of the mode line. 918/* Height in pixels of the mode line.
943 May be zero if W doesn't have a mode line. */ 919 May be zero if W doesn't have a mode line. */
944#define WINDOW_MODE_LINE_HEIGHT(W) \ 920#define WINDOW_MODE_LINE_HEIGHT(W) \
945 (WINDOW_WANTS_MODELINE_P ((W)) \ 921 (window_wants_mode_line ((W)) \
946 ? CURRENT_MODE_LINE_HEIGHT (W) \ 922 ? CURRENT_MODE_LINE_HEIGHT (W) \
947 : 0) 923 : 0)
948 924
949#define WINDOW_MODE_LINE_LINES(W) \ 925#define WINDOW_MODE_LINE_LINES(W) \
950 WINDOW_WANTS_MODELINE_P (W) 926 window_wants_mode_line (W)
951 927
952/* Height in pixels of the header line. 928/* Height in pixels of the header line.
953 Zero if W doesn't have a header line. */ 929 Zero if W doesn't have a header line. */
954#define WINDOW_HEADER_LINE_HEIGHT(W) \ 930#define WINDOW_HEADER_LINE_HEIGHT(W) \
955 (WINDOW_WANTS_HEADER_LINE_P (W) \ 931 (window_wants_header_line (W) \
956 ? CURRENT_HEADER_LINE_HEIGHT (W) \ 932 ? CURRENT_HEADER_LINE_HEIGHT (W) \
957 : 0) 933 : 0)
958 934
959#define WINDOW_HEADER_LINE_LINES(W) \ 935#define WINDOW_HEADER_LINE_LINES(W) \
960 WINDOW_WANTS_HEADER_LINE_P (W) 936 window_wants_header_line (W)
961 937
962/* Pixel height of window W without mode line, bottom scroll bar and 938/* Pixel height of window W without mode line, bottom scroll bar and
963 bottom divider. */ 939 bottom divider. */
@@ -1114,10 +1090,13 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
1114extern Lisp_Object Vwindow_list; 1090extern Lisp_Object Vwindow_list;
1115 1091
1116extern Lisp_Object window_list (void); 1092extern Lisp_Object window_list (void);
1093extern Lisp_Object window_parameter (struct window *, Lisp_Object parameter);
1117extern struct window *decode_live_window (Lisp_Object); 1094extern struct window *decode_live_window (Lisp_Object);
1118extern struct window *decode_any_window (Lisp_Object); 1095extern struct window *decode_any_window (Lisp_Object);
1119extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); 1096extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool);
1120extern void mark_window_cursors_off (struct window *); 1097extern void mark_window_cursors_off (struct window *);
1098extern bool window_wants_mode_line (struct window *);
1099extern bool window_wants_header_line (struct window *);
1121extern int window_internal_height (struct window *); 1100extern int window_internal_height (struct window *);
1122extern int window_body_width (struct window *w, bool); 1101extern int window_body_width (struct window *w, bool);
1123enum margin_unit { MARGIN_IN_LINES, MARGIN_IN_PIXELS }; 1102enum margin_unit { MARGIN_IN_LINES, MARGIN_IN_PIXELS };
@@ -1133,7 +1112,6 @@ extern void init_window_once (void);
1133extern void init_window (void); 1112extern void init_window (void);
1134extern void syms_of_window (void); 1113extern void syms_of_window (void);
1135extern void keys_of_window (void); 1114extern void keys_of_window (void);
1136
1137/* Move cursor to row/column position VPOS/HPOS, pixel coordinates 1115/* Move cursor to row/column position VPOS/HPOS, pixel coordinates
1138 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y 1116 Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
1139 are window-relative pixel positions. This is always done during 1117 are window-relative pixel positions. This is always done during