annotate src/winslots.h @ 1296:87084e8445a7

[xemacs-hg @ 2003-02-14 09:50:15 by ben] syntax-table fixes 1. the updating of mirror tables every time a syntax table was modified was taking up huge amounts of time so i added a dirty flag and made the updating "just-in-time". 2. no-longer-used char-table-entries were not getting "freed", generating tons of garbage. 3. syntax_match() was being incorrectly called on mirror tables in the cache, not the original syntax table. buffer.c, syntax.c: Move syntax table description from buffer.c to syntax.c. chartab.c, chartab.h: Free extra char table entries to avoid excessive garbage. Add flags for dirty and mirror_table_p to char tables. Add a back pointer from mirror tables to the original syntax table. When modifying a syntax table, don't update the mirror table right away, just mark as dirty. Add various asserts to make sure we are dealing with the right type of table (mirror or non-mirror). font-lock.c, syntax.c, syntax.h: Add entry to syntax caches for the non-mirror table. Set it appropriately when initializing the syntax table. Use it, not the mirror table, for calls to syntax_match(). Don't create a bogus float each time, just once at startup. Add some asserts, as in chartab.c. syntax.h: When retrieving the syntax code, check the dirty flag and update the mirror tables as appropriate. Add some asserts, as above.
author ben
date Fri, 14 Feb 2003 09:50:17 +0000
parents cd0abfdb9e9d
children 308d34e9f07d
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 XEmacs is free software; you can redistribute it and/or modify it
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 later version.
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
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 /* Split out of window.h and window.c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 by Kirill Katsnelson <kkm@kis.ru>, May 1998 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
27 /* 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
28
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
29 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
30 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
31 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
32 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
33 structure definitions.
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
34
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
35 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
36 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
37 a special way in window configurations.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
38 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
39 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
40 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
41 configuration. You must also declare the comparison function,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
42 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
43 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
44
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 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
56 using WINDOW_SLOT_ARRAY.
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
57
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
58 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
59 automatically.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
60 */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
61
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
62 #ifdef WINDOW_SLOT_ARRAY
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
63 # ifndef WINDOW_SAVED_SLOT_ARRAY
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
64 # ifdef WINDOW_SAVED_SLOT
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
65 # 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
66 # else
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
67 # define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) \
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
68 WINDOW_SLOT_ARRAY (slot, size)
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
69 # endif /* WINDOW_SAVED_SLOT */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
70 # endif /* not WINDOW_SAVED_SLOT_ARRAY */
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
71 #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
72 # 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
73 # 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
74 WINDOW_SAVED_SLOT (slot[size], compare)
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
75 #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
76 # define WINDOW_SLOT_ARRAY(slot, size) do { \
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
77 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
78 for (wsaidx = 0; wsaidx < size; 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 WINDOW_SLOT (slot[wsaidx]); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
81 } \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
82 } while (0);
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
83 # 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
84 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
85 for (wsaidx = 0; wsaidx < size; wsaidx++) \
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 WINDOW_SAVED_SLOT (slot[wsaidx], compare); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
88 } \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
89 } while (0);
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
90 #endif /* WINDOW_SLOT_DECLARATION */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
91
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
92 #ifndef WINDOW_SAVED_SLOT
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
93 #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
94 #endif
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 844
diff changeset
95
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #define EQUAL_WRAPPED(x,y) internal_equal ((x), (y), 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
98
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
99 /* The frame this window is on. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
100 WINDOW_SLOT (frame)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
101 /* t if this window is a minibuffer window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
102 WINDOW_SLOT (mini_p)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
103 /* 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
104 WINDOW_SLOT (next)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
105 /* 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
106 WINDOW_SLOT (prev)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
107 /* First child of this window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
108 /* 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
109 hchild if this is a horizontal combination. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
110 WINDOW_SLOT (hchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
111 WINDOW_SLOT (vchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
112 /* The window this one is a child of. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
113 WINDOW_SLOT (parent)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
114
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
115 /* The buffer displayed in this window */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
116 /* 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
117 WINDOW_SLOT (buffer)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
118 /* 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
119 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
120 WINDOW_SLOT_ARRAY (start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
121 /* 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
122 used only when the window is not selected.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
123 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
124 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
125 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
126 WINDOW_SLOT_ARRAY (pointm, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
127 /* 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
128 #### moved to scrollbar.c? */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
129 WINDOW_SLOT (sb_point)
844
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
130 /* 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
131 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
132 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
133 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
134 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
135 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
136 window configuration, since that would be counterproductive -- we
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
137 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
138 switched away from. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
139 WINDOW_SLOT (saved_point_cache)
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
140 /* 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
141 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
142 the previous table. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
143 WINDOW_SLOT (saved_last_window_start_cache)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
144
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
145 /* Number saying how recently window was selected */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
146 WINDOW_SLOT (use_time)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
147 /* 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
148 WINDOW_SLOT_ARRAY (last_modified, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
149 /* Value of point at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
150 WINDOW_SLOT_ARRAY (last_point, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
151 /* Value of start at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
152 WINDOW_SLOT_ARRAY (last_start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
153 /* 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
154 WINDOW_SLOT_ARRAY (last_facechange, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
155
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
156 /* 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
157 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
158 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
159 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
160 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
161 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
162 proper solution is probably not worth the effort. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
163 WINDOW_SLOT (subwindow_instance_cache)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
164
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
165 WINDOW_SLOT (line_cache_last_updated)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
166
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 /*** Non-specifier vars of window and window config ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 /* 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
170 WINDOW_SAVED_SLOT (dedicated, EQ)
428
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 /*** specifier values cached in the struct window ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 /* 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
175 WINDOW_SAVED_SLOT (display_table, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 /* Thickness of modeline shadow, in pixels. If negative, draw
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 as recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
178 WINDOW_SAVED_SLOT (modeline_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 /* 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
180 WINDOW_SAVED_SLOT (has_modeline_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 /* Thickness of vertical divider shadow, in pixels. If negative, draw as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
183 WINDOW_SAVED_SLOT (vertical_divider_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 /* 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
185 WINDOW_SAVED_SLOT (vertical_divider_line_width, EQ)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
186 /* 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
187 WINDOW_SAVED_SLOT (vertical_divider_spacing, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 /* Whether vertical dividers are always displayed */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
189 WINDOW_SAVED_SLOT (vertical_divider_always_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 /* Width of vertical scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
193 WINDOW_SAVED_SLOT (scrollbar_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 /* Height of horizontal scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
195 WINDOW_SAVED_SLOT (scrollbar_height, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 /* Whether the scrollbars are visible */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
197 WINDOW_SAVED_SLOT (horizontal_scrollbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
198 WINDOW_SAVED_SLOT (vertical_scrollbar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 /* Scrollbar positions */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
200 WINDOW_SAVED_SLOT (scrollbar_on_left_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
201 WINDOW_SAVED_SLOT (scrollbar_on_top_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 /* 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
203 WINDOW_SAVED_SLOT (scrollbar_pointer, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #endif /* HAVE_SCROLLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 #ifdef HAVE_TOOLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 /* Toolbar specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 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
208 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
209 WINDOW_SAVED_SLOT_ARRAY (toolbar, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 /* 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
211 WINDOW_SAVED_SLOT_ARRAY (toolbar_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 /* 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
213 WINDOW_SAVED_SLOT_ARRAY (toolbar_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 /* 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
215 WINDOW_SAVED_SLOT_ARRAY (toolbar_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 /* Caption status of toolbar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
217 WINDOW_SAVED_SLOT (toolbar_buttons_captioned_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 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
220 WINDOW_SAVED_SLOT (default_toolbar, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
221 WINDOW_SAVED_SLOT (default_toolbar_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
222 WINDOW_SAVED_SLOT (default_toolbar_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
223 WINDOW_SAVED_SLOT (default_toolbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
224 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
225 WINDOW_SAVED_SLOT (toolbar_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 #endif /* HAVE_TOOLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 /* Gutter specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 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
230 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
231 WINDOW_SAVED_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
232 /* Real (pre-calculated) gutter specification for each of the four positions.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
233 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
234 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
235 WINDOW_SAVED_SLOT_ARRAY (real_gutter, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 /* 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
237 WINDOW_SAVED_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 /* Real (pre-calculated) gutter size for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 This is not a specifier, it is calculated by the specifier change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
241 WINDOW_SAVED_SLOT_ARRAY (real_gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 /* 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
243 WINDOW_SAVED_SLOT_ARRAY (gutter_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 /* 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
245 WINDOW_SAVED_SLOT_ARRAY (gutter_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 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
248 WINDOW_SAVED_SLOT (default_gutter, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
249 WINDOW_SAVED_SLOT (default_gutter_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
250 WINDOW_SAVED_SLOT (default_gutter_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
251 WINDOW_SAVED_SLOT (default_gutter_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
252 WINDOW_SAVED_SLOT (default_gutter_border_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 /* margins */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
254 WINDOW_SAVED_SLOT (left_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
255 WINDOW_SAVED_SLOT (right_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
256 WINDOW_SAVED_SLOT (minimum_line_ascent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
257 WINDOW_SAVED_SLOT (minimum_line_descent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
258 WINDOW_SAVED_SLOT (use_left_overflow, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
259 WINDOW_SAVED_SLOT (use_right_overflow, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 #ifdef HAVE_MENUBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 /* Visibility of menubar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
262 WINDOW_SAVED_SLOT (menubar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 #endif /* HAVE_MENUBARS */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
264 WINDOW_SAVED_SLOT (text_cursor_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 /* Hara-kiri */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 #undef EQUAL_WRAPPED
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 #undef WINDOW_SLOT_DECLARATION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 #undef WINDOW_SLOT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 #undef WINDOW_SLOT_ARRAY
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
271 #undef WINDOW_SAVED_SLOT
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
272 #undef WINDOW_SAVED_SLOT_ARRAY