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  * pango_shape() produces a string of glyphs which
73  * can be measured or drawn to the screen. The following
74  * structures are used to store information about
75  * glyphs.
76  */
77 public class PgGlyphItemIter
78 {
79 	
80 	/** the main Gtk struct */
81 	protected PangoGlyphItemIter* pangoGlyphItemIter;
82 	
83 	
84 	public PangoGlyphItemIter* getPgGlyphItemIterStruct()
85 	{
86 		return pangoGlyphItemIter;
87 	}
88 	
89 	
90 	/** the main Gtk struct as a void* */
91 	protected void* getStruct()
92 	{
93 		return cast(void*)pangoGlyphItemIter;
94 	}
95 	
96 	/**
97 	 * Sets our main struct and passes it to the parent class
98 	 */
99 	public this (PangoGlyphItemIter* pangoGlyphItemIter)
100 	{
101 		this.pangoGlyphItemIter = pangoGlyphItemIter;
102 	}
103 	
104 	/**
105 	 */
106 	
107 	/**
108 	 * Make a shallow copy of an existing PangoGlyphItemIter structure.
109 	 * Since 1.22
110 	 * Returns: the newly allocated PangoGlyphItemIter, which should be freed with pango_glyph_item_iter_free(), or NULL if orig was NULL.
111 	 */
112 	public PgGlyphItemIter copy()
113 	{
114 		// PangoGlyphItemIter * pango_glyph_item_iter_copy (PangoGlyphItemIter *orig);
115 		auto p = pango_glyph_item_iter_copy(pangoGlyphItemIter);
116 		
117 		if(p is null)
118 		{
119 			return null;
120 		}
121 		
122 		return ObjectG.getDObject!(PgGlyphItemIter)(cast(PangoGlyphItemIter*) p);
123 	}
124 	
125 	/**
126 	 * Frees a PangoGlyphItemIter created by pango_glyph_item_iter_copy().
127 	 * Since 1.22
128 	 */
129 	public void free()
130 	{
131 		// void pango_glyph_item_iter_free (PangoGlyphItemIter *iter);
132 		pango_glyph_item_iter_free(pangoGlyphItemIter);
133 	}
134 	
135 	/**
136 	 * Initializes a PangoGlyphItemIter structure to point to the
137 	 * first cluster in a glyph item.
138 	 * See PangoGlyphItemIter for details of cluster orders.
139 	 * Since 1.22
140 	 * Params:
141 	 * glyphItem = the glyph item to iterate over
142 	 * text = text corresponding to the glyph item
143 	 * Returns: FALSE if there are no clusters in the glyph item
144 	 */
145 	public int initStart(PgGlyphItem glyphItem, string text)
146 	{
147 		// gboolean pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter,  PangoGlyphItem *glyph_item,  const char *text);
148 		return pango_glyph_item_iter_init_start(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text));
149 	}
150 	
151 	/**
152 	 * Initializes a PangoGlyphItemIter structure to point to the
153 	 * last cluster in a glyph item.
154 	 * See PangoGlyphItemIter for details of cluster orders.
155 	 * Since 1.22
156 	 * Params:
157 	 * glyphItem = the glyph item to iterate over
158 	 * text = text corresponding to the glyph item
159 	 * Returns: FALSE if there are no clusters in the glyph item
160 	 */
161 	public int initEnd(PgGlyphItem glyphItem, string text)
162 	{
163 		// gboolean pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter,  PangoGlyphItem *glyph_item,  const char *text);
164 		return pango_glyph_item_iter_init_end(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text));
165 	}
166 	
167 	/**
168 	 * Advances the iterator to the next cluster in the glyph item.
169 	 * See PangoGlyphItemIter for details of cluster orders.
170 	 * Since 1.22
171 	 * Returns: TRUE if the iterator was advanced, FALSE if we were already on the last cluster.
172 	 */
173 	public int nextCluster()
174 	{
175 		// gboolean pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter);
176 		return pango_glyph_item_iter_next_cluster(pangoGlyphItemIter);
177 	}
178 	
179 	/**
180 	 * Moves the iterator to the preceding cluster in the glyph item.
181 	 * See PangoGlyphItemIter for details of cluster orders.
182 	 * Since 1.22
183 	 * Returns: TRUE if the iterator was moved, FALSE if we were already on the first cluster.
184 	 */
185 	public int prevCluster()
186 	{
187 		// gboolean pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter);
188 		return pango_glyph_item_iter_prev_cluster(pangoGlyphItemIter);
189 	}
190 }