This file is indexed.

/usr/include/d/gtkd-3/gtk/Grid.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
/*
 * 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 gtk.Grid;

private import glib.ConstructionException;
private import gobject.ObjectG;
private import gtk.Container;
private import gtk.OrientableIF;
private import gtk.OrientableT;
private import gtk.Widget;
private import gtk.c.functions;
public  import gtk.c.types;
public  import gtkc.gtktypes;


/**
 * GtkGrid is a container which arranges its child widgets in
 * rows and columns. It is a very similar to #GtkTable and #GtkBox,
 * but it consistently uses #GtkWidget’s #GtkWidget:margin and #GtkWidget:expand
 * properties instead of custom child properties, and it fully supports
 * [height-for-width geometry management][geometry-management].
 * 
 * Children are added using gtk_grid_attach(). They can span multiple
 * rows or columns. It is also possible to add a child next to an
 * existing child, using gtk_grid_attach_next_to(). The behaviour of
 * GtkGrid when several children occupy the same grid cell is undefined.
 * 
 * GtkGrid can be used like a #GtkBox by just using gtk_container_add(),
 * which will place children next to each other in the direction determined
 * by the #GtkOrientable:orientation property.
 * 
 * # CSS nodes
 * 
 * GtkGrid uses a single CSS node with name grid.
 */
public class Grid : Container, OrientableIF
{
	/** the main Gtk struct */
	protected GtkGrid* gtkGrid;

