Git init
[external/pango1.0.git] / pango / pango-fontmap.h
1 /* Pango
2  * pango-font.h: Font handling
3  *
4  * Copyright (C) 2000 Red Hat Software
5  *
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.
10  *
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.
15  *
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.
20  */
21
22 #ifndef __PANGO_FONTMAP_H__
23 #define __PANGO_FONTMAP_H__
24
25 #include <pango/pango-font.h>
26 #include <pango/pango-fontset.h>
27
28 G_BEGIN_DECLS
29
30 #define PANGO_TYPE_FONT_MAP              (pango_font_map_get_type ())
31 #define PANGO_FONT_MAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap))
32 #define PANGO_IS_FONT_MAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
33
34 typedef struct _PangoContext PangoContext;
35
36 GType         pango_font_map_get_type       (void) G_GNUC_CONST;
37 PangoContext * pango_font_map_create_context (PangoFontMap               *fontmap);
38 PangoFont *   pango_font_map_load_font     (PangoFontMap                 *fontmap,
39                                             PangoContext                 *context,
40                                             const PangoFontDescription   *desc);
41 PangoFontset *pango_font_map_load_fontset  (PangoFontMap                 *fontmap,
42                                             PangoContext                 *context,
43                                             const PangoFontDescription   *desc,
44                                             PangoLanguage                *language);
45 void          pango_font_map_list_families (PangoFontMap                 *fontmap,
46                                             PangoFontFamily            ***families,
47                                             int                          *n_families);
48
49 #ifdef PANGO_ENABLE_BACKEND
50
51 #define PANGO_FONT_MAP_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
52 #define PANGO_IS_FONT_MAP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
53 #define PANGO_FONT_MAP_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass))
54
55 typedef struct _PangoFontMapClass PangoFontMapClass;
56
57 struct _PangoFontMap
58 {
59   GObject parent_instance;
60 };
61
62 struct _PangoFontMapClass
63 {
64   GObjectClass parent_class;
65
66   /*< public >*/
67
68   PangoFont *   (*load_font)     (PangoFontMap               *fontmap,
69                                   PangoContext               *context,
70                                   const PangoFontDescription *desc);
71   void          (*list_families) (PangoFontMap               *fontmap,
72                                   PangoFontFamily          ***families,
73                                   int                        *n_families);
74   PangoFontset *(*load_fontset)  (PangoFontMap               *fontmap,
75                                   PangoContext               *context,
76                                   const PangoFontDescription *desc,
77                                   PangoLanguage              *language);
78
79   const char *shape_engine_type;
80
81   /*< private >*/
82
83   /* Padding for future expansion */
84   void (*_pango_reserved1) (void);
85   void (*_pango_reserved2) (void);
86   void (*_pango_reserved3) (void);
87   void (*_pango_reserved4) (void);
88 };
89
90 const char   *pango_font_map_get_shape_engine_type (PangoFontMap *fontmap);
91
92 #endif /* PANGO_ENABLE_BACKEND */
93
94 G_END_DECLS
95
96 #endif /* __PANGO_FONTMAP_H__ */