Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 5617:b0d712bbc2a6
The "flush" face property.
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2011-12-23 Didier Verna <didier@xemacs.org>
* faces.h (struct Lisp_Face): New 'flush slot.
* faces.h (struct face_cachel): New 'flush and 'flush_specified
flags.
* faces.h (WINDOW_FACE_CACHEL_FLUSH_P):
* faces.h (FACE_FLUSH_P): New macros.
* faces.c: Declare Qflush.
* lisp.h: Externalize it.
* faces.c (syms_of_faces): Define it.
* faces.c (vars_of_faces): Update built-in face specifiers.
* faces.c (complex_vars_of_faces): Update specifier fallbacks.
* faces.c (mark_face):
* faces.c (face_equal):
* faces.c (face_getprop):
* faces.c (face_putprop):
* faces.c (face_remprop):
* faces.c (face_plist):
* faces.c (reset_face):
* faces.c (update_face_inheritance_mapper):
* faces.c (Fmake_face):
* faces.c (update_face_cachel_data):
* faces.c (merge_face_cachel_data):
* faces.c (Fcopy_face):
* fontcolor.c (face_boolean_validate): Handle the flush property.
* redisplay.h (struct display_line): Rename 'default_findex slot to
clearer name 'clear_findex.
* redisplay.h (DISPLAY_LINE_INIT): Update accordingly.
* redisplay-output.c (compare_display_blocks):
* redisplay-output.c (output_display_line):
* redisplay-output.c (redisplay_output_window):
* redisplay.c (regenerate_window_extents_only_changed):
* redisplay.c (regenerate_window_incrementally): Update the
comparison tests between the current and desired display lines to
cope for different 'clear_findex values.
* redisplay.c (create_text_block): Initialize the display line's
'clear_findex slot to DEFAULT_INDEX. Record a new 'clear_findex
value when we encounter a newline character displayed in a flushed
face.
* redisplay.c (create_string_text_block): Record a new
'clear_findex value when we encounter a newline character
displayed in a flushed face.
lisp/ChangeLog addition:
2011-12-23 Didier Verna <didier@xemacs.org>
* cl-macs.el (face-flush-p): New defsetf.
* faces.el (set-face-property): Document the flush property.
* faces.el (face-flush-p): New function.
* faces.el (set-face-flush-p): New function.
* faces.el (face-equal):
* cus-face.el (custom-face-attributes):
* x-faces.el (x-init-face-from-resources):
* x-faces.el (make-face-x-resource-internal): Handle the flush
property.
author | Didier Verna <didier@xemacs.org> |
---|---|
date | Fri, 23 Dec 2011 10:56:16 +0100 |
parents | 3fde0e346ad7 |
children | 75ad4969a16d |
comparison
equal
deleted
inserted
replaced
5616:79e9934779c1 | 5617:b0d712bbc2a6 |
---|---|
2184 symbol_value_in_buffer (Qsynchronize_minibuffers, w->buffer); | 2184 symbol_value_in_buffer (Qsynchronize_minibuffers, w->buffer); |
2185 | 2185 |
2186 dl->used_prop_data = 0; | 2186 dl->used_prop_data = 0; |
2187 dl->num_chars = 0; | 2187 dl->num_chars = 0; |
2188 dl->line_continuation = 0; | 2188 dl->line_continuation = 0; |
2189 dl->clear_findex = DEFAULT_INDEX; | |
2189 | 2190 |
2190 xzero (data); | 2191 xzero (data); |
2191 data.ef = extent_fragment_new (w->buffer, f); | 2192 data.ef = extent_fragment_new (w->buffer, f); |
2192 | 2193 |
2193 /* These values are used by all of the rune addition routines. We add | 2194 /* These values are used by all of the rune addition routines. We add |
2497 | 2498 |
2498 /* Check if we have hit a newline character. If so, add a marker | 2499 /* Check if we have hit a newline character. If so, add a marker |
2499 to the line and end this loop. */ | 2500 to the line and end this loop. */ |
2500 else if (data.ch == '\n') | 2501 else if (data.ch == '\n') |
2501 { | 2502 { |
2503 /* Update the clearing face index when the flush property is | |
2504 set. -- dvl */ | |
2505 if ((data.findex > DEFAULT_INDEX) | |
2506 && WINDOW_FACE_CACHEL_FLUSH_P (w, data.findex)) | |
2507 dl->clear_findex = data.findex; | |
2508 | |
2502 /* We aren't going to be adding an end glyph so give its | 2509 /* We aren't going to be adding an end glyph so give its |
2503 space back in order to make sure that the cursor can | 2510 space back in order to make sure that the cursor can |
2504 fit. */ | 2511 fit. */ |
2505 data.max_pixpos += data.end_glyph_width; | 2512 data.max_pixpos += data.end_glyph_width; |
2506 | 2513 |
4688 dl->used_prop_data = 0; | 4695 dl->used_prop_data = 0; |
4689 dl->num_chars = 0; | 4696 dl->num_chars = 0; |
4690 dl->line_continuation = 0; | 4697 dl->line_continuation = 0; |
4691 | 4698 |
4692 /* Set up faces to use for clearing areas, used by output_display_line. */ | 4699 /* Set up faces to use for clearing areas, used by output_display_line. */ |
4693 dl->default_findex = default_face; | 4700 dl->clear_findex = default_face; |
4694 if (default_face > DEFAULT_INDEX) | 4701 if (default_face > DEFAULT_INDEX) |
4695 { | 4702 { |
4696 dl->left_margin_findex = default_face; | 4703 dl->left_margin_findex = default_face; |
4697 dl->right_margin_findex = default_face; | 4704 dl->right_margin_findex = default_face; |
4698 } | 4705 } |
4929 | 4936 |
4930 /* Check if we have hit a newline character. If so, add a marker | 4937 /* Check if we have hit a newline character. If so, add a marker |
4931 to the line and end this loop. */ | 4938 to the line and end this loop. */ |
4932 else if (data.ch == '\n') | 4939 else if (data.ch == '\n') |
4933 { | 4940 { |
4941 /* Update the clearing face index when the flush property is | |
4942 set. -- dvl */ | |
4943 if ((data.findex > DEFAULT_INDEX) | |
4944 && WINDOW_FACE_CACHEL_FLUSH_P (w, data.findex)) | |
4945 dl->clear_findex = data.findex; | |
4946 | |
4934 /* We aren't going to be adding an end glyph so give its | 4947 /* We aren't going to be adding an end glyph so give its |
4935 space back in order to make sure that the cursor can | 4948 space back in order to make sure that the cursor can |
4936 fit. */ | 4949 fit. */ |
4937 data.max_pixpos += data.end_glyph_width; | 4950 data.max_pixpos += data.end_glyph_width; |
4938 goto done; | 4951 goto done; |
5869 || cdl->top_clip != ddl->top_clip | 5882 || cdl->top_clip != ddl->top_clip |
5870 || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) | 5883 || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) |
5871 || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1) | 5884 || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1) |
5872 || old_start != ddl->charpos | 5885 || old_start != ddl->charpos |
5873 || old_end != ddl->end_charpos | 5886 || old_end != ddl->end_charpos |
5874 || initial_size != Dynarr_length (db->runes)) | 5887 || initial_size != Dynarr_length (db->runes) |
5888 || cdl->clear_findex != ddl->clear_findex) | |
5875 { | 5889 { |
5876 return 0; | 5890 return 0; |
5877 } | 5891 } |
5878 | 5892 |
5879 if (ddl->cursor_elt != -1) | 5893 if (ddl->cursor_elt != -1) |
6018 if (cdl->ypos != ddl->ypos | 6032 if (cdl->ypos != ddl->ypos |
6019 || cdl->ascent != ddl->ascent | 6033 || cdl->ascent != ddl->ascent |
6020 || cdl->descent != ddl->descent | 6034 || cdl->descent != ddl->descent |
6021 || cdl->top_clip != ddl->top_clip | 6035 || cdl->top_clip != ddl->top_clip |
6022 || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) | 6036 || (cdl->cursor_elt != -1 && ddl->cursor_elt == -1) |
6023 || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1)) | 6037 || (cdl->cursor_elt == -1 && ddl->cursor_elt != -1) |
6038 || cdl->clear_findex != ddl->clear_findex) | |
6024 { | 6039 { |
6025 return 0; | 6040 return 0; |
6026 } | 6041 } |
6027 | 6042 |
6028 /* If the changed area also ends on this line, then we may be in | 6043 /* If the changed area also ends on this line, then we may be in |