comparison src/frame-impl.h @ 5128:7be849cb8828 ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Sun, 07 Mar 2010 02:09:59 -0600
parents a9c41067dd88 0ca81354c4c7
children 308d34e9f07d
comparison
equal deleted inserted replaced
5127:a9c41067dd88 5128:7be849cb8828
98 98
99 #ifdef HAVE_TOOLBARS 99 #ifdef HAVE_TOOLBARS
100 /* Size of toolbars as seen by redisplay. This is used to determine 100 /* Size of toolbars as seen by redisplay. This is used to determine
101 whether to re-layout windows by a call to change_frame_size early 101 whether to re-layout windows by a call to change_frame_size early
102 in redisplay_frame. */ 102 in redisplay_frame. */
103 int current_toolbar_size[4]; 103 int current_toolbar_size[NUM_EDGES];
104 #endif 104 #endif
105 105
106 /* Size of gutters as seen by redisplay. This is used to determine 106 /* Size of gutters as seen by redisplay. This is used to determine
107 whether to re-layout windows by a call to change_frame_size early 107 whether to re-layout windows by a call to change_frame_size early
108 in redisplay_frame. */ 108 in redisplay_frame. */
109 int current_gutter_bounds[4]; 109 int current_gutter_bounds[NUM_EDGES];
110
111 /* Toolbar visibility */
112 int toolbar_was_visible[NUM_EDGES];
113
114 /* gutter visibility */
115 int gutter_was_visible[NUM_EDGES];
110 116
111 /* Dynamic arrays of display lines for gutters */ 117 /* Dynamic arrays of display lines for gutters */
112 display_line_dynarr *current_display_lines[4]; 118 display_line_dynarr *current_display_lines[NUM_EDGES];
113 display_line_dynarr *desired_display_lines[4]; 119 display_line_dynarr *desired_display_lines[NUM_EDGES];
114 120
115 /* A structure of auxiliary data specific to the device type. For 121 /* A structure of auxiliary data specific to the device type. For
116 example, struct x_frame is for X window frames; defined in 122 example, struct x_frame is for X window frames; defined in
117 console-x-impl.h. */ 123 console-x-impl.h. */
118 void *frame_data; 124 void *frame_data;
157 0 if using a minibuffer window that isn't on this frame. */ 163 0 if using a minibuffer window that isn't on this frame. */
158 unsigned int has_minibuffer :1; 164 unsigned int has_minibuffer :1;
159 165
160 /* True if frame's root window can't be split. */ 166 /* True if frame's root window can't be split. */
161 unsigned int no_split :1; 167 unsigned int no_split :1;
162
163 unsigned int top_toolbar_was_visible :1;
164 unsigned int bottom_toolbar_was_visible :1;
165 unsigned int left_toolbar_was_visible :1;
166 unsigned int right_toolbar_was_visible :1;
167 /* gutter visibility */
168 unsigned int top_gutter_was_visible :1;
169 unsigned int bottom_gutter_was_visible :1;
170 unsigned int left_gutter_was_visible :1;
171 unsigned int right_gutter_was_visible :1;
172 168
173 /* redisplay flags */ 169 /* redisplay flags */
174 unsigned int buffers_changed :1; 170 unsigned int buffers_changed :1;
175 unsigned int clip_changed :1; 171 unsigned int clip_changed :1;
176 unsigned int extents_changed :1; 172 unsigned int extents_changed :1;
579 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \ 575 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \
580 ? FRAME_RAW_THEORETICAL_TOOLBAR_SIZE (f, pos) \ 576 ? FRAME_RAW_THEORETICAL_TOOLBAR_SIZE (f, pos) \
581 : 0) 577 : 0)
582 578
583 #define FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT(f) \ 579 #define FRAME_THEORETICAL_TOP_TOOLBAR_HEIGHT(f) \
584 FRAME_THEORETICAL_TOOLBAR_SIZE (f, TOP_TOOLBAR) 580 FRAME_THEORETICAL_TOOLBAR_SIZE (f, TOP_EDGE)
585 #define FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT(f) \ 581 #define FRAME_THEORETICAL_BOTTOM_TOOLBAR_HEIGHT(f) \
586 FRAME_THEORETICAL_TOOLBAR_SIZE (f, BOTTOM_TOOLBAR) 582 FRAME_THEORETICAL_TOOLBAR_SIZE (f, BOTTOM_EDGE)
587 #define FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH(f) \ 583 #define FRAME_THEORETICAL_LEFT_TOOLBAR_WIDTH(f) \
588 FRAME_THEORETICAL_TOOLBAR_SIZE (f, LEFT_TOOLBAR) 584 FRAME_THEORETICAL_TOOLBAR_SIZE (f, LEFT_EDGE)
589 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH(f) \ 585 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH(f) \
590 FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR) 586 FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_EDGE)
591 587
592 #define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \ 588 #define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \
593 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \ 589 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \
594 ? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos) \ 590 ? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos) \
595 : 0) 591 : 0)
596 592
597 #define FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH(f) \ 593 #define FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH(f) \
598 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR) 594 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, TOP_EDGE)
599 #define FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \ 595 #define FRAME_THEORETICAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \
600 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_TOOLBAR) 596 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_EDGE)
601 #define FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \ 597 #define FRAME_THEORETICAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \
602 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, LEFT_TOOLBAR) 598 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, LEFT_EDGE)
603 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \ 599 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \
604 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_TOOLBAR) 600 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_EDGE)
605 601
606 /* This returns the window-local value rather than the frame-local value; 602 /* This returns the window-local value rather than the frame-local value;
607 that tells you about what's actually visible rather than what should 603 that tells you about what's actually visible rather than what should
608 be used when computing the frame size. */ 604 be used when computing the frame size. */
609 605
668 #define FRAME_REAL_TOOLBAR_BOUNDS(f, pos) \ 664 #define FRAME_REAL_TOOLBAR_BOUNDS(f, pos) \
669 (FRAME_REAL_TOOLBAR_SIZE (f, pos) + \ 665 (FRAME_REAL_TOOLBAR_SIZE (f, pos) + \
670 2 * FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos)) 666 2 * FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos))
671 667
672 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \ 668 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \
673 FRAME_REAL_TOOLBAR_SIZE (f, TOP_TOOLBAR) 669 FRAME_REAL_TOOLBAR_SIZE (f, TOP_EDGE)
674 #define FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT(f) \ 670 #define FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT(f) \
675 FRAME_REAL_TOOLBAR_SIZE (f, BOTTOM_TOOLBAR) 671 FRAME_REAL_TOOLBAR_SIZE (f, BOTTOM_EDGE)
676 #define FRAME_REAL_LEFT_TOOLBAR_WIDTH(f) \ 672 #define FRAME_REAL_LEFT_TOOLBAR_WIDTH(f) \
677 FRAME_REAL_TOOLBAR_SIZE (f, LEFT_TOOLBAR) 673 FRAME_REAL_TOOLBAR_SIZE (f, LEFT_EDGE)
678 #define FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) \ 674 #define FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) \
679 FRAME_REAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR) 675 FRAME_REAL_TOOLBAR_SIZE (f, RIGHT_EDGE)
680 676
681 #define FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH(f) \ 677 #define FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH(f) \
682 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR) 678 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, TOP_EDGE)
683 #define FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \ 679 #define FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH(f) \
684 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_TOOLBAR) 680 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, BOTTOM_EDGE)
685 #define FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \ 681 #define FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH(f) \
686 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, LEFT_TOOLBAR) 682 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, LEFT_EDGE)
687 #define FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \ 683 #define FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f) \
688 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_TOOLBAR) 684 FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, RIGHT_EDGE)
689 685
690 #define FRAME_REAL_TOP_TOOLBAR_VISIBLE(f) \ 686 #define FRAME_REAL_TOP_TOOLBAR_VISIBLE(f) \
691 FRAME_REAL_TOOLBAR_VISIBLE (f, TOP_TOOLBAR) 687 FRAME_REAL_TOOLBAR_VISIBLE (f, TOP_EDGE)
692 #define FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE(f) \ 688 #define FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE(f) \
693 FRAME_REAL_TOOLBAR_VISIBLE (f, BOTTOM_TOOLBAR) 689 FRAME_REAL_TOOLBAR_VISIBLE (f, BOTTOM_EDGE)
694 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \ 690 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \
695 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_TOOLBAR) 691 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_EDGE)
696 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \ 692 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \
697 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR) 693 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_EDGE)
698 694
699 #define FRAME_REAL_TOP_TOOLBAR_BOUNDS(f) \ 695 #define FRAME_REAL_TOP_TOOLBAR_BOUNDS(f) \
700 FRAME_REAL_TOOLBAR_BOUNDS (f, TOP_TOOLBAR) 696 FRAME_REAL_TOOLBAR_BOUNDS (f, TOP_EDGE)
701 #define FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS(f) \ 697 #define FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS(f) \
702 FRAME_REAL_TOOLBAR_BOUNDS (f, BOTTOM_TOOLBAR) 698 FRAME_REAL_TOOLBAR_BOUNDS (f, BOTTOM_EDGE)
703 #define FRAME_REAL_LEFT_TOOLBAR_BOUNDS(f) \ 699 #define FRAME_REAL_LEFT_TOOLBAR_BOUNDS(f) \
704 FRAME_REAL_TOOLBAR_BOUNDS (f, LEFT_TOOLBAR) 700 FRAME_REAL_TOOLBAR_BOUNDS (f, LEFT_EDGE)
705 #define FRAME_REAL_RIGHT_TOOLBAR_BOUNDS(f) \ 701 #define FRAME_REAL_RIGHT_TOOLBAR_BOUNDS(f) \
706 FRAME_REAL_TOOLBAR_BOUNDS (f, RIGHT_TOOLBAR) 702 FRAME_REAL_TOOLBAR_BOUNDS (f, RIGHT_EDGE)
707 703
708 /************************************************************************/ 704 /************************************************************************/
709 /* frame dimensions defined using toolbars and gutters */ 705 /* frame dimensions defined using toolbars and gutters */
710 /************************************************************************/ 706 /************************************************************************/
711 707
712 /* #### These should be using the gutter sizes, but aren't yet */ 708 /* Bounds of the area framed by the toolbars is the client area --
713 709 (0, 0) - (FRAME_PIXWIDTH, FRAME_PIXHEIGHT). */
714 #define FRAME_TOP_BORDER_START(f) \ 710
711 /* Bounds of the area framed by the internal border width -- inside of the
712 toolbars, outside of everything else. */
713
714 #define FRAME_TOP_INTERNAL_BORDER_START(f) \
715 FRAME_REAL_TOP_TOOLBAR_BOUNDS (f) 715 FRAME_REAL_TOP_TOOLBAR_BOUNDS (f)
716 #define FRAME_TOP_BORDER_END(f) \ 716 #define FRAME_TOP_INTERNAL_BORDER_END(f) \
717 (FRAME_TOP_BORDER_START (f) + FRAME_INTERNAL_BORDER_HEIGHT (f)) 717 (FRAME_TOP_INTERNAL_BORDER_START (f) + FRAME_INTERNAL_BORDER_HEIGHT (f))
718 718
719 #define FRAME_BOTTOM_BORDER_START(f) \ 719 #define FRAME_BOTTOM_INTERNAL_BORDER_START(f) \
720 (FRAME_BOTTOM_BORDER_END (f) - FRAME_INTERNAL_BORDER_HEIGHT (f)) 720 (FRAME_BOTTOM_INTERNAL_BORDER_END (f) - FRAME_INTERNAL_BORDER_HEIGHT (f))
721 #define FRAME_BOTTOM_BORDER_END(f) \ 721 #define FRAME_BOTTOM_INTERNAL_BORDER_END(f) \
722 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f)) 722 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f))
723 723
724 #define FRAME_LEFT_BORDER_START(f) \ 724 #define FRAME_LEFT_INTERNAL_BORDER_START(f) \
725 FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f) 725 FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f)
726 #define FRAME_LEFT_BORDER_END(f) \ 726 #define FRAME_LEFT_INTERNAL_BORDER_END(f) \
727 (FRAME_LEFT_BORDER_START (f) + FRAME_INTERNAL_BORDER_WIDTH (f)) 727 (FRAME_LEFT_INTERNAL_BORDER_START (f) + FRAME_INTERNAL_BORDER_WIDTH (f))
728 728
729 #define FRAME_RIGHT_BORDER_START(f) \ 729 #define FRAME_RIGHT_INTERNAL_BORDER_START(f) \
730 (FRAME_RIGHT_BORDER_END (f) - FRAME_INTERNAL_BORDER_WIDTH (f)) 730 (FRAME_RIGHT_INTERNAL_BORDER_END (f) - FRAME_INTERNAL_BORDER_WIDTH (f))
731 #define FRAME_RIGHT_BORDER_END(f) \ 731 #define FRAME_RIGHT_INTERNAL_BORDER_END(f) \
732 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f)) 732 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f))
733 733
734 /* Bounds of the area framed by the gutter -- inside of the
735 toolbars and internal border width. */
736
737 #define FRAME_TOP_GUTTER_START(f) \
738 FRAME_TOP_INTERNAL_BORDER_END (f)
739 #define FRAME_TOP_GUTTER_END(f) \
740 (FRAME_TOP_GUTTER_START (f) + FRAME_TOP_GUTTER_BOUNDS (f))
741
742 #ifdef BOTTOM_GUTTER_IS_OUTSIDE_MINIBUFFER
743 #define FRAME_BOTTOM_GUTTER_START(f) \
744 (FRAME_BOTTOM_GUTTER_END (f) - FRAME_BOTTOM_GUTTER_BOUNDS (f))
745 #define FRAME_BOTTOM_GUTTER_END(f) \
746 FRAME_BOTTOM_INTERNAL_BORDER_START (f)
747 #endif /* BOTTOM_GUTTER_IS_OUTSIDE_MINIBUFFER */
748
749 #define FRAME_LEFT_GUTTER_START(f) \
750 FRAME_LEFT_INTERNAL_BORDER_END (f)
751 #define FRAME_LEFT_GUTTER_END(f) \
752 (FRAME_LEFT_GUTTER_START (f) + FRAME_LEFT_GUTTER_BOUNDS (f))
753
754 #define FRAME_RIGHT_GUTTER_START(f) \
755 (FRAME_RIGHT_GUTTER_END (f) - FRAME_RIGHT_GUTTER_BOUNDS (f))
756 #define FRAME_RIGHT_GUTTER_END(f) \
757 FRAME_RIGHT_INTERNAL_BORDER_START (f)
758
759 /* These are the bounds of the paned area -- inside of the toolbars,
760 gutters, and internal border width. The paned area is the same as the
761 area occupied by windows, including the minibuffer. See long comment in
762 frame.c. */
763
764 #define FRAME_PANED_TOP_EDGE(f) FRAME_TOP_GUTTER_END (f)
765 #ifdef BOTTOM_GUTTER_IS_OUTSIDE_MINIBUFFER
766 #define FRAME_PANED_BOTTOM_EDGE(f) FRAME_BOTTOM_GUTTER_START (f)
767 #endif /* BOTTOM_GUTTER_IS_OUTSIDE_MINIBUFFER */
768 #define FRAME_PANED_LEFT_EDGE(f) FRAME_LEFT_GUTTER_END (f)
769 #define FRAME_PANED_RIGHT_EDGE(f) FRAME_RIGHT_GUTTER_START (f)
770
771 /* Thickness of non-paned area at edge of frame;
772
773 FRAME_PANED_TOP_EDGE (f) == FRAME_NONPANED_SIZE (f, TOP_EDGE)
774 FRAME_PANED_LEFT_EDGE (f) == FRAME_NONPANED_SIZE (f, LEFT_EDGE)
775 FRAME_PANED_BOTTOM_EDGE (f) ==
776 FRAME_PIXHEIGHT (f) - FRAME_NONPANED_SIZE (f, BOTTOM_EDGE)
777 FRAME_PANED_RIGHT_EDGE (f) ==
778 FRAME_PIXWIDTH (f) - FRAME_NONPANED_SIZE (f, RIGHT_EDGE)
779
780 */
781 #define FRAME_NONPANED_SIZE(f, pos) \
782 (FRAME_REAL_TOOLBAR_BOUNDS (f, pos) + FRAME_INTERNAL_BORDER_SIZE (f, pos) + \
783 FRAME_GUTTER_BOUNDS (f, pos))
784
785
786
734 #endif /* INCLUDED_frame_impl_h_ */ 787 #endif /* INCLUDED_frame_impl_h_ */