Mercurial > hg > xemacs-beta
comparison src/redisplay.h @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | e121b013d1f0 |
children | b2472a1930f2 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
44 the width of the frame and very very tall. The line start cache is | 44 the width of the frame and very very tall. The line start cache is |
45 an array of struct line_start_cache's, describing the start and | 45 an array of struct line_start_cache's, describing the start and |
46 end buffer positions for a contiguous set of lines on that piece | 46 end buffer positions for a contiguous set of lines on that piece |
47 of paper. */ | 47 of paper. */ |
48 | 48 |
49 typedef struct line_start_cache line_start_cache; | |
49 struct line_start_cache | 50 struct line_start_cache |
50 { | 51 { |
51 Bufpos start, end; | 52 Bufpos start, end; |
52 int height; | 53 int height; |
53 }; | 54 }; |
54 | 55 |
55 typedef struct line_start_cache_dynarr_type | 56 typedef struct |
56 { | 57 { |
57 Dynarr_declare (struct line_start_cache); | 58 Dynarr_declare (line_start_cache); |
58 } line_start_cache_dynarr; | 59 } line_start_cache_dynarr; |
59 | 60 |
60 /* The possible types of runes. | 61 /* The possible types of runes. |
61 | 62 |
62 #### The Lisp_Glyph type is broken. There should instead be a pixmap | 63 #### The Lisp_Glyph type is broken. There should instead be a pixmap |
86 or pixmap. Any single character in a buffer has one or more runes | 87 or pixmap. Any single character in a buffer has one or more runes |
87 (or zero, if the character is invisible) corresponding to it. | 88 (or zero, if the character is invisible) corresponding to it. |
88 (Printable characters typically have one rune associated with them, | 89 (Printable characters typically have one rune associated with them, |
89 but control characters have two -- a ^ and a letter -- and other | 90 but control characters have two -- a ^ and a letter -- and other |
90 non-printing characters (those displayed in octal) have four. */ | 91 non-printing characters (those displayed in octal) have four. */ |
91 | 92 |
93 typedef struct rune rune; | |
92 struct rune | 94 struct rune |
93 { | 95 { |
94 face_index findex; /* face rune is displayed with. The | 96 face_index findex; /* face rune is displayed with. The |
95 face_index is an index into a | 97 face_index is an index into a |
96 window-specific array of face cache | 98 window-specific array of face cache |
130 chopped off the left of the glyph. | 132 chopped off the left of the glyph. |
131 This has the effect of shifting the | 133 This has the effect of shifting the |
132 glyph to the left while still clipping | 134 glyph to the left while still clipping |
133 at XPOS. */ | 135 at XPOS. */ |
134 } dglyph; | 136 } dglyph; |
135 | 137 |
136 /* CHAR */ | 138 /* CHAR */ |
137 struct | 139 struct |
138 { | 140 { |
139 Emchar ch; /* Cbaracter of this rune. */ | 141 Emchar ch; /* Cbaracter of this rune. */ |
140 } chr; | 142 } chr; |
141 | 143 |
142 /* HLINE */ | 144 /* HLINE */ |
143 struct | 145 struct |
144 { | 146 { |
145 int thickness; /* how thick to make hline */ | 147 int thickness; /* how thick to make hline */ |
146 int yoffset; /* how far down from top of line to put top */ | 148 int yoffset; /* how far down from top of line to put top */ |
147 } hline; | 149 } hline; |
148 } object; /* actual rune object */ | 150 } object; /* actual rune object */ |
149 }; | 151 }; |
150 | 152 |
151 typedef struct rune_dynarr_type | 153 typedef struct |
152 { | 154 { |
153 Dynarr_declare (struct rune); | 155 Dynarr_declare (rune); |
154 } rune_dynarr; | 156 } rune_dynarr; |
155 | 157 |
156 /* These must have distinct values. Note that the ordering actually | 158 /* These must have distinct values. Note that the ordering actually |
157 represents priority levels. TEXT has the lowest priority level. */ | 159 represents priority levels. TEXT has the lowest priority level. */ |
158 enum display_type | 160 enum display_type |
186 calls to XDrawText() (which draws multiple runs of single-font | 188 calls to XDrawText() (which draws multiple runs of single-font |
187 data) instead of XDrawString(). The reason for this is to | 189 data) instead of XDrawString(). The reason for this is to |
188 reduce the amount of X traffic, which will help things significantly | 190 reduce the amount of X traffic, which will help things significantly |
189 on a slow line. */ | 191 on a slow line. */ |
190 | 192 |
193 typedef struct display_block display_block; | |
191 struct display_block | 194 struct display_block |
192 { | 195 { |
193 enum display_type type; /* type of display block */ | 196 enum display_type type; /* type of display block */ |
194 | 197 |
195 int start_pos; /* starting pixel position of block */ | 198 int start_pos; /* starting pixel position of block */ |
196 int end_pos; /* ending pixel position of block */ | 199 int end_pos; /* ending pixel position of block */ |
197 | 200 |
198 rune_dynarr *runes; /* Dynamic array of runes */ | 201 rune_dynarr *runes; /* Dynamic array of runes */ |
199 }; | 202 }; |
200 | 203 |
201 typedef struct display_block_dynarr_type | 204 typedef struct |
202 { | 205 { |
203 Dynarr_declare (struct display_block); | 206 Dynarr_declare (display_block); |
204 } display_block_dynarr; | 207 } display_block_dynarr; |
205 | 208 |
206 typedef struct layout_bounds_type | 209 typedef struct layout_bounds_type |
207 { | 210 { |
208 int left_out; | 211 int left_out; |
211 int right_white; | 214 int right_white; |
212 int right_in; | 215 int right_in; |
213 int right_out; | 216 int right_out; |
214 } layout_bounds; | 217 } layout_bounds; |
215 | 218 |
219 typedef struct glyph_block glyph_block; | |
216 struct glyph_block | 220 struct glyph_block |
217 { | 221 { |
218 Lisp_Object glyph; | 222 Lisp_Object glyph; |
219 Lisp_Object extent; | 223 Lisp_Object extent; |
220 /* The rest are only used by margin routines. */ | 224 /* The rest are only used by margin routines. */ |
221 face_index findex; | 225 face_index findex; |
222 int active; | 226 int active; |
223 int width; | 227 int width; |
224 }; | 228 }; |
225 | 229 |
226 typedef struct glyph_block_dynarr_type | 230 typedef struct |
227 { | 231 { |
228 Dynarr_declare (struct glyph_block); | 232 Dynarr_declare (glyph_block); |
229 } glyph_block_dynarr; | 233 } glyph_block_dynarr; |
230 | 234 |
235 typedef struct display_line display_line; | |
231 struct display_line | 236 struct display_line |
232 { | 237 { |
233 short ypos; /* vertical position in pixels | 238 short ypos; /* vertical position in pixels |
234 of the baseline for this line. */ | 239 of the baseline for this line. */ |
235 unsigned short ascent, descent; /* maximum values for this line. | 240 unsigned short ascent, descent; /* maximum values for this line. |
262 /* Dynamic arrays of left and right glyph blocks */ | 267 /* Dynamic arrays of left and right glyph blocks */ |
263 glyph_block_dynarr *left_glyphs; | 268 glyph_block_dynarr *left_glyphs; |
264 glyph_block_dynarr *right_glyphs; | 269 glyph_block_dynarr *right_glyphs; |
265 }; | 270 }; |
266 | 271 |
267 typedef struct display_line_dynarr_type | 272 typedef struct |
268 { | 273 { |
269 Dynarr_declare (struct display_line); | 274 Dynarr_declare (display_line); |
270 } display_line_dynarr; | 275 } display_line_dynarr; |
271 | 276 |
272 /* It could be argued that the following two structs belong in | 277 /* It could be argued that the following two structs belong in |
273 extents.h, but they're only used by redisplay and it simplifies | 278 extents.h, but they're only used by redisplay and it simplifies |
274 the header files to put them here. */ | 279 the header files to put them here. */ |
275 | 280 |
276 typedef struct extent_dynarr_type | 281 typedef struct |
277 { | 282 { |
278 Dynarr_declare (struct extent *); | 283 Dynarr_declare (EXTENT); |
279 } extent_dynarr; | 284 } EXTENT_dynarr; |
280 | 285 |
281 struct font_metric_info | 286 struct font_metric_info |
282 { | 287 { |
283 int width; | 288 int width; |
284 int height; /* always ascent + descent; for convenience */ | 289 int height; /* always ascent + descent; for convenience */ |
294 struct extent_fragment | 299 struct extent_fragment |
295 { | 300 { |
296 Lisp_Object object; /* buffer or string */ | 301 Lisp_Object object; /* buffer or string */ |
297 struct frame *frm; | 302 struct frame *frm; |
298 Bytind pos, end; | 303 Bytind pos, end; |
299 extent_dynarr *extents; | 304 EXTENT_dynarr *extents; |
300 glyph_block_dynarr *begin_glyphs, *end_glyphs; | 305 glyph_block_dynarr *begin_glyphs, *end_glyphs; |
301 unsigned int invisible:1; | 306 unsigned int invisible:1; |
302 unsigned int invisible_ellipses:1; | 307 unsigned int invisible_ellipses:1; |
303 unsigned int previously_invisible:1; | 308 unsigned int previously_invisible:1; |
304 unsigned int invisible_ellipses_already_displayed:1; | 309 unsigned int invisible_ellipses_already_displayed:1; |