4 * Copyright (C) 1999 Red Hat Software
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __PANGOX_PRIVATE_H__
23 #define __PANGOX_PRIVATE_H__
25 #include <pango/pangox.h>
26 #include <pango/pango-modules.h>
28 typedef struct _PangoXFace PangoXFace;
29 typedef struct _PangoXFont PangoXFont;
30 typedef struct _PangoXSubfontInfo PangoXSubfontInfo;
41 /* hash table mapping from charset-name to array of PangoXSubfont ids,
44 GHashTable *subfonts_by_charset;
46 PangoXSubfontInfo **subfonts;
51 GSList *metrics_by_lang;
53 PangoFontMap *fontmap;
54 /* If TRUE, font is in cache of recently unused fonts and not otherwise
59 PangoXFace *xface; /* Used to remove cached fonts */
63 #define PANGO_TYPE_X_FONT_MAP (pango_x_font_map_get_type ())
64 #define PANGO_X_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_X_FONT_MAP, PangoXFontMap))
65 #define PANGO_X_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_X_FONT_MAP, PangoXFontMapClass))
66 #define PANGO_X_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_X_FONT_MAP))
67 #define PANGO_X_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_X_FONT_MAP))
68 #define PANGO_X_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_X_FONT_MAP, PangoXFontMapClass))
70 typedef struct _PangoXFontMap PangoXFontMap;
71 typedef struct _PangoXFontMapClass PangoXFontMapClass;
75 PangoFontMap parent_instance;
79 PangoXFontCache *font_cache;
83 GHashTable *size_infos;
85 GHashTable *to_atom_cache;
86 GHashTable *from_atom_cache;
90 double resolution; /* (points / pixel) * PANGO_SCALE */
95 GType pango_x_font_map_get_type (void) G_GNUC_CONST;
97 PangoXFont * pango_x_font_new (PangoFontMap *fontmap,
100 PangoMap * pango_x_get_shaper_map (PangoLanguage *language);
101 char * pango_x_make_matching_xlfd (PangoFontMap *fontmap,
105 PangoCoverage *pango_x_face_get_coverage (PangoXFace *xface,
107 PangoLanguage *language);
108 void pango_x_face_remove (PangoXFace *xface,
111 Display * pango_x_fontmap_get_display (PangoFontMap *fontmap);
112 void pango_x_fontmap_cache_add (PangoFontMap *fontmap,
114 void pango_x_fontmap_cache_remove (PangoFontMap *fontmap,
117 Atom pango_x_fontmap_atom_from_name (PangoFontMap *fontmap,
118 const char *atomname);
119 const char *pango_x_fontmap_name_from_atom (PangoFontMap *fontmap,
122 #endif /* __PANGOX_PRIVATE_H__ */