1/* Pango
2 * pango-context.h: Rendering contexts
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_CONTEXT_H__
23#define __PANGO_CONTEXT_H__
24
25#include <pango/pango-types.h>
26#include <pango/pango-font.h>
27#include <pango/pango-fontmap.h>
28#include <pango/pango-attributes.h>
29#include <pango/pango-direction.h>
30
31G_BEGIN_DECLS
32
33typedef struct _PangoContextClass PangoContextClass;
34
35#define PANGO_TYPE_CONTEXT (pango_context_get_type ())
36#define PANGO_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CONTEXT, PangoContext))
37#define PANGO_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CONTEXT, PangoContextClass))
38#define PANGO_IS_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CONTEXT))
39#define PANGO_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CONTEXT))
40#define PANGO_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CONTEXT, PangoContextClass))
41
42
43PANGO_AVAILABLE_IN_ALL
44GType pango_context_get_type (void) G_GNUC_CONST;
45
46PANGO_AVAILABLE_IN_ALL
47PangoContext * pango_context_new (void);
48PANGO_AVAILABLE_IN_1_32
49void pango_context_changed (PangoContext *context);
50PANGO_AVAILABLE_IN_ALL
51void pango_context_set_font_map (PangoContext *context,
52 PangoFontMap *font_map);
53PANGO_AVAILABLE_IN_1_6
54PangoFontMap * pango_context_get_font_map (PangoContext *context);
55PANGO_AVAILABLE_IN_1_32
56guint pango_context_get_serial (PangoContext *context);
57PANGO_AVAILABLE_IN_ALL
58void pango_context_list_families (PangoContext *context,
59 PangoFontFamily ***families,
60 int *n_families);
61PANGO_AVAILABLE_IN_ALL
62PangoFont * pango_context_load_font (PangoContext *context,
63 const PangoFontDescription *desc);
64PANGO_AVAILABLE_IN_ALL
65PangoFontset * pango_context_load_fontset (PangoContext *context,
66 const PangoFontDescription *desc,
67 PangoLanguage *language);
68
69PANGO_AVAILABLE_IN_ALL
70PangoFontMetrics * pango_context_get_metrics (PangoContext *context,
71 const PangoFontDescription *desc,
72 PangoLanguage *language);
73
74PANGO_AVAILABLE_IN_ALL
75void pango_context_set_font_description (PangoContext *context,
76 const PangoFontDescription *desc);
77PANGO_AVAILABLE_IN_ALL
78PangoFontDescription * pango_context_get_font_description (PangoContext *context);
79PANGO_AVAILABLE_IN_ALL
80PangoLanguage * pango_context_get_language (PangoContext *context);
81PANGO_AVAILABLE_IN_ALL
82void pango_context_set_language (PangoContext *context,
83 PangoLanguage *language);
84PANGO_AVAILABLE_IN_ALL
85void pango_context_set_base_dir (PangoContext *context,
86 PangoDirection direction);
87PANGO_AVAILABLE_IN_ALL
88PangoDirection pango_context_get_base_dir (PangoContext *context);
89PANGO_AVAILABLE_IN_1_16
90void pango_context_set_base_gravity (PangoContext *context,
91 PangoGravity gravity);
92PANGO_AVAILABLE_IN_1_16
93PangoGravity pango_context_get_base_gravity (PangoContext *context);
94PANGO_AVAILABLE_IN_1_16
95PangoGravity pango_context_get_gravity (PangoContext *context);
96PANGO_AVAILABLE_IN_1_16
97void pango_context_set_gravity_hint (PangoContext *context,
98 PangoGravityHint hint);
99PANGO_AVAILABLE_IN_1_16
100PangoGravityHint pango_context_get_gravity_hint (PangoContext *context);
101
102PANGO_AVAILABLE_IN_1_6
103void pango_context_set_matrix (PangoContext *context,
104 const PangoMatrix *matrix);
105PANGO_AVAILABLE_IN_1_6
106const PangoMatrix * pango_context_get_matrix (PangoContext *context);
107
108PANGO_AVAILABLE_IN_1_44
109void pango_context_set_round_glyph_positions (PangoContext *context,
110 gboolean round_positions);
111PANGO_AVAILABLE_IN_1_44
112gboolean pango_context_get_round_glyph_positions (PangoContext *context);
113
114G_END_DECLS
115
116#endif /* __PANGO_CONTEXT_H__ */
117

source code of include/pango-1.0/pango/pango-context.h