This file is indexed.

/usr/include/d/gtkd-3/gtk/Stack.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
459
460
461
/*
 * 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.Stack;

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


/**
 * The GtkStack widget is a container which only shows
 * one of its children at a time. In contrast to GtkNotebook,
 * GtkStack does not provide a means for users to change the
 * visible child. Instead, the #GtkStackSwitcher widget can be
 * used with GtkStack to provide this functionality.
 * 
 * Transitions between pages can be animated as slides or
 * fades. This can be controlled with gtk_stack_set_transition_type().
 * These animations respect the #GtkSettings:gtk-enable-animations
 * setting.
 * 
 * The GtkStack widget was added in GTK+ 3.10.
 * 
 * # CSS nodes
 * 
 * GtkStack has a single CSS node named stack.
 */
public class Stack : Container
{
	/** the main Gtk struct */
	protected GtkStack* gtkStack;

	/** Get the main Gtk struct */
	public GtkStack* getStackStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gtkStack;
	}

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

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

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


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

	/**
	 * Creates a new #GtkStack container.
	 *
	 * Returns: a new #GtkStack
	 *
	 * Since: 3.10
	 *
	 * Throws: ConstructionException GTK+ fails to create the object.
	 */
	public this()
	{
		auto p = gtk_stack_new();

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

		this(cast(GtkStack*) p);
	}

	/**
	 * Adds a child to @stack.
	 * The child is identified by the @name.
	 *
	 * Params:
	 *     child = the widget to add
	 *     name = the name for @child
	 *
	 * Since: 3.10
	 */
	public void addNamed(Widget child, string name)
	{
		gtk_stack_add_named(gtkStack, (child is null) ? null : child.getWidgetStruct(), Str.toStringz(name));
	}

	/**
	 * Adds a child to @stack.
	 * The child is identified by the @name. The @title
	 * will be used by #GtkStackSwitcher to represent
	 * @child in a tab bar, so it should be short.
	 *
	 * Params:
	 *     child = the widget to add
	 *     name = the name for @child
	 *     title = a human-readable title for @child
	 *
	 * Since: 3.10
	 */
	public void addTitled(Widget child, string name, string title)
	{
		gtk_stack_add_titled(gtkStack, (child is null) ? null : child.getWidgetStruct(), Str.toStringz(name), Str.toStringz(title));
	}

	/**
	 * Finds the child of the #GtkStack with the name given as
	 * the argument. Returns %NULL if there is no child with this
	 * name.
	 *
	 * Params:
	 *     name = the name of the child to find
	 *
	 * Returns: the requested child of the #GtkStack
	 *
	 * Since: 3.12
	 */
	public Widget getChildByName(string name)
	{
		auto p = gtk_stack_get_child_by_name(gtkStack, Str.toStringz(name));

		if(p is null)
		{
			return null;
		}

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

	/**
	 * Gets whether @stack is horizontally homogeneous.
	 * See gtk_stack_set_hhomogeneous().
	 *
	 * Returns: whether @stack is horizontally homogeneous.
	 *
	 * Since: 3.16
	 */
	public bool getHhomogeneous()
	{
		return gtk_stack_get_hhomogeneous(gtkStack) != 0;
	}

	/**
	 * Gets whether @stack is homogeneous.
	 * See gtk_stack_set_homogeneous().
	 *
	 * Returns: whether @stack is homogeneous.
	 *
	 * Since: 3.10
	 */
	public bool getHomogeneous()
	{
		return gtk_stack_get_homogeneous(gtkStack) != 0;
	}

	/**
	 * Returns wether the #GtkStack is set up to interpolate between
	 * the sizes of children on page switch.
	 *
	 * Returns: %TRUE if child sizes are interpolated
	 *
	 * Since: 3.18
	 */
	public bool getInterpolateSize()
	{
		return gtk_stack_get_interpolate_size(gtkStack) != 0;
	}

	/**
	 * Returns the amount of time (in milliseconds) that
	 * transitions between pages in @stack will take.
	 *
	 * Returns: the transition duration
	 *
	 * Since: 3.10
	 */
	public uint getTransitionDuration()
	{
		return gtk_stack_get_transition_duration(gtkStack);
	}

	/**
	 * Returns whether the @stack is currently in a transition from one page to
	 * another.
	 *
	 * Returns: %TRUE if the transition is currently running, %FALSE otherwise.
	 *
	 * Since: 3.12
	 */
	public bool getTransitionRunning()
	{
		return gtk_stack_get_transition_running(gtkStack) != 0;
	}

	/**
	 * Gets the type of animation that will be used
	 * for transitions between pages in @stack.
	 *
	 * Returns: the current transition type of @stack
	 *
	 * Since: 3.10
	 */
	public GtkStackTransitionType getTransitionType()
	{
		return gtk_stack_get_transition_type(gtkStack);
	}

	/**
	 * Gets whether @stack is vertically homogeneous.
	 * See gtk_stack_set_vhomogeneous().
	 *
	 * Returns: whether @stack is vertically homogeneous.
	 *
	 * Since: 3.16
	 */
	public bool getVhomogeneous()
	{
		return gtk_stack_get_vhomogeneous(gtkStack) != 0;
	}

	/**
	 * Gets the currently visible child of @stack, or %NULL if
	 * there are no visible children.
	 *
	 * Returns: the visible child of the #GtkStack
	 *
	 * Since: 3.10
	 */
	public Widget getVisibleChild()
	{
		auto p = gtk_stack_get_visible_child(gtkStack);

		if(p is null)
		{
			return null;
		}

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

	/**
	 * Returns the name of the currently visible child of @stack, or
	 * %NULL if there is no visible child.
	 *
	 * Returns: the name of the visible child of the #GtkStack
	 *
	 * Since: 3.10
	 */
	public string getVisibleChildName()
	{
		return Str.toString(gtk_stack_get_visible_child_name(gtkStack));
	}

	/**
	 * Sets the #GtkStack to be horizontally homogeneous or not.
	 * If it is homogeneous, the #GtkStack will request the same
	 * width for all its children. If it isn't, the stack
	 * may change width when a different child becomes visible.
	 *
	 * Params:
	 *     hhomogeneous = %TRUE to make @stack horizontally homogeneous
	 *
	 * Since: 3.16
	 */
	public void setHhomogeneous(bool hhomogeneous)
	{
		gtk_stack_set_hhomogeneous(gtkStack, hhomogeneous);
	}

	/**
	 * Sets the #GtkStack to be homogeneous or not. If it
	 * is homogeneous, the #GtkStack will request the same
	 * size for all its children. If it isn't, the stack
	 * may change size when a different child becomes visible.
	 *
	 * Since 3.16, homogeneity can be controlled separately
	 * for horizontal and vertical size, with the
	 * #GtkStack:hhomogeneous and #GtkStack:vhomogeneous.
	 *
	 * Params:
	 *     homogeneous = %TRUE to make @stack homogeneous
	 *
	 * Since: 3.10
	 */
	public void setHomogeneous(bool homogeneous)
	{
		gtk_stack_set_homogeneous(gtkStack, homogeneous);
	}

	/**
	 * Sets whether or not @stack will interpolate its size when
	 * changing the visible child. If the #GtkStack:interpolate-size
	 * property is set to %TRUE, @stack will interpolate its size between
	 * the current one and the one it'll take after changing the
	 * visible child, according to the set transition duration.
	 *
	 * Params:
	 *     interpolateSize = the new value
	 *
	 * Since: 3.18
	 */
	public void setInterpolateSize(bool interpolateSize)
	{
		gtk_stack_set_interpolate_size(gtkStack, interpolateSize);
	}

	/**
	 * Sets the duration that transitions between pages in @stack
	 * will take.
	 *
	 * Params:
	 *     duration = the new duration, in milliseconds
	 *
	 * Since: 3.10
	 */
	public void setTransitionDuration(uint duration)
	{
		gtk_stack_set_transition_duration(gtkStack, duration);
	}

	/**
	 * Sets the type of animation that will be used for
	 * transitions between pages in @stack. Available
	 * types include various kinds of fades and slides.
	 *
	 * The transition type can be changed without problems
	 * at runtime, so it is possible to change the animation
	 * based on the page that is about to become current.
	 *
	 * Params:
	 *     transition = the new transition type
	 *
	 * Since: 3.10
	 */
	public void setTransitionType(GtkStackTransitionType transition)
	{
		gtk_stack_set_transition_type(gtkStack, transition);
	}

	/**
	 * Sets the #GtkStack to be vertically homogeneous or not.
	 * If it is homogeneous, the #GtkStack will request the same
	 * height for all its children. If it isn't, the stack
	 * may change height when a different child becomes visible.
	 *
	 * Params:
	 *     vhomogeneous = %TRUE to make @stack vertically homogeneous
	 *
	 * Since: 3.16
	 */
	public void setVhomogeneous(bool vhomogeneous)
	{
		gtk_stack_set_vhomogeneous(gtkStack, vhomogeneous);
	}

	/**
	 * Makes @child the visible child of @stack.
	 *
	 * If @child is different from the currently
	 * visible child, the transition between the
	 * two will be animated with the current
	 * transition type of @stack.
	 *
	 * Note that the @child widget has to be visible itself
	 * (see gtk_widget_show()) in order to become the visible
	 * child of @stack.
	 *
	 * Params:
	 *     child = a child of @stack
	 *
	 * Since: 3.10
	 */
	public void setVisibleChild(Widget child)
	{
		gtk_stack_set_visible_child(gtkStack, (child is null) ? null : child.getWidgetStruct());
	}

	/**
	 * Makes the child with the given name visible.
	 *
	 * Note that the child widget has to be visible itself
	 * (see gtk_widget_show()) in order to become the visible
	 * child of @stack.
	 *
	 * Params:
	 *     name = the name of the child to make visible
	 *     transition = the transition type to use
	 *
	 * Since: 3.10
	 */
	public void setVisibleChildFull(string name, GtkStackTransitionType transition)
	{
		gtk_stack_set_visible_child_full(gtkStack, Str.toStringz(name), transition);
	}

	/**
	 * Makes the child with the given name visible.
	 *
	 * If @child is different from the currently
	 * visible child, the transition between the
	 * two will be animated with the current
	 * transition type of @stack.
	 *
	 * Note that the child widget has to be visible itself
	 * (see gtk_widget_show()) in order to become the visible
	 * child of @stack.
	 *
	 * Params:
	 *     name = the name of the child to make visible
	 *
	 * Since: 3.10
	 */
	public void setVisibleChildName(string name)
	{
		gtk_stack_set_visible_child_name(gtkStack, Str.toStringz(name));
	}
}