The object class structure needs to be the first element in the widget class structure in order for the class mechanism to work correctly. This allows a GtkWidgetClass pointer to be cast to a GObjectClass pointer.
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().
The name of the callback as expected in the template XML
The callback symbol
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().
The “id” of the child defined in the template XML
Whether the child should be accessible as an “internal-child” when this class is used in GtkBuilder XML
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.
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.
The role to use for accessibles created for widget_class
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.
The object type that implements the accessible for widget_class
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().
The #GtkBuilderConnectFunc to use when connecting signals in the class template
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.
A #GBytes holding the #GtkBuilder XML
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.
The name of the resource to load the template from
The signal to emit when a widget of this class is activated, gtk_widget_activate() handles the emission. Implementation of this signal is optional.