diff options
| author | Gerd Moellmann | 2002-03-31 10:59:57 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2002-03-31 10:59:57 +0000 |
| commit | abfb6b461327f5de3ded8145db23b7a107a5ec4a (patch) | |
| tree | 77e26d10e0f9bfe0bf50ed3b89f939f4f0745671 /src | |
| parent | 39328775af54d90444b85bfb9577f2abf253bd69 (diff) | |
| download | emacs-abfb6b461327f5de3ded8145db23b7a107a5ec4a.tar.gz emacs-abfb6b461327f5de3ded8145db23b7a107a5ec4a.zip | |
(x_get_char_face_and_encoding): Add parameter DISPLAY_P.
Callers changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 30 |
2 files changed, 23 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2177a8e307f..855181312e4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-03-31 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xterm.c (x_get_char_face_and_encoding): Add parameter DISPLAY_P. | ||
| 4 | Callers changed. | ||
| 5 | |||
| 1 | 2002-03-30 Richard M. Stallman <rms@gnu.org> | 6 | 2002-03-30 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * window.c (window_scroll_pixel_based): Exit the move_it_by_lines | 8 | * window.c (window_scroll_pixel_based): Exit the move_it_by_lines |
diff --git a/src/xterm.c b/src/xterm.c index 0e6ed76eb61..031f5e284cd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* X Communication module for terminals which understand the X protocol. | 1 | /* X Communication module for terminals which understand the X protocol. |
| 2 | Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001 | 2 | Copyright (C) 1989, 93, 94, 95, 96, 1997, 1998, 1999, 2000, 2001, 2002 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -1135,7 +1135,8 @@ static struct face *x_get_glyph_face_and_encoding P_ ((struct frame *, | |||
| 1135 | XChar2b *, | 1135 | XChar2b *, |
| 1136 | int *)); | 1136 | int *)); |
| 1137 | static struct face *x_get_char_face_and_encoding P_ ((struct frame *, int, | 1137 | static struct face *x_get_char_face_and_encoding P_ ((struct frame *, int, |
| 1138 | int, XChar2b *, int)); | 1138 | int, XChar2b *, int, |
| 1139 | int)); | ||
| 1139 | static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *)); | 1140 | static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *)); |
| 1140 | static void x_encode_char P_ ((int, XChar2b *, struct font_info *)); | 1141 | static void x_encode_char P_ ((int, XChar2b *, struct font_info *)); |
| 1141 | static void x_append_glyph P_ ((struct it *)); | 1142 | static void x_append_glyph P_ ((struct it *)); |
| @@ -1276,15 +1277,17 @@ x_encode_char (c, char2b, font_info) | |||
| 1276 | 1277 | ||
| 1277 | /* Get face and two-byte form of character C in face FACE_ID on frame | 1278 | /* Get face and two-byte form of character C in face FACE_ID on frame |
| 1278 | F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero | 1279 | F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero |
| 1279 | means we want to display multibyte text. Value is a pointer to a | 1280 | means we want to display multibyte text. DISPLAY_P non-zero means |
| 1280 | realized face that is ready for display. */ | 1281 | make sure that X resources for the face returned are allocated. |
| 1282 | Value is a pointer to a realized face that is ready for display if | ||
| 1283 | DISPLAY_P is non-zero. */ | ||
| 1281 | 1284 | ||
| 1282 | static INLINE struct face * | 1285 | static INLINE struct face * |
| 1283 | x_get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p) | 1286 | x_get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p) |
| 1284 | struct frame *f; | 1287 | struct frame *f; |
| 1285 | int c, face_id; | 1288 | int c, face_id; |
| 1286 | XChar2b *char2b; | 1289 | XChar2b *char2b; |
| 1287 | int multibyte_p; | 1290 | int multibyte_p, display_p; |
| 1288 | { | 1291 | { |
| 1289 | struct face *face = FACE_FROM_ID (f, face_id); | 1292 | struct face *face = FACE_FROM_ID (f, face_id); |
| 1290 | 1293 | ||
| @@ -1326,8 +1329,11 @@ x_get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p) | |||
| 1326 | } | 1329 | } |
| 1327 | 1330 | ||
| 1328 | /* Make sure X resources of the face are allocated. */ | 1331 | /* Make sure X resources of the face are allocated. */ |
| 1329 | xassert (face != NULL); | 1332 | if (display_p) |
| 1330 | PREPARE_FACE_FOR_DISPLAY (f, face); | 1333 | { |
| 1334 | xassert (face != NULL); | ||
| 1335 | PREPARE_FACE_FOR_DISPLAY (f, face); | ||
| 1336 | } | ||
| 1331 | 1337 | ||
| 1332 | return face; | 1338 | return face; |
| 1333 | } | 1339 | } |
| @@ -1838,7 +1844,7 @@ x_produce_glyphs (it) | |||
| 1838 | /* Get font to use. Encode IT->char_to_display. */ | 1844 | /* Get font to use. Encode IT->char_to_display. */ |
| 1839 | x_get_char_face_and_encoding (it->f, it->char_to_display, | 1845 | x_get_char_face_and_encoding (it->f, it->char_to_display, |
| 1840 | it->face_id, &char2b, | 1846 | it->face_id, &char2b, |
| 1841 | it->multibyte_p); | 1847 | it->multibyte_p, 0); |
| 1842 | font = face->font; | 1848 | font = face->font; |
| 1843 | 1849 | ||
| 1844 | /* When no suitable font found, use the default font. */ | 1850 | /* When no suitable font found, use the default font. */ |
| @@ -2070,7 +2076,7 @@ x_produce_glyphs (it) | |||
| 2070 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); | 2076 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); |
| 2071 | face = FACE_FROM_ID (it->f, it->face_id); | 2077 | face = FACE_FROM_ID (it->f, it->face_id); |
| 2072 | x_get_char_face_and_encoding (it->f, it->char_to_display, | 2078 | x_get_char_face_and_encoding (it->f, it->char_to_display, |
| 2073 | it->face_id, &char2b, it->multibyte_p); | 2079 | it->face_id, &char2b, it->multibyte_p, 0); |
| 2074 | font = face->font; | 2080 | font = face->font; |
| 2075 | 2081 | ||
| 2076 | /* When no suitable font found, use the default font. */ | 2082 | /* When no suitable font found, use the default font. */ |
| @@ -2158,7 +2164,7 @@ x_produce_glyphs (it) | |||
| 2158 | 2164 | ||
| 2159 | face = FACE_FROM_ID (it->f, face_id); | 2165 | face = FACE_FROM_ID (it->f, face_id); |
| 2160 | x_get_char_face_and_encoding (it->f, ch, face->id, &char2b, | 2166 | x_get_char_face_and_encoding (it->f, ch, face->id, &char2b, |
| 2161 | it->multibyte_p); | 2167 | it->multibyte_p, 0); |
| 2162 | font = face->font; | 2168 | font = face->font; |
| 2163 | if (font == NULL) | 2169 | if (font == NULL) |
| 2164 | { | 2170 | { |
| @@ -4958,7 +4964,7 @@ x_set_glyph_string_background_width (s, start, last_x) | |||
| 4958 | int this_face_id = FACE_FOR_CHAR (XFRAME (w->frame), base_face, c); \ | 4964 | int this_face_id = FACE_FOR_CHAR (XFRAME (w->frame), base_face, c); \ |
| 4959 | faces[n] = FACE_FROM_ID (XFRAME (w->frame), this_face_id); \ | 4965 | faces[n] = FACE_FROM_ID (XFRAME (w->frame), this_face_id); \ |
| 4960 | x_get_char_face_and_encoding (XFRAME (w->frame), c, \ | 4966 | x_get_char_face_and_encoding (XFRAME (w->frame), c, \ |
| 4961 | this_face_id, char2b + n, 1); \ | 4967 | this_face_id, char2b + n, 1, 1); \ |
| 4962 | } \ | 4968 | } \ |
| 4963 | \ | 4969 | \ |
| 4964 | /* Make glyph_strings for each glyph sequence that is drawable by \ | 4970 | /* Make glyph_strings for each glyph sequence that is drawable by \ |