	/** Get the main Gtk struct */
	public GtkGrid* getGridStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gtkGrid;
	}

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

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

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

	// add the Orientable capabilities
	mixin OrientableT!(GtkGrid);


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

	/**
	 * Creates a new grid widget.
	 *
	 * Returns: the new #GtkGrid
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this()
	{
		auto p = gtk_grid_new();

		if(p is null)
		{
			throw new ConstructionException("null returned by new");
		}

		this(cast(GtkGrid*) p);
	}

	/**
	 * Adds a widget to the grid.
	 *
	 * The position of @child is determined by @left and @top. The
	 * number of “cells” that @child will occupy is determined by
	 * @width and @height.
	 *
	 * Params:
	 *     child = the widget to add
	 *     left = the column number to attach the left side of @child to
	 *     top = the row number to attach the top side of @child to
	 *     width = the number of columns that @child will span
	 *     height = the number of rows that @child will span
	 */
	public void attach(Widget child, int left, int top, int width, int height)
	{
		gtk_grid_attach(gtkGrid, (child is null) ? null : child.getWidgetStruct(), left, top, width, height);
	}

	/**
	 * Adds a widget to the grid.
	 *
	 * The widget is placed next to @sibling, on the side determined by
	 * @side. When @sibling is %NULL, the widget is placed in row (for
	 * left or right placement) or column 0 (for top or bottom placement),
	 * at the end indicated by @side.
	 *
	 * Attaching widgets labeled [1], [2], [3] with @sibling == %NULL and
	 * @side == %GTK_POS_LEFT yields a layout of [3][2][1].
	 *
	 * Params:
	 *     child = the widget to add
	 *     sibling = the child of @grid that @child will be placed
	 *         next to, or %NULL to place @child at the beginning or end
	 *     side = the side of @sibling that @child is positioned next to
	 *     width = the number of columns that @child will span
	 *     height = the number of rows that @child will span
	 */
	public void attachNextTo(Widget child, Widget sibling, GtkPositionType side, int width, int height)
	{
		gtk_grid_attach_next_to(gtkGrid, (child is null) ? null : child.getWidgetStruct(), (sibling is null) ? null : sibling.getWidgetStruct(), side, width, height);
	}

	/**
	 * Returns which row defines the global baseline of @grid.
	 *
	 * Returns: the row index defining the global baseline
	 *
	 * Since: 3.10
	 */
	public int getBaselineRow()
	{
		return gtk_grid_get_baseline_row(gtkGrid);
	}

	/**
	 * Gets the child of @grid whose area covers the grid
	 * cell whose upper left corner is at @left, @top.
	 *
	 * Params:
	 *     left = the left edge of the cell
	 *     top = the top edge of the cell
	 *
	 * Returns: the child at the given position, or %NULL
	 *
	 * Since: 3.2
	 */
	public Widget getChildAt(int left, int top)
	{
		auto p = gtk_grid_get_child_at(gtkGrid, left, top);

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
	}

	/**
	 * Returns whether all columns of @grid have the same width.
	 *
	 * Returns: whether all columns of @grid have the same width.
	 */
	public bool getColumnHomogeneous()
	{
		return gtk_grid_get_column_homogeneous(gtkGrid) != 0;
	}

	/**
	 * Returns the amount of space between the columns of @grid.
	 *
	 * Returns: the column spacing of @grid
	 */
	public uint getColumnSpacing()
	{
		return gtk_grid_get_column_spacing(gtkGrid);
	}

	/**
	 * Returns the baseline position of @row as set
	 * by gtk_grid_set_row_baseline_position() or the default value
	 * %GTK_BASELINE_POSITION_CENTER.
	 *
	 * Params:
	 *     row = a row index
	 *
	 * Returns: the baseline position of @row
	 *
	 * Since: 3.10
	 */
	public GtkBaselinePosition getRowBaselinePosition(int row)
	{
		return gtk_grid_get_row_baseline_position(gtkGrid, row);
	}

	/**
	 * Returns whether all rows of @grid have the same height.
	 *
	 * Returns: whether all rows of @grid have the same height.
	 */
	public bool getRowHomogeneous()
	{
		return gtk_grid_get_row_homogeneous(gtkGrid) != 0;
	}

	/**
	 * Returns the amount of space between the rows of @grid.
	 *
	 * Returns: the row spacing of @grid
	 */
	public uint getRowSpacing()
	{
		return gtk_grid_get_row_spacing(gtkGrid);
	}

	/**
	 * Inserts a column at the specified position.
	 *
	 * Children which are attached at or to the right of this position
	 * are moved one column to the right. Children which span across this
	 * position are grown to span the new column.
	 *
	 * Params:
	 *     position = the position to insert the column at
	 *
	 * Since: 3.2
	 */
	public void insertColumn(int position)
	{
		gtk_grid_insert_column(gtkGrid, position);
	}

	/**
	 * Inserts a row or column at the specified position.
	 *
	 * The new row or column is placed next to @sibling, on the side
	 * determined by @side. If @side is %GTK_POS_TOP or %GTK_POS_BOTTOM,
	 * a row is inserted. If @side is %GTK_POS_LEFT of %GTK_POS_RIGHT,
	 * a column is inserted.
	 *
	 * Params:
	 *     sibling = the child of @grid that the new row or column will be
	 *         placed next to
	 *     side = the side of @sibling that @child is positioned next to
	 *
	 * Since: 3.2
	 */
	public void insertNextTo(Widget sibling, GtkPositionType side)
	{
		gtk_grid_insert_next_to(gtkGrid, (sibling is null) ? null : sibling.getWidgetStruct(), side);
	}

	/**
	 * Inserts a row at the specified position.
	 *
	 * Children which are attached at or below this position
	 * are moved one row down. Children which span across this
	 * position are grown to span the new row.
	 *
	 * Params:
	 *     position = the position to insert the row at
	 *
	 * Since: 3.2
	 */
	public void insertRow(int position)
	{
		gtk_grid_insert_row(gtkGrid, position);
	}

	/**
	 * Removes a column from the grid.
	 *
	 * Children that are placed in this column are removed,
	 * spanning children that overlap this column have their
	 * width reduced by one, and children after the column
	 * are moved to the left.
	 *
	 * Params:
	 *     position = the position of the column to remove
	 *
	 * Since: 3.10
	 */
	public void removeColumn(int position)
	{
		gtk_grid_remove_column(gtkGrid, position);
	}

	/**
	 * Removes a row from the grid.
	 *
	 * Children that are placed in this row are removed,
	 * spanning children that overlap this row have their
	 * height reduced by one, and children below the row
	 * are moved up.
	 *
	 * Params:
	 *     position = the position of the row to remove
	 *
	 * Since: 3.10
	 */
	public void removeRow(int position)
	{
		gtk_grid_remove_row(gtkGrid, position);
	}

	/**
	 * Sets which row defines the global baseline for the entire grid.
	 * Each row in the grid can have its own local baseline, but only
	 * one of those is global, meaning it will be the baseline in the
	 * parent of the @grid.
	 *
	 * Params:
	 *     row = the row index
	 *
	 * Since: 3.10
	 */
	public void setBaselineRow(int row)
	{
		gtk_grid_set_baseline_row(gtkGrid, row);
	}

	/**
	 * Sets whether all columns of @grid will have the same width.
	 *
	 * Params:
	 *     homogeneous = %TRUE to make columns homogeneous
	 */
	public void setColumnHomogeneous(bool homogeneous)
	{
		gtk_grid_set_column_homogeneous(gtkGrid, homogeneous);
	}

	/**
	 * Sets the amount of space between columns of @grid.
	 *
	 * Params:
	 *     spacing = the amount of space to insert between columns
	 */
	public void setColumnSpacing(uint spacing)
	{
		gtk_grid_set_column_spacing(gtkGrid, spacing);
	}

	/**
	 * Sets how the baseline should be positioned on @row of the
	 * grid, in case that row is assigned more space than is requested.
	 *
	 * Params:
	 *     row = a row index
	 *     pos = a #GtkBaselinePosition
	 *
	 * Since: 3.10
	 */
	public void setRowBaselinePosition(int row, GtkBaselinePosition pos)
	{
		gtk_grid_set_row_baseline_position(gtkGrid, row, pos);
	}

	/**
	 * Sets whether all rows of @grid will have the same height.
	 *
	 * Params:
	 *     homogeneous = %TRUE to make rows homogeneous
	 */
	public void setRowHomogeneous(bool homogeneous)
	{
		gtk_grid_set_row_homogeneous(gtkGrid, homogeneous);
	}

	/**
	 * Sets the amount of space between rows of @grid.
	 *
	 * Params:
	 *     spacing = the amount of space to insert between rows
	 */
	public void setRowSpacing(uint spacing)
	{
		gtk_grid_set_row_spacing(gtkGrid, spacing);
	}
}