This file is indexed.

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

private import glib.Bytes;
private import glib.Str;
private import gobject.ObjectG;
private import gobject.ParamSpec;
private import gtk.c.functions;
public  import gtk.c.types;
public  import gtkc.gtktypes;


/** */
public class WidgetClass
{
	/** the main Gtk struct */
	protected GtkWidgetClass* gtkWidgetClass;
	protected bool ownedRef;

	/** Get the main Gtk struct */
	public GtkWidgetClass* getWidgetClassStruct(bool transferOwnership = false)
	{
		if (transferOwnership)
			ownedRef = false;
		return gtkWidgetClass;
	}

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

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


	/**
	 * Declares a @callback_symbol to handle @callback_name from the template XML
	 * defined for @widget_type. See gtk_builder_add_callback_symbol().
	 *
	 * Note that this must be called from a composite widget classes class
	 * initializer after calling gtk_widget_class_set_template().
	 *
	 * Params:
	 *     callbackName = The name of the callback as expected in the template XML
	 *     callbackSymbol = The callback symbol
	 *
	 * Since: 3.10
	 */
	public void bindTemplateCallbackFull(string callbackName, GCallback callbackSymbol)
	{
		gtk_widget_class_bind_template_callback_full(gtkWidgetClass, Str.toStringz(callbackName), callbackSymbol);
	}

	/**
	 * Automatically assign an object declared in the class template XML to be set to a location
	 * on a freshly built instance’s private data, or alternatively accessible via gtk_widget_get_template_child().
	 *
	 * The struct can point either into the public instance, then you should use G_STRUCT_OFFSET(WidgetType, member)
	 * for @struct_offset,  or in the private struct, then you should use G_PRIVATE_OFFSET(WidgetType, member).
	 *
	 * An explicit strong reference will be held automatically for the duration of your
	 * instance’s life cycle, it will be released automatically when #GObjectClass.dispose() runs
	 * on your instance and if a @struct_offset that is != 0 is specified, then the automatic location
	 * in your instance public or private data will be set to %NULL. You can however access an automated child
	 * pointer the first time your classes #GObjectClass.dispose() runs, or alternatively in
	 * #GtkWidgetClass.destroy().
	 *
	 * If @internal_child is specified, #GtkBuildableIface.get_internal_child() will be automatically
	 * implemented by the #GtkWidget class so there is no need to implement it manually.
	 *
	 * The wrapper macros gtk_widget_class_bind_template_child(), gtk_widget_class_bind_template_child_internal(),
	 * gtk_widget_class_bind_template_child_private() and gtk_widget_class_bind_template_child_internal_private()
	 * might be more convenient to use.
	 *
	 * Note that this must be called from a composite widget classes class
	 * initializer after calling gtk_widget_class_set_template().
	 *
	 * Params:
	 *     name = The “id” of the child defined in the template XML
	 *     internalChild = Whether the child should be accessible as an “internal-child”
	 *         when this class is used in GtkBuilder XML
	 *     structOffset = The structure offset into the composite widget’s instance public or private structure
	 *         where the automated child pointer should be set, or 0 to not assign the pointer.
	 *
	 * Since: 3.10
	 */
	public void bindTemplateChildFull(string name, bool internalChild, ptrdiff_t structOffset)
	{
		gtk_widget_class_bind_template_child_full(gtkWidgetClass, Str.toStringz(name), internalChild, structOffset);
	}

