annotate src/winslots.h @ 844:047d37eb70d7

[xemacs-hg @ 2002-05-16 13:30:23 by ben] ui fixes for things that were bothering me bytecode.c, editfns.c, lisp.h, lread.c: Fix save-restriction to use markers rather than pseudo-markers (integers representing the amount of text on either side of the region). That way, all inserts are handled correctly, not just those inside old restriction. Add buffer argument to save_restriction_save(). process.c: Clean up very dirty and kludgy code that outputs into a buffer -- use proper unwind protects, etc. font-lock.c: Do save-restriction/widen around the function -- otherwise, incorrect results will ensue when a buffer has been narrowed before a call to e.g. `buffer-syntactic-context' -- something that happens quite often. fileio.c: Look for a handler for make-temp-name. window.c, winslots.h: Try to solve this annoying problem: have two frames displaying the buffer, in different places; in one, temporarily switch away to another buffer and then back -- and you've lost your position; it's reset to the other one in the other frame. My current solution involves window-level caches of buffers and points (also a cache for window-start); when set-window-buffer is called, it looks to see if the buffer was previously visited in the window, and if so, uses the most recent point at that time. (It's a marker, so it handles changes.) #### Note: It could be argued that doing it on the frame level would be better -- e.g. if you visit a buffer temporarily through a grep, and then go back to that buffer, you presumably want the grep's position rather than some previous position provided everything was in the same frame, even though the grep was in another window in the frame. However, doing it on the frame level fails when you have two windows on the same frame. Perhaps we keep both a window and a frame cache, and use the frame cache if there are no other windows on the frame showing the buffer, else the window's cache? This is probably something to be configurable using a specifier. Suggestions please please please? window.c: Clean up a bit code that deals with the annoyance of window-point vs. point. dialog.el: Function to ask a multiple-choice question, automatically choosing a dialog box or minibuffer representation as necessary. Generalized version of yes-or-no-p, y-or-n-p. files.el: Use get-user-response to ask "yes/no/diff" question when recovering. "diff" means that a diff is displayed between the current file and the autosave. (Converts/deconverts escape-quoted as necessary. No more complaints from you, Mr. Turnbull!) One known problem: when a dialog is used, it's modal, so you can't scroll the diff. Will fix soon. lisp-mode.el: If we're filling a string, don't treat semicolon as a comment, which would give very unfriendly results. Uses `buffer-syntactic-context'. simple.el: all changes back to the beginning. (Useful if you've saved the file in the middle of the changes.) simple.el: Add option kill-word-into-kill-ring, which controls whether words deleted with kill-word, backward-kill-word, etc. are "cut" into the kill ring, or "cleared" into nothingness. (My preference is the latter, by far. I'd almost go so far as suggesting we make it the default, as you can always select a word and then cut it if you want it cut.) menubar-items.el: Add option corresponding to kill-word-into-kill-ring.
author ben
date Thu, 16 May 2002 13:30:58 +0000
parents 8ae895c67ce7
children e22b0213b713
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
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
45 Callers should define WINDOW_SLOT (with a terminating semicolon if
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
46 not blank), and WINDOW_SAVED_SLOT if different; otherwise the
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
47 latter will be defined using WINDOW_SLOT. Callers do not define
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
48 the _ARRAY versions. Instead, they either do or do not define
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
49 WINDOW_SLOT_DECLARATION. It should be defined in the definition of
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
50 a struct and not elsewhere.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
51
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
52 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
53 automatically.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
54 */
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 #ifndef WINDOW_SAVED_SLOT
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
57 #define WINDOW_SAVED_SLOT(slot, compare) WINDOW_SLOT (slot)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
60 #ifdef WINDOW_SLOT_DECLARATION
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
61 #define WINDOW_SLOT_ARRAY(slot, size) WINDOW_SLOT (slot[size])
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
62 #define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
63 WINDOW_SAVED_SLOT (slot[size], compare)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
64 #else
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
65 #define WINDOW_SLOT_ARRAY(slot, size) do { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
66 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
67 for (wsaidx = 0; wsaidx < size; wsaidx++) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
68 { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
69 WINDOW_SLOT (slot[wsaidx]); \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
70 } \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
71 } while (0);
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
72 #define WINDOW_SAVED_SLOT_ARRAY(slot, size, compare) do { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
73 int wsaidx; \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
74 for (wsaidx = 0; wsaidx < size; wsaidx++) \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
75 { \
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
76 WINDOW_SAVED_SLOT (slot[wsaidx], compare); \
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 } while (0);
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
79 #endif /* WINDOW_SLOT_DECLARATION */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
80
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 #define EQUAL_WRAPPED(x,y) internal_equal ((x), (y), 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
83
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
84 /* The frame this window is on. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
85 WINDOW_SLOT (frame)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
86 /* t if this window is a minibuffer window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
87 WINDOW_SLOT (mini_p)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
88 /* 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
89 WINDOW_SLOT (next)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
90 /* 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
91 WINDOW_SLOT (prev)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
92 /* First child of this window. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
93 /* 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
94 hchild if this is a horizontal combination. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
95 WINDOW_SLOT (hchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
96 WINDOW_SLOT (vchild)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
97 /* The window this one is a child of. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
98 WINDOW_SLOT (parent)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
99
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
100 /* The buffer displayed in this window */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
101 /* 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
102 WINDOW_SLOT (buffer)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
103 /* 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
104 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
105 WINDOW_SLOT_ARRAY (start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
106 /* 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
107 used only when the window is not selected.
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
108 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
109 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
110 /* need one for each set of display structures */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
111 WINDOW_SLOT_ARRAY (pointm, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
112 /* 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
113 #### moved to scrollbar.c? */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
114 WINDOW_SLOT (sb_point)
844
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
115 /* 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
116 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
117 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
118 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
119 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
120 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
121 window configuration, since that would be counterproductive -- we
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
122 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
123 switched away from. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
124 WINDOW_SLOT (saved_point_cache)
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
125 /* 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
126 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
127 the previous table. */
047d37eb70d7 [xemacs-hg @ 2002-05-16 13:30:23 by ben]
ben
parents: 744
diff changeset
128 WINDOW_SLOT (saved_last_window_start_cache)
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
129
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
130 /* Number saying how recently window was selected */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
131 WINDOW_SLOT (use_time)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
132 /* 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
133 WINDOW_SLOT_ARRAY (last_modified, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
134 /* Value of point at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
135 WINDOW_SLOT_ARRAY (last_point, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
136 /* Value of start at that time */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
137 WINDOW_SLOT_ARRAY (last_start, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
138 /* 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
139 WINDOW_SLOT_ARRAY (last_facechange, 3)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
140
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
141 /* 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
142 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
143 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
144 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
145 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
146 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
147 proper solution is probably not worth the effort. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
148 WINDOW_SLOT (subwindow_instance_cache)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
149
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
150 WINDOW_SLOT (line_cache_last_updated)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
151
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
152 /* If redisplay in this window goes beyond this buffer position,
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
153 must run the redisplay-end-trigger-functions. */
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
154 WINDOW_SLOT (redisplay_end_trigger)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
155
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 /*** Non-specifier vars of window and window config ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 /* 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
159 WINDOW_SAVED_SLOT (dedicated, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 /*** specifier values cached in the struct window ***/
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 /* 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
164 WINDOW_SAVED_SLOT (display_table, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 /* Thickness of modeline shadow, in pixels. If negative, draw
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 as recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
167 WINDOW_SAVED_SLOT (modeline_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 /* 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
169 WINDOW_SAVED_SLOT (has_modeline_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 /* Thickness of vertical divider shadow, in pixels. If negative, draw as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 recessed. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
172 WINDOW_SAVED_SLOT (vertical_divider_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 /* 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
174 WINDOW_SAVED_SLOT (vertical_divider_line_width, EQ)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
175 /* 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
176 WINDOW_SAVED_SLOT (vertical_divider_spacing, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* Whether vertical dividers are always displayed */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
178 WINDOW_SAVED_SLOT (vertical_divider_always_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 /* Width of vertical scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
182 WINDOW_SAVED_SLOT (scrollbar_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 /* Height of horizontal scrollbars. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
184 WINDOW_SAVED_SLOT (scrollbar_height, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 /* Whether the scrollbars are visible */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
186 WINDOW_SAVED_SLOT (horizontal_scrollbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
187 WINDOW_SAVED_SLOT (vertical_scrollbar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 /* Scrollbar positions */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
189 WINDOW_SAVED_SLOT (scrollbar_on_left_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
190 WINDOW_SAVED_SLOT (scrollbar_on_top_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 /* 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
192 WINDOW_SAVED_SLOT (scrollbar_pointer, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 #endif /* HAVE_SCROLLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 #ifdef HAVE_TOOLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 /* Toolbar specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 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
197 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
198 WINDOW_SAVED_SLOT_ARRAY (toolbar, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 /* 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
200 WINDOW_SAVED_SLOT_ARRAY (toolbar_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 /* 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
202 WINDOW_SAVED_SLOT_ARRAY (toolbar_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 /* 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
204 WINDOW_SAVED_SLOT_ARRAY (toolbar_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 /* Caption status of toolbar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
206 WINDOW_SAVED_SLOT (toolbar_buttons_captioned_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 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
209 WINDOW_SAVED_SLOT (default_toolbar, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
210 WINDOW_SAVED_SLOT (default_toolbar_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
211 WINDOW_SAVED_SLOT (default_toolbar_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
212 WINDOW_SAVED_SLOT (default_toolbar_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
213 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
214 WINDOW_SAVED_SLOT (toolbar_shadow_thickness, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 #endif /* HAVE_TOOLBARS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 /* Gutter specification for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 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
219 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
220 WINDOW_SAVED_SLOT_ARRAY (gutter, 4, EQUAL_WRAPPED)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
221 /* Real (pre-calculated) gutter specification for each of the four positions.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
222 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
223 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
224 WINDOW_SAVED_SLOT_ARRAY (real_gutter, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 /* 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
226 WINDOW_SAVED_SLOT_ARRAY (gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 /* Real (pre-calculated) gutter size for each of the four positions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 This is not a specifier, it is calculated by the specifier change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 functions. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
230 WINDOW_SAVED_SLOT_ARRAY (real_gutter_size, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 /* 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
232 WINDOW_SAVED_SLOT_ARRAY (gutter_border_width, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 /* 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
234 WINDOW_SAVED_SLOT_ARRAY (gutter_visible_p, 4, EQUAL_WRAPPED)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 /* The following five don't really need to be cached except
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 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
237 WINDOW_SAVED_SLOT (default_gutter, EQUAL_WRAPPED)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
238 WINDOW_SAVED_SLOT (default_gutter_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
239 WINDOW_SAVED_SLOT (default_gutter_height, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
240 WINDOW_SAVED_SLOT (default_gutter_visible_p, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
241 WINDOW_SAVED_SLOT (default_gutter_border_width, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 /* margins */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
243 WINDOW_SAVED_SLOT (left_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
244 WINDOW_SAVED_SLOT (right_margin_width, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
245 WINDOW_SAVED_SLOT (minimum_line_ascent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
246 WINDOW_SAVED_SLOT (minimum_line_descent, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
247 WINDOW_SAVED_SLOT (use_left_overflow, EQ)
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
248 WINDOW_SAVED_SLOT (use_right_overflow, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #ifdef HAVE_MENUBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 /* Visibility of menubar. */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
251 WINDOW_SAVED_SLOT (menubar_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 #endif /* HAVE_MENUBARS */
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
253 WINDOW_SAVED_SLOT (text_cursor_visible_p, EQ)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 /* Hara-kiri */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 #undef EQUAL_WRAPPED
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 #undef WINDOW_SLOT_DECLARATION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 #undef WINDOW_SLOT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 #undef WINDOW_SLOT_ARRAY
617
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
260 #undef WINDOW_SAVED_SLOT
af57a77cbc92 [xemacs-hg @ 2001-06-18 07:09:50 by ben]
ben
parents: 442
diff changeset
261 #undef WINDOW_SAVED_SLOT_ARRAY