Mercurial > emacs
annotate src/dispextern.h @ 14145:e8831855e44d
(USE_X_TOOLKIT = maybe): Delete redundant `fi'.
author | Erik Naggum <erik@naggum.no> |
---|---|
date | Wed, 10 Jan 1996 20:09:38 +0000 |
parents | 5ebb99bc06bb |
children | ee40177f6c68 |
rev | line source |
---|---|
247 | 1 /* Interface definitions for display code. |
7307 | 2 Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. |
247 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
732 | 8 the Free Software Foundation; either version 2, or (at your option) |
247 | 9 any later version. |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | |
9572 | 20 #ifndef _DISPEXTERN_H_ |
21 #define _DISPEXTERN_H_ | |
22 | |
247 | 23 /* Nonzero means last display completed and cursor is really at |
24 cursX, cursY. Zero means it was preempted. */ | |
25 extern int display_completed; | |
26 | |
27 #ifdef HAVE_X_WINDOWS | |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
28 #include <X11/Xlib.h> |
9572 | 29 #endif |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
30 |
9572 | 31 #ifdef MSDOS |
32 #include "msdos.h" | |
33 #endif | |
34 | |
13407
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
35 #ifdef HAVE_NTGUI |
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
36 #include "win32.h" |
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
37 #endif |
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
38 |
9572 | 39 #ifdef HAVE_FACES |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
40 struct face |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
41 { |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
42 /* If this is non-zero, it is a GC we can use without modification |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
43 to represent this face. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
44 GC gc; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
45 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
46 /* Pixel value for foreground color. */ |
8821
041e02e09745
(struct face): Use EMACS_UINT.
Richard M. Stallman <rms@gnu.org>
parents:
7307
diff
changeset
|
47 EMACS_UINT foreground; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
48 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
49 /* Pixel value for background color. */ |
8821
041e02e09745
(struct face): Use EMACS_UINT.
Richard M. Stallman <rms@gnu.org>
parents:
7307
diff
changeset
|
50 EMACS_UINT background; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
51 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
52 /* Font used for this face. */ |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
53 XFontStruct *font; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
54 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
55 /* Background stipple or bitmap used for this face. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
56 Pixmap stipple; |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
57 |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
58 /* Pixmap_depth. */ |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
59 unsigned int pixmap_w, pixmap_h; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
60 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
61 /* Whether or not to underline text in this face. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
62 char underline; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
63 }; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
64 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
65 /* Let's stop using this and get rid of it. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
66 typedef struct face *FACE; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
67 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
68 #define NORMAL_FACE ((struct face *) 0) |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
69 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
70 #define FACE_HAS_GC(f) ((f)->gc) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
71 #define FACE_GC(f) ((f)->gc) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
72 #define FACE_FOREGROUND(f) ((f)->foreground) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
73 #define FACE_BACKGROUND(f) ((f)->background) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
74 #define FACE_FONT(f) ((f)->font) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
75 #define FACE_STIPPLE(f) ((f)->stipple) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
76 #define FACE_UNDERLINE_P(f) ((f)->underline) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
77 |
9572 | 78 #else /* not HAVE_FACES */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
79 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
80 typedef int FACE; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
81 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
82 #define NORMAL_FACE 0x0 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
83 #define HIGHLIGHT_FACE 0x1 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
84 #define UNDERLINE_FACE 0x2 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
85 #define HIGHLIGHT_UNDERLINE_FACE 0x3 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
86 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
87 #define FACE_HIGHLIGHT(f) ((f) & 0x1) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
88 #define FACE_UNDERLINE(f) ((f) & 0x2) |
9572 | 89 |
90 #endif /* not HAVE_FACES */ | |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
91 |
247 | 92 |
764 | 93 /* This structure is used for the actual display of text on a frame. |
247 | 94 |
95 There are two instantiations of it: the glyphs currently displayed, | |
96 and the glyphs we desire to display. The latter object is generated | |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
97 from buffers being displayed. */ |
247 | 98 |
764 | 99 struct frame_glyphs |
247 | 100 { |
764 | 101 #ifdef MULTI_FRAME |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
102 struct frame *frame; /* Frame these glyphs belong to. */ |
764 | 103 #endif /* MULTI_FRAME */ |
247 | 104 int height; |
105 int width; | |
106 | |
764 | 107 /* Contents of the frame. |
485 | 108 glyphs[V][H] is the glyph at position V, H. |
109 Note that glyphs[V][-1], | |
110 glyphs[V][used[V]], | |
764 | 111 and glyphs[V][frame_width] are always '\0'. */ |
247 | 112 GLYPH **glyphs; |
113 /* long vector from which the strings in `glyphs' are taken. */ | |
114 GLYPH *total_contents; | |
115 | |
764 | 116 /* When representing a desired frame, |
117 enable[n] == 0 means that line n is same as current frame. | |
1649
c3225b867171
* dispextern.h (struct frame_glyphs): Doc fix.
Jim Blandy <jimb@redhat.com>
parents:
1510
diff
changeset
|
118 Between updates, all lines should be disabled. |
764 | 119 When representing current frame contents, |
485 | 120 enable[n] == 0 means that line n is blank. */ |
121 char *enable; | |
122 | |
123 /* Everything on line n after column used[n] is considered blank. */ | |
124 int *used; | |
125 | |
247 | 126 /* highlight[n] != 0 iff line n is highlighted. */ |
127 char *highlight; | |
128 | |
6658 | 129 /* Buffer offset of this line's first char. |
130 This is not really implemented, and cannot be, | |
131 and should be deleted. */ | |
247 | 132 int *bufp; |
133 | |
13407
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
134 #ifdef HAVE_WINDOW_SYSTEM |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
135 /* Pixel position of top left corner of line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
136 short *top_left_x; |
247 | 137 short *top_left_y; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
138 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
139 /* Pixel width of line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
140 short *pix_width; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
141 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
142 /* Pixel height of line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
143 short *pix_height; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
144 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
145 /* Largest font ascent on this line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
146 short *max_ascent; |
13407
5ebb99bc06bb
[HAVE_NTGUI]: Include win32.h.
Geoff Voelker <voelker@cs.washington.edu>
parents:
9572
diff
changeset
|
147 #endif /* HAVE_WINDOW_SYSTEM */ |
6570
2c6d3ba470bb
(struct frame_glyphs): New fields charstarts and total_charstarts.
Richard M. Stallman <rms@gnu.org>
parents:
3883
diff
changeset
|
148 |
6658 | 149 /* Mapping of coordinate pairs to buffer positions. |
150 This field holds a vector indexed by row number. | |
151 Its elements are vectors indexed by column number. | |
152 Each element of these vectors is a buffer position, 0, or -1. | |
153 | |
154 For a column where the image of a text character starts, | |
155 the element value is the buffer position of that character. | |
156 When a window's screen line starts in mid character, | |
157 the element for the line's first column (at the window's left margin) | |
158 is that character's position. | |
159 For successive columns within a multicolumn character, | |
160 the element is -1. | |
161 For the column just beyond the last glyph on a line, | |
162 the element is the buffer position of the end of the line. | |
163 For following columns within the same window, the element is 0. | |
164 For rows past the end of the accessible buffer text, | |
165 the window's first column has ZV and other columns have 0. | |
166 | |
167 Mode lines and vertical separator lines have 0. | |
168 | |
169 The column of a window's left margin | |
170 always has a positive value (a buffer position), not 0 or -1, | |
171 for each line in that window's interior. */ | |
172 | |
6570
2c6d3ba470bb
(struct frame_glyphs): New fields charstarts and total_charstarts.
Richard M. Stallman <rms@gnu.org>
parents:
3883
diff
changeset
|
173 int **charstarts; |
2c6d3ba470bb
(struct frame_glyphs): New fields charstarts and total_charstarts.
Richard M. Stallman <rms@gnu.org>
parents:
3883
diff
changeset
|
174 |
2c6d3ba470bb
(struct frame_glyphs): New fields charstarts and total_charstarts.
Richard M. Stallman <rms@gnu.org>
parents:
3883
diff
changeset
|
175 /* This holds all the space in the subvectors of the charstarts field. */ |
2c6d3ba470bb
(struct frame_glyphs): New fields charstarts and total_charstarts.
Richard M. Stallman <rms@gnu.org>
parents:
3883
diff
changeset
|
176 int *total_charstarts; |
247 | 177 }; |
178 | |
179 extern void get_display_line (); | |
1510
2fd5263590ea
* dispextern.h (sit_for): Declare this extern.
Jim Blandy <jimb@redhat.com>
parents:
1409
diff
changeset
|
180 extern Lisp_Object sit_for (); |
9572 | 181 |
182 #endif /* not _DISPEXTERN_H_ */ |