Git init
[external/pango1.0.git] / pango / pangoatsui-private.h
1 /* Pango
2  * pangoatsui-private.h:
3  *
4  * Copyright (C) 2003 Red Hat Software
5  * Copyright (C) 2005-2007 Imendio AB
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 __PANGOATSUI_PRIVATE_H__
24 #define __PANGOATSUI_PRIVATE_H__
25
26 #include <pango/pango-fontmap.h>
27 #include <pango/pango-context.h>
28 #include "pangoatsui.h"
29
30 G_BEGIN_DECLS
31
32 #define PANGO_TYPE_ATSUI_FONT_MAP             (pango_atsui_font_map_get_type ())
33 #define PANGO_ATSUI_FONT_MAP(object)          (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_ATSUI_FONT_MAP, PangoATSUIFontMap))
34 #define PANGO_ATSUI_IS_FONT_MAP(object)       (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_ATSUI_FONT_MAP))
35 #define PANGO_ATSUI_FONT_MAP_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_ATSUI_FONT_MAP, PangoATSUIFontMapClass))
36 #define PANGO_IS_ATSUI_FONT_MAP_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_ATSUI_FONT_MAP))
37 #define PANGO_ATSUI_FONT_MAP_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_ATSUI_FONT_MAP, PangoATSUIFontMapClass))
38
39
40 typedef struct _PangoATSUIFamily       PangoATSUIFamily;
41 typedef struct _PangoATSUIFace         PangoATSUIFace;
42
43 typedef struct _PangoATSUIFontMap      PangoATSUIFontMap;
44 typedef struct _PangoATSUIFontMapClass PangoATSUIFontMapClass;
45
46 struct _PangoATSUIFontMap
47 {
48   PangoFontMap parent_instance;
49
50   GHashTable *font_hash;
51
52   GHashTable *families;
53 };
54
55 struct _PangoATSUIFontMapClass
56 {
57   PangoFontMapClass parent_class;
58
59   gconstpointer (*context_key_get)   (PangoATSUIFontMap             *atsuifontmap,
60                                       PangoContext               *context);
61   gpointer     (*context_key_copy)   (PangoATSUIFontMap             *atsuifontmap,
62                                       gconstpointer               key);
63   void         (*context_key_free)   (PangoATSUIFontMap             *atsuifontmap,
64                                       gpointer                    key);
65   guint32      (*context_key_hash)   (PangoATSUIFontMap             *atsuifontmap,
66                                       gconstpointer               key);
67   gboolean     (*context_key_equal)  (PangoATSUIFontMap             *atsuifontmap,
68                                       gconstpointer               key_a,
69                                       gconstpointer               key_b);
70
71   PangoATSUIFont * (* create_font)   (PangoATSUIFontMap          *fontmap,
72                                       PangoContext               *context,
73                                       PangoATSUIFace             *face,
74                                       const PangoFontDescription *desc);
75 };
76
77
78 GType                 pango_atsui_font_map_get_type          (void) G_GNUC_CONST;
79
80 const char *          _pango_atsui_face_get_postscript_name  (PangoATSUIFace    *face);
81 PangoCoverage *       _pango_atsui_face_get_coverage         (PangoATSUIFace    *face,
82                                                               PangoLanguage     *language);
83 gboolean              _pango_atsui_face_get_synthetic_italic (PangoATSUIFace    *face);
84
85 void                  _pango_atsui_font_set_font_description (PangoATSUIFont    *afont,
86                                                               const PangoFontDescription *desc);
87 PangoFontDescription *_pango_atsui_font_get_font_description (PangoATSUIFont    *afont);
88 void                  _pango_atsui_font_set_font_map         (PangoATSUIFont    *afont,
89                                                               PangoATSUIFontMap *fontmap);
90 void                  _pango_atsui_font_set_face             (PangoATSUIFont    *afont, 
91                                                               PangoATSUIFace    *aface);
92 PangoATSUIFace *      _pango_atsui_font_get_face             (PangoATSUIFont    *font);
93 gpointer              _pango_atsui_font_get_context_key      (PangoATSUIFont    *afont);
94 void                  _pango_atsui_font_set_context_key      (PangoATSUIFont    *afont,
95                                                               gpointer           context_key);
96 void                  _pango_atsui_font_set_cgfont           (PangoATSUIFont    *font,
97                                                               CGFontRef         font_id);
98
99 G_END_DECLS
100
101 #endif /* __PANGOATSUI_H__ */