Upload tizen 2.0 beta source
[external/pango1.0.git] / pango / pango-item.h
1 /* Pango
2  * pango-item.h: Structure for storing run information
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_ITEM_H__
23 #define __PANGO_ITEM_H__
24
25 #include <pango/pango-types.h>
26
27 G_BEGIN_DECLS
28
29 typedef struct _PangoAnalysis PangoAnalysis;
30 typedef struct _PangoItem PangoItem;
31
32 /* TODO: if more flags are needed, turn this into a real PangoAnalysisFlags enum */
33 #define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
34
35 struct _PangoAnalysis
36 {
37   PangoEngineShape *shape_engine;
38   PangoEngineLang  *lang_engine;
39   PangoFont *font;
40
41   guint8 level;
42   guint8 gravity; /* PangoGravity */
43   guint8 flags;
44
45   guint8 script; /* PangoScript */
46   PangoLanguage *language;
47
48   GSList *extra_attrs;
49 };
50
51 struct _PangoItem
52 {
53   gint offset;
54   gint length;
55   gint num_chars;
56   PangoAnalysis analysis;
57 };
58
59 #define PANGO_TYPE_ITEM (pango_item_get_type ())
60
61 GType pango_item_get_type (void) G_GNUC_CONST;
62
63 PangoItem *pango_item_new   (void);
64 PangoItem *pango_item_copy  (PangoItem  *item);
65 void       pango_item_free  (PangoItem  *item);
66 PangoItem *pango_item_split (PangoItem  *orig,
67                              int         split_index,
68                              int         split_offset);
69
70 G_END_DECLS
71
72 #endif /* __PANGO_ITEM_H__ */