Improve API of recently-added bool vector functions.
[bpt/emacs.git] / src / font.h
index daeb320..2db8d35 100644 (file)
@@ -56,11 +56,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
 
-
-struct font_driver;
-struct font;
-struct glyph_string;
-
 /* An enumerator for each font property.  This is used as an index to
    the vector of FONT-SPEC and FONT-ENTITY.
 
@@ -487,8 +482,6 @@ struct font_bitmap
    this value.  */
 #define FONT_PIXEL_SIZE_QUANTUM 1
 
-struct face;
-
 #define FONT_INVALID_CODE 0xFFFFFFFF
 
 /* Font driver.  Members specified as "optional" can be NULL.  */
@@ -552,8 +545,8 @@ struct font_driver
   Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity,
                        int pixel_size);
 
-  /* Close FONT on frame F.  */
-  void (*close) (struct frame *f, struct font *font);
+  /* Close FONT.  NOTE: this can be called by GC.  */
+  void (*close) (struct font *font);
 
   /* Optional (if FACE->extra is not used).
      Prepare FACE for displaying characters by FONT on frame F by
@@ -582,6 +575,8 @@ struct font_driver
                        unsigned *code, int nglyphs,
                        struct font_metrics *metrics);
 
+#ifdef HAVE_WINDOW_SYSTEM
+
   /* Optional.
      Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
      position of frame F with S->FACE and S->GC.  If WITH_BACKGROUND,
@@ -602,6 +597,8 @@ struct font_driver
      Free bitmap data in BITMAP.  */
   void (*free_bitmap) (struct font *font, struct font_bitmap *bitmap);
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
   /* Optional.
      Return an outline data for glyph-code CODE of FONT.  The format
      of the outline data depends on the font-driver.  */
@@ -760,6 +757,7 @@ extern Lisp_Object font_load_for_lface (struct frame *f, Lisp_Object *lface,
                                         Lisp_Object spec);
 extern void font_prepare_for_face (struct frame *f, struct face *face);
 extern void font_done_for_face (struct frame *f, struct face *face);
+extern void clear_font_cache (struct frame *);
 
 extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec);
 extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name);
@@ -827,6 +825,7 @@ extern void syms_of_w32font (void);
 extern Lisp_Object Qfontsize;
 extern struct font_driver nsfont_driver;
 extern void syms_of_nsfont (void);
+extern void syms_of_macfont (void);
 #endif /* HAVE_NS */
 
 #ifndef FONT_DEBUG