2
* pango-fontset.h: Font set handling
4
* Copyright (C) 2001 Red Hat Software
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.
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.
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.
22
#ifndef __PANGO_FONTSET_H__
23
#define __PANGO_FONTSET_H__
25
#include <pango/pango-coverage.h>
26
#include <pango/pango-types.h>
28
#include <glib-object.h>
36
#define PANGO_TYPE_FONTSET (pango_fontset_get_type ())
37
#define PANGO_FONTSET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET, PangoFontset))
38
#define PANGO_IS_FONTSET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET))
40
GType pango_fontset_get_type (void) G_GNUC_CONST;
42
typedef struct _PangoFontset PangoFontset;
45
* PangoFontsetForeachFunc
46
* @fontset: a #PangoFontset
47
* @font: a font from @fontset
48
* @data: callback data
50
* A callback function used by pango_fontset_foreach() when enumerating
51
* the fonts in a fontset.
53
* Returns: if %TRUE, stop iteration and return immediately.
57
typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset,
61
PangoFont * pango_fontset_get_font (PangoFontset *fontset,
63
PangoFontMetrics *pango_fontset_get_metrics (PangoFontset *fontset);
64
void pango_fontset_foreach (PangoFontset *fontset,
65
PangoFontsetForeachFunc func,
68
#ifdef PANGO_ENABLE_BACKEND
70
typedef struct _PangoFontsetClass PangoFontsetClass;
72
#define PANGO_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONTSET, PangoFontsetClass))
73
#define PANGO_IS_FONTSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONTSET))
74
#define PANGO_FONTSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONTSET, PangoFontsetClass))
78
GObject parent_instance;
81
struct _PangoFontsetClass
83
GObjectClass parent_class;
87
PangoFont * (*get_font) (PangoFontset *fontset,
90
PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
91
PangoLanguage * (*get_language) (PangoFontset *fontset);
92
void (*foreach) (PangoFontset *fontset,
93
PangoFontsetForeachFunc func,
98
/* Padding for future expansion */
99
void (*_pango_reserved1) (void);
100
void (*_pango_reserved2) (void);
101
void (*_pango_reserved3) (void);
102
void (*_pango_reserved4) (void);
109
#define PANGO_TYPE_FONTSET_SIMPLE (pango_fontset_simple_get_type ())
110
#define PANGO_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimple))
111
#define PANGO_IS_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET_SIMPLE))
113
typedef struct _PangoFontsetSimple PangoFontsetSimple;
114
typedef struct _PangoFontsetSimpleClass PangoFontsetSimpleClass;
116
GType pango_fontset_simple_get_type (void) G_GNUC_CONST;
118
PangoFontsetSimple * pango_fontset_simple_new (PangoLanguage *language);
119
void pango_fontset_simple_append (PangoFontsetSimple *fontset,
121
int pango_fontset_simple_size (PangoFontsetSimple *fontset);
123
#endif /* PANGO_ENABLE_BACKEND */
127
#endif /* __PANGO_FONTSET_H__ */