diff options
| author | Paul Eggert | 2019-11-14 14:00:07 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-11-14 14:02:03 -0800 |
| commit | 2241f7ca7adb8aa7d785174dec0280a07cd16479 (patch) | |
| tree | 596070d1698863b211c021c5b195a6094070949c /src | |
| parent | 6a2a371c288a13060c44fa1af3ab73db611705a4 (diff) | |
| download | emacs-2241f7ca7adb8aa7d785174dec0280a07cd16479.tar.gz emacs-2241f7ca7adb8aa7d785174dec0280a07cd16479.zip | |
In Cairo builds, omit some unnecessary functions
* src/font.c (fset_font_data, font_put_frame_data)
(font_get_frame_data):
* src/ftfont.c (ftfont_open, ftfont_close)
(ftfont_encode_char, ftfont_glyph_metrics)
(ftfont_text_extents, ftfont_driver):
Define only if USE_CAIRO.
* src/xdisp.c (tty_handle_tab_bar_click):
Define only if HAVE_NTGUI && !CYGWIN.
Diffstat (limited to 'src')
| -rw-r--r-- | src/font.c | 4 | ||||
| -rw-r--r-- | src/ftfont.c | 12 | ||||
| -rw-r--r-- | src/xdisp.c | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/font.c b/src/font.c index 7c8e9e30c9d..b987a453d66 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -3650,7 +3650,7 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers) | |||
| 3650 | return active_drivers; | 3650 | return active_drivers; |
| 3651 | } | 3651 | } |
| 3652 | 3652 | ||
| 3653 | #if defined (HAVE_XFT) || defined (HAVE_FREETYPE) | 3653 | #if (defined HAVE_XFT || defined HAVE_FREETYPE) && !defined USE_CAIRO |
| 3654 | 3654 | ||
| 3655 | static void | 3655 | static void |
| 3656 | fset_font_data (struct frame *f, Lisp_Object val) | 3656 | fset_font_data (struct frame *f, Lisp_Object val) |
| @@ -3683,7 +3683,7 @@ font_get_frame_data (struct frame *f, Lisp_Object driver) | |||
| 3683 | return NILP (val) ? NULL : xmint_pointer (XCDR (val)); | 3683 | return NILP (val) ? NULL : xmint_pointer (XCDR (val)); |
| 3684 | } | 3684 | } |
| 3685 | 3685 | ||
| 3686 | #endif /* HAVE_XFT || HAVE_FREETYPE */ | 3686 | #endif /* (HAVE_XFT || HAVE_FREETYPE) && !USE_CAIRO */ |
| 3687 | 3687 | ||
| 3688 | /* Sets attributes on a font. Any properties that appear in ALIST and | 3688 | /* Sets attributes on a font. Any properties that appear in ALIST and |
| 3689 | BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. | 3689 | BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font. |
diff --git a/src/ftfont.c b/src/ftfont.c index 77a4cf5de5c..d649c991dd6 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -1264,6 +1264,8 @@ ftfont_entity_pattern (Lisp_Object entity, int pixel_size) | |||
| 1264 | return pat; | 1264 | return pat; |
| 1265 | } | 1265 | } |
| 1266 | 1266 | ||
| 1267 | #ifndef USE_CAIRO | ||
| 1268 | |||
| 1267 | Lisp_Object | 1269 | Lisp_Object |
| 1268 | ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) | 1270 | ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) |
| 1269 | { | 1271 | { |
| @@ -1459,6 +1461,8 @@ ftfont_close (struct font *font) | |||
| 1459 | FT_Done_Size (ftfont_info->ft_size); | 1461 | FT_Done_Size (ftfont_info->ft_size); |
| 1460 | } | 1462 | } |
| 1461 | 1463 | ||
| 1464 | #endif /* !USE_CAIRO */ | ||
| 1465 | |||
| 1462 | int | 1466 | int |
| 1463 | ftfont_has_char (Lisp_Object font, int c) | 1467 | ftfont_has_char (Lisp_Object font, int c) |
| 1464 | { | 1468 | { |
| @@ -1489,6 +1493,8 @@ ftfont_has_char (Lisp_Object font, int c) | |||
| 1489 | } | 1493 | } |
| 1490 | } | 1494 | } |
| 1491 | 1495 | ||
| 1496 | #ifndef USE_CAIRO | ||
| 1497 | |||
| 1492 | unsigned | 1498 | unsigned |
| 1493 | ftfont_encode_char (struct font *font, int c) | 1499 | ftfont_encode_char (struct font *font, int c) |
| 1494 | { | 1500 | { |
| @@ -1560,6 +1566,8 @@ ftfont_text_extents (struct font *font, const unsigned int *code, | |||
| 1560 | metrics->width = width; | 1566 | metrics->width = width; |
| 1561 | } | 1567 | } |
| 1562 | 1568 | ||
| 1569 | #endif /* !USE_CAIRO */ | ||
| 1570 | |||
| 1563 | int | 1571 | int |
| 1564 | ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel) | 1572 | ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel) |
| 1565 | { | 1573 | { |
| @@ -3031,6 +3039,8 @@ ftfont_combining_capability (struct font *font) | |||
| 3031 | 3039 | ||
| 3032 | static void syms_of_ftfont_for_pdumper (void); | 3040 | static void syms_of_ftfont_for_pdumper (void); |
| 3033 | 3041 | ||
| 3042 | #ifndef USE_CAIRO | ||
| 3043 | |||
| 3034 | static struct font_driver const ftfont_driver = | 3044 | static struct font_driver const ftfont_driver = |
| 3035 | { | 3045 | { |
| 3036 | /* We can't draw a text without device dependent functions. */ | 3046 | /* We can't draw a text without device dependent functions. */ |
| @@ -3059,6 +3069,8 @@ static struct font_driver const ftfont_driver = | |||
| 3059 | .combining_capability = ftfont_combining_capability, | 3069 | .combining_capability = ftfont_combining_capability, |
| 3060 | }; | 3070 | }; |
| 3061 | 3071 | ||
| 3072 | #endif /* !USE_CAIRO */ | ||
| 3073 | |||
| 3062 | void | 3074 | void |
| 3063 | syms_of_ftfont (void) | 3075 | syms_of_ftfont (void) |
| 3064 | { | 3076 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index 8aefab964a8..320e0731de8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13437,6 +13437,8 @@ tty_get_tab_bar_item (struct frame *f, int x, int *idx, ptrdiff_t *end) | |||
| 13437 | return Qnil; | 13437 | return Qnil; |
| 13438 | } | 13438 | } |
| 13439 | 13439 | ||
| 13440 | #if defined HAVE_NTGUI && !defined CYGWIN | ||
| 13441 | |||
| 13440 | /* Handle a mouse click at X/Y on the tab bar of TTY frame F. If the | 13442 | /* Handle a mouse click at X/Y on the tab bar of TTY frame F. If the |
| 13441 | click was on the tab bar and was handled, populate the EVENT | 13443 | click was on the tab bar and was handled, populate the EVENT |
| 13442 | structure, store it in keyboard queue, and return true; otherwise | 13444 | structure, store it in keyboard queue, and return true; otherwise |
| @@ -13499,6 +13501,7 @@ tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, | |||
| 13499 | 13501 | ||
| 13500 | return true; | 13502 | return true; |
| 13501 | } | 13503 | } |
| 13504 | #endif /* HAVE_NTGUI && !CYGWIN */ | ||
| 13502 | 13505 | ||
| 13503 | 13506 | ||
| 13504 | 13507 | ||