Mercurial > emacs
annotate src/dispextern.h @ 2574:c782b69b60a4
Added and fixed documentation.
(ring-rotate): Nuked. It was (a) unused, and (b) totally broken (as in,
any attempt to use it died with a type error, and when I patched it to fix
that I found its algorithm was broken).
(ring-ref): Added doc string.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Sun, 25 Apr 1993 06:14:03 +0000 |
parents | aec61f55a84d |
children | 56a657acd984 |
rev | line source |
---|---|
247 | 1 /* Interface definitions for display code. |
732 | 2 Copyright (C) 1985, 1992 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 | |
20 /* Nonzero means last display completed and cursor is really at | |
21 cursX, cursY. Zero means it was preempted. */ | |
22 extern int display_completed; | |
23 | |
24 #ifdef HAVE_X_WINDOWS | |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
25 #include <X11/Xlib.h> |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
26 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
27 struct face |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
28 { |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
29 /* 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
|
30 to represent this face. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
31 GC gc; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
32 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
33 /* Pixel value for foreground color. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
34 int foreground; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
35 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
36 /* Pixel value for background color. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
37 int background; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
38 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
39 /* Font used for this face. */ |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
40 XFontStruct *font; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
41 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
42 /* 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
|
43 Pixmap stipple; |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
44 |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
45 /* Pixmap_depth. */ |
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
46 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
|
47 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
48 /* 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
|
49 char underline; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
50 }; |
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 /* 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
|
53 typedef struct face *FACE; |
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 #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
|
56 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
57 #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
|
58 #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
|
59 #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
|
60 #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
|
61 #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
|
62 #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
|
63 #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
|
64 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
65 #else /* Not X */ |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
66 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
67 typedef int FACE; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
68 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
69 #define NORMAL_FACE 0x0 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
70 #define HIGHLIGHT_FACE 0x1 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
71 #define UNDERLINE_FACE 0x2 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
72 #define HIGHLIGHT_UNDERLINE_FACE 0x3 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
73 |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
74 #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
|
75 #define FACE_UNDERLINE(f) ((f) & 0x2) |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
76 #endif /* Not X */ |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
77 |
247 | 78 |
764 | 79 /* This structure is used for the actual display of text on a frame. |
247 | 80 |
81 There are two instantiations of it: the glyphs currently displayed, | |
82 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
|
83 from buffers being displayed. */ |
247 | 84 |
764 | 85 struct frame_glyphs |
247 | 86 { |
764 | 87 #ifdef MULTI_FRAME |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
88 struct frame *frame; /* Frame these glyphs belong to. */ |
764 | 89 #endif /* MULTI_FRAME */ |
247 | 90 int height; |
91 int width; | |
92 | |
764 | 93 /* Contents of the frame. |
485 | 94 glyphs[V][H] is the glyph at position V, H. |
95 Note that glyphs[V][-1], | |
96 glyphs[V][used[V]], | |
764 | 97 and glyphs[V][frame_width] are always '\0'. */ |
247 | 98 GLYPH **glyphs; |
99 /* long vector from which the strings in `glyphs' are taken. */ | |
100 GLYPH *total_contents; | |
101 | |
764 | 102 /* When representing a desired frame, |
103 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
|
104 Between updates, all lines should be disabled. |
764 | 105 When representing current frame contents, |
485 | 106 enable[n] == 0 means that line n is blank. */ |
107 char *enable; | |
108 | |
109 /* Everything on line n after column used[n] is considered blank. */ | |
110 int *used; | |
111 | |
247 | 112 /* highlight[n] != 0 iff line n is highlighted. */ |
113 char *highlight; | |
114 | |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
115 /* Buffer offset of this line's first char. */ |
247 | 116 int *bufp; |
117 | |
118 #ifdef HAVE_X_WINDOWS | |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
119 /* 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
|
120 short *top_left_x; |
247 | 121 short *top_left_y; |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
122 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
123 /* Pixel width of line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
124 short *pix_width; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
125 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
126 /* Pixel height of line. */ |
1409
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
127 short *pix_height; |
7fd1c810daca
* dispextern.h: New element of frame structure `max_ascent'.
Joseph Arceneaux <jla@gnu.org>
parents:
764
diff
changeset
|
128 |
2395
aec61f55a84d
(struct face): New fields pixmap_h, pixmap_w.
Richard M. Stallman <rms@gnu.org>
parents:
1780
diff
changeset
|
129 /* 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
|
130 short *max_ascent; |
247 | 131 #endif /* HAVE_X_WINDOWS */ |
132 }; | |
133 | |
134 extern void get_display_line (); | |
1510
2fd5263590ea
* dispextern.h (sit_for): Declare this extern.
Jim Blandy <jimb@redhat.com>
parents:
1409
diff
changeset
|
135 extern Lisp_Object sit_for (); |