diff options
author | Gerd Moellmann <gerd@gnu.org> | 1999-07-21 21:43:52 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 1999-07-21 21:43:52 +0000 |
commit | e18f9922555ebf2da6244c82bbf9fe7717c79b7b (patch) | |
tree | 0b5501b1579dd95f5f4f9e95c45808087dc1491a /src/fontset.h | |
parent | 18082e2d154ba9c8c54732a15bdf05ee269c5922 (diff) | |
download | emacs-e18f9922555ebf2da6244c82bbf9fe7717c79b7b.tar.gz |
(FONT_INFO_ID): Build an ID from a font_info pointer.
(FONT_INFO_FROM_ID): Get a font_info pointer from an ID.
(toplevel): Add extern declarations for Vfontset_alias_alist
and Vglobal_fontset_alist.
Diffstat (limited to 'src/fontset.h')
-rw-r--r-- | src/fontset.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/fontset.h b/src/fontset.h index 4f0258513f4..57545fbfa1b 100644 --- a/src/fontset.h +++ b/src/fontset.h @@ -217,6 +217,8 @@ extern int fs_register_fontset P_ ((struct frame *, Lisp_Object)); 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; @@ -243,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 */ |