'C',
glyph->charpos,
glyph->pixel_width,
- glyph->u.ch.code,
- (glyph->u.ch.code < 0x80 && glyph->u.ch.code >= ' '
- ? glyph->u.ch.code
+ glyph->u.ch,
+ (glyph->u.ch < 0x80 && glyph->u.ch >= ' '
+ ? glyph->u.ch
: '.'),
- glyph->u.ch.face_id,
+ glyph->face_id,
glyph->left_box_line_p,
glyph->right_box_line_p);
}
glyph->pixel_width,
0,
'.',
- glyph->u.stretch.face_id,
+ glyph->u.face_id,
glyph->left_box_line_p,
glyph->right_box_line_p);
}
'I',
glyph->charpos,
glyph->pixel_width,
- glyph->u.img.id,
+ glyph->u.img_id,
'.',
- glyph->u.img.face_id,
+ glyph->u.face_id,
glyph->left_box_line_p,
glyph->right_box_line_p);
}
for (i = 0; i < row->used[area]; ++i)
row->hash = ((((row->hash << 4) + (row->hash >> 24)) & 0x0fffffff)
+ row->glyphs[area][i].u.val
+ + row->glyphs[area][i].face_id
+ + row->glyphs[area][i].padding_p
+ (row->glyphs[area][i].type << 2));
it->max_ascent = it->max_descent = 0;
if (it->glyph_row->used[TEXT_AREA] == 0)
{
it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph;
- it->glyph_row->glyphs[TEXT_AREA][0].u.ch.face_id = it->face_id;
+ it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id;
it->glyph_row->used[TEXT_AREA] = 1;
}
}
/* Skip over the space glyph inserted to display the
cursor at the end of a line. */
if (glyph->type == CHAR_GLYPH
- && glyph->u.ch.code == ' '
+ && glyph->u.ch == ' '
&& glyph->object == 0)
--glyph;
&& BUFFERP (glyph->object)
&& (glyph->type == STRETCH_GLYPH
|| (glyph->type == CHAR_GLYPH
- && glyph->u.ch.code == ' '))
+ && glyph->u.ch == ' '))
&& trailing_whitespace_p (glyph->charpos))
{
int face_id = lookup_named_face (f, Qtrailing_whitespace,
&& BUFFERP (glyph->object)
&& (glyph->type == STRETCH_GLYPH
|| (glyph->type == CHAR_GLYPH
- && glyph->u.ch.code == ' ')))
- {
- if (glyph->type == STRETCH_GLYPH)
- glyph->u.stretch.face_id = face_id;
- else
- glyph->u.ch.face_id = face_id;
- --glyph;
- }
+ && glyph->u.ch == ' ')))
+ (glyph--)->face_id = face_id;
}
}
}
/* Get face and two-byte form of character glyph GLYPH on frame F.
- The encoding of GLYPH->u.ch.code is returned in *CHAR2B. Value is
+ The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is
a pointer to a realized face that is ready for display. */
static INLINE struct face *
struct face *face;
xassert (glyph->type == CHAR_GLYPH);
- face = FACE_FROM_ID (f, glyph->u.ch.face_id);
+ face = FACE_FROM_ID (f, glyph->face_id);
if (!glyph->multibyte_p)
{
/* Unibyte case. We don't have to encode, but we have to make
sure to use a face suitable for unibyte. */
char2b->byte1 = 0;
- char2b->byte2 = glyph->u.ch.code;
+ char2b->byte2 = glyph->u.ch;
}
- else if (glyph->u.ch.code < 128
- && glyph->u.ch.face_id < BASIC_FACE_ID_SENTINEL)
+ else if (glyph->u.ch < 128
+ && glyph->face_id < BASIC_FACE_ID_SENTINEL)
{
/* Case of ASCII in a face known to fit ASCII. */
char2b->byte1 = 0;
- char2b->byte2 = glyph->u.ch.code;
+ char2b->byte2 = glyph->u.ch;
}
else
{
/* Split characters into bytes. If c2 is -1 afterwards, C is
really a one-byte character so that byte1 is zero. */
- SPLIT_CHAR (glyph->u.ch.code, charset, c1, c2);
+ SPLIT_CHAR (glyph->u.ch, charset, c1, c2);
if (c2 > 0)
char2b->byte1 = c1, char2b->byte2 = c2;
else
= FONT_INFO_FROM_ID (f, face->font_info_id);
if (font_info)
{
- x_encode_char (glyph->u.ch.code, char2b, font_info);
+ x_encode_char (glyph->u.ch, char2b, font_info);
if (charset == charset_latin_iso8859_1)
char2b->byte2 |= 0x80;
}
glyph->type = CHAR_GLYPH;
glyph->pixel_width = it->pixel_width;
- glyph->u.ch.code = it->char_to_display;
- glyph->u.ch.face_id = it->face_id;
+ glyph->u.ch = it->char_to_display;
+ glyph->face_id = it->face_id;
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
glyph->left_box_line_p = it->start_of_box_run_p;
glyph->type = COMPOSITE_GLYPH;
glyph->pixel_width = it->pixel_width;
- glyph->u.cmp.id = it->cmp_id;
- glyph->u.cmp.face_id = it->face_id;
+ glyph->u.cmp_id = it->cmp_id;
+ glyph->face_id = it->face_id;
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
glyph->left_box_line_p = it->start_of_box_run_p;
if (glyph < it->glyph_row->glyphs[area + 1])
{
glyph->type = IMAGE_GLYPH;
- glyph->u.img.id = img->id;
- glyph->u.img.face_id = it->face_id;
+ glyph->u.img_id = img->id;
+ glyph->face_id = it->face_id;
glyph->pixel_width = it->pixel_width;
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
glyph->type = STRETCH_GLYPH;
glyph->u.stretch.ascent = height * ascent;
glyph->u.stretch.height = height;
- glyph->u.stretch.face_id = it->face_id;
+ glyph->face_id = it->face_id;
glyph->pixel_width = width;
glyph->charpos = CHARPOS (it->position);
glyph->object = object;
&& glyph->type == CHAR_GLYPH
&& glyph->voffset == voffset
/* Same face id implies same charset, nowadays. */
- && glyph->u.ch.face_id == face_id)
+ && glyph->face_id == face_id)
{
s->face = x_get_glyph_face_and_encoding (s->f, glyph,
s->char2b + s->nchars);
struct glyph_string *s;
{
xassert (s->first_glyph->type == IMAGE_GLYPH);
- s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img.id);
+ s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id);
xassert (s->img);
- s->face = FACE_FROM_ID (s->f, s->first_glyph->u.img.face_id);
+ s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
s->font = s->face->font;
s->width = s->first_glyph->pixel_width;
struct glyph_string *s;
{
xassert (s->first_glyph->type == STRETCH_GLYPH);
- s->face = FACE_FROM_ID (s->f, s->first_glyph->u.stretch.face_id);
+ s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
s->font = s->face->font;
s->width = s->first_glyph->pixel_width;
int c, charset, face_id; \
XChar2b *char2b; \
\
- c = (ROW)->glyphs[AREA][START].u.ch.code; \
+ c = (ROW)->glyphs[AREA][START].u.ch; \
charset = CHAR_CHARSET (c); \
- face_id = (ROW)->glyphs[AREA][START].u.ch.face_id; \
+ face_id = (ROW)->glyphs[AREA][START].face_id; \
\
s = (struct glyph_string *) alloca (sizeof *s); \
char2b = (XChar2b *) alloca ((END - START) * sizeof *char2b); \
#define BUILD_COMPOSITE_GLYPH_STRING(W, ROW, AREA, START, END, HEAD, TAIL, HL, X, LAST_X, OVERLAPS_P) \
do { \
- int cmp_id = (ROW)->glyphs[AREA][START].u.cmp.id; \
- int face_id = (ROW)->glyphs[AREA][START].u.cmp.face_id; \
+ int cmp_id = (ROW)->glyphs[AREA][START].u.cmp_id; \
+ int face_id = (ROW)->glyphs[AREA][START].face_id; \
struct composition *cmp = composition_table[cmp_id]; \
int glyph_len = cmp->glyph_len; \
XChar2b *char2b; \
/* At first, fill in `char2b' and `faces'. */ \
for (n = 0; n < glyph_len; n++) \
{ \
- int c = FAST_GLYPH_CHAR (COMPOSITION_GLYPH (cmp, n)); \
+ int c = COMPOSITION_GLYPH (cmp, n); \
faces[n] = x_get_char_face_and_encoding (XFRAME (w->frame), c, \
face_id, char2b + n, 1); \
} \