Mercurial > hg > xemacs-beta
comparison src/redisplay.h @ 4187:26dccfc8fa60
[xemacs-hg @ 2007-09-26 13:27:59 by didierv]
More fixes about face indexes
author | didierv |
---|---|
date | Wed, 26 Sep 2007 13:28:01 +0000 |
parents | 368e26e0b1e3 |
children | 62d532188a28 |
comparison
equal
deleted
inserted
replaced
4186:05dd0ed58262 | 4187:26dccfc8fa60 |
---|---|
79 #define CURSOR_OFF 1 | 79 #define CURSOR_OFF 1 |
80 #define NO_CURSOR 2 | 80 #define NO_CURSOR 2 |
81 #define NEXT_CURSOR 3 | 81 #define NEXT_CURSOR 3 |
82 #define IGNORE_CURSOR 4 | 82 #define IGNORE_CURSOR 4 |
83 | 83 |
84 /* #### NOTE: these indexes depend on the order in which the faces are added | |
85 to the cache in the function reset_face_cachels. */ | |
84 #define DEFAULT_INDEX (face_index) 0 | 86 #define DEFAULT_INDEX (face_index) 0 |
85 #define MODELINE_INDEX (face_index) 1 | 87 #define MODELINE_INDEX (face_index) 1 |
86 | 88 |
87 /* A rune is a single display element, such as a printable character | 89 /* A rune is a single display element, such as a printable character |
88 or pixmap. Any single character in a buffer has one or more runes | 90 or pixmap. Any single character in a buffer has one or more runes |
132 Charxpos charpos; /* buffer position this rune is displaying; | 134 Charxpos charpos; /* buffer position this rune is displaying; |
133 for the modeline, the value here is a | 135 for the modeline, the value here is a |
134 Charcount, but who's looking? */ | 136 Charcount, but who's looking? */ |
135 Charxpos endpos; /* if set this rune covers a range of pos; | 137 Charxpos endpos; /* if set this rune covers a range of pos; |
136 used in redisplay_move_cursor(). */ | 138 used in redisplay_move_cursor(). */ |
137 /* #### Chuck, what does it mean for a rune | 139 /* #### Chuck, what does it mean for a rune |
138 to cover a range of pos? I don't get | 140 to cover a range of pos? I don't get |
139 this. */ | 141 this. */ |
140 | 142 |
141 | 143 |
142 short xpos; /* horizontal starting position in pixels */ | 144 short xpos; /* horizontal starting position in pixels */ |
143 short width; /* pixel width of rune */ | 145 short width; /* pixel width of rune */ |
144 | 146 |
145 | 147 |
146 unsigned char cursor_type; /* is this rune covered by the cursor? */ | 148 unsigned char cursor_type; /* is this rune covered by the cursor? */ |
147 unsigned int type; /* type of rune object */ | 149 unsigned int type; /* type of rune object */ |
148 /* We used to do bitfields here, but if I | 150 /* We used to do bitfields here, but if I |
149 (JV) count correctly that doesn't matter | 151 (JV) count correctly that doesn't matter |
150 for the size of the structure. All the bit | 152 for the size of the structure. All the bit |
151 fiddling _does_ slow down redisplay by | 153 fiddling _does_ slow down redisplay by |
152 about 10%. So don't do that */ | 154 about 10%. So don't do that */ |
153 | 155 |
154 union /* Information specific to the type of rune */ | 156 union /* Information specific to the type of rune */ |
155 { | 157 { |
156 /* #### Glyphs are rare. Is it really necessary to waste 8 bytes on every | 158 /* #### Glyphs are rare. Is it really necessary to waste 8 bytes on every |
157 rune for that?! */ | 159 rune for that?! */ |
311 layout_bounds bounds; /* line boundary positions */ | 313 layout_bounds bounds; /* line boundary positions */ |
312 | 314 |
313 char modeline; /* t if this line is a modeline */ | 315 char modeline; /* t if this line is a modeline */ |
314 | 316 |
315 char line_continuation; /* t if this line continues to | 317 char line_continuation; /* t if this line continues to |
316 next display line. */ | 318 next display line. */ |
317 | 319 |
318 /* Dynamic array of display blocks */ | 320 /* Dynamic array of display blocks */ |
319 display_block_dynarr *display_blocks; | 321 display_block_dynarr *display_blocks; |
320 | 322 |
321 /* Dynamic arrays of left and right glyph blocks */ | 323 /* Dynamic arrays of left and right glyph blocks */ |
508 #define MARK_TYPE_CHANGED(object) do { \ | 510 #define MARK_TYPE_CHANGED(object) do { \ |
509 if (!object##_changed_set) { \ | 511 if (!object##_changed_set) { \ |
510 Lisp_Object MTC_devcons, MTC_concons; \ | 512 Lisp_Object MTC_devcons, MTC_concons; \ |
511 DEVICE_LOOP_NO_BREAK (MTC_devcons, MTC_concons) \ | 513 DEVICE_LOOP_NO_BREAK (MTC_devcons, MTC_concons) \ |
512 { \ | 514 { \ |
513 Lisp_Object MTC_frmcons; \ | 515 Lisp_Object MTC_frmcons; \ |
514 struct device *MTC_d = XDEVICE (XCAR (MTC_devcons)); \ | 516 struct device *MTC_d = XDEVICE (XCAR (MTC_devcons)); \ |
515 DEVICE_FRAME_LOOP (MTC_frmcons, MTC_d) \ | 517 DEVICE_FRAME_LOOP (MTC_frmcons, MTC_d) \ |
516 { \ | 518 { \ |
517 struct frame *MTC_f = XFRAME (XCAR (MTC_frmcons)); \ | 519 struct frame *MTC_f = XFRAME (XCAR (MTC_frmcons)); \ |
518 MTC_f->object##_changed = 1; \ | 520 MTC_f->object##_changed = 1; \ |
519 MTC_f->modiff++; \ | 521 MTC_f->modiff++; \ |
520 } \ | 522 } \ |
521 MTC_d->object##_changed = 1; \ | 523 MTC_d->object##_changed = 1; \ |
522 } \ | 524 } \ |
523 object##_changed = 1; \ | 525 object##_changed = 1; \ |
524 object##_changed_set = 1; } \ | 526 object##_changed_set = 1; } \ |
525 } while (0) | 527 } while (0) |
526 | 528 |
805 face_index findex, int cursor_start, | 807 face_index findex, int cursor_start, |
806 int cursor_width, | 808 int cursor_width, |
807 int cursor_height, int offset_bitmap); | 809 int cursor_height, int offset_bitmap); |
808 int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, | 810 int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, |
809 int xoffset, int yoffset, int start_pixpos, | 811 int xoffset, int yoffset, int start_pixpos, |
810 int width, struct display_box* dest, | 812 int width, struct display_box* dest, |
811 struct display_glyph_area* src); | 813 struct display_glyph_area* src); |
812 int redisplay_normalize_glyph_area (struct display_box* dest, | 814 int redisplay_normalize_glyph_area (struct display_box* dest, |
813 struct display_glyph_area* glyphsrc); | 815 struct display_glyph_area* glyphsrc); |
814 void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2); | 816 void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2); |
815 void redisplay_clear_region (Lisp_Object window, face_index findex, int x, | 817 void redisplay_clear_region (Lisp_Object window, face_index findex, int x, |