Mercurial > emacs
comparison src/lisp.h @ 30447:e60d22cf57b4
(GLYPH_MASK_CHAR, GLYPH_MASK_FACE): Use 19 bits
for the character code, and the rest for the face id.
(FAST_GLYPH_FACE, FAST_MAKE_GLYPH): Changed accordingly.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 25 Jul 2000 12:06:09 +0000 |
parents | a438686586dd |
children | fb23cf90b636 |
comparison
equal
deleted
inserted
replaced
30446:e3fe041c4e25 | 30447:e60d22cf57b4 |
---|---|
1180 probably run out of 255 pretty quickly. | 1180 probably run out of 255 pretty quickly. |
1181 This is always -1 for a multibyte character. */ | 1181 This is always -1 for a multibyte character. */ |
1182 #define GLYPH int | 1182 #define GLYPH int |
1183 | 1183 |
1184 /* Mask bits for face. */ | 1184 /* Mask bits for face. */ |
1185 #define GLYPH_MASK_FACE 0x7FFFFF00 | 1185 #define GLYPH_MASK_FACE 0x7FF80000 |
1186 /* Mask bits for character code. */ | 1186 /* Mask bits for character code. */ |
1187 #define GLYPH_MASK_CHAR 0x000000FF /* The lowest 8 bits */ | 1187 #define GLYPH_MASK_CHAR 0x0007FFFF /* The lowest 19 bits */ |
1188 | 1188 |
1189 /* The FAST macros assume that we already know we're in an X window. */ | 1189 /* The FAST macros assume that we already know we're in an X window. */ |
1190 | 1190 |
1191 /* Set a character code and a face ID in a glyph G. */ | 1191 /* Set a character code and a face ID in a glyph G. */ |
1192 #define FAST_MAKE_GLYPH(char, face) ((char) | ((face) << 8)) | 1192 #define FAST_MAKE_GLYPH(char, face) ((char) | ((face) << CHARACTERBITS)) |
1193 | 1193 |
1194 /* Return a glyph's character code. */ | 1194 /* Return a glyph's character code. */ |
1195 #define FAST_GLYPH_CHAR(glyph) ((glyph) & GLYPH_MASK_CHAR) | 1195 #define FAST_GLYPH_CHAR(glyph) ((glyph) & GLYPH_MASK_CHAR) |
1196 | 1196 |
1197 /* Return a glyph's face ID. */ | 1197 /* Return a glyph's face ID. */ |
1198 #define FAST_GLYPH_FACE(glyph) (((glyph) & GLYPH_MASK_FACE) >> 8) | 1198 #define FAST_GLYPH_FACE(glyph) (((glyph) & GLYPH_MASK_FACE) >> CHARACTERBITS) |
1199 | 1199 |
1200 /* Slower versions that test the frame type first. */ | 1200 /* Slower versions that test the frame type first. */ |
1201 #define MAKE_GLYPH(f, char, face) (FAST_MAKE_GLYPH (char, face)) | 1201 #define MAKE_GLYPH(f, char, face) (FAST_MAKE_GLYPH (char, face)) |
1202 #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) | 1202 #define GLYPH_CHAR(f, g) (FAST_GLYPH_CHAR (g)) |
1203 #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) | 1203 #define GLYPH_FACE(f, g) (FAST_GLYPH_FACE (g)) |