Commit 2241f7ca authored by Paul Eggert's avatar Paul Eggert

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.
parent 6a2a371c
Pipeline #4044 failed with stage
in 63 minutes and 59 seconds
......@@ -3650,7 +3650,7 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers)
return active_drivers;
}
#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
#if (defined HAVE_XFT || defined HAVE_FREETYPE) && !defined USE_CAIRO
static void
fset_font_data (struct frame *f, Lisp_Object val)
......@@ -3683,7 +3683,7 @@ font_get_frame_data (struct frame *f, Lisp_Object driver)
return NILP (val) ? NULL : xmint_pointer (XCDR (val));
}
#endif /* HAVE_XFT || HAVE_FREETYPE */
#endif /* (HAVE_XFT || HAVE_FREETYPE) && !USE_CAIRO */
/* Sets attributes on a font. Any properties that appear in ALIST and
BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font.
......
......@@ -1264,6 +1264,8 @@ ftfont_entity_pattern (Lisp_Object entity, int pixel_size)
return pat;
}
#ifndef USE_CAIRO
Lisp_Object
ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
{
......@@ -1459,6 +1461,8 @@ ftfont_close (struct font *font)
FT_Done_Size (ftfont_info->ft_size);
}
#endif /* !USE_CAIRO */
int
ftfont_has_char (Lisp_Object font, int c)
{
......@@ -1489,6 +1493,8 @@ ftfont_has_char (Lisp_Object font, int c)
}
}
#ifndef USE_CAIRO
unsigned
ftfont_encode_char (struct font *font, int c)
{
......@@ -1560,6 +1566,8 @@ ftfont_text_extents (struct font *font, const unsigned int *code,
metrics->width = width;
}
#endif /* !USE_CAIRO */
int
ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bitmap, int bits_per_pixel)
{
......@@ -3031,6 +3039,8 @@ ftfont_combining_capability (struct font *font)
static void syms_of_ftfont_for_pdumper (void);
#ifndef USE_CAIRO
static struct font_driver const ftfont_driver =
{
/* We can't draw a text without device dependent functions. */
......@@ -3059,6 +3069,8 @@ static struct font_driver const ftfont_driver =
.combining_capability = ftfont_combining_capability,
};
#endif /* !USE_CAIRO */
void
syms_of_ftfont (void)
{
......
......@@ -13437,6 +13437,8 @@ tty_get_tab_bar_item (struct frame *f, int x, int *idx, ptrdiff_t *end)
return Qnil;
}
#if defined HAVE_NTGUI && !defined CYGWIN
/* Handle a mouse click at X/Y on the tab bar of TTY frame F. If the
click was on the tab bar and was handled, populate the EVENT
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,
return true;
}
#endif /* HAVE_NTGUI && !CYGWIN */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment