This file is indexed.

/usr/include/d/gtkd-3/pango/PgRenderer.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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
/*
 * 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.PgRenderer;

private import glib.Str;
private import gobject.ObjectG;
public  import gtkc.pangotypes;
private import pango.PgColor;
private import pango.PgFont;
private import pango.PgGlyphItem;
private import pango.PgGlyphString;
private import pango.PgLayout;
private import pango.PgLayoutLine;
private import pango.PgMatrix;
private import pango.c.functions;
public  import pango.c.types;


/**
 * #PangoRenderer is a base class for objects that are used to
 * render Pango objects such as #PangoGlyphString and
 * #PangoLayout.
 *
 * Since: 1.8
 */
public class PgRenderer : ObjectG
{
	/** the main Gtk struct */
	protected PangoRenderer* pangoRenderer;

	/** Get the main Gtk struct */
	public PangoRenderer* getPgRendererStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return pangoRenderer;
	}

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

	protected override void setStruct(GObject* obj)
	{
		pangoRenderer = cast(PangoRenderer*)obj;
		super.setStruct(obj);
	}

	/**
	 * Sets our main struct and passes it to the parent class.
	 */
	public this (PangoRenderer* pangoRenderer, bool ownedRef = false)
	{
		this.pangoRenderer = pangoRenderer;
		super(cast(GObject*)pangoRenderer, ownedRef);
	}


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

	/**
	 * Does initial setup before rendering operations on @renderer.
	 * pango_renderer_deactivate() should be called when done drawing.
	 * Calls such as pango_renderer_draw_layout() automatically
	 * activate the layout before drawing on it. Calls to
	 * pango_renderer_activate() and pango_renderer_deactivate() can
	 * be nested and the renderer will only be initialized and
	 * deinitialized once.
	 *
	 * Since: 1.8
	 */
	public void activate()
	{
		pango_renderer_activate(pangoRenderer);
	}

	/**
	 * Cleans up after rendering operations on @renderer. See
	 * docs for pango_renderer_activate().
	 *
	 * Since: 1.8
	 */
	public void deactivate()
	{
		pango_renderer_deactivate(pangoRenderer);
	}

	/**
	 * Draw a squiggly line that approximately covers the given rectangle
	 * in the style of an underline used to indicate a spelling error.
	 * (The width of the underline is rounded to an integer number
	 * of up/down segments and the resulting rectangle is centered
	 * in the original rectangle)
	 *
	 * This should be called while @renderer is already active.  Use
	 * pango_renderer_activate() to activate a renderer.
	 *
	 * Params:
	 *     x = X coordinate of underline, in Pango units in user coordinate system
	 *     y = Y coordinate of underline, in Pango units in user coordinate system
	 *     width = width of underline, in Pango units in user coordinate system
	 *     height = height of underline, in Pango units in user coordinate system
	 *
	 * Since: 1.8
	 */
	public void drawErrorUnderline(int x, int y, int width, int height)
	{
		pango_renderer_draw_error_underline(pangoRenderer, x, y, width, height);
	}

	/**
	 * Draws a single glyph with coordinates in device space.
	 *
	 * Params:
	 *     font = a #PangoFont
	 *     glyph = the glyph index of a single glyph
	 *     x = X coordinate of left edge of baseline of glyph
	 *     y = Y coordinate of left edge of baseline of glyph
	 *
	 * Since: 1.8
	 */
	public void drawGlyph(PgFont font, PangoGlyph glyph, double x, double y)
	{
		pango_renderer_draw_glyph(pangoRenderer, (font is null) ? null : font.getPgFontStruct(), glyph, x, y);
	}

	/**
	 * Draws the glyphs in @glyph_item with the specified #PangoRenderer,
	 * embedding the text associated with the glyphs in the output if the
	 * output format supports it (PDF for example).
	 *
	 * Note that @text is the start of the text for layout, which is then
	 * indexed by <literal>@glyph_item->item->offset</literal>.
	 *
	 * If @text is %NULL, this simply calls pango_renderer_draw_glyphs().
	 *
	 * The default implementation of this method simply falls back to
	 * pango_renderer_draw_glyphs().
	 *
	 * Params:
	 *     text = the UTF-8 text that @glyph_item refers to, or %NULL
	 *     glyphItem = a #PangoGlyphItem
	 *     x = X position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *     y = Y position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *
	 * Since: 1.22
	 */
	public void drawGlyphItem(string text, PgGlyphItem glyphItem, int x, int y)
	{
		pango_renderer_draw_glyph_item(pangoRenderer, Str.toStringz(text), (glyphItem is null) ? null : glyphItem.getPgGlyphItemStruct(), x, y);
	}

	/**
	 * Draws the glyphs in @glyphs with the specified #PangoRenderer.
	 *
	 * Params:
	 *     font = a #PangoFont
	 *     glyphs = a #PangoGlyphString
	 *     x = X position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *     y = Y position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *
	 * Since: 1.8
	 */
	public void drawGlyphs(PgFont font, PgGlyphString glyphs, int x, int y)
	{
		pango_renderer_draw_glyphs(pangoRenderer, (font is null) ? null : font.getPgFontStruct(), (glyphs is null) ? null : glyphs.getPgGlyphStringStruct(), x, y);
	}

	/**
	 * Draws @layout with the specified #PangoRenderer.
	 *
	 * Params:
	 *     layout = a #PangoLayout
	 *     x = X position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *     y = Y position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *
	 * Since: 1.8
	 */
	public void drawLayout(PgLayout layout, int x, int y)
	{
		pango_renderer_draw_layout(pangoRenderer, (layout is null) ? null : layout.getPgLayoutStruct(), x, y);
	}

	/**
	 * Draws @line with the specified #PangoRenderer.
	 *
	 * Params:
	 *     line = a #PangoLayoutLine
	 *     x = X position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *     y = Y position of left edge of baseline, in user space coordinates
	 *         in Pango units.
	 *
	 * Since: 1.8
	 */
	public void drawLayoutLine(PgLayoutLine line, int x, int y)
	{
		pango_renderer_draw_layout_line(pangoRenderer, (line is null) ? null : line.getPgLayoutLineStruct(), x, y);
	}

	/**
	 * Draws an axis-aligned rectangle in user space coordinates with the
	 * specified #PangoRenderer.
	 *
	 * This should be called while @renderer is already active.  Use
	 * pango_renderer_activate() to activate a renderer.
	 *
	 * Params:
	 *     part = type of object this rectangle is part of
	 *     x = X position at which to draw rectangle, in user space coordinates in Pango units
	 *     y = Y position at which to draw rectangle, in user space coordinates in Pango units
	 *     width = width of rectangle in Pango units in user space coordinates
	 *     height = height of rectangle in Pango units in user space coordinates
	 *
	 * Since: 1.8
	 */
	public void drawRectangle(PangoRenderPart part, int x, int y, int width, int height)
	{
		pango_renderer_draw_rectangle(pangoRenderer, part, x, y, width, height);
	}

	/**
	 * Draws a trapezoid with the parallel sides aligned with the X axis
	 * using the given #PangoRenderer; coordinates are in device space.
	 *
	 * Params:
	 *     part = type of object this trapezoid is part of
	 *     y1 = Y coordinate of top of trapezoid
	 *     x11 = X coordinate of left end of top of trapezoid
	 *     x21 = X coordinate of right end of top of trapezoid
	 *     y2 = Y coordinate of bottom of trapezoid
	 *     x12 = X coordinate of left end of bottom of trapezoid
	 *     x22 = X coordinate of right end of bottom of trapezoid
	 *
	 * Since: 1.8
	 */
	public void drawTrapezoid(PangoRenderPart part, double y1, double x11, double x21, double y2, double x12, double x22)
	{
		pango_renderer_draw_trapezoid(pangoRenderer, part, y1, x11, x21, y2, x12, x22);
	}

	/**
	 * Gets the current alpha for the specified part.
	 *
	 * Params:
	 *     part = the part to get the alpha for
	 *
	 * Returns: the alpha for the specified part,
	 *     or 0 if it hasn't been set and should be
	 *     inherited from the environment.
	 *
	 * Since: 1.38
	 */
	public ushort getAlpha(PangoRenderPart part)
	{
		return pango_renderer_get_alpha(pangoRenderer, part);
	}

	/**
	 * Gets the current rendering color for the specified part.
	 *
	 * Params:
	 *     part = the part to get the color for
	 *
	 * Returns: the color for the
	 *     specified part, or %NULL if it hasn't been set and should be
	 *     inherited from the environment.
	 *
	 * Since: 1.8
	 */
	public PgColor getColor(PangoRenderPart part)
	{
		auto p = pango_renderer_get_color(pangoRenderer, part);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgColor)(cast(PangoColor*) p);
	}

	/**
	 * Gets the layout currently being rendered using @renderer.
	 * Calling this function only makes sense from inside a subclass's
	 * methods, like in its draw_shape<!---->() for example.
	 *
	 * The returned layout should not be modified while still being
	 * rendered.
	 *
	 * Returns: the layout, or %NULL if
	 *     no layout is being rendered using @renderer at this time.
	 *
	 * Since: 1.20
	 */
	public PgLayout getLayout()
	{
		auto p = pango_renderer_get_layout(pangoRenderer);

		if(p is null)
		{
			return null;
		}

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

	/**
	 * Gets the layout line currently being rendered using @renderer.
	 * Calling this function only makes sense from inside a subclass's
	 * methods, like in its draw_shape<!---->() for example.
	 *
	 * The returned layout line should not be modified while still being
	 * rendered.
	 *
	 * Returns: the layout line, or %NULL
	 *     if no layout line is being rendered using @renderer at this time.
	 *
	 * Since: 1.20
	 */
	public PgLayoutLine getLayoutLine()
	{
		auto p = pango_renderer_get_layout_line(pangoRenderer);

		if(p is null)
		{
			return null;
		}

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

	/**
	 * Gets the transformation matrix that will be applied when
	 * rendering. See pango_renderer_set_matrix().
	 *
	 * Returns: the matrix, or %NULL if no matrix has
	 *     been set (which is the same as the identity matrix). The returned
	 *     matrix is owned by Pango and must not be modified or freed.
	 *
	 * Since: 1.8
	 */
	public PgMatrix getMatrix()
	{
		auto p = pango_renderer_get_matrix(pangoRenderer);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(PgMatrix)(cast(PangoMatrix*) p);
	}

	/**
	 * Informs Pango that the way that the rendering is done
	 * for @part has changed in a way that would prevent multiple
	 * pieces being joined together into one drawing call. For
	 * instance, if a subclass of #PangoRenderer was to add a stipple
	 * option for drawing underlines, it needs to call
	 *
	 * <informalexample><programlisting>
	 * pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);
	 * </programlisting></informalexample>
	 *
	 * When the stipple changes or underlines with different stipples
	 * might be joined together. Pango automatically calls this for
	 * changes to colors. (See pango_renderer_set_color())
	 *
	 * Params:
	 *     part = the part for which rendering has changed.
	 *
	 * Since: 1.8
	 */
	public void partChanged(PangoRenderPart part)
	{
		pango_renderer_part_changed(pangoRenderer, part);
	}

	/**
	 * Sets the alpha for part of the rendering.
	 * Note that the alpha may only be used if a color is
	 * specified for @part as well.
	 *
	 * Params:
	 *     part = the part to set the alpha for
	 *     alpha = an alpha value between 1 and 65536, or 0 to unset the alpha
	 *
	 * Since: 1.38
	 */
	public void setAlpha(PangoRenderPart part, ushort alpha)
	{
		pango_renderer_set_alpha(pangoRenderer, part, alpha);
	}

	/**
	 * Sets the color for part of the rendering.
	 * Also see pango_renderer_set_alpha().
	 *
	 * Params:
	 *     part = the part to change the color of
	 *     color = the new color or %NULL to unset the current color
	 *
	 * Since: 1.8
	 */
	public void setColor(PangoRenderPart part, PgColor color)
	{
		pango_renderer_set_color(pangoRenderer, part, (color is null) ? null : color.getPgColorStruct());
	}

	/**
	 * Sets the transformation matrix that will be applied when rendering.
	 *
	 * Params:
	 *     matrix = a #PangoMatrix, or %NULL to unset any existing matrix.
	 *         (No matrix set is the same as setting the identity matrix.)
	 *
	 * Since: 1.8
	 */
	public void setMatrix(PgMatrix matrix)
	{
		pango_renderer_set_matrix(pangoRenderer, (matrix is null) ? null : matrix.getPgMatrixStruct());
	}
}