annotate src/winslots.h @ 5602:c9e5612f5424

Support the MP library on recent FreeBSD, have it pass relevant tests. src/ChangeLog addition: 2011-11-26 Aidan Kehoe <kehoea@parhasard.net> * number-mp.c (bignum_to_string): Don't overwrite the accumulator we've just set up for this function. * number-mp.c (BIGNUM_TO_TYPE): mp_itom() doesn't necessarily do what this code used to think with negative numbers, it can treat them as unsigned ints. Subtract numbers from bignum_zero instead of multiplying them by -1 to convert them to their negative equivalents. * number-mp.c (bignum_to_int): * number-mp.c (bignum_to_uint): * number-mp.c (bignum_to_long): * number-mp.c (bignum_to_ulong): * number-mp.c (bignum_to_double): Use the changed BIGNUM_TO_TYPE() in these functions. * number-mp.c (bignum_ceil): * number-mp.c (bignum_floor): In these functions, be more careful about rounding to positive and negative infinity, respectively. Don't use the sign of QUOTIENT when working out out whether to add or subtract one, rather use the sign QUOTIENT would have if arbitrary-precision division were done. * number-mp.h: * number-mp.h (MP_GCD): Wrap #include <mp.h> in BEGIN_C_DECLS/END_C_DECLS. * number.c (Fbigfloat_get_precision): * number.c (Fbigfloat_set_precision): Don't attempt to call XBIGFLOAT_GET_PREC if this build doesn't support big floats.
author Aidan Kehoe <kehoea@parhasard.net>
date Sat, 26 Nov 2011 17:59:14 +0000
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Definitions of marked slots in windows and window configs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
844
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
4 Copyright (C) 1995, 1996, 2001, 2002 Ben Wing.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 Copyright (C) 1996 Chuck Thompson.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 1279
diff changeset
9 XEmacs is free software: you can redistribute it and/or modify it
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 1279
diff changeset
11 Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 1279
diff changeset
12 option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 1279
diff changeset
20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 /* Split out of window.h and window.c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 by Kirill Katsnelson <kkm@kis.ru>, May 1998 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
25 /* Separation into WINDOW_SLOT / WINDOW_SAVED_SLOT by Ben Wing, June 2001.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
26
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
27 NOTE: No semicolons after slot declarations in this file! The
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
28 definitions of WINDOW_SLOT (and possibly WINDOW_SAVED_SLOT) need
844
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
29 to include a semicolon. This is because these may be defined as
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
30 nothing, and some compilers don't tolerate extra semicolons in
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
31 structure definitions.
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
32
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
33 WINDOW_SLOT declares a Lisp_Object that is not copied into the
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
34 saved_window struct of a window configuration, or is handled in
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
35 a special way in window configurations.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
36 WINDOW_SLOT_ARRAY is the same for an array of Lisp_Objects.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
37 WINDOW_SAVED_SLOT declares a Lisp_Object that is copied with no
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
38 special handling into the saved_window struct of a window
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
39 configuration. You must also declare the comparison function,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
40 either EQ or EQUAL_WRAPPED (i.e. Feq() or Fequal()).
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
41 WINDOW_SAVED_SLOT_ARRAY is the same for an array of Lisp_Objects.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
42
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
43 Callers should define WINDOW_SLOT (with a terminating semicolon if not
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
44 blank), and WINDOW_SAVED_SLOT if different; otherwise the latter will be
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
45 defined using WINDOW_SLOT. Callers should also either (a) do nothing
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
46 else (which defines WINDOW_SLOT_ARRAY using a for() loop, appropriate
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
47 for normal code), define WINDOW_SLOT_DECLARATION (which defines
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
48 WINDOW_SLOT_ARRAY using WINDOW_SLOT (slot[size]), appropriate for a
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
49 struct definition), or define WINDOW_SLOT_ARRAY themselves. In the
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
50 first two cases, WINDOW_SAVED_SLOT_ARRAY will be defined in the same
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
51 fashion, using WINDOW_SAVED_SLOT. In the last case, if
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
52 WINDOW_SAVED_SLOT is defined, the caller must provide an appropriate
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
53 definition of WINDOW_SAVED_SLOT_ARRAY; otherwise, it will be defined
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
54 using WINDOW_SLOT_ARRAY.
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
55
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
56 Callers do not need to undefine these definitions; it is done
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
57 automatically.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
58 */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
59
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
60 #ifdef WINDOW_SLOT_ARRAY
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
61 # ifndef WINDOW_SAVED_SLOT_ARRAY
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
62 # ifdef WINDOW_SAVED_SLOT
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
63 # error must define WINDOW_SAVED_SLOT_ARRAY if WINDOW_SAVED_SLOT and WINDOW_SLOT_ARRAY are defined
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
64 # else
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
65 # define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) \
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
66 WINDOW_SLOT_ARRAY (slot, size)
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
67 # endif /* WINDOW_SAVED_SLOT */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
68 # endif /* not WINDOW_SAVED_SLOT_ARRAY */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
69 #elif defined (WINDOW_SLOT_DECLARATION) /* not WINDOW_SLOT_ARRAY */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
70 # define WINDOW_SLOT_ARRAY(slot, size) WINDOW_SLOT (slot[size])
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
71 # define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
72 WINDOW_SAVED_SLOT (slot[size], compare)
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
73 #else /* not WINDOW_SLOT_DECLARATION, not WINDOW_SLOT_ARRAY */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
74 # define WINDOW_SLOT_ARRAY(slot, size) do { \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
75 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
76 for (wsaidx = 0; wsaidx < size; wsaidx++) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
77 { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
78 WINDOW_SLOT (slot[wsaidx]); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
79 } \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
80 } while (0);
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
81 # define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) do { \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
82 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
83 for (wsaidx = 0; wsaidx < size; wsaidx++) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
84 { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
85 WINDOW_SAVED_SLOT (slot[wsaidx], compare); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
86 } \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
87 } while (0);
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
88 #endif /* WINDOW_SLOT_DECLARATION */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
89
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
90 #ifndef WINDOW_SAVED_SLOT
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
91 #define WINDOW_SAVED_SLOT(slot, compare) WINDOW_SLOT (slot)
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
92 #endif
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
93
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 #define EQUAL_WRAPPED(x,y) internal_equal ((x), (y), 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
96
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
97 /* The frame this window is on. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
98 WINDOW_SLOT (frame)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
99 /* t if this window is a minibuffer window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
100 WINDOW_SLOT (mini_p)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
101 /* Following child (to right or down) at same level of tree */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
102 WINDOW_SLOT (next)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
103 /* Preceding child (to left or up) at same level of tree */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
104 WINDOW_SLOT (prev)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
105 /* First child of this window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
106 /* vchild is used if this is a vertical combination,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
107 hchild if this is a horizontal combination. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
108 WINDOW_SLOT (hchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
109 WINDOW_SLOT (vchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
110 /* The window this one is a child of. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
111 WINDOW_SLOT (parent)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
112
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
113 /* The buffer displayed in this window */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
114 /* Of the fields vchild, hchild and buffer, only one is non-nil. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
115 WINDOW_SLOT (buffer)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
116 /* A marker pointing to where in the text to start displaying */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
117 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
118 WINDOW_SLOT_ARRAY (start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
119 /* A marker pointing to where in the text point is in this window,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
120 used only when the window is not selected.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
121 This exists so that when multiple windows show one buffer
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
122 each one can have its own value of point. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
123 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
124 WINDOW_SLOT_ARRAY (pointm, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
125 /* A marker pointing to where in the text the scrollbar is pointing;
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
126 #### moved to scrollbar.c? */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
127 WINDOW_SLOT (sb_point)
844
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
128 /* A table that remembers (in marker form) the value of point in buffers
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
129 previously displayed in this window. Switching back to those buffers
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
130 causes the remembered point value to become current, rather than the
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
131 buffer's point. This is so that you get sensible behavior if you have
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
132 a buffer displayed in multiple windows and temporarily switch away and
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
133 then back in one window. We don't save or restore this table in a
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
134 window configuration, since that would be counterproductive -- we
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
135 always want to remember the most recent value of point in buffers we
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
136 switched away from. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
137 WINDOW_SLOT (saved_point_cache)
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
138 /* A table that remembers (in marker form) the value of window start in
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
139 buffers previously displayed in this window. Save reason as for
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
140 the previous table. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
141 WINDOW_SLOT (saved_last_window_start_cache)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
142
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
143 /* Number saying how recently window was selected */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
144 WINDOW_SLOT (use_time)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
145 /* text.modified of displayed buffer as of last time display completed */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
146 WINDOW_SLOT_ARRAY (last_modified, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
147 /* Value of point at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
148 WINDOW_SLOT_ARRAY (last_point, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
149 /* Value of start at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
150 WINDOW_SLOT_ARRAY (last_start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
151 /* buf.face_change as of last time display completed */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
152 WINDOW_SLOT_ARRAY (last_facechange, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
153
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
154 /* we cannot have a per-device cache of widgets / subwindows because
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
155 each visible instance needs to be a separate instance. The lowest
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
156 level of granularity we can get easily is the window that the
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
157 subwindow is in. This will fail if we attach the same subwindow
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
158 twice to a buffer. However, we are quite unlikely to do this,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
159 especially with buttons which will need individual callbacks. The
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
160 proper solution is probably not worth the effort. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
161 WINDOW_SLOT (subwindow_instance_cache)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
162
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
163 WINDOW_SLOT (line_cache_last_updated)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
164
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 /*** Non-specifier vars of window and window config ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 /* Non-nil means window is marked as dedicated. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
168 WINDOW_SAVED_SLOT (dedicated, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 /*** specifier values cached in the struct window ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 /* Display-table to use for displaying chars in this window. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
173 WINDOW_SAVED_SLOT (display_table, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 /* Thickness of modeline shadow, in pixels. If negative, draw
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 as recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
176 WINDOW_SAVED_SLOT (modeline_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* Non-nil means to display a modeline for the buffer. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
178 WINDOW_SAVED_SLOT (has_modeline_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 /* Thickness of vertical divider shadow, in pixels. If negative, draw as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
181 WINDOW_SAVED_SLOT (vertical_divider_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 /* Divider surface width (not counting 3-d borders) */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
183 WINDOW_SAVED_SLOT (vertical_divider_line_width, EQ)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
184 /* Spacing between outer edge of divider border and window edge */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
185 WINDOW_SAVED_SLOT (vertical_divider_spacing, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 /* Whether vertical dividers are always displayed */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
187 WINDOW_SAVED_SLOT (vertical_divider_always_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 /* Width of vertical scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
191 WINDOW_SAVED_SLOT (scrollbar_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 /* Height of horizontal scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
193 WINDOW_SAVED_SLOT (scrollbar_height, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 /* Whether the scrollbars are visible */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
195 WINDOW_SAVED_SLOT (horizontal_scrollbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
196 WINDOW_SAVED_SLOT (vertical_scrollbar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 /* Scrollbar positions */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
198 WINDOW_SAVED_SLOT (scrollbar_on_left_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
199 WINDOW_SAVED_SLOT (scrollbar_on_top_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 /* Pointer to use for vertical and horizontal scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
201 WINDOW_SAVED_SLOT (scrollbar_pointer, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 #endif /* HAVE_SCROLLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 #ifdef HAVE_TOOLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 /* Toolbar specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 This is not a size hog because the value here is not copied,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 and will be shared with the specs in the specifier. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
207 WINDOW_SAVED_SLOT_ARRAY (toolbar, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 /* Toolbar size for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
209 WINDOW_SAVED_SLOT_ARRAY (toolbar_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 /* Toolbar border width for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
211 WINDOW_SAVED_SLOT_ARRAY (toolbar_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 /* Toolbar visibility status for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
213 WINDOW_SAVED_SLOT_ARRAY (toolbar_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 /* Caption status of toolbar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
215 WINDOW_SAVED_SLOT (toolbar_buttons_captioned_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 that we need to know when they've changed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
218 WINDOW_SAVED_SLOT (default_toolbar, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
219 WINDOW_SAVED_SLOT (default_toolbar_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
220 WINDOW_SAVED_SLOT (default_toolbar_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
221 WINDOW_SAVED_SLOT (default_toolbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
222 WINDOW_SAVED_SLOT (default_toolbar_border_width, EQ)
744
8ae895c67ce7 [xemacs-hg @ 2002-02-04 15:44:37 by wmperry]
wmperry
parents: 617
diff changeset
223 WINDOW_SAVED_SLOT (toolbar_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 #endif /* HAVE_TOOLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 /* Gutter specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 This is not a size hog because the value here is not copied,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 and will be shared with the specs in the specifier. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
229 WINDOW_SAVED_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
230 /* Real (pre-calculated) gutter specification for each of the four positions.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
231 This is not a specifier, it is calculated by the specifier change
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
232 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
233 WINDOW_SAVED_SLOT_ARRAY (real_gutter, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 /* Gutter size for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
235 WINDOW_SAVED_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 /* Real (pre-calculated) gutter size for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 This is not a specifier, it is calculated by the specifier change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
239 WINDOW_SAVED_SLOT_ARRAY (real_gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 /* Gutter border width for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
241 WINDOW_SAVED_SLOT_ARRAY (gutter_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 /* Gutter visibility status for each of the four positions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
243 WINDOW_SAVED_SLOT_ARRAY (gutter_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 that we need to know when they've changed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
246 WINDOW_SAVED_SLOT (default_gutter, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
247 WINDOW_SAVED_SLOT (default_gutter_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
248 WINDOW_SAVED_SLOT (default_gutter_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
249 WINDOW_SAVED_SLOT (default_gutter_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
250 WINDOW_SAVED_SLOT (default_gutter_border_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 /* margins */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
252 WINDOW_SAVED_SLOT (left_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
253 WINDOW_SAVED_SLOT (right_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
254 WINDOW_SAVED_SLOT (minimum_line_ascent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
255 WINDOW_SAVED_SLOT (minimum_line_descent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
256 WINDOW_SAVED_SLOT (use_left_overflow, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
257 WINDOW_SAVED_SLOT (use_right_overflow, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 #ifdef HAVE_MENUBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 /* Visibility of menubar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
260 WINDOW_SAVED_SLOT (menubar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 #endif /* HAVE_MENUBARS */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
262 WINDOW_SAVED_SLOT (text_cursor_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 /* Hara-kiri */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 #undef EQUAL_WRAPPED
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 #undef WINDOW_SLOT_DECLARATION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 #undef WINDOW_SLOT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 #undef WINDOW_SLOT_ARRAY
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
269 #undef WINDOW_SAVED_SLOT
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
270 #undef WINDOW_SAVED_SLOT_ARRAY