]> code.delx.au - gnu-emacs/blobdiff - src/fontset.h
(ad-make-single-advice-docstring): Treat case with no doctring specially.
[gnu-emacs] / src / fontset.h
index 8d21bd7a5110e74ae8f697b96bfea5026c4c0690..57545fbfa1b5991edd79b3a6d5e508cc60aa3886 100644 (file)
@@ -124,7 +124,7 @@ struct font_info
 /* A value which may appear in the member encoding of struch font_info
    indicating that a font itself doesn't tell which encoding to be
    used.  */
-#define FONT_ENCODING_NOT_DECIDED 4
+#define FONT_ENCODING_NOT_DECIDED 255
 
 #define FONT_NOT_OPENED -1
 #define FONT_NOT_FOUND  -2
@@ -180,10 +180,10 @@ extern struct font_info *(*get_font_info_func) P_ ((struct frame *f,
 
 /* Return a list of font names which matches PATTERN.  See the document of
    `x-list-fonts' for more detail.  */
-extern Lisp_Object (*list_fonts_func) P_ ((Lisp_Object pattern,
-                                          Lisp_Object face,
-                                          Lisp_Object frame,
-                                          Lisp_Object width));
+extern Lisp_Object (*list_fonts_func) P_ ((struct frame *f,
+                                          Lisp_Object pattern,
+                                          int size,
+                                          int maxnames));
 
 /* Load a font named NAME for frame F and return a pointer to the
    information of the loaded font.  If loading is failed, return -1.  */
@@ -200,6 +200,11 @@ extern struct font_info *(*query_font_func) P_ ((struct frame *f, char *name));
 extern void (*set_frame_fontset_func) P_ ((struct frame *f, Lisp_Object arg,
                                           Lisp_Object oldval));
 
+/* To find a CCL program, fs_load_font calls this function.
+   The argument is a pointer to the struct font_info.
+   This function set the memer `encoder' of the structure.  */
+extern void (*find_ccl_program_func) P_ ((struct font_info *));
+
 /* Check if any window system is used now.  */
 extern void (*check_window_system_func) P_ ((void));
 
@@ -209,9 +214,11 @@ extern struct font_info *fs_load_font P_ ((struct frame *, struct font_info *,
                                           int, char *, int));
 extern int fs_query_fontset P_ ((struct frame *, char *));
 extern int fs_register_fontset P_ ((struct frame *, Lisp_Object));
-EXFUN (Fquery_fontset, 1);
+EXFUN (Fquery_fontset, 2);
 extern Lisp_Object list_fontsets P_ ((struct frame *, Lisp_Object, int));
 extern Lisp_Object Vglobal_fontset_alist;
+struct frame;
+int fs_query_fontset P_ ((struct frame *f, char *name));
 
 extern Lisp_Object Qfontset;
 extern Lisp_Object Vuse_default_ascent; 
@@ -238,4 +245,24 @@ extern int font_idx_temp;
    ? font_table + font_idx_temp                                                  \
    : fs_load_font (f, font_table, charset, fontname, fontset))
 
+extern Lisp_Object Vfontset_alias_alist;
+extern Lisp_Object Vglobal_fontset_alist;
+
+
+/* Return an immutable id for font_info FONT_INFO on frame F.  The
+   reason for this macro is hat one cannot hold pointers to font_info
+   structures in other data structures, because the table is
+   reallocated in x_list_fonts.  */
+
+#define FONT_INFO_ID(F, FONT_INFO) \
+     (FONT_INFO) - (FRAME_X_DISPLAY_INFO ((F))->font_table)
+
+/* Given a font_info id ID, return a pointer to the font_info
+   structure on frame F.  If ID is invalid, return null.  */
+
+#define FONT_INFO_FROM_ID(F, ID)                                       \
+     (((ID) >= 0 && (ID) < FRAME_X_DISPLAY_INFO ((F))->font_table_size)        \
+      ? (FRAME_X_DISPLAY_INFO ((F))->font_table + (ID))                        \
+      : 0)
+
 #endif /* _FONTSET_H */