annotate src/frame.h @ 486:80cdb2387043

Initial revision
author Jim Blandy <jimb@redhat.com>
date Mon, 13 Jan 1992 22:04:23 +0000
parents 8c615e453683
children a8d94735277e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Define screen-object for GNU Emacs.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 Copyright (C) 1988 Free Software Foundation, Inc.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 the Free Software Foundation; either version 1, or (at your option)
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 #ifdef MULTI_SCREEN
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 enum output_method
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 { output_termcap, output_x_window };
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 struct screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 {
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 int size;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 struct Lisp_Vector *next;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 /* glyphs as they appear on the screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 struct screen_glyphs *current_glyphs;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 /* glyphs we'd like to appear on the screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 struct screen_glyphs *desired_glyphs;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 /* Cost of inserting 1 line on this screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 int *insert_line_cost;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 /* Cost of deleting 1 line on this screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 int *delete_line_cost;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 /* Cost of inserting n lines on this screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 int *insert_n_lines_cost;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 /* Cost of deleting n lines on this screen */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 int *delete_n_lines_cost;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 /* glyphs for the mode line */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 struct screen_glyphs *temp_glyphs;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 /* Intended cursor position of this screen.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 Measured in characters, counting from upper left corner
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 within the screen. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 int cursor_x;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 int cursor_y;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
58 /* Actual cursor position of this screen, and the character under it.
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 (Not used for terminal screens.) */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 int phys_cursor_x;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 int phys_cursor_y;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
62 /* This is handy for undrawing the cursor, because current_glyphs is
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
63 not always accurate when in do_scrolling. */
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
64 GLYPH phys_cursor_glyph;
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 /* Size of this screen, in units of characters. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 int height;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 int width;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 /* New height and width for pending size change. 0 if no change pending. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 int new_height, new_width;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 /* Name of this screen: a Lisp string. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 Lisp_Object name;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75
357
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
76 /* The screen which should recieve keystrokes that occur in this
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
77 screen. This is usually the screen itself, but if the screen is
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
78 minibufferless, this points to the minibuffer screen when it is
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
79 active. */
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
80 Lisp_Object focus_screen;
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
81
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 /* This screen's root window. Every screen has one.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 If the screen has only a minibuffer window, this is it.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 Otherwise, if the screen has a minibuffer window, this is its sibling. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 Lisp_Object root_window;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 /* This screen's selected window.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 Each screen has its own window hierarchy
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 and one of the windows in it is selected within the screen.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 The selected window of the selected screen is Emacs's selected window. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 Lisp_Object selected_window;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 /* This screen's minibuffer window.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 Most screens have their own minibuffer windows,
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 but only the selected screen's minibuffer window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 can actually appear to exist. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 Lisp_Object minibuffer_window;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 /* Parameter alist of this screen.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 These are the parameters specified when creating the screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 or modified with modify-screen-parameters. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 Lisp_Object param_alist;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 /* The output method says how the contents of this screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 are displayed. It could be using termcap, or using an X window. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 enum output_method output_method;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 /* A structure of auxiliary data used for displaying the contents.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 struct x_display is used for X window screens;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 it is defined in xterm.h. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 union display { struct x_display *x; int nothing; } display;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 /* Nonzero if last attempt at redisplay on this screen was preempted. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 char display_preempted;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 /* Nonzero if screen is currently displayed. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 char visible;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 /* Nonzero if window is currently iconified.
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 This and visible are mutually exclusive. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 char iconified;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 /* Nonzero if this screen should be redrawn. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 char garbaged;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
126 /* True if screen actually has a minibuffer window on it.
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127 0 if using a minibuffer window that isn't on this screen. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 char has_minibuffer;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 /* 0 means, if this screen has just one window,
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 show no modeline for that window. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 char wants_modeline;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134 /* Non-0 means raise this screen to the top of the heap when selected. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 char auto_raise;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 /* Non-0 means lower this screen to the bottom of the stack when left. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 char auto_lower;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 /* True if screen's root window can't be split. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 char no_split;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 /* Storage for messages to this screen. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 char *message_buf;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 /* Nonnegative if current redisplay should not do scroll computation
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 for lines beyond a certain vpos. This is the vpos. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 int scroll_bottom_vpos;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 };
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 typedef struct screen *SCREEN_PTR;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 #define XSCREEN(p) ((struct screen *) XPNTR (p))
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 #define XSETSCREEN(p, v) ((struct screen *) XSETPNTR (p, v))
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 #define WINDOW_SCREEN(w) (w)->screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
158 #define SCREENP(s) (XTYPE(s) == Lisp_Screen)
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
159 #define SCREEN_LIVE_P(s) ((s)->display.nothing != 0)
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1, s->garbaged = 1)
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 #define SCREEN_IS_TERMCAP(s) ((s)->output_method == output_termcap)
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 #define SCREEN_IS_X(s) ((s)->output_method == output_x_window)
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
163 #define SCREEN_MINIBUF_ONLY_P(s) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
164 EQ (SCREEN_ROOT_WINDOW (s), SCREEN_MINIBUF_WINDOW (s))
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
165 #define SCREEN_HAS_MINIBUF(s) ((s)->has_minibuffer)
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 #define SCREEN_CURRENT_GLYPHS(s) (s)->current_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 #define SCREEN_DESIRED_GLYPHS(s) (s)->desired_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 #define SCREEN_TEMP_GLYPHS(s) (s)->temp_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 #define SCREEN_HEIGHT(s) (s)->height
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 #define SCREEN_WIDTH(s) (s)->width
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 #define SCREEN_NEW_HEIGHT(s) (s)->new_height
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 #define SCREEN_NEW_WIDTH(s) (s)->new_width
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 #define SCREEN_CURSOR_X(s) (s)->cursor_x
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 #define SCREEN_CURSOR_Y(s) (s)->cursor_y
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 #define SCREEN_VISIBLE_P(s) (s)->visible
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 #define SCREEN_GARBAGED_P(s) (s)->garbaged
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 #define SCREEN_NO_SPLIT_P(s) (s)->no_split
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 #define SCREEN_WANTS_MODELINE_P(s) (s)->wants_modeline
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 #define SCREEN_ICONIFIED_P(s) (s)->iconified
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 #define SCREEN_MINIBUF_WINDOW(s) (s)->minibuffer_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 #define SCREEN_ROOT_WINDOW(s) (s)->root_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 #define SCREEN_SELECTED_WINDOW(s) (s)->selected_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 #define SET_GLYPHS_SCREEN(glyphs,screen) ((glyphs)->screen = (screen))
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 #define SCREEN_INSERT_COST(s) (s)->insert_line_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 #define SCREEN_DELETE_COST(s) (s)->delete_line_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 #define SCREEN_INSERTN_COST(s) (s)->insert_n_lines_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 #define SCREEN_DELETEN_COST(s) (s)->delete_n_lines_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 #define SCREEN_MESSAGE_BUF(s) (s)->message_buf
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 #define SCREEN_SCROLL_BOTTOM_VPOS(s) (s)->scroll_bottom_vpos
357
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
190 #define SCREEN_FOCUS_SCREEN(s) (s)->focus_screen
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
192 #define CHECK_SCREEN(x, i) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
193 { \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
194 if (! SCREENP (x)) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
195 x = wrong_type_argument (Qscreenp, (x)); \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
196 }
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
197
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
198 #define CHECK_LIVE_SCREEN(x, i) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
199 { \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
200 if (! SCREENP (x) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
201 || ! SCREEN_LIVE_P (XSCREEN (x))) \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
202 x = wrong_type_argument (Qlive_screen_p, (x)); \
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
203 }
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
204
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
205 extern Lisp_Object Qscreenp, Qlive_screen_p;
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 extern struct screen *selected_screen;
357
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
208 extern struct screen *last_nonminibuf_screen;
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 extern struct screen *make_terminal_screen ();
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 extern struct screen *make_screen ();
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 extern struct screen *make_minibuffer_screen ();
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 extern struct screen *make_screen_without_minibuffer ();
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215 extern Lisp_Object Vscreen_list;
385
493f247f7ca1 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 357
diff changeset
216 extern Lisp_Object Vdefault_screen_alist;
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 extern Lisp_Object Vterminal_screen;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 #else /* not MULTI_SCREEN */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 /* These definitions are used in a single-screen version of Emacs. */
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 #define SCREEN_PTR int
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 extern int selected_screen;
357
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
227 #define last_nonminibuf_screen selected_screen
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 #define XSCREEN(s) selected_screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 #define WINDOW_SCREEN(w) selected_screen
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
232 #define SCREENP(s) (XTYPE(s) == Lisp_Screen)
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
233 #define SCREEN_LIVE_P(s) 1
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 #define SET_SCREEN_GARBAGED(s) (screen_garbaged = 1)
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 #define SCREEN_IS_TERMCAP(s) 1
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
236 #define SCREEN_IS_X(s) 0
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
237 #define SCREEN_IS_MINIBUF_ONLY(s) 0
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
238 #define SCREEN_HAS_MINIBUF(s) 1
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 #define SCREEN_CURRENT_GLYPHS(s) current_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 #define SCREEN_DESIRED_GLYPHS(s) desired_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 #define SCREEN_TEMP_GLYPHS(s) temp_glyphs
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 #define SCREEN_HEIGHT(s) screen_height
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 #define SCREEN_WIDTH(s) screen_width
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 #define SCREEN_NEW_HEIGHT(s) delayed_screen_height
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 #define SCREEN_NEW_WIDTH(s) delayed_screen_width
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 #define SCREEN_CURSOR_X(s) cursX
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 #define SCREEN_CURSOR_Y(s) cursY
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 #define SCREEN_VISIBLE_P(s) 1
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 #define SCREEN_GARBAGED_P(s) screen_garbaged
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250 #define SCREEN_NO_SPLIT_P(s) 0
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 #define SCREEN_WANTS_MODELINE_P(s) 1
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 #define SCREEN_ICONIFIED_P(s) 0
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 #define SCREEN_MINIBUF_WINDOW(s) minibuf_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254 #define SCREEN_ROOT_WINDOW(s) root_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 #define SCREEN_SELECTED_WINDOW(s) selected_window
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 #define SET_GLYPHS_SCREEN(glyphs,screen)
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257 #define SCREEN_INSERT_COST(screen) insert_line_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 #define SCREEN_DELETE_COST(screen) delete_line_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 #define SCREEN_INSERTN_COST(screen) insert_n_lines_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 #define SCREEN_DELETEN_COST(screen) delete_n_lines_cost
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 #define SCREEN_MESSAGE_BUF(s) message_buf
357
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
262 #define SCREEN_SCROLL_BOTTOM_VPOS(s) scroll_bottom_vpos
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
263
1ad871406b12 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 261
diff changeset
264 #define CHECK_SCREEN(x, i) { ; }
261
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 extern int screen_width, screen_height;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 extern int cursX, cursY;
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268
731afdb0842c Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 #endif /* not MULTI_SCREEN */