]> code.delx.au - gnu-emacs/blobdiff - src/xftfont.c
Merge from emacs-23
[gnu-emacs] / src / xftfont.c
index 35e07da61e382e249c63660684df35bf214af5ad..79dc6c5715a406153f2fa974836164f8bb61f942 100644 (file)
@@ -71,9 +71,9 @@ struct xftface_info
   XftColor xft_bg;             /* color for face->background */
 };
 
-static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc,
-                                   struct xftface_info *,
-                                   XftColor *fg, XftColor *bg));
+static void xftfont_get_colors (FRAME_PTR, struct face *, GC gc,
+                                struct xftface_info *,
+                                XftColor *fg, XftColor *bg);
 
 
 /* Setup foreground and background colors of GC into FG and BG.  If
@@ -81,12 +81,7 @@ static void xftfont_get_colors P_ ((FRAME_PTR, struct face *, GC gc,
    may be NULL.  */
 
 static void
-xftfont_get_colors (f, face, gc, xftface_info, fg, bg)
-     FRAME_PTR f;
-     struct face *face;
-     GC gc;
-     struct xftface_info *xftface_info;
-     XftColor *fg, *bg;
+xftfont_get_colors (FRAME_PTR f, struct face *face, GC gc, struct xftface_info *xftface_info, XftColor *fg, XftColor *bg)
 {
   if (xftface_info && face->gc == gc)
     {
@@ -142,25 +137,23 @@ xftfont_get_colors (f, face, gc, xftface_info, fg, bg)
 }
 
 
-static Lisp_Object xftfont_list P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xftfont_match P_ ((Lisp_Object, Lisp_Object));
-static Lisp_Object xftfont_open P_ ((FRAME_PTR, Lisp_Object, int));
-static void xftfont_close P_ ((FRAME_PTR, struct font *));
-static int xftfont_prepare_face P_ ((FRAME_PTR, struct face *));
-static void xftfont_done_face P_ ((FRAME_PTR, struct face *));
-static int xftfont_has_char P_ ((Lisp_Object, int));
-static unsigned xftfont_encode_char P_ ((struct font *, int));
-static int xftfont_text_extents P_ ((struct font *, unsigned *, int,
-                                    struct font_metrics *));
-static int xftfont_draw P_ ((struct glyph_string *, int, int, int, int, int));
-static int xftfont_end_for_frame P_ ((FRAME_PTR f));
+static Lisp_Object xftfont_list (Lisp_Object, Lisp_Object);
+static Lisp_Object xftfont_match (Lisp_Object, Lisp_Object);
+static Lisp_Object xftfont_open (FRAME_PTR, Lisp_Object, int);
+static void xftfont_close (FRAME_PTR, struct font *);
+static int xftfont_prepare_face (FRAME_PTR, struct face *);
+static void xftfont_done_face (FRAME_PTR, struct face *);
+static int xftfont_has_char (Lisp_Object, int);
+static unsigned xftfont_encode_char (struct font *, int);
+static int xftfont_text_extents (struct font *, unsigned *, int,
+                                 struct font_metrics *);
+static int xftfont_draw (struct glyph_string *, int, int, int, int, int);
+static int xftfont_end_for_frame (FRAME_PTR f);
 
 struct font_driver xftfont_driver;
 
 static Lisp_Object
-xftfont_list (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+xftfont_list (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object list = ftfont_driver.list (frame, spec), tail;
 
@@ -170,9 +163,7 @@ xftfont_list (frame, spec)
 }
 
 static Lisp_Object
-xftfont_match (frame, spec)
-     Lisp_Object frame;
-     Lisp_Object spec;
+xftfont_match (Lisp_Object frame, Lisp_Object spec)
 {
   Lisp_Object entity = ftfont_driver.match (frame, spec);
 
@@ -181,15 +172,10 @@ xftfont_match (frame, spec)
   return entity;
 }
 
-extern Lisp_Object ftfont_font_format P_ ((FcPattern *, Lisp_Object));
-extern FcCharSet *ftfont_get_fc_charset P_ ((Lisp_Object));
-extern Lisp_Object QCantialias;
-
 static FcChar8 ascii_printable[95];
 
 static void
-xftfont_fix_match (pat, match)
-     FcPattern *pat, *match;
+xftfont_fix_match (FcPattern *pat, FcPattern *match)
 {
   /*  These values are not used for matching (except antialias), but for
       rendering, so make sure they are carried over to the match.
@@ -239,9 +225,7 @@ xftfont_fix_match (pat, match)
 }
 
 static void
-xftfont_add_rendering_parameters (pat, entity)
-     FcPattern *pat;
-     Lisp_Object entity;
+xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
 {
   Lisp_Object tail;
   int ival;
@@ -289,10 +273,7 @@ xftfont_add_rendering_parameters (pat, entity)
 }
 
 static Lisp_Object
-xftfont_open (f, entity, pixel_size)
-     FRAME_PTR f;
-     Lisp_Object entity;
-     int pixel_size;
+xftfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size)
 {
   FcResult result;
   Display *display = FRAME_X_DISPLAY (f);
@@ -511,9 +492,7 @@ xftfont_open (f, entity, pixel_size)
 }
 
 static void
-xftfont_close (f, font)
-     FRAME_PTR f;
-     struct font *font;
+xftfont_close (FRAME_PTR f, struct font *font)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
 
@@ -528,9 +507,7 @@ xftfont_close (f, font)
 }
 
 static int
-xftfont_prepare_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+xftfont_prepare_face (FRAME_PTR f, struct face *face)
 {
   struct xftface_info *xftface_info;
 
@@ -553,9 +530,7 @@ xftfont_prepare_face (f, face)
 }
 
 static void
-xftfont_done_face (f, face)
-     FRAME_PTR f;
-     struct face *face;
+xftfont_done_face (FRAME_PTR f, struct face *face)
 {
   struct xftface_info *xftface_info;
 
@@ -574,12 +549,8 @@ xftfont_done_face (f, face)
     }
 }
 
-extern Lisp_Object Qja, Qko;
-
 static int
-xftfont_has_char (font, c)
-     Lisp_Object font;
-     int c;
+xftfont_has_char (Lisp_Object font, int c)
 {
   struct xftfont_info *xftfont_info;
   struct charset *cs = NULL;
@@ -601,9 +572,7 @@ xftfont_has_char (font, c)
 }
 
 static unsigned
-xftfont_encode_char (font, c)
-     struct font *font;
-     int c;
+xftfont_encode_char (struct font *font, int c)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
   unsigned code = XftCharIndex (xftfont_info->display, xftfont_info->xftfont,
@@ -613,11 +582,7 @@ xftfont_encode_char (font, c)
 }
 
 static int
-xftfont_text_extents (font, code, nglyphs, metrics)
-     struct font *font;
-     unsigned *code;
-     int nglyphs;
-     struct font_metrics *metrics;
+xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
   XGlyphInfo extents;
@@ -638,8 +603,7 @@ xftfont_text_extents (font, code, nglyphs, metrics)
 }
 
 static XftDraw *
-xftfont_get_xft_draw (f)
-     FRAME_PTR f;
+xftfont_get_xft_draw (FRAME_PTR f)
 {
   XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
 
@@ -659,9 +623,7 @@ xftfont_get_xft_draw (f)
 }
 
 static int
-xftfont_draw (s, from, to, x, y, with_background)
-     struct glyph_string *s;
-     int from, to, x, y, with_background;
+xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_background)
 {
   FRAME_PTR f = s->f;
   struct face *face = s->face;
@@ -721,8 +683,7 @@ xftfont_shape (Lisp_Object lgstring)
 }
 
 static int
-xftfont_end_for_frame (f)
-     FRAME_PTR f;
+xftfont_end_for_frame (FRAME_PTR f)
 {
   XftDraw *xft_draw;
 
@@ -742,11 +703,7 @@ xftfont_end_for_frame (f)
 }
 
 static int
-xftfont_cached_font_ok (f, font_object, entity)
-     struct frame *f;
-     Lisp_Object font_object;
-     Lisp_Object entity;
-
+xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object, Lisp_Object entity)
 {
   struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object);
   FcPattern *oldpat = info->xftfont->pattern;
@@ -789,7 +746,7 @@ xftfont_cached_font_ok (f, font_object, entity)
 }
 
 void
-syms_of_xftfont ()
+syms_of_xftfont (void)
 {
   DEFSYM (Qxft, "xft");
   DEFSYM (QChinting, ":hinting");