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