I've no idea here...
[gtkD.git] / src / pango / PgItem.d
blobd9efdc0870eda5ce6135f10d0477e702bf7691c5
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile =
26 * outPack = pango
27 * outFile = PgItem
28 * strct = PangoItem
29 * realStrct=
30 * ctorStrct=
31 * clss = PgItem
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - pango_item_
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - pango.PgContext
45 * - pango.PgLayout
46 * - pango.PgFontDescription
47 * - pango.PgFontMetrics
48 * - pango.PgFontFamily
49 * - pango.PgFontFace
50 * - pango.PgFontMap
51 * - pango.PgFontsetSimple
52 * - pango.PgAttribute
53 * - pango.PgAttributeList
54 * - pango.PgLanguage
55 * - pango.PgTabArray
56 * - pango.PgLayout
57 * - pango.PgLayoutIter
58 * - pango.PgScriptIter
59 * structWrap:
60 * - PangoAttribute* -> PgAttribute
61 * - PangoAttributeList* -> PgAttributeList
62 * - PangoContext* -> PgContext
63 * - PangoFontDescription* -> PgFontDescription
64 * - PangoFontFace* -> PgFontFace
65 * - PangoFontFamily* -> PgFontFamily
66 * - PangoFontMap* -> PgFontMap
67 * - PangoFontMetrics* -> PgFontMetrics
68 * - PangoFontsetSimple* -> PgFontsetSimple
69 * - PangoLanguage* -> PgLanguage
70 * - PangoLayout* -> PgLayout
71 * - PangoLayoutIter* -> PgLayoutIter
72 * - PangoScriptIter* -> PgScriptIter
73 * - PangoTabArray* -> PgTabArray
74 * local aliases:
77 module pango.PgItem;
79 private import pango.pangotypes;
81 private import lib.pango;
83 private import pango.PgContext;
84 private import pango.PgLayout;
85 private import pango.PgFontDescription;
86 private import pango.PgFontMetrics;
87 private import pango.PgFontFamily;
88 private import pango.PgFontFace;
89 private import pango.PgFontMap;
90 private import pango.PgFontsetSimple;
91 private import pango.PgAttribute;
92 private import pango.PgAttributeList;
93 private import pango.PgLanguage;
94 private import pango.PgTabArray;
95 private import pango.PgLayout;
96 private import pango.PgLayoutIter;
97 private import pango.PgScriptIter;
99 /**
100 * Description
101 * The Pango rendering pipeline takes a string of
102 * Unicode characters and converts it into glyphs.
103 * The functions described in this section accomplish
104 * various steps of this process.
106 public class PgItem
109 /** the main Gtk struct */
110 protected PangoItem* pangoItem;
113 public PangoItem* getPgItemStruct()
115 return pangoItem;
119 /** the main Gtk struct as a void* */
120 protected void* getStruct()
122 return cast(void*)pangoItem;
126 * Sets our main struct and passes it to the parent class
128 public this (PangoItem* pangoItem)
130 this.pangoItem = pangoItem;
146 * Free a PangoItem and all associated memory.
147 * item:
148 * a PangoItem
150 public void free()
152 // void pango_item_free (PangoItem *item);
153 pango_item_free(pangoItem);
157 * Copy an existing PangoItem structure.
158 * item:
159 * a PangoItem
160 * Returns:
161 * the newly allocated PangoItem, which should
162 * be freed with pango_item_free().
164 public PangoItem* copy()
166 // PangoItem* pango_item_copy (PangoItem *item);
167 return pango_item_copy(pangoItem);
171 * Creates a new PangoItem structure initialized to default values.
172 * Returns:
173 * the newly allocated PangoItem, which should
174 * be freed with pango_item_free().
176 public this ()
178 // PangoItem* pango_item_new (void);
179 this(cast(PangoItem*)pango_item_new() );
183 * Modifies orig to cover only the text after split_index, and
184 * returns a new item that covers the text before split_index that
185 * used to be in orig. You can think of split_index as the length of
186 * the returned item. split_index may not be 0, and it may not be
187 * greater than or equal to the length of orig (that is, there must
188 * be at least one byte assigned to each item, you can't create a
189 * zero-length item). split_offset is the length of the first item in
190 * chars, and must be provided because the text used to generate the
191 * item isn't available, so pango_item_split() can't count the char
192 * length of the split items itself.
193 * orig:
194 * a PangoItem
195 * split_index:
196 * byte index of position to split item, relative to the start of the item
197 * split_offset:
198 * number of chars between start of orig and split_index
199 * Returns:
200 * new item representing text before split_index, which
201 * should be freed with pango_item_free().
203 public PangoItem* split(int splitIndex, int splitOffset)
205 // PangoItem* pango_item_split (PangoItem *orig, int split_index, int split_offset);
206 return pango_item_split(pangoItem, splitIndex, splitOffset);