4 * Copyright (C) 1999 Red Hat Software
5 * Copyright (C) 2000 SuSE Linux Ltd
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
27 #include <pango/pango-layout.h>
33 #ifndef PANGO_DISABLE_DEPRECATED
35 #define PANGO_RENDER_TYPE_X "PangoRenderX"
37 typedef GC (*PangoGetGCFunc) (PangoContext *context, PangoColor *color, GC base_gc);
38 typedef void (*PangoFreeGCFunc) (PangoContext *context, GC gc);
40 /* Calls for applications
42 PangoContext * pango_x_get_context (Display *display);
43 void pango_x_context_set_funcs (PangoContext *context,
44 PangoGetGCFunc get_gc_func,
45 PangoFreeGCFunc free_gc_func);
47 PangoFont * pango_x_load_font (Display *display,
49 void pango_x_render (Display *display,
53 PangoGlyphString *glyphs,
56 void pango_x_render_layout_line (Display *display,
59 PangoLayoutLine *line,
62 void pango_x_render_layout (Display *display,
69 /* API for rendering modules
71 typedef guint16 PangoXSubfont;
73 #define PANGO_X_MAKE_GLYPH(subfont,index_) ((subfont)<<16 | (index_))
74 #define PANGO_X_GLYPH_SUBFONT(glyph) ((glyph)>>16)
75 #define PANGO_X_GLYPH_INDEX(glyph) ((glyph) & 0xffff)
77 int pango_x_list_subfonts (PangoFont *font,
80 PangoXSubfont **subfont_ids,
81 int **subfont_charsets);
82 gboolean pango_x_has_glyph (PangoFont *font,
84 PangoGlyph pango_x_get_unknown_glyph (PangoFont *font);
86 #ifdef PANGO_ENABLE_ENGINE
87 PangoGlyph pango_x_font_get_unknown_glyph (PangoFont *font,
89 #endif /* PANGO_ENABLE_ENGINE */
91 /* API for libraries that want to use PangoX mixed with classic X fonts.
93 typedef struct _PangoXFontCache PangoXFontCache;
95 PangoXFontCache *pango_x_font_cache_new (Display *display);
96 void pango_x_font_cache_free (PangoXFontCache *cache);
98 XFontStruct * pango_x_font_cache_load (PangoXFontCache *cache,
100 void pango_x_font_cache_unload (PangoXFontCache *cache,
103 PangoFontMap * pango_x_font_map_for_display (Display *display);
104 void pango_x_shutdown_display (Display *display);
105 PangoXFontCache *pango_x_font_map_get_font_cache (PangoFontMap *font_map);
107 char *pango_x_font_subfont_xlfd (PangoFont *font,
108 PangoXSubfont subfont_id);
111 gboolean pango_x_find_first_subfont (PangoFont *font,
114 PangoXSubfont *rfont);
116 void pango_x_fallback_shape (PangoFont *font,
117 PangoGlyphString *glyphs,
121 gboolean pango_x_apply_ligatures (PangoFont *font,
122 PangoXSubfont subfont,
127 #endif /* PANGO_DISABLE_DEPRECATED */
131 #endif /* __PANGOX_H__ */