[14:7] extends: object
Generated low-level opaque record wrapper for GIR type WidgetClass.
GtkWidgetClass (Handle = null)
Creates a new
WidgetClassby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.add_binding (int keyval, string mods, object arg3Callback, string format_string, list varargs)
Creates a new shortcut for @widget_class that calls the given @callback with arguments according to @format_string. The arguments and format string must be provided in the same way as with [ctor@GLib.Variant.new]. This function is a convenience wrapper around [method@Gtk.WidgetClass.add_shortcut] and must be called during class initialization. It does not provide for user data, if you need that, you will have to use [method@Gtk.WidgetClass.add_shortcut] with a custom shortcut.
keyval is key value of binding to install.mods is key modifier of binding to install.callback is the callback to call upon activation.format_string is GVariant format string for arguments.... is arguments, as given by format string.None.add_binding_action (int keyval, string mods, string action_name, string format_string, list varargs)
Creates a new shortcut for @widget_class that activates the given
with arguments read according to @format_string. The arguments and format string must be provided in the same way as with [ctor@GLib.Variant.new]. This function is a convenience wrapper around [method@Gtk.WidgetClass.add_shortcut] and must be called during class initialization.keyval is key value of binding to install.mods is key modifier of binding to install.action_name is the action to activate.format_string is GVariant format string for arguments.... is arguments, as given by format string.None.add_binding_signal (int keyval, string mods, string signal, string format_string, list varargs)
Creates a new shortcut for @widget_class that emits the given action
with arguments read according to @format_string. The arguments and format string must be provided in the same way as with [ctor@GLib.Variant.new]. This function is a convenience wrapper around [method@Gtk.WidgetClass.add_shortcut] and must be called during class initialization.keyval is key value of binding to install.mods is key modifier of binding to install.signal is the signal to execute.format_string is GVariant format string for arguments.... is arguments, as given by format string.None.add_shortcut (object shortcut)
Installs a shortcut in @widget_class. Every instance created for
or its subclasses will inherit this shortcut and trigger it. Shortcuts added this way will be triggered in the [enum@Gtk.PropagationPhase.bubble] phase, which means they may also trigger if child widgets have focus. This function must only be used in class initialization functions otherwise it is not guaranteed that the shortcut will be installed.shortcut is the shortcut to add.None.bind_template_callback_full (string callback_name, object callback_symbol)
Associates a name to be used in GtkBuilder XML with a symbol. This function is not supported after [method@Gtk.WidgetClass.set_template_scope] has been used on
See [method@Gtk.BuilderCScope.add_callback_symbol]. Note that this must be called from a composite widget classes class initializer after calling [method@Gtk.WidgetClass.set_template].callback_name is name of the callback as expected in the template XML.callback_symbol is the callback symbol.None.bind_template_child_full (string name, bool internal_child, int struct_offset)
Assigns 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 [method@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 useG_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 whenGObjectClass.dispose()runs on your instance and if a nonzero
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 [signal@Gtk.Widget::destroy]. If @internal_child is specified, [vfunc@Gtk.Buildable.get_internal_child] will be automatically implemented by the widget class so there is no need to implement it manually. The wrapper macros [func@Gtk.widget_class_bind_template_child], [func@Gtk.widget_class_bind_template_child_internal], [func@Gtk.widget_class_bind_template_child_private] and [func@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 [method@Gtk.WidgetClass.set_template].name is ID of the child defined in the template XML.internal_child is whether the child should be accessible as an “internal-child” when this class is used in GtkBuilder XML.struct_offset is The 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.None.get_accessible_role ()
Retrieves the accessible role used by the given widget class. Different accessible roles have different states, and are rendered differently by assistive technologies. See also: [method@Gtk.Accessible.get_accessible_role].
the accessible role for the widget class.get_activate_signal ()
Retrieves the signal id for the activation signal. The activation signal is set using [method@Gtk.WidgetClass.set_activate_signal].
a signal id, or 0 if the widget class does not specify an activation signal.get_css_name ()
Gets the name used by this class for matching in CSS code. See [method@Gtk.WidgetClass.set_css_name] for details.
the CSS name of the given class.get_layout_manager_type ()
Retrieves the type of the [class@Gtk.LayoutManager] used by widgets of class @widget_class. See also: [method@Gtk.WidgetClass.set_layout_manager_type].
type of a GtkLayoutManager subclass, or G_TYPE_INVALID.install_action (string action_name, string parameter_type, object activate)
Adds an action for all instances of a widget class. This function should be called at class initialization time. Actions installed by this function are stateless. The only state they have is whether they are enabled or not (which can be changed with [method@Gtk.Widget.action_set_enabled]).
action_name is a prefixed action name, such as "clipboard.paste".parameter_type is the parameter type.activate is callback to use when the action is activated.None.install_property_action (string action_name, string property_name)
Installs an action called @action_name on @widget_class and binds its state to the value of the @property_name property. This function will perform a few sanity checks on the property selected via @property_name. Namely, the property must exist, must be readable, writable and must not be construct-only. There are also restrictions on the type of the given property, it must be boolean, int, unsigned int, double or string. If any of these conditions are not met, a critical warning will be printed and no action will be added. The state type of the action matches the property type. If the property is boolean, the action will have no parameter and toggle the property value. Otherwise, the action will have a parameter of the same type as the property.
action_name is name of the action.property_name is name of a property in instances of @widget_class or any parent class.None.query_action (int index_)
Returns details about an action that has been installed for
See [method@Gtk.WidgetClass.install_action] for details on how to install actions. Note that this function will also return actions defined by parent classes. You can identify those by looking at @owner.index_ is position of the action to query.owner is return location for the type where the action was defined.action_name is return location for the action name.parameter_type is return location for the parameter type.property_name is return location for the property name.true if the action was found.set_accessible_role (string accessible_role)
Sets the accessible role used by the given widget class. Different accessible roles have different states, and are rendered differently by assistive technologies.
accessible_role is the accessible role to use.None.set_activate_signal (int signal_id)
Sets the activation signal for a widget class. The signal will be emitted when calling [method@Gtk.Widget.activate]. The @signal_id must have been registered with [function.GObject.signal_new] or [func@GObject.signal_newv] before calling this function.
signal_id is the id for the activate signal.None.set_activate_signal_from_name (string signal_name)
Sets the activation signal for a widget class. The signal id will by looked up by @signal_name. The signal will be emitted when calling [method@Gtk.Widget.activate]. The @signal_name must have been registered with [function.GObject.signal_new] or [func@GObject.signal_newv] before calling this function.
signal_name is the name of the activate signal of @widget_type.None.set_css_name (string name)
Sets the name to be used for CSS matching of widgets. If this function is not called for a given class, the name set on the parent class is used. By default,
GtkWidgetuses the name "widget".
name is name to use.None.set_layout_manager_type (int type)
Sets the type to be used for creating layout managers for widgets of
The given @type must be a subtype of [class@Gtk.LayoutManager]. This function should only be called from class init functions of widgets.type is the object type that implements the GtkLayoutManager forNone.set_template (object template_bytes)
This should be called at class initialization time to specify the
GtkBuilderXML to be used to extend a widget. For convenience, [method@Gtk.WidgetClass.set_template_from_resource] is also provided. Note that any class that installs templates must call [method@Gtk.Widget.init_template] in the widget’s instance initializer.
template_bytes is GBytes holding the GtkBuilder XML.None.set_template_from_resource (string resource_name)
A convenience function that calls [method@Gtk.WidgetClass.set_template] with the contents of a resource. Note that any class that installs templates must call [method@Gtk.Widget.init_template] in the widget’s instance initializer.
resource_name is resource path to load the template from.None.set_template_scope (object scope)
Overrides the default scope to be used when parsing the class template. This function is intended for language bindings. Note that this must be called from a composite widget classes class initializer after calling [method@Gtk.WidgetClass.set_template].
scope is GtkBuilderScope to use when loading the class template.None.