]> git.eshelyaron.com Git - emacs.git/commitdiff
In Cairo builds, omit some unnecessary functions
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Nov 2019 22:00:07 +0000 (14:00 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Nov 2019 22:02:03 +0000 (14:02 -0800)
* 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.

src/font.c
src/ftfont.c
src/xdisp.c

index 7c8e9e30c9dd0d880e33b5c6505d6aa96749c74a..b987a453d66fa472ac6479b722066ac74d9de45d 100644 (file)
@@ -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.
index 77a4cf5de5c5b7e712e264e6892fb99371810784..d649c991dd62fc1f2e2ee96dd1da3222984a8d5f 100644 (file)
@@ -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)
 {
index 8aefab964a8ddb4171b8b24addadc98b8386b0df..320e0731de8fddb752407235593704b64da8149a 100644 (file)
@@ -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 */
 
 \f