	/**
	 * Finds a style property of a widget class by name.
	 *
	 * Params:
	 *     propertyName = the name of the style property to find
	 *
	 * Returns: the #GParamSpec of the style property or
	 *     %NULL if @class has no style property with that name.
	 *
	 * Since: 2.2
	 */
	public ParamSpec findStyleProperty(string propertyName)
	{
		auto p = gtk_widget_class_find_style_property(gtkWidgetClass, Str.toStringz(propertyName));

		if(p is null)
		{
			return null;
		}

		return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p);
	}

	/**
	 * Gets the name used by this class for matching in CSS code. See
	 * gtk_widget_class_set_css_name() for details.
	 *
	 * Returns: the CSS name of the given class
	 *
	 * Since: 3.20
	 */
	public string getCssName()
	{
		return Str.toString(gtk_widget_class_get_css_name(gtkWidgetClass));
	}

	/**
	 * Installs a style property on a widget class. The parser for the
	 * style property is determined by the value type of @pspec.
	 *
	 * Params:
	 *     pspec = the #GParamSpec for the property
	 */
	public void installStyleProperty(ParamSpec pspec)
	{
		gtk_widget_class_install_style_property(gtkWidgetClass, (pspec is null) ? null : pspec.getParamSpecStruct());
	}

	/**
	 * Installs a style property on a widget class.
	 *
	 * Params:
	 *     pspec = the #GParamSpec for the style property
	 *     parser = the parser for the style property
	 */
	public void installStylePropertyParser(ParamSpec pspec, GtkRcPropertyParser parser)
	{
		gtk_widget_class_install_style_property_parser(gtkWidgetClass, (pspec is null) ? null : pspec.getParamSpecStruct(), parser);
	}

	/**
	 * Returns all style properties of a widget class.
	 *
	 * Returns: a
	 *     newly allocated array of #GParamSpec*. The array must be
	 *     freed with g_free().
	 *
	 * Since: 2.2
	 */
	public ParamSpec[] listStyleProperties()
	{
		uint nProperties;

		auto p = gtk_widget_class_list_style_properties(gtkWidgetClass, &nProperties);

		if(p is null)
		{
			return null;
		}

		ParamSpec[] arr = new ParamSpec[nProperties];
		for(int i = 0; i < nProperties; i++)
		{
			arr[i] = ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p[i]);
		}

		return arr;
	}

	/**
	 * Sets the default #AtkRole to be set on accessibles created for
	 * widgets of @widget_class. Accessibles may decide to not honor this
	 * setting if their role reporting is more refined. Calls to
	 * gtk_widget_class_set_accessible_type() will reset this value.
	 *
	 * In cases where you want more fine-grained control over the role of
	 * accessibles created for @widget_class, you should provide your own
	 * accessible type and use gtk_widget_class_set_accessible_type()
	 * instead.
	 *
	 * If @role is #ATK_ROLE_INVALID, the default role will not be changed
	 * and the accessible’s default role will be used instead.
	 *
	 * This function should only be called from class init functions of widgets.
	 *
	 * Params:
	 *     role = The role to use for accessibles created for @widget_class
	 *
	 * Since: 3.2
	 */
	public void setAccessibleRole(AtkRole role)
	{
		gtk_widget_class_set_accessible_role(gtkWidgetClass, role);
	}

	/**
	 * Sets the type to be used for creating accessibles for widgets of
	 * @widget_class. The given @type must be a subtype of the type used for
	 * accessibles of the parent class.
	 *
	 * This function should only be called from class init functions of widgets.
	 *
	 * Params:
	 *     type = The object type that implements the accessible for @widget_class
	 *
	 * Since: 3.2
	 */
	public void setAccessibleType(GType type)
	{
		gtk_widget_class_set_accessible_type(gtkWidgetClass, type);
	}

	/**
	 * For use in language bindings, this will override the default #GtkBuilderConnectFunc to be
	 * used when parsing GtkBuilder XML from this class’s template data.
	 *
	 * Note that this must be called from a composite widget classes class
	 * initializer after calling gtk_widget_class_set_template().
	 *
	 * Params:
	 *     connectFunc = The #GtkBuilderConnectFunc to use when connecting signals in the class template
	 *     connectData = The data to pass to @connect_func
	 *     connectDataDestroy = The #GDestroyNotify to free @connect_data, this will only be used at
	 *         class finalization time, when no classes of type @widget_type are in use anymore.
	 *
	 * Since: 3.10
	 */
	public void setConnectFunc(GtkBuilderConnectFunc connectFunc, void* connectData, GDestroyNotify connectDataDestroy)
	{
		gtk_widget_class_set_connect_func(gtkWidgetClass, connectFunc, connectData, connectDataDestroy);
	}

	/**
	 * Sets the name to be used for CSS matching of widgets.
	 *
	 * If this function is not called for a given class, the name
	 * of the parent class is used.
	 *
	 * Params:
	 *     name = name to use
	 *
	 * Since: 3.20
	 */
	public void setCssName(string name)
	{
		gtk_widget_class_set_css_name(gtkWidgetClass, Str.toStringz(name));
	}

	/**
	 * This should be called at class initialization time to specify
	 * the GtkBuilder XML to be used to extend a widget.
	 *
	 * For convenience, gtk_widget_class_set_template_from_resource() is also provided.
	 *
	 * Note that any class that installs templates must call gtk_widget_init_template()
	 * in the widget’s instance initializer.
	 *
	 * Params:
	 *     templateBytes = A #GBytes holding the #GtkBuilder XML
	 *
	 * Since: 3.10
	 */
	public void setTemplate(Bytes templateBytes)
	{
		gtk_widget_class_set_template(gtkWidgetClass, (templateBytes is null) ? null : templateBytes.getBytesStruct());
	}

	/**
	 * A convenience function to call gtk_widget_class_set_template().
	 *
	 * Note that any class that installs templates must call gtk_widget_init_template()
	 * in the widget’s instance initializer.
	 *
	 * Params:
	 *     resourceName = The name of the resource to load the template from
	 *
	 * Since: 3.10
	 */
	public void setTemplateFromResource(string resourceName)
	{
		gtk_widget_class_set_template_from_resource(gtkWidgetClass, Str.toStringz(resourceName));
	}
}