Git init
[external/pango1.0.git] / pango / pangoxft.h
1 /* Pango
2  * pangoxft.h:
3  *
4  * Copyright (C) 1999 Red Hat Software
5  * Copyright (C) 2000 SuSE Linux Ltd
6  *
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.
11  *
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.
16  *
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.
21  */
22
23 #ifndef __PANGOXFT_H__
24 #define __PANGOXFT_H__
25
26 #include <pango/pango-context.h>
27 #include <pango/pango-ot.h>
28 #include <pango/pangofc-font.h>
29 #include <pango/pango-layout.h>
30 #include <pango/pangoxft-render.h>
31
32 G_BEGIN_DECLS
33
34 #ifndef PANGO_DISABLE_DEPRECATED
35 #define PANGO_RENDER_TYPE_XFT "PangoRenderXft"
36 #endif
37
38 #define PANGO_TYPE_XFT_FONT_MAP              (pango_xft_font_map_get_type ())
39 #define PANGO_XFT_FONT_MAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT_MAP, PangoXftFontMap))
40 #define PANGO_XFT_IS_FONT_MAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT_MAP))
41
42 typedef struct _PangoXftFontMap      PangoXftFontMap;
43
44 typedef struct _PangoXftFont    PangoXftFont;
45
46 typedef void (*PangoXftSubstituteFunc) (FcPattern *pattern,
47                                         gpointer   data);
48
49 /* Calls for applications
50  */
51 PangoFontMap *pango_xft_get_font_map     (Display *display,
52                                           int      screen);
53 #ifndef PANGO_DISABLE_DEPRECATED
54 PangoContext *pango_xft_get_context      (Display *display,
55                                           int      screen);
56 #endif
57 void          pango_xft_shutdown_display (Display *display,
58                                           int      screen);
59
60 void pango_xft_set_default_substitute (Display                *display,
61                                        int                     screen,
62                                        PangoXftSubstituteFunc  func,
63                                        gpointer                data,
64                                        GDestroyNotify          notify);
65 void pango_xft_substitute_changed     (Display                *display,
66                                        int                     screen);
67
68 GType pango_xft_font_map_get_type (void) G_GNUC_CONST;
69
70 #define PANGO_XFT_FONT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, PangoXftFont))
71 #define PANGO_TYPE_XFT_FONT              (pango_xft_font_get_type ())
72 #define PANGO_XFT_IS_FONT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT))
73
74 GType      pango_xft_font_get_type (void) G_GNUC_CONST;
75
76 /* For shape engines
77  */
78
79 #ifdef PANGO_ENABLE_ENGINE
80 XftFont *     pango_xft_font_get_font          (PangoFont *font);
81 Display *     pango_xft_font_get_display       (PangoFont *font);
82 #ifndef PANGO_DISABLE_DEPRECATED
83 FT_Face       pango_xft_font_lock_face         (PangoFont *font);
84 void          pango_xft_font_unlock_face       (PangoFont *font);
85 guint         pango_xft_font_get_glyph         (PangoFont *font,
86                                                 gunichar   wc);
87 gboolean      pango_xft_font_has_char          (PangoFont *font,
88                                                 gunichar   wc);
89 PangoGlyph    pango_xft_font_get_unknown_glyph (PangoFont *font,
90                                                 gunichar   wc);
91 #endif /* PANGO_DISABLE_DEPRECATED */
92 #endif /* PANGO_ENABLE_ENGINE */
93
94 G_END_DECLS
95
96 #endif /* __PANGOXFT_H__ */