aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorJim Blandy1993-05-10 00:17:55 +0000
committerJim Blandy1993-05-10 00:17:55 +0000
commit703f280806d8029ef900fa50a367fd53a71706ef (patch)
tree49607bf8a4db8f2a9594b086197335ebddf8d4ef /src/lisp.h
parent2fc6697323fd6cc950d808347b89ac3483d311e1 (diff)
downloademacs-703f280806d8029ef900fa50a367fd53a71706ef.tar.gz
emacs-703f280806d8029ef900fa50a367fd53a71706ef.zip
* 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/lisp.h')
-rw-r--r--src/lisp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 5abde042d7f..7d69e765695 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -579,6 +579,28 @@ typedef unsigned char UCHAR;
579#define CHAR_SHIFT (0x200000) 579#define CHAR_SHIFT (0x200000)
580#define CHAR_CTL (0x400000) 580#define CHAR_CTL (0x400000)
581#define CHAR_META (0x800000) 581#define CHAR_META (0x800000)
582
583
584/* The glyph datatype, used to represent characters on the display. */
585
586/* The low eight bits are the character code, and the bits above them
587 are the numeric face ID. If FID is the face ID of a glyph on a
588 frame F, then F->display.x->faces[FID] contains the description of
589 that face. This is an int instead of a short, so we can support a
590 good bunch of face ID's; given that we have no mechanism for
591 tossing unused frame face ID's yet, we'll probably run out of 255
592 pretty quickly. */
593#define GLYPH unsigned int
594
595/* Given a character code and a face ID, return the appropriate glyph. */
596#define MAKE_GLYPH(char, face) ((char) | ((face) << 8))
597
598/* Return a glyph's character code. */
599#define GLYPH_CHAR(glyph) ((glyph) & 0xff)
600
601/* Return a glyph's face ID. */
602#define GLYPH_FACE(glyph) (((glyph) >> 8) & 0xff)
603
582 604
583/* Data type checking */ 605/* Data type checking */
584 606