diff options
author | Jim Blandy <[email protected]> | 1993-05-10 00:17:55 +0000 |
---|---|---|
committer | Jim Blandy <[email protected]> | 1993-05-10 00:17:55 +0000 |
commit | 703f280806d8029ef900fa50a367fd53a71706ef (patch) | |
tree | 49607bf8a4db8f2a9594b086197335ebddf8d4ef /src | |
parent | 2fc6697323fd6cc950d808347b89ac3483d311e1 (diff) |
* config.h.in: Remove mention of GLYPH datatype; that shouldn't be
a user option.
* lisp.h (GLYPH, MAKE_GLYPH, GLYPH_CHAR, GLYPH_FACE): New macros.
Diffstat (limited to 'src')
-rw-r--r-- | src/lisp.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index 5abde042d7..7d69e76569 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -579,6 +579,28 @@ typedef unsigned char UCHAR; #define CHAR_SHIFT (0x200000) #define CHAR_CTL (0x400000) #define CHAR_META (0x800000) + + +/* The glyph datatype, used to represent characters on the display. */ + +/* The low eight bits are the character code, and the bits above them + are the numeric face ID. If FID is the face ID of a glyph on a + frame F, then F->display.x->faces[FID] contains the description of + that face. This is an int instead of a short, so we can support a + good bunch of face ID's; given that we have no mechanism for + tossing unused frame face ID's yet, we'll probably run out of 255 + pretty quickly. */ +#define GLYPH unsigned int + +/* Given a character code and a face ID, return the appropriate glyph. */ +#define MAKE_GLYPH(char, face) ((char) | ((face) << 8)) + +/* Return a glyph's character code. */ +#define GLYPH_CHAR(glyph) ((glyph) & 0xff) + +/* Return a glyph's face ID. */ +#define GLYPH_FACE(glyph) (((glyph) >> 8) & 0xff) + /* Data type checking */ |