comparison src/frame-impl.h @ 5126:2a462149bd6a ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Wed, 24 Feb 2010 19:04:27 -0600
parents d1247f3cc363 c3cc3fa503a2
children a9c41067dd88
comparison
equal deleted inserted replaced
5125:b5df3737028a 5126:2a462149bd6a
1 /* Define frame-object for XEmacs. 1 /* Define frame-object for XEmacs.
2 Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc. 2 Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1995 Ben Wing. 3 Copyright (C) 1995, 2010 Ben Wing.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
541 (f)->visible = (f)->async_visible, \ 541 (f)->visible = (f)->async_visible, \
542 (f)->iconified = (f)->async_iconified) 542 (f)->iconified = (f)->async_iconified)
543 543
544 #endif /* FSFmacs */ 544 #endif /* FSFmacs */
545 545
546 #define FRAME_BORDER_WIDTH(f) ((f)->internal_border_width) 546 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->internal_border_width)
547 #define FRAME_BORDER_HEIGHT(f) ((f)->internal_border_width) 547 #define FRAME_INTERNAL_BORDER_HEIGHT(f) ((f)->internal_border_width)
548 #define FRAME_INTERNAL_BORDER_SIZE(f, pos) ((f)->internal_border_width)
549
550 /************************************************************************/
551 /* toolbars */
552 /************************************************************************/
553
554 /*---------------- Theoretical and real toolbar values ----------------*/
555
548 556
549 /* This returns the frame-local value; that tells you what you should 557 /* This returns the frame-local value; that tells you what you should
550 use when computing the frame size. It is *not* the actual toolbar 558 use when computing the frame size. It is *not* the actual toolbar
551 size because that depends on the selected window. Use the macros 559 size because that depends on the selected window. Use the macros
552 below for that. 560 below for that.
655 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \ 663 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
656 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \ 664 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
657 ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \ 665 ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \
658 : 0) 666 : 0)
659 667
668 #define FRAME_REAL_TOOLBAR_BOUNDS(f, pos) \
669 (FRAME_REAL_TOOLBAR_SIZE (f, pos) + \
670 2 * FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos))
671
660 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \ 672 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \
661 FRAME_REAL_TOOLBAR_SIZE (f, TOP_TOOLBAR) 673 FRAME_REAL_TOOLBAR_SIZE (f, TOP_TOOLBAR)
662 #define FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT(f) \ 674 #define FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT(f) \
663 FRAME_REAL_TOOLBAR_SIZE (f, BOTTOM_TOOLBAR) 675 FRAME_REAL_TOOLBAR_SIZE (f, BOTTOM_TOOLBAR)
664 #define FRAME_REAL_LEFT_TOOLBAR_WIDTH(f) \ 676 #define FRAME_REAL_LEFT_TOOLBAR_WIDTH(f) \
682 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \ 694 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \
683 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_TOOLBAR) 695 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_TOOLBAR)
684 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \ 696 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \
685 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR) 697 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR)
686 698
699 #define FRAME_REAL_TOP_TOOLBAR_BOUNDS(f) \
700 FRAME_REAL_TOOLBAR_BOUNDS (f, TOP_TOOLBAR)
701 #define FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS(f) \
702 FRAME_REAL_TOOLBAR_BOUNDS (f, BOTTOM_TOOLBAR)
703 #define FRAME_REAL_LEFT_TOOLBAR_BOUNDS(f) \
704 FRAME_REAL_TOOLBAR_BOUNDS (f, LEFT_TOOLBAR)
705 #define FRAME_REAL_RIGHT_TOOLBAR_BOUNDS(f) \
706 FRAME_REAL_TOOLBAR_BOUNDS (f, RIGHT_TOOLBAR)
707
708 /************************************************************************/
709 /* frame dimensions defined using toolbars and gutters */
710 /************************************************************************/
711
712 /* #### These should be using the gutter sizes, but aren't yet */
713
687 #define FRAME_TOP_BORDER_START(f) \ 714 #define FRAME_TOP_BORDER_START(f) \
688 (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \ 715 FRAME_REAL_TOP_TOOLBAR_BOUNDS (f)
689 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f))
690 #define FRAME_TOP_BORDER_END(f) \ 716 #define FRAME_TOP_BORDER_END(f) \
691 (FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f)) 717 (FRAME_TOP_BORDER_START (f) + FRAME_INTERNAL_BORDER_HEIGHT (f))
692 718
693 #define FRAME_BOTTOM_BORDER_START(f) \ 719 #define FRAME_BOTTOM_BORDER_START(f) \
694 (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \ 720 (FRAME_BOTTOM_BORDER_END (f) - FRAME_INTERNAL_BORDER_HEIGHT (f))
695 FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
696 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
697 #define FRAME_BOTTOM_BORDER_END(f) \ 721 #define FRAME_BOTTOM_BORDER_END(f) \
698 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \ 722 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_BOUNDS (f))
699 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
700 723
701 #define FRAME_LEFT_BORDER_START(f) \ 724 #define FRAME_LEFT_BORDER_START(f) \
702 (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \ 725 FRAME_REAL_LEFT_TOOLBAR_BOUNDS (f)
703 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f))
704 #define FRAME_LEFT_BORDER_END(f) \ 726 #define FRAME_LEFT_BORDER_END(f) \
705 (FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f)) 727 (FRAME_LEFT_BORDER_START (f) + FRAME_INTERNAL_BORDER_WIDTH (f))
706 728
707 #define FRAME_RIGHT_BORDER_START(f) \ 729 #define FRAME_RIGHT_BORDER_START(f) \
708 (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \ 730 (FRAME_RIGHT_BORDER_END (f) - FRAME_INTERNAL_BORDER_WIDTH (f))
709 FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \
710 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f))
711 #define FRAME_RIGHT_BORDER_END(f) \ 731 #define FRAME_RIGHT_BORDER_END(f) \
712 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \ 732 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_BOUNDS (f))
713 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f))
714 733
715 #endif /* INCLUDED_frame_impl_h_ */ 734 #endif /* INCLUDED_frame_impl_h_ */