This file is indexed.

/usr/include/d/gtkd-3/pango/PgLayoutIter.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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
/*
 * 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.PgLayoutIter;

private import gobject.ObjectG;
public  import gtkc.pangotypes;
private import gtkd.Loader;
private import pango.PgLayout;
private import pango.PgLayoutLine;
private import pango.c.functions;
public  import pango.c.types;


/**
 * A #PangoLayoutIter structure can be used to
 * iterate over the visual extents of a #PangoLayout.
 * 
 * The #PangoLayoutIter structure is opaque, and
 * has no user-visible fields.
 */
public class PgLayoutIter
{
	/** the main Gtk struct */
	protected PangoLayoutIter* pangoLayoutIter;
	protected bool ownedRef;

	/** Get the main Gtk struct */
	public PangoLayoutIter* getPgLayoutIterStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return pangoLayoutIter;
	}

	/** the main Gtk struct as a void* */
	protected void* getStruct()
	{
		return cast(void*)pangoLayoutIter;
	}

	/**
	 * Sets our main struct and passes it to the parent class.
	 */
	public this (PangoLayoutIter* pangoLayoutIter, bool ownedRef = false)
	{
		this.pangoLayoutIter = pangoLayoutIter;
		this.ownedRef = ownedRef;
	}

	~this ()
	{
		if ( Linker.isLoaded(LIBRARY_PANGO) && ownedRef )
			pango_layout_iter_free(pangoLayoutIter);
	}


	/** */
	public static GType getType()
	{
		return pango_layout_iter_get_type();
	}

	/**
	 * Determines whether @iter is on the last line of the layout.
	 *
	 * Returns: %TRUE if @iter is on the last line.
	 */
	public bool atLastLine()
	{
		return pango_layout_iter_at_last_line(pangoLayoutIter) != 0;
	}

	/**
	 * Copies a #PangoLayoutIter.
	 *
	 * Returns: the newly allocated #PangoLayoutIter,
	 *     which should be freed with pango_layout_iter_free(),
	 *     or %NULL if @iter was %NULL.
	 *
	 * Since: 1.20
	 */
	public PgLayoutIter copy()
	{
		auto p = pango_layout_iter_copy(pangoLayoutIter);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgLayoutIter)(cast(PangoLayoutIter*) p, true);
	}

	/**
	 * Frees an iterator that's no longer in use.
	 */
	public void free()
	{
		pango_layout_iter_free(pangoLayoutIter);
		ownedRef = false;
	}

	/**
	 * Gets the Y position of the current line's baseline, in layout
	 * coordinates (origin at top left of the entire layout).
	 *
	 * Returns: baseline of current line.
	 */
	public int getBaseline()
	{
		return pango_layout_iter_get_baseline(pangoLayoutIter);
	}

	/**
	 * Gets the extents of the current character, in layout coordinates
	 * (origin is the top left of the entire layout). Only logical extents
	 * can sensibly be obtained for characters; ink extents make sense only
	 * down to the level of clusters.
	 *
	 * Params:
	 *     logicalRect = rectangle to fill with
	 *         logical extents
	 */
	public void getCharExtents(out PangoRectangle logicalRect)
	{
		pango_layout_iter_get_char_extents(pangoLayoutIter, &logicalRect);
	}

	/**
	 * Gets the extents of the current cluster, in layout coordinates
	 * (origin is the top left of the entire layout).
	 *
	 * Params:
	 *     inkRect = rectangle to fill with ink extents, or %NULL
	 *     logicalRect = rectangle to fill with logical extents, or %NULL
	 */
	public void getClusterExtents(out PangoRectangle inkRect, out PangoRectangle logicalRect)
	{
		pango_layout_iter_get_cluster_extents(pangoLayoutIter, &inkRect, &logicalRect);
	}

	/**
	 * Gets the current byte index. Note that iterating forward by char
	 * moves in visual order, not logical order, so indexes may not be
	 * sequential. Also, the index may be equal to the length of the text
	 * in the layout, if on the %NULL run (see pango_layout_iter_get_run()).
	 *
	 * Returns: current byte index.
	 */
	public int getIndex()
	{
		return pango_layout_iter_get_index(pangoLayoutIter);
	}

	/**
	 * Gets the layout associated with a #PangoLayoutIter.
	 *
	 * Returns: the layout associated with @iter.
	 *
	 * Since: 1.20
	 */
	public PgLayout getLayout()
	{
		auto p = pango_layout_iter_get_layout(pangoLayoutIter);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgLayout)(cast(PangoLayout*) p);
	}

	/**
	 * Obtains the extents of the #PangoLayout being iterated
	 * over. @ink_rect or @logical_rect can be %NULL if you
	 * aren't interested in them.
	 *
	 * Params:
	 *     inkRect = rectangle to fill with ink extents,
	 *         or %NULL
	 *     logicalRect = rectangle to fill with logical
	 *         extents, or %NULL
	 */
	public void getLayoutExtents(out PangoRectangle inkRect, out PangoRectangle logicalRect)
	{
		pango_layout_iter_get_layout_extents(pangoLayoutIter, &inkRect, &logicalRect);
	}

	/**
	 * Gets the current line.
	 *
	 * Use the faster pango_layout_iter_get_line_readonly() if you do not plan
	 * to modify the contents of the line (glyphs, glyph widths, etc.).
	 *
	 * Returns: the current line.
	 */
	public PgLayoutLine getLine()
	{
		auto p = pango_layout_iter_get_line(pangoLayoutIter);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgLayoutLine)(cast(PangoLayoutLine*) p, true);
	}

	/**
	 * Obtains the extents of the current line. @ink_rect or @logical_rect
	 * can be %NULL if you aren't interested in them. Extents are in layout
	 * coordinates (origin is the top-left corner of the entire
	 * #PangoLayout).  Thus the extents returned by this function will be
	 * the same width/height but not at the same x/y as the extents
	 * returned from pango_layout_line_get_extents().
	 *
	 * Params:
	 *     inkRect = rectangle to fill with ink extents, or %NULL
	 *     logicalRect = rectangle to fill with logical extents, or %NULL
	 */
	public void getLineExtents(out PangoRectangle inkRect, out PangoRectangle logicalRect)
	{
		pango_layout_iter_get_line_extents(pangoLayoutIter, &inkRect, &logicalRect);
	}

	/**
	 * Gets the current line for read-only access.
	 *
	 * This is a faster alternative to pango_layout_iter_get_line(),
	 * but the user is not expected
	 * to modify the contents of the line (glyphs, glyph widths, etc.).
	 *
	 * Returns: the current line, that should not be
	 *     modified.
	 *
	 * Since: 1.16
	 */
	public PgLayoutLine getLineReadonly()
	{
		auto p = pango_layout_iter_get_line_readonly(pangoLayoutIter);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgLayoutLine)(cast(PangoLayoutLine*) p);
	}

	/**
	 * Divides the vertical space in the #PangoLayout being iterated over
	 * between the lines in the layout, and returns the space belonging to
	 * the current line.  A line's range includes the line's logical
	 * extents, plus half of the spacing above and below the line, if
	 * pango_layout_set_spacing() has been called to set layout spacing.
	 * The Y positions are in layout coordinates (origin at top left of the
	 * entire layout).
	 *
	 * Params:
	 *     y0 = start of line, or %NULL
	 *     y1 = end of line, or %NULL
	 */
	public void getLineYrange(out int y0, out int y1)
	{
		pango_layout_iter_get_line_yrange(pangoLayoutIter, &y0, &y1);
	}

	/**
	 * Gets the current run. When iterating by run, at the end of each
	 * line, there's a position with a %NULL run, so this function can return
	 * %NULL. The %NULL run at the end of each line ensures that all lines have
	 * at least one run, even lines consisting of only a newline.
	 *
	 * Use the faster pango_layout_iter_get_run_readonly() if you do not plan
	 * to modify the contents of the run (glyphs, glyph widths, etc.).
	 *
	 * Returns: the current run.
	 */
	public PangoLayoutRun* getRun()
	{
		return pango_layout_iter_get_run(pangoLayoutIter);
	}

	/**
	 * Gets the extents of the current run in layout coordinates
	 * (origin is the top left of the entire layout).
	 *
	 * Params:
	 *     inkRect = rectangle to fill with ink extents, or %NULL
	 *     logicalRect = rectangle to fill with logical extents, or %NULL
	 */
	public void getRunExtents(out PangoRectangle inkRect, out PangoRectangle logicalRect)
	{
		pango_layout_iter_get_run_extents(pangoLayoutIter, &inkRect, &logicalRect);
	}

	/**
	 * Gets the current run. When iterating by run, at the end of each
	 * line, there's a position with a %NULL run, so this function can return
	 * %NULL. The %NULL run at the end of each line ensures that all lines have
	 * at least one run, even lines consisting of only a newline.
	 *
	 * This is a faster alternative to pango_layout_iter_get_run(),
	 * but the user is not expected
	 * to modify the contents of the run (glyphs, glyph widths, etc.).
	 *
	 * Returns: the current run, that
	 *     should not be modified.
	 *
	 * Since: 1.16
	 */
	public PangoLayoutRun* getRunReadonly()
	{
		return pango_layout_iter_get_run_readonly(pangoLayoutIter);
	}

	/**
	 * Moves @iter forward to the next character in visual order. If @iter was already at
	 * the end of the layout, returns %FALSE.
	 *
	 * Returns: whether motion was possible.
	 */
	public bool nextChar()
	{
		return pango_layout_iter_next_char(pangoLayoutIter) != 0;
	}

	/**
	 * Moves @iter forward to the next cluster in visual order. If @iter
	 * was already at the end of the layout, returns %FALSE.
	 *
	 * Returns: whether motion was possible.
	 */
	public bool nextCluster()
	{
		return pango_layout_iter_next_cluster(pangoLayoutIter) != 0;
	}

	/**
	 * Moves @iter forward to the start of the next line. If @iter is
	 * already on the last line, returns %FALSE.
	 *
	 * Returns: whether motion was possible.
	 */
	public bool nextLine()
	{
		return pango_layout_iter_next_line(pangoLayoutIter) != 0;
	}

	/**
	 * Moves @iter forward to the next run in visual order. If @iter was
	 * already at the end of the layout, returns %FALSE.
	 *
	 * Returns: whether motion was possible.
	 */
	public bool nextRun()
	{
		return pango_layout_iter_next_run(pangoLayoutIter) != 0;
	}
}