1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = 
27  * outPack = pango
28  * outFile = PgGlyphItemIter
29  * strct   = PangoGlyphItemIter
30  * realStrct=
31  * ctorStrct=
32  * clss    = PgGlyphItemIter
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- pango_glyph_item_iter_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- pango.PgGlyphItem
48  * structWrap:
49  * 	- PangoGlyphItem* -> PgGlyphItem
50  * 	- PangoGlyphItemIter* -> PgGlyphItemIter
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module pango.PgGlyphItemIter;
57 
58 public  import gtkc.pangotypes;
59 
60 private import gtkc.pango;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 
65 private import glib.Str;
66 private import pango.PgGlyphItem;
67 
68 
69 
70 
71 /**
72  * Description
73  * pango_shape() produces a string of glyphs which
74  * can be measured or drawn to the screen. The following
75  * structures are used to store information about
76  * glyphs.
77  */
78 public class PgGlyphItemIter
79 {
80 	
81 	/** the main Gtk struct */
82 	protected PangoGlyphItemIter* pangoGlyphItemIter;
83 	
84 	
85 	public PangoGlyphItemIter* getPgGlyphItemIterStruct()
86 	{
87 		return pangoGlyphItemIter;
88 	}
89 	
90 	
91 	/** the main Gtk struct as a void* */
92 	protected void* getStruct()
93 	{
94 		return cast(void*)pangoGlyphItemIter;
95 	}
96 	
97 	/**
98 	 * Sets our main struct and passes it to the parent class
99 	 */
100 	public this (PangoGlyphItemIter* pangoGlyphItemIter)
101 	{
102 		this.pangoGlyphItemIter = pangoGlyphItemIter;
103 	}
104 	
105 	/**
106 	 */
107 	
108 	/**
109 	 * Make a shallow copy of an existing PangoGlyphItemIter structure.
110 	 * Since 1.22
111 	 * Returns: the newly allocated PangoGlyphItemIter, which should be freed with pango_glyph_item_iter_free(), or NULL if orig was NULL.
112 	 */
113 	public PgGlyphItemIter copy()
114 	{
115 		// PangoGlyphItemIter * pango_glyph_item_iter_copy (PangoGlyphItemIter *orig);
116 		auto p = pango_glyph_item_iter_copy(pangoGlyphItemIter);
117 		
118 		if(p is null)
119 		{
120 			return null;
121 		}
122 		
123 		return ObjectG.getDObject!(PgGlyphItemIter)(cast(PangoGlyphItemIter*) p);
124 	}
125 	
126 	/**
127 	 * Frees a PangoGlyphItemIter created by pango_glyph_item_iter_copy().
128 	 * Since 1.22
129 	 */
130 	public void free()
131 	{
132 		// void pango_glyph_item_iter_free (PangoGlyphItemIter *iter);
133 		pango_glyph_item_iter_free(pangoGlyphItemIter);
134 	}
135 	
136 	/**
137 	 * Initializes a PangoGlyphItemIter structure to point to the
138 	 * first cluster in a glyph item.
139 	 * See PangoGlyphItemIter for details of cluster orders.
140 	 * Since 1.22
141 	 * Params:
142 	 * glyphItem = the glyph item to iterate over
143 	 * text = text corresponding to the glyph item
144 	 * Returns: FALSE if there are no clusters in the glyph item
145 	 */
146 	public int initStart(PgGlyphItem glyphItem, string text)
147 	{
148 		// gboolean pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter,  PangoGlyphItem *glyph_item,  const char *text);
149 		return pango_glyph_item_iter_init_start(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text));
150 	}
151 	
152 	/**
153 	 * Initializes a PangoGlyphItemIter structure to point to the
154 	 * last cluster in a glyph item.
155 	 * See PangoGlyphItemIter for details of cluster orders.
156 	 * Since 1.22
157 	 * Params:
158 	 * glyphItem = the glyph item to iterate over
159 	 * text = text corresponding to the glyph item
160 	 * Returns: FALSE if there are no clusters in the glyph item
161 	 */
162 	public int initEnd(PgGlyphItem glyphItem, string text)
163 	{
164 		// gboolean pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter,  PangoGlyphItem *glyph_item,  const char *text);
165 		return pango_glyph_item_iter_init_end(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text));
166 	}
167 	
168 	/**
169 	 * Advances the iterator to the next cluster in the glyph item.
170 	 * See PangoGlyphItemIter for details of cluster orders.
171 	 * Since 1.22
172 	 * Returns: TRUE if the iterator was advanced, FALSE if we were already on the last cluster.
173 	 */
174 	public int nextCluster()
175 	{
176 		// gboolean pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter);
177 		return pango_glyph_item_iter_next_cluster(pangoGlyphItemIter);
178 	}
179 	
180 	/**
181 	 * Moves the iterator to the preceding cluster in the glyph item.
182 	 * See PangoGlyphItemIter for details of cluster orders.
183 	 * Since 1.22
184 	 * Returns: TRUE if the iterator was moved, FALSE if we were already on the first cluster.
185 	 */
186 	public int prevCluster()
187 	{
188 		// gboolean pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter);
189 		return pango_glyph_item_iter_prev_cluster(pangoGlyphItemIter);
190 	}
191 }