PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/binding/pango/item.d

http://github.com/wilkie/djehuty
D | 78 lines | 32 code | 15 blank | 31 comment | 0 complexity | 015b134fb59d8402ca6331a199f191d5 MD5 | raw file
 1/*
 2 * item.d
 3 *
 4 * This file holds bindings to pango's pango-item.h. The original
 5 * copyright is displayed below.
 6 *
 7 * Author: Dave Wilkinson
 8 *
 9 */
10
11module binding.pango.item;
12
13/* Pango
14 * pango-item.h: Structure for storing run information
15 *
16 * Copyright (C) 2000 Red Hat Software
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Library General Public
20 * License as published by the Free Software Foundation; either
21 * version 2 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
26 * Library General Public License for more details.
27 *
28 * You should have received a copy of the GNU Library General Public
29 * License along with this library; if not, write to the
30 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
31 * Boston, MA 02111-1307, USA.
32 */
33
34import binding.pango.types;
35import binding.pango.engine;
36import binding.pango.font;
37
38alias _PangoAnalysis PangoAnalysis;
39alias _PangoItem PangoItem;
40
41/* TODO: if more flags are needed, turn this into a real PangoAnalysisFlags enum */
42const auto PANGO_ANALYSIS_FLAG_CENTERED_BASELINE = (1 << 0);
43
44struct _PangoAnalysis
45{
46  PangoEngineShape *shape_engine;
47  PangoEngineLang  *lang_engine;
48  PangoFont *font;
49
50  guint8 level;
51  guint8 gravity; /* PangoGravity */
52  guint8 flags;
53
54  PangoLanguage *language;
55  GSList *extra_attrs;
56}
57
58struct _PangoItem
59{
60  gint offset;
61  gint length;
62  gint num_chars;
63  PangoAnalysis analysis;
64}
65
66//#define PANGO_TYPE_ITEM (pango_item_get_type ())
67
68GType pango_item_get_type ();
69
70PangoItem *pango_item_new   ();
71
72PangoItem *pango_item_copy  (PangoItem  *item);
73
74void       pango_item_free  (PangoItem  *item);
75
76PangoItem *pango_item_split (PangoItem  *orig,
77			     int         split_index,
78			     int         split_offset);