/usr/include/d/gtkd-3/pango/PgGlyphItemIter.d is in libgtkd-3-dev 3.7.5-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | /*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
module pango.PgGlyphItemIter;
private import glib.Str;
private import glib.c.functions;
private import gobject.ObjectG;
public import gtkc.pangotypes;
private import gtkd.Loader;
private import pango.PgGlyphItem;
private import pango.c.functions;
public import pango.c.types;
/**
* A #PangoGlyphItemIter is an iterator over the clusters in a
* #PangoGlyphItem. The <firstterm>forward direction</firstterm> of the
* iterator is the logical direction of text. That is, with increasing
* @start_index and @start_char values. If @glyph_item is right-to-left
* (that is, if <literal>@glyph_item->item->analysis.level</literal> is odd),
* then @start_glyph decreases as the iterator moves forward. Moreover,
* in right-to-left cases, @start_glyph is greater than @end_glyph.
*
* An iterator should be initialized using either of
* pango_glyph_item_iter_init_start() and
* pango_glyph_item_iter_init_end(), for forward and backward iteration
* respectively, and walked over using any desired mixture of
* pango_glyph_item_iter_next_cluster() and
* pango_glyph_item_iter_prev_cluster(). A common idiom for doing a
* forward iteration over the clusters is:
* <programlisting>
* PangoGlyphItemIter cluster_iter;
* gboolean have_cluster;
*
* for (have_cluster = pango_glyph_item_iter_init_start (&cluster_iter,
* glyph_item, text);
* have_cluster;
* have_cluster = pango_glyph_item_iter_next_cluster (&cluster_iter))
* {
* ...
* }
* </programlisting>
*
* Note that @text is the start of the text for layout, which is then
* indexed by <literal>@glyph_item->item->offset</literal> to get to the
* text of @glyph_item. The @start_index and @end_index values can directly
* index into @text. The @start_glyph, @end_glyph, @start_char, and @end_char
* values however are zero-based for the @glyph_item. For each cluster, the
* item pointed at by the start variables is included in the cluster while
* the one pointed at by end variables is not.
*
* None of the members of a #PangoGlyphItemIter should be modified manually.
*
* Since: 1.22
*/
public final class PgGlyphItemIter
{
/** the main Gtk struct */
protected PangoGlyphItemIter* pangoGlyphItemIter;
protected bool ownedRef;
/** Get the main Gtk struct */
public PangoGlyphItemIter* getPgGlyphItemIterStruct(bool transferOwnership = false)
{
if (transferOwnership)
ownedRef = false;
return pangoGlyphItemIter;
}
/** the main Gtk struct as a void* */
protected void* getStruct()
{
return cast(void*)pangoGlyphItemIter;
}
/**
* Sets our main struct and passes it to the parent class.
*/
public this (PangoGlyphItemIter* pangoGlyphItemIter, bool ownedRef = false)
{
this.pangoGlyphItemIter = pangoGlyphItemIter;
this.ownedRef = ownedRef;
}
~this ()
{
if ( Linker.isLoaded(LIBRARY_PANGO) && ownedRef )
pango_glyph_item_iter_free(pangoGlyphItemIter);
}
/** */
public @property PgGlyphItem glyphItem()
{
return ObjectG.getDObject!(PgGlyphItem)(pangoGlyphItemIter.glyphItem, false);
}
/** Ditto */
public @property void glyphItem(PgGlyphItem value)
{
pangoGlyphItemIter.glyphItem = value.getPgGlyphItemStruct();
}
/** */
public @property string text()
{
return Str.toString(pangoGlyphItemIter.text);
}
/** Ditto */
public @property void text(string value)
{
pangoGlyphItemIter.text = Str.toStringz(value);
}
/** */
public @property int startGlyph()
{
return pangoGlyphItemIter.startGlyph;
}
/** Ditto */
public @property void startGlyph(int value)
{
pangoGlyphItemIter.startGlyph = value;
}
/** */
public @property int startIndex()
{
return pangoGlyphItemIter.startIndex;
}
/** Ditto */
public @property void startIndex(int value)
{
pangoGlyphItemIter.startIndex = value;
}
/** */
public @property int startChar()
{
return pangoGlyphItemIter.startChar;
}
/** Ditto */
public @property void startChar(int value)
{
pangoGlyphItemIter.startChar = value;
}
/** */
public @property int endGlyph()
{
return pangoGlyphItemIter.endGlyph;
}
/** Ditto */
public @property void endGlyph(int value)
{
pangoGlyphItemIter.endGlyph = value;
}
/** */
public @property int endIndex()
{
return pangoGlyphItemIter.endIndex;
}
/** Ditto */
public @property void endIndex(int value)
{
pangoGlyphItemIter.endIndex = value;
}
/** */
public @property int endChar()
{
return pangoGlyphItemIter.endChar;
}
/** Ditto */
public @property void endChar(int value)
{
pangoGlyphItemIter.endChar = value;
}
/** */
public static GType getType()
{
return pango_glyph_item_iter_get_type();
}
/**
* Make a shallow copy of an existing #PangoGlyphItemIter structure.
*
* Returns: the newly allocated #PangoGlyphItemIter, which should
* be freed with pango_glyph_item_iter_free(), or %NULL
* if @orig was %NULL.
*
* Since: 1.22
*/
public PgGlyphItemIter copy()
{
auto p = pango_glyph_item_iter_copy(pangoGlyphItemIter);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(PgGlyphItemIter)(cast(PangoGlyphItemIter*) p, true);
}
/**
* Frees a #PangoGlyphItemIter created by pango_glyph_item_iter_copy().
*
* Since: 1.22
*/
public void free()
{
pango_glyph_item_iter_free(pangoGlyphItemIter);
ownedRef = false;
}
/**
* Initializes a #PangoGlyphItemIter structure to point to the
* last cluster in a glyph item.
* See #PangoGlyphItemIter for details of cluster orders.
*
* Params:
* glyphItem = the glyph item to iterate over
* text = text corresponding to the glyph item
*
* Returns: %FALSE if there are no clusters in the glyph item
*
* Since: 1.22
*/
public bool initEnd(PgGlyphItem glyphItem, string text)
{
return pango_glyph_item_iter_init_end(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text)) != 0;
}
/**
* Initializes a #PangoGlyphItemIter structure to point to the
* first cluster in a glyph item.
* See #PangoGlyphItemIter for details of cluster orders.
*
* Params:
* glyphItem = the glyph item to iterate over
* text = text corresponding to the glyph item
*
* Returns: %FALSE if there are no clusters in the glyph item
*
* Since: 1.22
*/
public bool initStart(PgGlyphItem glyphItem, string text)
{
return pango_glyph_item_iter_init_start(pangoGlyphItemIter, (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), Str.toStringz(text)) != 0;
}
/**
* Advances the iterator to the next cluster in the glyph item.
* See #PangoGlyphItemIter for details of cluster orders.
*
* Returns: %TRUE if the iterator was advanced, %FALSE if we were already on the
* last cluster.
*
* Since: 1.22
*/
public bool nextCluster()
{
return pango_glyph_item_iter_next_cluster(pangoGlyphItemIter) != 0;
}
/**
* Moves the iterator to the preceding cluster in the glyph item.
* See #PangoGlyphItemIter for details of cluster orders.
*
* Returns: %TRUE if the iterator was moved, %FALSE if we were already on the
* first cluster.
*
* Since: 1.22
*/
public bool prevCluster()
{
return pango_glyph_item_iter_prev_cluster(pangoGlyphItemIter) != 0;
}
}
|