diff options
| author | Kenichi Handa | 2000-03-21 00:36:45 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-03-21 00:36:45 +0000 |
| commit | b3091a238849daf332191a3f929143260f085a44 (patch) | |
| tree | aeae61b27e528d3c03a68ac4de88e6f13ebf2539 /src | |
| parent | 9170cbcc18e1e71c5299f51c6de2eba3d1c0ed71 (diff) | |
| download | emacs-b3091a238849daf332191a3f929143260f085a44.tar.gz emacs-b3091a238849daf332191a3f929143260f085a44.zip | |
(struct glyph): New member glyph_not_available_p.
Use 22 bits for face_id.
(enum lface_attribute_index): Add LFACE_FONT_INDEX.
(struct face): Delete member registry, new member ascii_face.
(FACE_SUITABLE_FOR_CHAR_P): Renamed from
FACE_SUITABLE_FOR_CHARSET_P. Caller changed.
(FACE_FOR_CHAR): Renamed from FACE_FOR_CHARSET. Caller changed.
(struct it): Delete member charset, new member
glyph_not_available_p.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 7a7c20e3265..34dd9712c86 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -269,8 +269,12 @@ struct glyph | |||
| 269 | padding. */ | 269 | padding. */ |
| 270 | unsigned padding_p : 1; | 270 | unsigned padding_p : 1; |
| 271 | 271 | ||
| 272 | /* 1 means the actual glyph is not available in the current | ||
| 273 | system. */ | ||
| 274 | unsigned glyph_not_available_p : 1; | ||
| 275 | |||
| 272 | /* Face of the glyph. */ | 276 | /* Face of the glyph. */ |
| 273 | unsigned face_id : 23; | 277 | unsigned face_id : 22; |
| 274 | 278 | ||
| 275 | /* A union of sub-structures for different glyph types. */ | 279 | /* A union of sub-structures for different glyph types. */ |
| 276 | union | 280 | union |
| @@ -1089,6 +1093,7 @@ enum lface_attribute_index | |||
| 1089 | LFACE_OVERLINE_INDEX, | 1093 | LFACE_OVERLINE_INDEX, |
| 1090 | LFACE_STRIKE_THROUGH_INDEX, | 1094 | LFACE_STRIKE_THROUGH_INDEX, |
| 1091 | LFACE_BOX_INDEX, | 1095 | LFACE_BOX_INDEX, |
| 1096 | LFACE_FONT_INDEX, | ||
| 1092 | LFACE_VECTOR_SIZE | 1097 | LFACE_VECTOR_SIZE |
| 1093 | }; | 1098 | }; |
| 1094 | 1099 | ||
| @@ -1166,9 +1171,6 @@ struct face | |||
| 1166 | must not be freed. */ | 1171 | must not be freed. */ |
| 1167 | char *font_name; | 1172 | char *font_name; |
| 1168 | 1173 | ||
| 1169 | /* The X font registry and encoding of font_name. */ | ||
| 1170 | Lisp_Object registry; | ||
| 1171 | |||
| 1172 | /* Font info ID for this face's font. An ID is stored here because | 1174 | /* Font info ID for this face's font. An ID is stored here because |
| 1173 | pointers to font_info structures may change. The reason is that | 1175 | pointers to font_info structures may change. The reason is that |
| 1174 | they are pointers into a font table vector that is itself | 1176 | they are pointers into a font table vector that is itself |
| @@ -1249,6 +1251,10 @@ struct face | |||
| 1249 | 1251 | ||
| 1250 | /* Next and previous face in hash collision list of face cache. */ | 1252 | /* Next and previous face in hash collision list of face cache. */ |
| 1251 | struct face *next, *prev; | 1253 | struct face *next, *prev; |
| 1254 | |||
| 1255 | /* If this face is for ASCII characters, this points this face | ||
| 1256 | itself. Otherwise, this points a face for ASCII characters. */ | ||
| 1257 | struct face *ascii_face; | ||
| 1252 | }; | 1258 | }; |
| 1253 | 1259 | ||
| 1254 | 1260 | ||
| @@ -1324,29 +1330,21 @@ struct face_cache | |||
| 1324 | ? FRAME_FACE_CACHE (F)->faces_by_id[ID] \ | 1330 | ? FRAME_FACE_CACHE (F)->faces_by_id[ID] \ |
| 1325 | : NULL) | 1331 | : NULL) |
| 1326 | 1332 | ||
| 1327 | /* Non-zero if FACE is suitable for displaying characters of CHARSET. | 1333 | /* Non-zero if FACE is suitable for displaying character CHAR. */ |
| 1328 | CHARSET < 0 means unibyte text. */ | 1334 | |
| 1329 | 1335 | #define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \ | |
| 1330 | #define FACE_SUITABLE_FOR_CHARSET_P(FACE, CHARSET) \ | 1336 | (SINGLE_BYTE_CHAR_P (CHAR) \ |
| 1331 | (((CHARSET) < 0 \ | 1337 | ? (FACE) == (FACE)->ascii_face \ |
| 1332 | ? (EQ ((FACE)->registry, Vface_default_registry) \ | 1338 | : face_suitable_for_char_p ((FACE), (CHAR))) |
| 1333 | || !NILP (Fequal ((FACE)->registry, Vface_default_registry))) \ | 1339 | |
| 1334 | : ((FACE)->charset == (CHARSET) \ | ||
| 1335 | || ((FACE)->charset == CHARSET_ASCII \ | ||
| 1336 | && (CHARSET) == charset_latin_iso8859_1 \ | ||
| 1337 | && face_suitable_for_iso8859_1_p ((FACE))) \ | ||
| 1338 | || ((FACE)->charset == charset_latin_iso8859_1 \ | ||
| 1339 | && (CHARSET) == CHARSET_ASCII)))) | ||
| 1340 | |||
| 1341 | /* Return the id of the realized face on frame F that is like the face | 1340 | /* Return the id of the realized face on frame F that is like the face |
| 1342 | with id ID but is suitable for displaying characters of CHARSET. | 1341 | with id ID but is suitable for displaying character CHAR. |
| 1343 | This macro is only meaningful for CHARSET >= 0, i.e. multibyte | 1342 | This macro is only meaningful for multibyte character CHAR. */ |
| 1344 | text. */ | ||
| 1345 | 1343 | ||
| 1346 | #define FACE_FOR_CHARSET(F, ID, CHARSET) \ | 1344 | #define FACE_FOR_CHAR(F, FACE, CHAR) \ |
| 1347 | (FACE_SUITABLE_FOR_CHARSET_P (FACE_FROM_ID ((F), (ID)), (CHARSET)) \ | 1345 | (SINGLE_BYTE_CHAR_P (CHAR) \ |
| 1348 | ? (ID) \ | 1346 | ? (FACE)->ascii_face->id \ |
| 1349 | : lookup_face ((F), FACE_FROM_ID ((F), (ID))->lface, (CHARSET))) | 1347 | : face_for_char ((F), (FACE), (CHAR))) |
| 1350 | 1348 | ||
| 1351 | /* The default registry and encoding to use. */ | 1349 | /* The default registry and encoding to use. */ |
| 1352 | 1350 | ||
| @@ -1601,6 +1599,10 @@ struct it | |||
| 1601 | /* 1 means overlay strings at end_charpos have been processed. */ | 1599 | /* 1 means overlay strings at end_charpos have been processed. */ |
| 1602 | unsigned overlay_strings_at_end_processed_p : 1; | 1600 | unsigned overlay_strings_at_end_processed_p : 1; |
| 1603 | 1601 | ||
| 1602 | /* 1 means the actual glyph is not available in the current | ||
| 1603 | system. */ | ||
| 1604 | unsigned glyph_not_available_p : 1; | ||
| 1605 | |||
| 1604 | /* The ID of the default face to use. One of DEFAULT_FACE_ID, | 1606 | /* The ID of the default face to use. One of DEFAULT_FACE_ID, |
| 1605 | MODE_LINE_FACE_ID, or TOOL_BAR_FACE_ID, depending on what we | 1607 | MODE_LINE_FACE_ID, or TOOL_BAR_FACE_ID, depending on what we |
| 1606 | are displaying. */ | 1608 | are displaying. */ |
| @@ -1624,10 +1626,6 @@ struct it | |||
| 1624 | is set after x_produce_glyphs has been called. */ | 1626 | is set after x_produce_glyphs has been called. */ |
| 1625 | int char_to_display; | 1627 | int char_to_display; |
| 1626 | 1628 | ||
| 1627 | /* Charset for which face_id was computed. This is the charset | ||
| 1628 | of char_to_display after x_produce_glyphs has been called. */ | ||
| 1629 | int charset; | ||
| 1630 | |||
| 1631 | /* If what == IT_IMAGE, the id of the image to display. */ | 1629 | /* If what == IT_IMAGE, the id of the image to display. */ |
| 1632 | int image_id; | 1630 | int image_id; |
| 1633 | 1631 | ||
| @@ -2118,7 +2116,6 @@ void x_free_colors P_ ((struct frame *, unsigned long *, int)); | |||
| 2118 | 2116 | ||
| 2119 | void update_face_from_frame_parameter P_ ((struct frame *, Lisp_Object, | 2117 | void update_face_from_frame_parameter P_ ((struct frame *, Lisp_Object, |
| 2120 | Lisp_Object)); | 2118 | Lisp_Object)); |
| 2121 | char *x_charset_registry P_ ((int)); | ||
| 2122 | Lisp_Object tty_color_name P_ ((struct frame *, int)); | 2119 | Lisp_Object tty_color_name P_ ((struct frame *, int)); |
| 2123 | void clear_face_cache P_ ((int)); | 2120 | void clear_face_cache P_ ((int)); |
| 2124 | unsigned long load_color P_ ((struct frame *, struct face *, Lisp_Object, | 2121 | unsigned long load_color P_ ((struct frame *, struct face *, Lisp_Object, |
| @@ -2127,10 +2124,8 @@ void unload_color P_ ((struct frame *, unsigned long)); | |||
| 2127 | int frame_update_line_height P_ ((struct frame *)); | 2124 | int frame_update_line_height P_ ((struct frame *)); |
| 2128 | int ascii_face_of_lisp_face P_ ((struct frame *, int)); | 2125 | int ascii_face_of_lisp_face P_ ((struct frame *, int)); |
| 2129 | void prepare_face_for_display P_ ((struct frame *, struct face *)); | 2126 | void prepare_face_for_display P_ ((struct frame *, struct face *)); |
| 2130 | int face_suitable_for_iso8859_1_p P_ ((struct face *)); | ||
| 2131 | int xstricmp P_ ((unsigned char *, unsigned char *)); | 2127 | int xstricmp P_ ((unsigned char *, unsigned char *)); |
| 2132 | int lookup_face P_ ((struct frame *, Lisp_Object *, int)); | 2128 | int lookup_face P_ ((struct frame *, Lisp_Object *, int, struct face *)); |
| 2133 | int face_suitable_for_charset_p P_ ((struct face *, int)); | ||
| 2134 | int lookup_named_face P_ ((struct frame *, Lisp_Object, int)); | 2129 | int lookup_named_face P_ ((struct frame *, Lisp_Object, int)); |
| 2135 | int smaller_face P_ ((struct frame *, int, int)); | 2130 | int smaller_face P_ ((struct frame *, int, int)); |
| 2136 | int face_with_height P_ ((struct frame *, int, int)); | 2131 | int face_with_height P_ ((struct frame *, int, int)); |
| @@ -2145,6 +2140,7 @@ int face_at_string_position P_ ((struct window *, Lisp_Object, | |||
| 2145 | int compute_char_face P_ ((struct frame *, int, Lisp_Object)); | 2140 | int compute_char_face P_ ((struct frame *, int, Lisp_Object)); |
| 2146 | void free_all_realized_faces P_ ((Lisp_Object)); | 2141 | void free_all_realized_faces P_ ((Lisp_Object)); |
| 2147 | extern Lisp_Object Qforeground_color, Qbackground_color; | 2142 | extern Lisp_Object Qforeground_color, Qbackground_color; |
| 2143 | void free_realized_multibyte_face P_ ((struct frame *, int)); | ||
| 2148 | 2144 | ||
| 2149 | /* Defined in xfns.c */ | 2145 | /* Defined in xfns.c */ |
| 2150 | 2146 | ||