2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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:
46 * - pango.PgFontDescription
47 * - pango.PgFontMetrics
48 * - pango.PgFontFamily
51 * - pango.PgFontsetSimple
53 * - pango.PgAttributeList
57 * - pango.PgLayoutIter
58 * - pango.PgScriptIter
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
84 import tango
.io
.Stdout
; // use the tango loging?
88 private import gtkc
.pangotypes
;
90 private import gtkc
.pango
;
93 private import pango
.PgContext
;
94 private import pango
.PgLayout
;
95 private import pango
.PgFontDescription
;
96 private import pango
.PgFontMetrics
;
97 private import pango
.PgFontFamily
;
98 private import pango
.PgFontFace
;
99 private import pango
.PgFontMap
;
100 private import pango
.PgFontsetSimple
;
101 private import pango
.PgAttribute
;
102 private import pango
.PgAttributeList
;
103 private import pango
.PgLanguage
;
104 private import pango
.PgTabArray
;
105 private import pango
.PgLayout
;
106 private import pango
.PgLayoutIter
;
107 private import pango
.PgScriptIter
;
114 * The Pango rendering pipeline takes a string of
115 * Unicode characters and converts it into glyphs.
116 * The functions described in this section accomplish
117 * various steps of this process.
122 /** the main Gtk struct */
123 protected PangoItem
* pangoItem
;
126 public PangoItem
* getPgItemStruct()
132 /** the main Gtk struct as a void* */
133 protected void* getStruct()
135 return cast(void*)pangoItem
;
139 * Sets our main struct and passes it to the parent class
141 public this (PangoItem
* pangoItem
)
145 if ( pangoItem
is null )
150 Stdout("struct pangoItem is null on constructor").newline
;
154 printf("struct pangoItem is null on constructor");
161 assert(pangoItem
!is null, "struct pangoItem is null on constructor");
163 this.pangoItem
= pangoItem
;
178 * Free a PangoItem and all associated memory.
184 // void pango_item_free (PangoItem *item);
185 pango_item_free(pangoItem
);
189 * Copy an existing PangoItem structure.
193 * the newly allocated PangoItem, which should
194 * be freed with pango_item_free().
196 public PangoItem
* copy()
198 // PangoItem* pango_item_copy (PangoItem *item);
199 return pango_item_copy(pangoItem
);
203 * Creates a new PangoItem structure initialized to default values.
205 * the newly allocated PangoItem, which should
206 * be freed with pango_item_free().
210 // PangoItem* pango_item_new (void);
211 this(cast(PangoItem
*)pango_item_new() );
215 * Modifies orig to cover only the text after split_index, and
216 * returns a new item that covers the text before split_index that
217 * used to be in orig. You can think of split_index as the length of
218 * the returned item. split_index may not be 0, and it may not be
219 * greater than or equal to the length of orig (that is, there must
220 * be at least one byte assigned to each item, you can't create a
221 * zero-length item). split_offset is the length of the first item in
222 * chars, and must be provided because the text used to generate the
223 * item isn't available, so pango_item_split() can't count the char
224 * length of the split items itself.
228 * byte index of position to split item, relative to the start of the item
230 * number of chars between start of orig and split_index
232 * new item representing text before split_index, which
233 * should be freed with pango_item_free().
235 public PangoItem
* split(int splitIndex
, int splitOffset
)
237 // PangoItem* pango_item_split (PangoItem *orig, int split_index, int split_offset);
238 return pango_item_split(pangoItem
, splitIndex
, splitOffset
);