Files
archived-gir-files/Gtk-4.0.gir
2022-04-26 17:18:10 +08:00

110263 lines
5.3 MiB

<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0" version="1.2">
<include name="Gdk" version="4.0"/>
<include name="Gsk" version="4.0"/>
<package name="gtk4"/>
<c:include name="gtk/gtk.h"/>
<namespace name="Gtk" version="4.0" shared-library="libgtk-4.so.1" c:identifier-prefixes="Gtk" c:symbol-prefixes="gtk">
<alias name="Allocation" c:type="GtkAllocation">
<doc xml:space="preserve">The rectangle representing the area allocated for a widget by its parent.</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle"/>
</alias>
<function-macro name="ABOUT_DIALOG" c:identifier="GTK_ABOUT_DIALOG" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<constant name="ACCESSIBLE_VALUE_UNDEFINED" value="-1" c:type="GTK_ACCESSIBLE_VALUE_UNDEFINED">
<doc xml:space="preserve">An undefined value. The accessible attribute is either unset, or its
value is undefined.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="ACTIONABLE" c:identifier="GTK_ACTIONABLE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="ACTIONABLE_GET_IFACE" c:identifier="GTK_ACTIONABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="ACTION_BAR" c:identifier="GTK_ACTION_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ADJUSTMENT" c:identifier="GTK_ADJUSTMENT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ADJUSTMENT_CLASS" c:identifier="GTK_ADJUSTMENT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="ADJUSTMENT_GET_CLASS" c:identifier="GTK_ADJUSTMENT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION" c:identifier="GTK_APPLICATION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION_CLASS" c:identifier="GTK_APPLICATION_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION_GET_CLASS" c:identifier="GTK_APPLICATION_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION_WINDOW" c:identifier="GTK_APPLICATION_WINDOW" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION_WINDOW_CLASS" c:identifier="GTK_APPLICATION_WINDOW_CLASS" introspectable="0">
<parameters>
<parameter name="class">
</parameter>
</parameters>
</function-macro>
<function-macro name="APPLICATION_WINDOW_GET_CLASS" c:identifier="GTK_APPLICATION_WINDOW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="APP_CHOOSER" c:identifier="GTK_APP_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APP_CHOOSER_BUTTON" c:identifier="GTK_APP_CHOOSER_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APP_CHOOSER_DIALOG" c:identifier="GTK_APP_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="APP_CHOOSER_WIDGET" c:identifier="GTK_APP_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ASPECT_FRAME" c:identifier="GTK_ASPECT_FRAME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ASSISTANT" c:identifier="GTK_ASSISTANT" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="ASSISTANT_PAGE" c:identifier="GTK_ASSISTANT_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="ATContext" c:symbol-prefix="at_context" c:type="GtkATContext" parent="GObject.Object" abstract="1" glib:type-name="GtkATContext" glib:get-type="gtk_at_context_get_type" glib:type-struct="ATContextClass">
<doc xml:space="preserve">`GtkATContext` is an abstract class provided by GTK to communicate to
platform-specific assistive technologies API.
Each platform supported by GTK implements a `GtkATContext` subclass, and
is responsible for updating the accessible state in response to state
changes in `GtkAccessible`.</doc>
<constructor name="create" c:identifier="gtk_at_context_create">
<doc xml:space="preserve">Creates a new `GtkATContext` instance for the given accessible role,
accessible instance, and display connection.
The `GtkATContext` implementation being instantiated will depend on the
platform.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the `GtkATContext`</doc>
<type name="ATContext" c:type="GtkATContext*"/>
</return-value>
<parameters>
<parameter name="accessible_role" transfer-ownership="none">
<doc xml:space="preserve">the accessible role used by the `GtkATContext`</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</parameter>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">the `GtkAccessible` implementation using the `GtkATContext`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDisplay` used by the `GtkATContext`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</constructor>
<method name="get_accessible" c:identifier="gtk_at_context_get_accessible" glib:get-property="accessible">
<attribute name="org.gtk.Method.get_property" value="accessible"/>
<doc xml:space="preserve">Retrieves the `GtkAccessible` using this context.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkATContext`</doc>
<type name="ATContext" c:type="GtkATContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_accessible_role" c:identifier="gtk_at_context_get_accessible_role" glib:get-property="accessible-role">
<attribute name="org.gtk.Method.get_property" value="accessible-role"/>
<doc xml:space="preserve">Retrieves the accessible role of this context.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRole`</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkATContext`</doc>
<type name="ATContext" c:type="GtkATContext*"/>
</instance-parameter>
</parameters>
</method>
<property name="accessible" writable="1" construct-only="1" transfer-ownership="none" getter="get_accessible">
<attribute name="org.gtk.Property.get" value="gtk_at_context_get_accessible"/>
<doc xml:space="preserve">The `GtkAccessible` that created the `GtkATContext` instance.</doc>
<type name="Accessible"/>
</property>
<property name="accessible-role" writable="1" construct="1" transfer-ownership="none" getter="get_accessible_role">
<attribute name="org.gtk.Property.get" value="gtk_at_context_get_accessible_role"/>
<doc xml:space="preserve">The accessible role used by the AT context.
Depending on the given role, different states and properties can be
set or retrieved.</doc>
<type name="AccessibleRole"/>
</property>
<property name="display" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `GdkDisplay` for the `GtkATContext`.</doc>
<type name="Gdk.Display"/>
</property>
<glib:signal name="state-change" when="first">
<doc xml:space="preserve">Emitted when the attributes of the accessible for the
`GtkATContext` instance change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="ATContextClass" c:type="GtkATContextClass" disguised="1" glib:is-gtype-struct-for="ATContext"/>
<class name="AboutDialog" c:symbol-prefix="about_dialog" c:type="GtkAboutDialog" parent="Window" glib:type-name="GtkAboutDialog" glib:get-type="gtk_about_dialog_get_type">
<doc xml:space="preserve">The `GtkAboutDialog` offers a simple way to display information about
a program.
The shown information includes the programs' logo, name, copyright,
website and license. It is also possible to give credits to the authors,
documenters, translators and artists who have worked on the program.
An about dialog is typically opened when the user selects the `About`
option from the `Help` menu. All parts of the dialog are optional.
![An example GtkAboutDialog](aboutdialog.png)
About dialogs often contain links and email addresses. `GtkAboutDialog`
displays these as clickable links. By default, it calls [func@Gtk.show_uri]
when a user clicks one. The behaviour can be overridden with the
[signal@Gtk.AboutDialog::activate-link] signal.
To specify a person with an email address, use a string like
`Edgar Allan Poe &lt;edgar@poe.com&gt;`. To specify a website with a title,
use a string like `GTK team https://www.gtk.org`.
To make constructing a `GtkAboutDialog` as convenient as possible, you can
use the function [func@Gtk.show_about_dialog] which constructs and shows
a dialog and keeps it around so that it can be shown again.
Note that GTK sets a default title of `_("About %s")` on the dialog
window (where `%s` is replaced by the name of the application, but in
order to ensure proper translation of the title, applications should
set the title property explicitly when constructing a `GtkAboutDialog`,
as shown in the following example:
```c
GFile *logo_file = g_file_new_for_path ("./logo.png");
GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
g_object_unref (logo_file);
gtk_show_about_dialog (NULL,
"program-name", "ExampleCode",
"logo", example_logo,
"title", _("About ExampleCode"),
NULL);
```
## CSS nodes
`GtkAboutDialog` has a single CSS node with the name `window` and style
class `.aboutdialog`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_about_dialog_new">
<doc xml:space="preserve">Creates a new `GtkAboutDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAboutDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="add_credit_section" c:identifier="gtk_about_dialog_add_credit_section">
<doc xml:space="preserve">Creates a new section in the "Credits" page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">A `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="section_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the section</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="people" transfer-ownership="none">
<doc xml:space="preserve">The people who belong to that section</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="get_artists" c:identifier="gtk_about_dialog_get_artists" glib:get-property="artists">
<attribute name="org.gtk.Method.get_property" value="artists"/>
<doc xml:space="preserve">Returns the names of the artists which are displayed
in the credits page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A
`NULL`-terminated string array containing the artists</doc>
<array c:type="const char* const*">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_authors" c:identifier="gtk_about_dialog_get_authors" glib:get-property="authors">
<attribute name="org.gtk.Method.get_property" value="authors"/>
<doc xml:space="preserve">Returns the names of the authors which are displayed
in the credits page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A
`NULL`-terminated string array containing the authors</doc>
<array c:type="const char* const*">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_comments" c:identifier="gtk_about_dialog_get_comments" glib:get-property="comments">
<attribute name="org.gtk.Method.set_property" value="comments"/>
<doc xml:space="preserve">Returns the comments string.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The comments</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_copyright" c:identifier="gtk_about_dialog_get_copyright" glib:get-property="copyright">
<attribute name="org.gtk.Method.get_property" value="copyright"/>
<doc xml:space="preserve">Returns the copyright string.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The copyright string</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_documenters" c:identifier="gtk_about_dialog_get_documenters" glib:get-property="documenters">
<attribute name="org.gtk.Method.get_property" value="documenters"/>
<doc xml:space="preserve">Returns the name of the documenters which are displayed
in the credits page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A
`NULL`-terminated string array containing the documenters</doc>
<array c:type="const char* const*">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_license" c:identifier="gtk_about_dialog_get_license" glib:get-property="license">
<attribute name="org.gtk.Method.get_property" value="license"/>
<doc xml:space="preserve">Returns the license information.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The license information</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_license_type" c:identifier="gtk_about_dialog_get_license_type" glib:get-property="license-type">
<attribute name="org.gtk.Method.get_property" value="license-type"/>
<doc xml:space="preserve">Retrieves the license type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a [enum@Gtk.License] value</doc>
<type name="License" c:type="GtkLicense"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_logo" c:identifier="gtk_about_dialog_get_logo" glib:get-property="logo">
<attribute name="org.gtk.Method.get_property" value="logo"/>
<doc xml:space="preserve">Returns the paintable displayed as logo in the about dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the paintable displayed as
logo or `NULL` if the logo is unset or has been set via
[method@Gtk.AboutDialog.set_logo_icon_name]</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_logo_icon_name" c:identifier="gtk_about_dialog_get_logo_icon_name" glib:get-property="logo-icon-name">
<attribute name="org.gtk.Method.get_property" value="logo-icon-name"/>
<doc xml:space="preserve">Returns the icon name displayed as logo in the about dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the icon name displayed as logo,
or `NULL` if the logo has been set via [method@Gtk.AboutDialog.set_logo]</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_program_name" c:identifier="gtk_about_dialog_get_program_name" glib:get-property="program-name">
<attribute name="org.gtk.Method.get_property" value="program-name"/>
<doc xml:space="preserve">Returns the program name displayed in the about dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The program name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_system_information" c:identifier="gtk_about_dialog_get_system_information" glib:get-property="system-information">
<attribute name="org.gtk.Method.get_property" value="system-information"/>
<doc xml:space="preserve">Returns the system information that is shown in the about dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the system information</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_translator_credits" c:identifier="gtk_about_dialog_get_translator_credits" glib:get-property="translator-credits">
<attribute name="org.gtk.Method.get_property" value="translator-credits"/>
<doc xml:space="preserve">Returns the translator credits string which is displayed
in the credits page.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The translator credits string</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_version" c:identifier="gtk_about_dialog_get_version" glib:get-property="version">
<attribute name="org.gtk.Method.get_property" value="version"/>
<doc xml:space="preserve">Returns the version string.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The version string</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_website" c:identifier="gtk_about_dialog_get_website" glib:get-property="website">
<attribute name="org.gtk.Method.get_property" value="website"/>
<doc xml:space="preserve">Returns the website URL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The website URL</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_website_label" c:identifier="gtk_about_dialog_get_website_label" glib:get-property="website-label">
<attribute name="org.gtk.Method.get_property" value="website-label"/>
<doc xml:space="preserve">Returns the label used for the website link.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The label used for the website link</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_wrap_license" c:identifier="gtk_about_dialog_get_wrap_license" glib:get-property="wrap-license">
<attribute name="org.gtk.Method.get_property" value="wrap-license"/>
<doc xml:space="preserve">Returns whether the license text in the about dialog is
automatically wrapped.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the license text is wrapped</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_artists" c:identifier="gtk_about_dialog_set_artists" glib:set-property="artists">
<attribute name="org.gtk.Method.set_property" value="artists"/>
<doc xml:space="preserve">Sets the names of the artists to be displayed
in the "Credits" page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="artists" transfer-ownership="none">
<doc xml:space="preserve">the authors of the artwork
of the application</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_authors" c:identifier="gtk_about_dialog_set_authors" glib:set-property="authors">
<attribute name="org.gtk.Method.set_property" value="authors"/>
<doc xml:space="preserve">Sets the names of the authors which are displayed
in the "Credits" page of the about dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="authors" transfer-ownership="none">
<doc xml:space="preserve">the authors of the application</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_comments" c:identifier="gtk_about_dialog_set_comments" glib:set-property="comments">
<attribute name="org.gtk.Method.set_property" value="comments"/>
<doc xml:space="preserve">Sets the comments string to display in the about dialog.
This should be a short string of one or two lines.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="comments" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a comments string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_copyright" c:identifier="gtk_about_dialog_set_copyright" glib:set-property="copyright">
<attribute name="org.gtk.Method.set_property" value="copyright"/>
<doc xml:space="preserve">Sets the copyright string to display in the about dialog.
This should be a short string of one or two lines.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="copyright" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the copyright string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_documenters" c:identifier="gtk_about_dialog_set_documenters" glib:set-property="documenters">
<attribute name="org.gtk.Method.set_property" value="documenters"/>
<doc xml:space="preserve">Sets the names of the documenters which are displayed
in the "Credits" page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="documenters" transfer-ownership="none">
<doc xml:space="preserve">the authors of the documentation
of the application</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_license" c:identifier="gtk_about_dialog_set_license" glib:set-property="license">
<attribute name="org.gtk.Method.set_property" value="license"/>
<doc xml:space="preserve">Sets the license information to be displayed in the
about dialog.
If `license` is `NULL`, the license page is hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="license" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the license information</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_license_type" c:identifier="gtk_about_dialog_set_license_type" glib:set-property="license-type">
<attribute name="org.gtk.Method.set_property" value="license-type"/>
<doc xml:space="preserve">Sets the license of the application showing the about dialog from a
list of known licenses.
This function overrides the license set using
[method@Gtk.AboutDialog.set_license].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="license_type" transfer-ownership="none">
<doc xml:space="preserve">the type of license</doc>
<type name="License" c:type="GtkLicense"/>
</parameter>
</parameters>
</method>
<method name="set_logo" c:identifier="gtk_about_dialog_set_logo" glib:set-property="logo">
<attribute name="org.gtk.Method.set_property" value="logo"/>
<doc xml:space="preserve">Sets the logo in the about dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="logo" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="set_logo_icon_name" c:identifier="gtk_about_dialog_set_logo_icon_name" glib:set-property="logo-icon-name">
<attribute name="org.gtk.Method.set_property" value="logo-icon-name"/>
<doc xml:space="preserve">Sets the icon name to be displayed as logo in the about dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_program_name" c:identifier="gtk_about_dialog_set_program_name" glib:set-property="program-name">
<attribute name="org.gtk.Method.set_property" value="program-name"/>
<doc xml:space="preserve">Sets the name to display in the about dialog.
If `name` is not set, the string returned
by `g_get_application_name()` is used.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the program name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_system_information" c:identifier="gtk_about_dialog_set_system_information" glib:set-property="system-information">
<attribute name="org.gtk.Method.set_property" value="system-information"/>
<doc xml:space="preserve">Sets the system information to be displayed in the about
dialog.
If `system_information` is `NULL`, the system information
page is hidden.
See [property@Gtk.AboutDialog:system-information].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="system_information" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">system information</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_translator_credits" c:identifier="gtk_about_dialog_set_translator_credits" glib:set-property="translator-credits">
<attribute name="org.gtk.Method.set_property" value="translator-credits"/>
<doc xml:space="preserve">Sets the translator credits string which is displayed in
the credits page.
The intended use for this string is to display the translator
of the language which is currently used in the user interface.
Using `gettext()`, a simple way to achieve that is to mark the
string for translation:
```c
GtkWidget *about = gtk_about_dialog_new ();
gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
_("translator-credits"));
```
It is a good idea to use the customary `msgid` &#x201C;translator-credits&#x201D;
for this purpose, since translators will already know the purpose of
that `msgid`, and since `GtkAboutDialog` will detect if &#x201C;translator-credits&#x201D;
is untranslated and omit translator credits.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="translator_credits" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the translator credits</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_version" c:identifier="gtk_about_dialog_set_version" glib:set-property="version">
<attribute name="org.gtk.Method.set_property" value="version"/>
<doc xml:space="preserve">Sets the version string to display in the about dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="version" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the version string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_website" c:identifier="gtk_about_dialog_set_website" glib:set-property="website">
<attribute name="org.gtk.Method.set_property" value="website"/>
<doc xml:space="preserve">Sets the URL to use for the website link.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="website" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a URL string starting with `http://`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_website_label" c:identifier="gtk_about_dialog_set_website_label" glib:set-property="website-label">
<attribute name="org.gtk.Method.set_property" value="website-label"/>
<doc xml:space="preserve">Sets the label to be used for the website link.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="website_label" transfer-ownership="none">
<doc xml:space="preserve">the label used for the website link</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_wrap_license" c:identifier="gtk_about_dialog_set_wrap_license" glib:set-property="wrap-license">
<attribute name="org.gtk.Method.set_property" value="wrap-license"/>
<doc xml:space="preserve">Sets whether the license text in the about dialog should be
automatically wrapped.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="about" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAboutDialog`</doc>
<type name="AboutDialog" c:type="GtkAboutDialog*"/>
</instance-parameter>
<parameter name="wrap_license" transfer-ownership="none">
<doc xml:space="preserve">whether to wrap the license</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="artists" writable="1" transfer-ownership="none" setter="set_artists" getter="get_artists">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_artists"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_artists"/>
<doc xml:space="preserve">The people who contributed artwork to the program, as a `NULL`-terminated
array of strings.
Each string may contain email addresses and URLs, which will be displayed
as links.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="authors" writable="1" transfer-ownership="none" setter="set_authors" getter="get_authors">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_authors"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_authors"/>
<doc xml:space="preserve">The authors of the program, as a `NULL`-terminated array of strings.
Each string may contain email addresses and URLs, which will be displayed
as links, see the introduction for more details.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="comments" writable="1" transfer-ownership="none" setter="set_comments" getter="get_comments">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_comments"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_comments"/>
<doc xml:space="preserve">Comments about the program.
This string is displayed in a label in the main dialog, thus it
should be a short explanation of the main purpose of the program,
not a detailed list of features.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="copyright" writable="1" transfer-ownership="none" setter="set_copyright" getter="get_copyright">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_copyright"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_copyright"/>
<doc xml:space="preserve">Copyright information for the program.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="documenters" writable="1" transfer-ownership="none" setter="set_documenters" getter="get_documenters">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_documenters"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_documenters"/>
<doc xml:space="preserve">The people documenting the program, as a `NULL`-terminated array of strings.
Each string may contain email addresses and URLs, which will be displayed
as links, see the introduction for more details.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="license" writable="1" transfer-ownership="none" setter="set_license" getter="get_license">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_license"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_license"/>
<doc xml:space="preserve">The license of the program, as free-form text.
This string is displayed in a text view in a secondary dialog, therefore
it is fine to use a long multi-paragraph text. Note that the text is only
wrapped in the text view if the "wrap-license" property is set to `TRUE`;
otherwise the text itself must contain the intended linebreaks.
When setting this property to a non-`NULL` value, the
[property@Gtk.AboutDialog:license-type] property is set to
`GTK_LICENSE_CUSTOM` as a side effect.
The text may contain links in this format `&lt;http://www.some.place/&gt;`
and email references in the form `&lt;mail-to@some.body&gt;`, and these will
be converted into clickable links.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="license-type" writable="1" transfer-ownership="none" setter="set_license_type" getter="get_license_type">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_license_type"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_license_type"/>
<doc xml:space="preserve">The license of the program.
The `GtkAboutDialog` will automatically fill out a standard disclaimer
and link the user to the appropriate online resource for the license
text.
If `GTK_LICENSE_UNKNOWN` is used, the link used will be the same
specified in the [property@Gtk.AboutDialog:website] property.
If `GTK_LICENSE_CUSTOM` is used, the current contents of the
[property@Gtk.AboutDialog:license] property are used.
For any other [enum@Gtk.License] value, the contents of the
[property@Gtk.AboutDialog:license] property are also set by this property as
a side effect.</doc>
<type name="License"/>
</property>
<property name="logo" writable="1" transfer-ownership="none" setter="set_logo" getter="get_logo">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_logo"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_logo"/>
<doc xml:space="preserve">A logo for the about box.
If it is `NULL`, the default window icon set with
[id@gtk_window_set_default_icon_name] will be used.</doc>
<type name="Gdk.Paintable"/>
</property>
<property name="logo-icon-name" writable="1" transfer-ownership="none" setter="set_logo_icon_name" getter="get_logo_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_logo_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_logo_icon_name"/>
<doc xml:space="preserve">A named icon to use as the logo for the about box.
This property overrides the [property@Gtk.AboutDialog:logo] property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="program-name" writable="1" transfer-ownership="none" setter="set_program_name" getter="get_program_name">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_program_name"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_program_name"/>
<doc xml:space="preserve">The name of the program.
If this is not set, it defaults to the value returned by
`g_get_application_name()`.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="system-information" writable="1" transfer-ownership="none" setter="set_system_information" getter="get_system_information">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_system_information"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_system_information"/>
<doc xml:space="preserve">Information about the system on which the program is running.
This information is displayed in a separate page, therefore it is fine
to use a long multi-paragraph text. Note that the text should contain
the intended linebreaks.
The text may contain links in this format `&lt;http://www.some.place/&gt;`
and email references in the form `&lt;mail-to@some.body&gt;`, and these will
be converted into clickable links.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="translator-credits" writable="1" transfer-ownership="none" setter="set_translator_credits" getter="get_translator_credits">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_translator_credits"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_translator_credits"/>
<doc xml:space="preserve">Credits to the translators.
This string should be marked as translatable.
The string may contain email addresses and URLs, which will be displayed
as links, see the introduction for more details.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="version" writable="1" transfer-ownership="none" setter="set_version" getter="get_version">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_version"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_version"/>
<doc xml:space="preserve">The version of the program.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="website" writable="1" transfer-ownership="none" setter="set_website" getter="get_website">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_website"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_website"/>
<doc xml:space="preserve">The URL for the link to the website of the program.
This should be a string starting with `http://` or `https://`.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="website-label" writable="1" transfer-ownership="none" setter="set_website_label" getter="get_website_label">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_website_label"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_website_label"/>
<doc xml:space="preserve">The label for the link to the website of the program.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="wrap-license" writable="1" transfer-ownership="none" setter="set_wrap_license" getter="get_wrap_license">
<attribute name="org.gtk.Property.get" value="gtk_about_dialog_get_wrap_license"/>
<attribute name="org.gtk.Property.set" value="gtk_about_dialog_set_wrap_license"/>
<doc xml:space="preserve">Whether to wrap the text in the license dialog.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate-link" when="last">
<doc xml:space="preserve">Emitted every time a URL is activated.
Applications may connect to it to override the default behaviour,
which is to call [func@Gtk.show_uri].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the link has been activated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the URI that is activated</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<interface name="Accessible" c:symbol-prefix="accessible" c:type="GtkAccessible" glib:type-name="GtkAccessible" glib:get-type="gtk_accessible_get_type" glib:type-struct="AccessibleInterface">
<doc xml:space="preserve">`GtkAccessible` is an interface for describing UI elements for
Assistive Technologies.
Every accessible implementation has:
- a &#x201C;role&#x201D;, represented by a value of the [enum@Gtk.AccessibleRole] enumeration
- an &#x201C;attribute&#x201D;, represented by a set of [enum@Gtk.AccessibleState],
[enum@Gtk.AccessibleProperty] and [enum@Gtk.AccessibleRelation] values
The role cannot be changed after instantiating a `GtkAccessible`
implementation.
The attributes are updated every time a UI element's state changes in
a way that should be reflected by assistive technologies. For instance,
if a `GtkWidget` visibility changes, the %GTK_ACCESSIBLE_STATE_HIDDEN
state will also change to reflect the [property@Gtk.Widget:visible] property.</doc>
<method name="get_accessible_role" c:identifier="gtk_accessible_get_accessible_role" glib:get-property="accessible-role">
<attribute name="org.gtk.Method.get_property" value="accessible-role"/>
<doc xml:space="preserve">Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRole`</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
</parameters>
</method>
<method name="reset_property" c:identifier="gtk_accessible_reset_property">
<doc xml:space="preserve">Resets the accessible @property to its default value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="property" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleProperty`</doc>
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
</parameters>
</method>
<method name="reset_relation" c:identifier="gtk_accessible_reset_relation">
<doc xml:space="preserve">Resets the accessible @relation to its default value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="relation" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRelation`</doc>
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
</parameters>
</method>
<method name="reset_state" c:identifier="gtk_accessible_reset_state">
<doc xml:space="preserve">Resets the accessible @state to its default value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleState`</doc>
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
</parameters>
</method>
<method name="update_property" c:identifier="gtk_accessible_update_property" shadowed-by="update_property_value" introspectable="0">
<doc xml:space="preserve">Updates a list of accessible properties.
See the [enum@Gtk.AccessibleProperty] documentation for the
value types of accessible properties.
This function should be called by `GtkWidget` types whenever
an accessible property change must be communicated to assistive
technologies.
Example:
```c
value = gtk_adjustment_get_value (adjustment);
gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
-1);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="first_property" transfer-ownership="none">
<doc xml:space="preserve">the first `GtkAccessibleProperty`</doc>
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a list of property and value pairs, terminated by -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="update_property_value" c:identifier="gtk_accessible_update_property_value" shadows="update_property">
<doc xml:space="preserve">Updates an array of accessible properties.
This function should be called by `GtkWidget` types whenever an accessible
property change must be communicated to assistive technologies.
This function is meant to be used by language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="n_properties" transfer-ownership="none">
<doc xml:space="preserve">the number of accessible properties to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="properties" transfer-ownership="none">
<doc xml:space="preserve">an array of `GtkAccessibleProperty`</doc>
<array length="0" zero-terminated="0" c:type="GtkAccessibleProperty*">
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of `GValues`, one for each property</doc>
<array length="0" zero-terminated="0" c:type="const GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
</parameters>
</method>
<method name="update_relation" c:identifier="gtk_accessible_update_relation" shadowed-by="update_relation_value" introspectable="0">
<doc xml:space="preserve">Updates a list of accessible relations.
This function should be called by `GtkWidget` types whenever an accessible
relation change must be communicated to assistive technologies.
If the [enum@Gtk.AccessibleRelation] requires a list of references,
you should pass each reference individually, followed by %NULL, e.g.
```c
gtk_accessible_update_relation (accessible,
GTK_ACCESSIBLE_RELATION_CONTROLS,
ref1, NULL,
GTK_ACCESSIBLE_RELATION_LABELLED_BY,
ref1, ref2, ref3, NULL,
-1);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="first_relation" transfer-ownership="none">
<doc xml:space="preserve">the first `GtkAccessibleRelation`</doc>
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a list of relation and value pairs, terminated by -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="update_relation_value" c:identifier="gtk_accessible_update_relation_value" shadows="update_relation">
<doc xml:space="preserve">Updates an array of accessible relations.
This function should be called by `GtkWidget` types whenever an accessible
relation change must be communicated to assistive technologies.
This function is meant to be used by language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="n_relations" transfer-ownership="none">
<doc xml:space="preserve">the number of accessible relations to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="relations" transfer-ownership="none">
<doc xml:space="preserve">an array of `GtkAccessibleRelation`</doc>
<array length="0" zero-terminated="0" c:type="GtkAccessibleRelation*">
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of `GValues`, one for each relation</doc>
<array length="0" zero-terminated="0" c:type="const GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
</parameters>
</method>
<method name="update_state" c:identifier="gtk_accessible_update_state" shadowed-by="update_state_value" introspectable="0">
<doc xml:space="preserve">Updates a list of accessible states. See the [enum@Gtk.AccessibleState]
documentation for the value types of accessible states.
This function should be called by `GtkWidget` types whenever an accessible
state change must be communicated to assistive technologies.
Example:
```c
value = GTK_ACCESSIBLE_TRISTATE_MIXED;
gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
GTK_ACCESSIBLE_STATE_CHECKED, value,
-1);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="first_state" transfer-ownership="none">
<doc xml:space="preserve">the first `GtkAccessibleState`</doc>
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a list of state and value pairs, terminated by -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="update_state_value" c:identifier="gtk_accessible_update_state_value" shadows="update_state">
<doc xml:space="preserve">Updates an array of accessible states.
This function should be called by `GtkWidget` types whenever an accessible
state change must be communicated to assistive technologies.
This function is meant to be used by language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</instance-parameter>
<parameter name="n_states" transfer-ownership="none">
<doc xml:space="preserve">the number of accessible states to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="states" transfer-ownership="none">
<doc xml:space="preserve">an array of `GtkAccessibleState`</doc>
<array length="0" zero-terminated="0" c:type="GtkAccessibleState*">
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of `GValues`, one for each state</doc>
<array length="0" zero-terminated="0" c:type="const GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
</parameters>
</method>
<property name="accessible-role" writable="1" transfer-ownership="none" getter="get_accessible_role">
<attribute name="org.gtk.Property.get" value="gtk_accessible_get_accessible_role"/>
<doc xml:space="preserve">The accessible role of the given `GtkAccessible` implementation.
The accessible role cannot be changed once set.</doc>
<type name="AccessibleRole"/>
</property>
</interface>
<enumeration name="AccessibleAutocomplete" glib:type-name="GtkAccessibleAutocomplete" glib:get-type="gtk_accessible_autocomplete_get_type" c:type="GtkAccessibleAutocomplete">
<doc xml:space="preserve">The possible values for the %GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE
accessible property.</doc>
<member name="none" value="0" c:identifier="GTK_ACCESSIBLE_AUTOCOMPLETE_NONE" glib:nick="none" glib:name="GTK_ACCESSIBLE_AUTOCOMPLETE_NONE">
<doc xml:space="preserve">Automatic suggestions are not displayed.</doc>
</member>
<member name="inline" value="1" c:identifier="GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE" glib:nick="inline" glib:name="GTK_ACCESSIBLE_AUTOCOMPLETE_INLINE">
<doc xml:space="preserve">When a user is providing input, text
suggesting one way to complete the provided input may be dynamically
inserted after the caret.</doc>
</member>
<member name="list" value="2" c:identifier="GTK_ACCESSIBLE_AUTOCOMPLETE_LIST" glib:nick="list" glib:name="GTK_ACCESSIBLE_AUTOCOMPLETE_LIST">
<doc xml:space="preserve">When a user is providing input, an element
containing a collection of values that could complete the provided input
may be displayed.</doc>
</member>
<member name="both" value="3" c:identifier="GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH" glib:nick="both" glib:name="GTK_ACCESSIBLE_AUTOCOMPLETE_BOTH">
<doc xml:space="preserve">When a user is providing input, an element
containing a collection of values that could complete the provided input
may be displayed. If displayed, one value in the collection is automatically
selected, and the text needed to complete the automatically selected value
appears after the caret in the input.</doc>
</member>
</enumeration>
<record name="AccessibleInterface" c:type="GtkAccessibleInterface" disguised="1" glib:is-gtype-struct-for="Accessible"/>
<enumeration name="AccessibleInvalidState" glib:type-name="GtkAccessibleInvalidState" glib:get-type="gtk_accessible_invalid_state_get_type" c:type="GtkAccessibleInvalidState">
<doc xml:space="preserve">The possible values for the %GTK_ACCESSIBLE_STATE_INVALID
accessible state.
Note that the %GTK_ACCESSIBLE_INVALID_FALSE and
%GTK_ACCESSIBLE_INVALID_TRUE have the same values
as %FALSE and %TRUE.</doc>
<member name="false" value="0" c:identifier="GTK_ACCESSIBLE_INVALID_FALSE" glib:nick="false" glib:name="GTK_ACCESSIBLE_INVALID_FALSE">
<doc xml:space="preserve">There are no detected errors in the value</doc>
</member>
<member name="true" value="1" c:identifier="GTK_ACCESSIBLE_INVALID_TRUE" glib:nick="true" glib:name="GTK_ACCESSIBLE_INVALID_TRUE">
<doc xml:space="preserve">The value entered by the user has failed validation</doc>
</member>
<member name="grammar" value="2" c:identifier="GTK_ACCESSIBLE_INVALID_GRAMMAR" glib:nick="grammar" glib:name="GTK_ACCESSIBLE_INVALID_GRAMMAR">
<doc xml:space="preserve">A grammatical error was detected</doc>
</member>
<member name="spelling" value="3" c:identifier="GTK_ACCESSIBLE_INVALID_SPELLING" glib:nick="spelling" glib:name="GTK_ACCESSIBLE_INVALID_SPELLING">
<doc xml:space="preserve">A spelling error was detected</doc>
</member>
</enumeration>
<enumeration name="AccessibleProperty" glib:type-name="GtkAccessibleProperty" glib:get-type="gtk_accessible_property_get_type" c:type="GtkAccessibleProperty">
<doc xml:space="preserve">The possible accessible properties of a [iface@Accessible].</doc>
<member name="autocomplete" value="0" c:identifier="GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE" glib:nick="autocomplete" glib:name="GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE">
<doc xml:space="preserve">Indicates whether inputting text
could trigger display of one or more predictions of the user's intended
value for a combobox, searchbox, or textbox and specifies how predictions
would be presented if they were made. Value type: [enum@AccessibleAutocomplete]</doc>
</member>
<member name="description" value="1" c:identifier="GTK_ACCESSIBLE_PROPERTY_DESCRIPTION" glib:nick="description" glib:name="GTK_ACCESSIBLE_PROPERTY_DESCRIPTION">
<doc xml:space="preserve">Defines a string value that describes
or annotates the current element. Value type: string</doc>
</member>
<member name="has_popup" value="2" c:identifier="GTK_ACCESSIBLE_PROPERTY_HAS_POPUP" glib:nick="has-popup" glib:name="GTK_ACCESSIBLE_PROPERTY_HAS_POPUP">
<doc xml:space="preserve">Indicates the availability and type of
interactive popup element, such as menu or dialog, that can be triggered
by an element.</doc>
</member>
<member name="key_shortcuts" value="3" c:identifier="GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS" glib:nick="key-shortcuts" glib:name="GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS">
<doc xml:space="preserve">Indicates keyboard shortcuts that an
author has implemented to activate or give focus to an element. Value type:
string</doc>
</member>
<member name="label" value="4" c:identifier="GTK_ACCESSIBLE_PROPERTY_LABEL" glib:nick="label" glib:name="GTK_ACCESSIBLE_PROPERTY_LABEL">
<doc xml:space="preserve">Defines a string value that labels the current
element. Value type: string</doc>
</member>
<member name="level" value="5" c:identifier="GTK_ACCESSIBLE_PROPERTY_LEVEL" glib:nick="level" glib:name="GTK_ACCESSIBLE_PROPERTY_LEVEL">
<doc xml:space="preserve">Defines the hierarchical level of an element
within a structure. Value type: integer</doc>
</member>
<member name="modal" value="6" c:identifier="GTK_ACCESSIBLE_PROPERTY_MODAL" glib:nick="modal" glib:name="GTK_ACCESSIBLE_PROPERTY_MODAL">
<doc xml:space="preserve">Indicates whether an element is modal when
displayed. Value type: boolean</doc>
</member>
<member name="multi_line" value="7" c:identifier="GTK_ACCESSIBLE_PROPERTY_MULTI_LINE" glib:nick="multi-line" glib:name="GTK_ACCESSIBLE_PROPERTY_MULTI_LINE">
<doc xml:space="preserve">Indicates whether a text box accepts
multiple lines of input or only a single line. Value type: boolean</doc>
</member>
<member name="multi_selectable" value="8" c:identifier="GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE" glib:nick="multi-selectable" glib:name="GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE">
<doc xml:space="preserve">Indicates that the user may select
more than one item from the current selectable descendants. Value type:
boolean</doc>
</member>
<member name="orientation" value="9" c:identifier="GTK_ACCESSIBLE_PROPERTY_ORIENTATION" glib:nick="orientation" glib:name="GTK_ACCESSIBLE_PROPERTY_ORIENTATION">
<doc xml:space="preserve">Indicates whether the element's
orientation is horizontal, vertical, or unknown/ambiguous. Value type:
[enum@Orientation]</doc>
</member>
<member name="placeholder" value="10" c:identifier="GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER" glib:nick="placeholder" glib:name="GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER">
<doc xml:space="preserve">Defines a short hint (a word or short
phrase) intended to aid the user with data entry when the control has no
value. A hint could be a sample value or a brief description of the expected
format. Value type: string</doc>
</member>
<member name="read_only" value="11" c:identifier="GTK_ACCESSIBLE_PROPERTY_READ_ONLY" glib:nick="read-only" glib:name="GTK_ACCESSIBLE_PROPERTY_READ_ONLY">
<doc xml:space="preserve">Indicates that the element is not editable,
but is otherwise operable. Value type: boolean</doc>
</member>
<member name="required" value="12" c:identifier="GTK_ACCESSIBLE_PROPERTY_REQUIRED" glib:nick="required" glib:name="GTK_ACCESSIBLE_PROPERTY_REQUIRED">
<doc xml:space="preserve">Indicates that user input is required on
the element before a form may be submitted. Value type: boolean</doc>
</member>
<member name="role_description" value="13" c:identifier="GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION" glib:nick="role-description" glib:name="GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION">
<doc xml:space="preserve">Defines a human-readable,
author-localized description for the role of an element. Value type: string</doc>
</member>
<member name="sort" value="14" c:identifier="GTK_ACCESSIBLE_PROPERTY_SORT" glib:nick="sort" glib:name="GTK_ACCESSIBLE_PROPERTY_SORT">
<doc xml:space="preserve">Indicates if items in a table or grid are
sorted in ascending or descending order. Value type: [enum@AccessibleSort]</doc>
</member>
<member name="value_max" value="15" c:identifier="GTK_ACCESSIBLE_PROPERTY_VALUE_MAX" glib:nick="value-max" glib:name="GTK_ACCESSIBLE_PROPERTY_VALUE_MAX">
<doc xml:space="preserve">Defines the maximum allowed value for a
range widget. Value type: double</doc>
</member>
<member name="value_min" value="16" c:identifier="GTK_ACCESSIBLE_PROPERTY_VALUE_MIN" glib:nick="value-min" glib:name="GTK_ACCESSIBLE_PROPERTY_VALUE_MIN">
<doc xml:space="preserve">Defines the minimum allowed value for a
range widget. Value type: double</doc>
</member>
<member name="value_now" value="17" c:identifier="GTK_ACCESSIBLE_PROPERTY_VALUE_NOW" glib:nick="value-now" glib:name="GTK_ACCESSIBLE_PROPERTY_VALUE_NOW">
<doc xml:space="preserve">Defines the current value for a range widget.
Value type: double</doc>
</member>
<member name="value_text" value="18" c:identifier="GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT" glib:nick="value-text" glib:name="GTK_ACCESSIBLE_PROPERTY_VALUE_TEXT">
<doc xml:space="preserve">Defines the human readable text alternative
of aria-valuenow for a range widget. Value type: string</doc>
</member>
<function name="init_value" c:identifier="gtk_accessible_property_init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="property" transfer-ownership="none">
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
</enumeration>
<enumeration name="AccessibleRelation" glib:type-name="GtkAccessibleRelation" glib:get-type="gtk_accessible_relation_get_type" c:type="GtkAccessibleRelation">
<doc xml:space="preserve">The possible accessible relations of a [iface@Accessible].
Accessible relations can be references to other widgets,
integers or strings.</doc>
<member name="active_descendant" value="0" c:identifier="GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT" glib:nick="active-descendant" glib:name="GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT">
<doc xml:space="preserve">Identifies the currently active
element when focus is on a composite widget, combobox, textbox, group,
or application. Value type: reference</doc>
</member>
<member name="col_count" value="1" c:identifier="GTK_ACCESSIBLE_RELATION_COL_COUNT" glib:nick="col-count" glib:name="GTK_ACCESSIBLE_RELATION_COL_COUNT">
<doc xml:space="preserve">Defines the total number of columns
in a table, grid, or treegrid. Value type: integer</doc>
</member>
<member name="col_index" value="2" c:identifier="GTK_ACCESSIBLE_RELATION_COL_INDEX" glib:nick="col-index" glib:name="GTK_ACCESSIBLE_RELATION_COL_INDEX">
<doc xml:space="preserve">Defines an element's column index or
position with respect to the total number of columns within a table,
grid, or treegrid. Value type: integer</doc>
</member>
<member name="col_index_text" value="3" c:identifier="GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT" glib:nick="col-index-text" glib:name="GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT">
<doc xml:space="preserve">Defines a human readable text
alternative of %GTK_ACCESSIBLE_RELATION_COL_INDEX. Value type: string</doc>
</member>
<member name="col_span" value="4" c:identifier="GTK_ACCESSIBLE_RELATION_COL_SPAN" glib:nick="col-span" glib:name="GTK_ACCESSIBLE_RELATION_COL_SPAN">
<doc xml:space="preserve">Defines the number of columns spanned
by a cell or gridcell within a table, grid, or treegrid. Value type: integer</doc>
</member>
<member name="controls" value="5" c:identifier="GTK_ACCESSIBLE_RELATION_CONTROLS" glib:nick="controls" glib:name="GTK_ACCESSIBLE_RELATION_CONTROLS">
<doc xml:space="preserve">Identifies the element (or elements) whose
contents or presence are controlled by the current element. Value type: reference</doc>
</member>
<member name="described_by" value="6" c:identifier="GTK_ACCESSIBLE_RELATION_DESCRIBED_BY" glib:nick="described-by" glib:name="GTK_ACCESSIBLE_RELATION_DESCRIBED_BY">
<doc xml:space="preserve">Identifies the element (or elements)
that describes the object. Value type: reference</doc>
</member>
<member name="details" value="7" c:identifier="GTK_ACCESSIBLE_RELATION_DETAILS" glib:nick="details" glib:name="GTK_ACCESSIBLE_RELATION_DETAILS">
<doc xml:space="preserve">Identifies the element (or elements) that
provide additional information related to the object. Value type: reference</doc>
</member>
<member name="error_message" value="8" c:identifier="GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE" glib:nick="error-message" glib:name="GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE">
<doc xml:space="preserve">Identifies the element that provides
an error message for an object. Value type: reference</doc>
</member>
<member name="flow_to" value="9" c:identifier="GTK_ACCESSIBLE_RELATION_FLOW_TO" glib:nick="flow-to" glib:name="GTK_ACCESSIBLE_RELATION_FLOW_TO">
<doc xml:space="preserve">Identifies the next element (or elements)
in an alternate reading order of content which, at the user's discretion,
allows assistive technology to override the general default of reading in
document source order. Value type: reference</doc>
</member>
<member name="labelled_by" value="10" c:identifier="GTK_ACCESSIBLE_RELATION_LABELLED_BY" glib:nick="labelled-by" glib:name="GTK_ACCESSIBLE_RELATION_LABELLED_BY">
<doc xml:space="preserve">Identifies the element (or elements)
that labels the current element. Value type: reference</doc>
</member>
<member name="owns" value="11" c:identifier="GTK_ACCESSIBLE_RELATION_OWNS" glib:nick="owns" glib:name="GTK_ACCESSIBLE_RELATION_OWNS">
<doc xml:space="preserve">Identifies an element (or elements) in order
to define a visual, functional, or contextual parent/child relationship
between elements where the widget hierarchy cannot be used to represent
the relationship. Value type: reference</doc>
</member>
<member name="pos_in_set" value="12" c:identifier="GTK_ACCESSIBLE_RELATION_POS_IN_SET" glib:nick="pos-in-set" glib:name="GTK_ACCESSIBLE_RELATION_POS_IN_SET">
<doc xml:space="preserve">Defines an element's number or position
in the current set of listitems or treeitems. Value type: integer</doc>
</member>
<member name="row_count" value="13" c:identifier="GTK_ACCESSIBLE_RELATION_ROW_COUNT" glib:nick="row-count" glib:name="GTK_ACCESSIBLE_RELATION_ROW_COUNT">
<doc xml:space="preserve">Defines the total number of rows in a table,
grid, or treegrid. Value type: integer</doc>
</member>
<member name="row_index" value="14" c:identifier="GTK_ACCESSIBLE_RELATION_ROW_INDEX" glib:nick="row-index" glib:name="GTK_ACCESSIBLE_RELATION_ROW_INDEX">
<doc xml:space="preserve">Defines an element's row index or position
with respect to the total number of rows within a table, grid, or treegrid.
Value type: integer</doc>
</member>
<member name="row_index_text" value="15" c:identifier="GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT" glib:nick="row-index-text" glib:name="GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT">
<doc xml:space="preserve">Defines a human readable text
alternative of aria-rowindex. Value type: string</doc>
</member>
<member name="row_span" value="16" c:identifier="GTK_ACCESSIBLE_RELATION_ROW_SPAN" glib:nick="row-span" glib:name="GTK_ACCESSIBLE_RELATION_ROW_SPAN">
<doc xml:space="preserve">Defines the number of rows spanned by a
cell or gridcell within a table, grid, or treegrid. Value type: integer</doc>
</member>
<member name="set_size" value="17" c:identifier="GTK_ACCESSIBLE_RELATION_SET_SIZE" glib:nick="set-size" glib:name="GTK_ACCESSIBLE_RELATION_SET_SIZE">
<doc xml:space="preserve">Defines the number of items in the current
set of listitems or treeitems. Value type: integer</doc>
</member>
<function name="init_value" c:identifier="gtk_accessible_relation_init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="relation" transfer-ownership="none">
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
</enumeration>
<enumeration name="AccessibleRole" glib:type-name="GtkAccessibleRole" glib:get-type="gtk_accessible_role_get_type" c:type="GtkAccessibleRole">
<doc xml:space="preserve">The accessible role for a [iface@Accessible] implementation.
Abstract roles are only used as part of the ontology; application
developers must not use abstract roles in their code.</doc>
<member name="alert" value="0" c:identifier="GTK_ACCESSIBLE_ROLE_ALERT" glib:nick="alert" glib:name="GTK_ACCESSIBLE_ROLE_ALERT">
<doc xml:space="preserve">An element with important, and usually
time-sensitive, information</doc>
</member>
<member name="alert_dialog" value="1" c:identifier="GTK_ACCESSIBLE_ROLE_ALERT_DIALOG" glib:nick="alert-dialog" glib:name="GTK_ACCESSIBLE_ROLE_ALERT_DIALOG">
<doc xml:space="preserve">A type of dialog that contains an
alert message</doc>
</member>
<member name="banner" value="2" c:identifier="GTK_ACCESSIBLE_ROLE_BANNER" glib:nick="banner" glib:name="GTK_ACCESSIBLE_ROLE_BANNER">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="button" value="3" c:identifier="GTK_ACCESSIBLE_ROLE_BUTTON" glib:nick="button" glib:name="GTK_ACCESSIBLE_ROLE_BUTTON">
<doc xml:space="preserve">An input element that allows for
user-triggered actions when clicked or pressed</doc>
</member>
<member name="caption" value="4" c:identifier="GTK_ACCESSIBLE_ROLE_CAPTION" glib:nick="caption" glib:name="GTK_ACCESSIBLE_ROLE_CAPTION">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="cell" value="5" c:identifier="GTK_ACCESSIBLE_ROLE_CELL" glib:nick="cell" glib:name="GTK_ACCESSIBLE_ROLE_CELL">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="checkbox" value="6" c:identifier="GTK_ACCESSIBLE_ROLE_CHECKBOX" glib:nick="checkbox" glib:name="GTK_ACCESSIBLE_ROLE_CHECKBOX">
<doc xml:space="preserve">A checkable input element that has
three possible values: `true`, `false`, or `mixed`</doc>
</member>
<member name="column_header" value="7" c:identifier="GTK_ACCESSIBLE_ROLE_COLUMN_HEADER" glib:nick="column-header" glib:name="GTK_ACCESSIBLE_ROLE_COLUMN_HEADER">
<doc xml:space="preserve">A header in a columned list.</doc>
</member>
<member name="combo_box" value="8" c:identifier="GTK_ACCESSIBLE_ROLE_COMBO_BOX" glib:nick="combo-box" glib:name="GTK_ACCESSIBLE_ROLE_COMBO_BOX">
<doc xml:space="preserve">An input that controls another element,
such as a list or a grid, that can dynamically pop up to help the user
set the value of the input</doc>
</member>
<member name="command" value="9" c:identifier="GTK_ACCESSIBLE_ROLE_COMMAND" glib:nick="command" glib:name="GTK_ACCESSIBLE_ROLE_COMMAND">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="composite" value="10" c:identifier="GTK_ACCESSIBLE_ROLE_COMPOSITE" glib:nick="composite" glib:name="GTK_ACCESSIBLE_ROLE_COMPOSITE">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="dialog" value="11" c:identifier="GTK_ACCESSIBLE_ROLE_DIALOG" glib:nick="dialog" glib:name="GTK_ACCESSIBLE_ROLE_DIALOG">
<doc xml:space="preserve">A dialog is a window that is designed to interrupt
the current processing of an application in order to prompt the user to enter
information or require a response.</doc>
</member>
<member name="document" value="12" c:identifier="GTK_ACCESSIBLE_ROLE_DOCUMENT" glib:nick="document" glib:name="GTK_ACCESSIBLE_ROLE_DOCUMENT">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="feed" value="13" c:identifier="GTK_ACCESSIBLE_ROLE_FEED" glib:nick="feed" glib:name="GTK_ACCESSIBLE_ROLE_FEED">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="form" value="14" c:identifier="GTK_ACCESSIBLE_ROLE_FORM" glib:nick="form" glib:name="GTK_ACCESSIBLE_ROLE_FORM">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="generic" value="15" c:identifier="GTK_ACCESSIBLE_ROLE_GENERIC" glib:nick="generic" glib:name="GTK_ACCESSIBLE_ROLE_GENERIC">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="grid" value="16" c:identifier="GTK_ACCESSIBLE_ROLE_GRID" glib:nick="grid" glib:name="GTK_ACCESSIBLE_ROLE_GRID">
<doc xml:space="preserve">A grid of items.</doc>
</member>
<member name="grid_cell" value="17" c:identifier="GTK_ACCESSIBLE_ROLE_GRID_CELL" glib:nick="grid-cell" glib:name="GTK_ACCESSIBLE_ROLE_GRID_CELL">
<doc xml:space="preserve">An item in a grid or tree grid.</doc>
</member>
<member name="group" value="18" c:identifier="GTK_ACCESSIBLE_ROLE_GROUP" glib:nick="group" glib:name="GTK_ACCESSIBLE_ROLE_GROUP">
<doc xml:space="preserve">An element that groups multiple widgets. GTK uses
this role for various containers, like [class@Box], [class@Viewport], and [class@HeaderBar].</doc>
</member>
<member name="heading" value="19" c:identifier="GTK_ACCESSIBLE_ROLE_HEADING" glib:nick="heading" glib:name="GTK_ACCESSIBLE_ROLE_HEADING">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="img" value="20" c:identifier="GTK_ACCESSIBLE_ROLE_IMG" glib:nick="img" glib:name="GTK_ACCESSIBLE_ROLE_IMG">
<doc xml:space="preserve">An image.</doc>
</member>
<member name="input" value="21" c:identifier="GTK_ACCESSIBLE_ROLE_INPUT" glib:nick="input" glib:name="GTK_ACCESSIBLE_ROLE_INPUT">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="label" value="22" c:identifier="GTK_ACCESSIBLE_ROLE_LABEL" glib:nick="label" glib:name="GTK_ACCESSIBLE_ROLE_LABEL">
<doc xml:space="preserve">A visible name or caption for a user interface component.</doc>
</member>
<member name="landmark" value="23" c:identifier="GTK_ACCESSIBLE_ROLE_LANDMARK" glib:nick="landmark" glib:name="GTK_ACCESSIBLE_ROLE_LANDMARK">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="legend" value="24" c:identifier="GTK_ACCESSIBLE_ROLE_LEGEND" glib:nick="legend" glib:name="GTK_ACCESSIBLE_ROLE_LEGEND">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="link" value="25" c:identifier="GTK_ACCESSIBLE_ROLE_LINK" glib:nick="link" glib:name="GTK_ACCESSIBLE_ROLE_LINK">
<doc xml:space="preserve">A clickable link.</doc>
</member>
<member name="list" value="26" c:identifier="GTK_ACCESSIBLE_ROLE_LIST" glib:nick="list" glib:name="GTK_ACCESSIBLE_ROLE_LIST">
<doc xml:space="preserve">A list of items.</doc>
</member>
<member name="list_box" value="27" c:identifier="GTK_ACCESSIBLE_ROLE_LIST_BOX" glib:nick="list-box" glib:name="GTK_ACCESSIBLE_ROLE_LIST_BOX">
<doc xml:space="preserve">Unused.</doc>
</member>
<member name="list_item" value="28" c:identifier="GTK_ACCESSIBLE_ROLE_LIST_ITEM" glib:nick="list-item" glib:name="GTK_ACCESSIBLE_ROLE_LIST_ITEM">
<doc xml:space="preserve">An item in a list.</doc>
</member>
<member name="log" value="29" c:identifier="GTK_ACCESSIBLE_ROLE_LOG" glib:nick="log" glib:name="GTK_ACCESSIBLE_ROLE_LOG">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="main" value="30" c:identifier="GTK_ACCESSIBLE_ROLE_MAIN" glib:nick="main" glib:name="GTK_ACCESSIBLE_ROLE_MAIN">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="marquee" value="31" c:identifier="GTK_ACCESSIBLE_ROLE_MARQUEE" glib:nick="marquee" glib:name="GTK_ACCESSIBLE_ROLE_MARQUEE">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="math" value="32" c:identifier="GTK_ACCESSIBLE_ROLE_MATH" glib:nick="math" glib:name="GTK_ACCESSIBLE_ROLE_MATH">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="meter" value="33" c:identifier="GTK_ACCESSIBLE_ROLE_METER" glib:nick="meter" glib:name="GTK_ACCESSIBLE_ROLE_METER">
<doc xml:space="preserve">An element that represents a value within a known range.</doc>
</member>
<member name="menu" value="34" c:identifier="GTK_ACCESSIBLE_ROLE_MENU" glib:nick="menu" glib:name="GTK_ACCESSIBLE_ROLE_MENU">
<doc xml:space="preserve">A menu.</doc>
</member>
<member name="menu_bar" value="35" c:identifier="GTK_ACCESSIBLE_ROLE_MENU_BAR" glib:nick="menu-bar" glib:name="GTK_ACCESSIBLE_ROLE_MENU_BAR">
<doc xml:space="preserve">A menubar.</doc>
</member>
<member name="menu_item" value="36" c:identifier="GTK_ACCESSIBLE_ROLE_MENU_ITEM" glib:nick="menu-item" glib:name="GTK_ACCESSIBLE_ROLE_MENU_ITEM">
<doc xml:space="preserve">An item in a menu.</doc>
</member>
<member name="menu_item_checkbox" value="37" c:identifier="GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX" glib:nick="menu-item-checkbox" glib:name="GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX">
<doc xml:space="preserve">A check item in a menu.</doc>
</member>
<member name="menu_item_radio" value="38" c:identifier="GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO" glib:nick="menu-item-radio" glib:name="GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO">
<doc xml:space="preserve">A radio item in a menu.</doc>
</member>
<member name="navigation" value="39" c:identifier="GTK_ACCESSIBLE_ROLE_NAVIGATION" glib:nick="navigation" glib:name="GTK_ACCESSIBLE_ROLE_NAVIGATION">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="none" value="40" c:identifier="GTK_ACCESSIBLE_ROLE_NONE" glib:nick="none" glib:name="GTK_ACCESSIBLE_ROLE_NONE">
<doc xml:space="preserve">An element that is not represented to accessibility technologies.</doc>
</member>
<member name="note" value="41" c:identifier="GTK_ACCESSIBLE_ROLE_NOTE" glib:nick="note" glib:name="GTK_ACCESSIBLE_ROLE_NOTE">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="option" value="42" c:identifier="GTK_ACCESSIBLE_ROLE_OPTION" glib:nick="option" glib:name="GTK_ACCESSIBLE_ROLE_OPTION">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="presentation" value="43" c:identifier="GTK_ACCESSIBLE_ROLE_PRESENTATION" glib:nick="presentation" glib:name="GTK_ACCESSIBLE_ROLE_PRESENTATION">
<doc xml:space="preserve">An element that is not represented to accessibility technologies.</doc>
</member>
<member name="progress_bar" value="44" c:identifier="GTK_ACCESSIBLE_ROLE_PROGRESS_BAR" glib:nick="progress-bar" glib:name="GTK_ACCESSIBLE_ROLE_PROGRESS_BAR">
<doc xml:space="preserve">An element that displays the progress
status for tasks that take a long time.</doc>
</member>
<member name="radio" value="45" c:identifier="GTK_ACCESSIBLE_ROLE_RADIO" glib:nick="radio" glib:name="GTK_ACCESSIBLE_ROLE_RADIO">
<doc xml:space="preserve">A checkable input in a group of radio roles,
only one of which can be checked at a time.</doc>
</member>
<member name="radio_group" value="46" c:identifier="GTK_ACCESSIBLE_ROLE_RADIO_GROUP" glib:nick="radio-group" glib:name="GTK_ACCESSIBLE_ROLE_RADIO_GROUP">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="range" value="47" c:identifier="GTK_ACCESSIBLE_ROLE_RANGE" glib:nick="range" glib:name="GTK_ACCESSIBLE_ROLE_RANGE">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="region" value="48" c:identifier="GTK_ACCESSIBLE_ROLE_REGION" glib:nick="region" glib:name="GTK_ACCESSIBLE_ROLE_REGION">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="row" value="49" c:identifier="GTK_ACCESSIBLE_ROLE_ROW" glib:nick="row" glib:name="GTK_ACCESSIBLE_ROLE_ROW">
<doc xml:space="preserve">A row in a columned list.</doc>
</member>
<member name="row_group" value="50" c:identifier="GTK_ACCESSIBLE_ROLE_ROW_GROUP" glib:nick="row-group" glib:name="GTK_ACCESSIBLE_ROLE_ROW_GROUP">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="row_header" value="51" c:identifier="GTK_ACCESSIBLE_ROLE_ROW_HEADER" glib:nick="row-header" glib:name="GTK_ACCESSIBLE_ROLE_ROW_HEADER">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="scrollbar" value="52" c:identifier="GTK_ACCESSIBLE_ROLE_SCROLLBAR" glib:nick="scrollbar" glib:name="GTK_ACCESSIBLE_ROLE_SCROLLBAR">
<doc xml:space="preserve">A graphical object that controls the scrolling
of content within a viewing area, regardless of whether the content is fully
displayed within the viewing area.</doc>
</member>
<member name="search" value="53" c:identifier="GTK_ACCESSIBLE_ROLE_SEARCH" glib:nick="search" glib:name="GTK_ACCESSIBLE_ROLE_SEARCH">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="search_box" value="54" c:identifier="GTK_ACCESSIBLE_ROLE_SEARCH_BOX" glib:nick="search-box" glib:name="GTK_ACCESSIBLE_ROLE_SEARCH_BOX">
<doc xml:space="preserve">A type of textbox intended for specifying
search criteria.</doc>
</member>
<member name="section" value="55" c:identifier="GTK_ACCESSIBLE_ROLE_SECTION" glib:nick="section" glib:name="GTK_ACCESSIBLE_ROLE_SECTION">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="section_head" value="56" c:identifier="GTK_ACCESSIBLE_ROLE_SECTION_HEAD" glib:nick="section-head" glib:name="GTK_ACCESSIBLE_ROLE_SECTION_HEAD">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="select" value="57" c:identifier="GTK_ACCESSIBLE_ROLE_SELECT" glib:nick="select" glib:name="GTK_ACCESSIBLE_ROLE_SELECT">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="separator" value="58" c:identifier="GTK_ACCESSIBLE_ROLE_SEPARATOR" glib:nick="separator" glib:name="GTK_ACCESSIBLE_ROLE_SEPARATOR">
<doc xml:space="preserve">A divider that separates and distinguishes
sections of content or groups of menuitems.</doc>
</member>
<member name="slider" value="59" c:identifier="GTK_ACCESSIBLE_ROLE_SLIDER" glib:nick="slider" glib:name="GTK_ACCESSIBLE_ROLE_SLIDER">
<doc xml:space="preserve">A user input where the user selects a value
from within a given range.</doc>
</member>
<member name="spin_button" value="60" c:identifier="GTK_ACCESSIBLE_ROLE_SPIN_BUTTON" glib:nick="spin-button" glib:name="GTK_ACCESSIBLE_ROLE_SPIN_BUTTON">
<doc xml:space="preserve">A form of range that expects the user to
select from among discrete choices.</doc>
</member>
<member name="status" value="61" c:identifier="GTK_ACCESSIBLE_ROLE_STATUS" glib:nick="status" glib:name="GTK_ACCESSIBLE_ROLE_STATUS">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="structure" value="62" c:identifier="GTK_ACCESSIBLE_ROLE_STRUCTURE" glib:nick="structure" glib:name="GTK_ACCESSIBLE_ROLE_STRUCTURE">
<doc xml:space="preserve">Abstract role.</doc>
</member>
<member name="switch" value="63" c:identifier="GTK_ACCESSIBLE_ROLE_SWITCH" glib:nick="switch" glib:name="GTK_ACCESSIBLE_ROLE_SWITCH">
<doc xml:space="preserve">A type of checkbox that represents on/off values,
as opposed to checked/unchecked values.</doc>
</member>
<member name="tab" value="64" c:identifier="GTK_ACCESSIBLE_ROLE_TAB" glib:nick="tab" glib:name="GTK_ACCESSIBLE_ROLE_TAB">
<doc xml:space="preserve">An item in a list of tab used for switching pages.</doc>
</member>
<member name="table" value="65" c:identifier="GTK_ACCESSIBLE_ROLE_TABLE" glib:nick="table" glib:name="GTK_ACCESSIBLE_ROLE_TABLE">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="tab_list" value="66" c:identifier="GTK_ACCESSIBLE_ROLE_TAB_LIST" glib:nick="tab-list" glib:name="GTK_ACCESSIBLE_ROLE_TAB_LIST">
<doc xml:space="preserve">A list of tabs for switching pages.</doc>
</member>
<member name="tab_panel" value="67" c:identifier="GTK_ACCESSIBLE_ROLE_TAB_PANEL" glib:nick="tab-panel" glib:name="GTK_ACCESSIBLE_ROLE_TAB_PANEL">
<doc xml:space="preserve">A page in a notebook or stack.</doc>
</member>
<member name="text_box" value="68" c:identifier="GTK_ACCESSIBLE_ROLE_TEXT_BOX" glib:nick="text-box" glib:name="GTK_ACCESSIBLE_ROLE_TEXT_BOX">
<doc xml:space="preserve">A type of input that allows free-form text
as its value.</doc>
</member>
<member name="time" value="69" c:identifier="GTK_ACCESSIBLE_ROLE_TIME" glib:nick="time" glib:name="GTK_ACCESSIBLE_ROLE_TIME">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="timer" value="70" c:identifier="GTK_ACCESSIBLE_ROLE_TIMER" glib:nick="timer" glib:name="GTK_ACCESSIBLE_ROLE_TIMER">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="toolbar" value="71" c:identifier="GTK_ACCESSIBLE_ROLE_TOOLBAR" glib:nick="toolbar" glib:name="GTK_ACCESSIBLE_ROLE_TOOLBAR">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="tooltip" value="72" c:identifier="GTK_ACCESSIBLE_ROLE_TOOLTIP" glib:nick="tooltip" glib:name="GTK_ACCESSIBLE_ROLE_TOOLTIP">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="tree" value="73" c:identifier="GTK_ACCESSIBLE_ROLE_TREE" glib:nick="tree" glib:name="GTK_ACCESSIBLE_ROLE_TREE">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="tree_grid" value="74" c:identifier="GTK_ACCESSIBLE_ROLE_TREE_GRID" glib:nick="tree-grid" glib:name="GTK_ACCESSIBLE_ROLE_TREE_GRID">
<doc xml:space="preserve">A treeview-like, columned list.</doc>
</member>
<member name="tree_item" value="75" c:identifier="GTK_ACCESSIBLE_ROLE_TREE_ITEM" glib:nick="tree-item" glib:name="GTK_ACCESSIBLE_ROLE_TREE_ITEM">
<doc xml:space="preserve">Unused</doc>
</member>
<member name="widget" value="76" c:identifier="GTK_ACCESSIBLE_ROLE_WIDGET" glib:nick="widget" glib:name="GTK_ACCESSIBLE_ROLE_WIDGET">
<doc xml:space="preserve">An interactive component of a graphical user
interface. This is the role that GTK uses by default for widgets.</doc>
</member>
<member name="window" value="77" c:identifier="GTK_ACCESSIBLE_ROLE_WINDOW" glib:nick="window" glib:name="GTK_ACCESSIBLE_ROLE_WINDOW">
<doc xml:space="preserve">An application window.</doc>
</member>
</enumeration>
<enumeration name="AccessibleSort" glib:type-name="GtkAccessibleSort" glib:get-type="gtk_accessible_sort_get_type" c:type="GtkAccessibleSort">
<doc xml:space="preserve">The possible values for the %GTK_ACCESSIBLE_PROPERTY_SORT
accessible property.</doc>
<member name="none" value="0" c:identifier="GTK_ACCESSIBLE_SORT_NONE" glib:nick="none" glib:name="GTK_ACCESSIBLE_SORT_NONE">
<doc xml:space="preserve">There is no defined sort applied to the column.</doc>
</member>
<member name="ascending" value="1" c:identifier="GTK_ACCESSIBLE_SORT_ASCENDING" glib:nick="ascending" glib:name="GTK_ACCESSIBLE_SORT_ASCENDING">
<doc xml:space="preserve">Items are sorted in ascending order by this column.</doc>
</member>
<member name="descending" value="2" c:identifier="GTK_ACCESSIBLE_SORT_DESCENDING" glib:nick="descending" glib:name="GTK_ACCESSIBLE_SORT_DESCENDING">
<doc xml:space="preserve">Items are sorted in descending order by this column.</doc>
</member>
<member name="other" value="3" c:identifier="GTK_ACCESSIBLE_SORT_OTHER" glib:nick="other" glib:name="GTK_ACCESSIBLE_SORT_OTHER">
<doc xml:space="preserve">A sort algorithm other than ascending or
descending has been applied.</doc>
</member>
</enumeration>
<enumeration name="AccessibleState" glib:type-name="GtkAccessibleState" glib:get-type="gtk_accessible_state_get_type" c:type="GtkAccessibleState">
<doc xml:space="preserve">The possible accessible states of a [iface@Accessible].</doc>
<member name="busy" value="0" c:identifier="GTK_ACCESSIBLE_STATE_BUSY" glib:nick="busy" glib:name="GTK_ACCESSIBLE_STATE_BUSY">
<doc xml:space="preserve">A &#x201C;busy&#x201D; state. This state has boolean values</doc>
</member>
<member name="checked" value="1" c:identifier="GTK_ACCESSIBLE_STATE_CHECKED" glib:nick="checked" glib:name="GTK_ACCESSIBLE_STATE_CHECKED">
<doc xml:space="preserve">A &#x201C;checked&#x201D; state; indicates the current
state of a [class@CheckButton]. Value type: [enum@AccessibleTristate]</doc>
</member>
<member name="disabled" value="2" c:identifier="GTK_ACCESSIBLE_STATE_DISABLED" glib:nick="disabled" glib:name="GTK_ACCESSIBLE_STATE_DISABLED">
<doc xml:space="preserve">A &#x201C;disabled&#x201D; state; corresponds to the
[property@Widget:sensitive] property. It indicates a UI element
that is perceivable, but not editable or operable. Value type: boolean</doc>
</member>
<member name="expanded" value="3" c:identifier="GTK_ACCESSIBLE_STATE_EXPANDED" glib:nick="expanded" glib:name="GTK_ACCESSIBLE_STATE_EXPANDED">
<doc xml:space="preserve">An &#x201C;expanded&#x201D; state; corresponds to the
[property@Expander:expanded] property. Value type: boolean
or undefined</doc>
</member>
<member name="hidden" value="4" c:identifier="GTK_ACCESSIBLE_STATE_HIDDEN" glib:nick="hidden" glib:name="GTK_ACCESSIBLE_STATE_HIDDEN">
<doc xml:space="preserve">A &#x201C;hidden&#x201D; state; corresponds to the
[property@Widget:visible] property. You can use this state
explicitly on UI elements that should not be exposed to an assistive
technology. Value type: boolean
See also: %GTK_ACCESSIBLE_STATE_DISABLED</doc>
</member>
<member name="invalid" value="5" c:identifier="GTK_ACCESSIBLE_STATE_INVALID" glib:nick="invalid" glib:name="GTK_ACCESSIBLE_STATE_INVALID">
<doc xml:space="preserve">An &#x201C;invalid&#x201D; state; set when a widget
is showing an error. Value type: [enum@AccessibleInvalidState]</doc>
</member>
<member name="pressed" value="6" c:identifier="GTK_ACCESSIBLE_STATE_PRESSED" glib:nick="pressed" glib:name="GTK_ACCESSIBLE_STATE_PRESSED">
<doc xml:space="preserve">A &#x201C;pressed&#x201D; state; indicates the current
state of a [class@ToggleButton]. Value type: [enum@AccessibleTristate]
enumeration</doc>
</member>
<member name="selected" value="7" c:identifier="GTK_ACCESSIBLE_STATE_SELECTED" glib:nick="selected" glib:name="GTK_ACCESSIBLE_STATE_SELECTED">
<doc xml:space="preserve">A &#x201C;selected&#x201D; state; set when a widget
is selected. Value type: boolean or undefined</doc>
</member>
<function name="init_value" c:identifier="gtk_accessible_state_init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="state" transfer-ownership="none">
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
</enumeration>
<enumeration name="AccessibleTristate" glib:type-name="GtkAccessibleTristate" glib:get-type="gtk_accessible_tristate_get_type" c:type="GtkAccessibleTristate">
<doc xml:space="preserve">The possible values for the %GTK_ACCESSIBLE_STATE_PRESSED
accessible state.
Note that the %GTK_ACCESSIBLE_TRISTATE_FALSE and
%GTK_ACCESSIBLE_TRISTATE_TRUE have the same values
as %FALSE and %TRUE.</doc>
<member name="false" value="0" c:identifier="GTK_ACCESSIBLE_TRISTATE_FALSE" glib:nick="false" glib:name="GTK_ACCESSIBLE_TRISTATE_FALSE">
<doc xml:space="preserve">The state is `false`</doc>
</member>
<member name="true" value="1" c:identifier="GTK_ACCESSIBLE_TRISTATE_TRUE" glib:nick="true" glib:name="GTK_ACCESSIBLE_TRISTATE_TRUE">
<doc xml:space="preserve">The state is `true`</doc>
</member>
<member name="mixed" value="2" c:identifier="GTK_ACCESSIBLE_TRISTATE_MIXED" glib:nick="mixed" glib:name="GTK_ACCESSIBLE_TRISTATE_MIXED">
<doc xml:space="preserve">The state is `mixed`</doc>
</member>
</enumeration>
<class name="ActionBar" c:symbol-prefix="action_bar" c:type="GtkActionBar" parent="Widget" glib:type-name="GtkActionBar" glib:get-type="gtk_action_bar_get_type">
<doc xml:space="preserve">`GtkActionBar` is designed to present contextual actions.
![An example GtkActionBar](action-bar.png)
It is expected to be displayed below the content and expand
horizontally to fill the area.
It allows placing children at the start or the end. In addition, it
contains an internal centered box which is centered with respect to
the full width of the box, even if the children at either side take
up different amounts of space.
# CSS nodes
```
actionbar
&#x2570;&#x2500;&#x2500; revealer
&#x2570;&#x2500;&#x2500; box
&#x251C;&#x2500;&#x2500; box.start
&#x2502; &#x2570;&#x2500;&#x2500; [start children]
&#x251C;&#x2500;&#x2500; [center widget]
&#x2570;&#x2500;&#x2500; box.end
&#x2570;&#x2500;&#x2500; [end children]
```
A `GtkActionBar`'s CSS node is called `actionbar`. It contains a `revealer`
subnode, which contains a `box` subnode, which contains two `box` subnodes at
the start and end of the action bar, with `start` and `end style classes
respectively, as well as a center node that represents the center child.
Each of the boxes contains children packed for that side.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_action_bar_new">
<doc xml:space="preserve">Creates a new `GtkActionBar` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkActionBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_center_widget" c:identifier="gtk_action_bar_get_center_widget">
<doc xml:space="preserve">Retrieves the center bar widget of the bar.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the center `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_revealed" c:identifier="gtk_action_bar_get_revealed" glib:get-property="revealed">
<attribute name="org.gtk.Method.get_property" value="revealed"/>
<doc xml:space="preserve">Gets whether the contents of the action bar are revealed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current value of the [property@Gtk.ActionBar:revealed]
property</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="pack_end" c:identifier="gtk_action_bar_pack_end">
<doc xml:space="preserve">Adds @child to @action_bar, packed with reference to the
end of the @action_bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">A `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to be added to @action_bar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="pack_start" c:identifier="gtk_action_bar_pack_start">
<doc xml:space="preserve">Adds @child to @action_bar, packed with reference to the
start of the @action_bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">A `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to be added to @action_bar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_action_bar_remove">
<doc xml:space="preserve">Removes a child from @action_bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to be removed</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_center_widget" c:identifier="gtk_action_bar_set_center_widget">
<doc xml:space="preserve">Sets the center widget for the `GtkActionBar`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
<parameter name="center_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a widget to use for the center</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_revealed" c:identifier="gtk_action_bar_set_revealed" glib:set-property="revealed">
<attribute name="org.gtk.Method.set_property" value="revealed"/>
<doc xml:space="preserve">Reveals or conceals the content of the action bar.
Note: this does not show or hide @action_bar in the
[property@Gtk.Widget:visible] sense, so revealing has
no effect if the action bar is hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="action_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionBar`</doc>
<type name="ActionBar" c:type="GtkActionBar*"/>
</instance-parameter>
<parameter name="revealed" transfer-ownership="none">
<doc xml:space="preserve">The new value of the property</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="revealed" writable="1" transfer-ownership="none" setter="set_revealed" getter="get_revealed">
<attribute name="org.gtk.Property.get" value="gtk_action_bar_get_revealed"/>
<attribute name="org.gtk.Property.set" value="gtk_action_bar_set_revealed"/>
<doc xml:space="preserve">Controls whether the action bar shows its contents.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<interface name="Actionable" c:symbol-prefix="actionable" c:type="GtkActionable" glib:type-name="GtkActionable" glib:get-type="gtk_actionable_get_type" glib:type-struct="ActionableInterface">
<doc xml:space="preserve">The `GtkActionable` interface provides a convenient way of asscociating
widgets with actions.
It primarily consists of two properties: [property@Gtk.Actionable:action-name]
and [property@Gtk.Actionable:action-target]. There are also some convenience
APIs for setting these properties.
The action will be looked up in action groups that are found among
the widgets ancestors. Most commonly, these will be the actions with
the &#x201C;win.&#x201D; or &#x201C;app.&#x201D; prefix that are associated with the
`GtkApplicationWindow` or `GtkApplication`, but other action groups that
are added with [method@Gtk.Widget.insert_action_group] will be consulted
as well.</doc>
<prerequisite name="Widget"/>
<virtual-method name="get_action_name" invoker="get_action_name">
<attribute name="org.gtk.Property.get" value="action-name"/>
<doc xml:space="preserve">Gets the action name for @actionable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the action name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_action_target_value" invoker="get_action_target_value">
<attribute name="org.gtk.Method.get_property" value="action-target"/>
<doc xml:space="preserve">Gets the current target value of @actionable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_action_name" invoker="set_action_name">
<attribute name="org.gtk.Property.set" value="action-name"/>
<doc xml:space="preserve">Specifies the name of the action with which this widget should be
associated.
If @action_name is %NULL then the widget will be unassociated from
any previous action.
Usually this function is used when the widget is located (or will be
located) within the hierarchy of a `GtkApplicationWindow`.
Names are of the form &#x201C;win.save&#x201D; or &#x201C;app.quit&#x201D; for actions on the
containing [class@ApplicationWindow] or its associated [class@Application],
respectively. This is the same form used for actions in the [class@Gio.Menu]
associated with the window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an action name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_action_target_value" invoker="set_action_target_value">
<attribute name="org.gtk.Method.set_property" value="action-target"/>
<doc xml:space="preserve">Sets the target value of an actionable widget.
If @target_value is %NULL then the target value is unset.
The target value has two purposes. First, it is used as the parameter
to activation of the action associated with the `GtkActionable` widget.
Second, it is used to determine if the widget should be rendered as
&#x201C;active&#x201D; &#x2014; the widget is active if the state is equal to the given target.
Consider the example of associating a set of buttons with a [iface@Gio.Action]
with string state in a typical &#x201C;radio button&#x201D; situation. Each button
will be associated with the same action, but with a different target
value for that action. Clicking on a particular button will activate
the action with the target of that button, which will typically cause
the action&#x2019;s state to change to that value. Since the action&#x2019;s state
is now equal to the target value of the button, the button will now
be rendered as active (and the other buttons, with different targets,
rendered inactive).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="target_value" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a [struct@GLib.Variant] to set as the target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_action_name" c:identifier="gtk_actionable_get_action_name" glib:get-property="action-name">
<attribute name="org.gtk.Property.get" value="action-name"/>
<doc xml:space="preserve">Gets the action name for @actionable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the action name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_action_target_value" c:identifier="gtk_actionable_get_action_target_value">
<attribute name="org.gtk.Method.get_property" value="action-target"/>
<doc xml:space="preserve">Gets the current target value of @actionable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_action_name" c:identifier="gtk_actionable_set_action_name" glib:set-property="action-name">
<attribute name="org.gtk.Property.set" value="action-name"/>
<doc xml:space="preserve">Specifies the name of the action with which this widget should be
associated.
If @action_name is %NULL then the widget will be unassociated from
any previous action.
Usually this function is used when the widget is located (or will be
located) within the hierarchy of a `GtkApplicationWindow`.
Names are of the form &#x201C;win.save&#x201D; or &#x201C;app.quit&#x201D; for actions on the
containing [class@ApplicationWindow] or its associated [class@Application],
respectively. This is the same form used for actions in the [class@Gio.Menu]
associated with the window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an action name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_action_target" c:identifier="gtk_actionable_set_action_target" glib:set-property="action-target" introspectable="0">
<doc xml:space="preserve">Sets the target of an actionable widget.
This is a convenience function that calls [ctor@GLib.Variant.new] for
@format_string and uses the result to call
[method@Gtk.Actionable.set_action_target_value].
If you are setting a string-valued target and want to set
the action name at the same time, you can use
[method@Gtk.Actionable.set_detailed_action_name].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="format_string" transfer-ownership="none">
<doc xml:space="preserve">a [struct@GLib.Variant] format string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments appropriate for @format_string</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="set_action_target_value" c:identifier="gtk_actionable_set_action_target_value">
<attribute name="org.gtk.Method.set_property" value="action-target"/>
<doc xml:space="preserve">Sets the target value of an actionable widget.
If @target_value is %NULL then the target value is unset.
The target value has two purposes. First, it is used as the parameter
to activation of the action associated with the `GtkActionable` widget.
Second, it is used to determine if the widget should be rendered as
&#x201C;active&#x201D; &#x2014; the widget is active if the state is equal to the given target.
Consider the example of associating a set of buttons with a [iface@Gio.Action]
with string state in a typical &#x201C;radio button&#x201D; situation. Each button
will be associated with the same action, but with a different target
value for that action. Clicking on a particular button will activate
the action with the target of that button, which will typically cause
the action&#x2019;s state to change to that value. Since the action&#x2019;s state
is now equal to the target value of the button, the button will now
be rendered as active (and the other buttons, with different targets,
rendered inactive).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="target_value" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a [struct@GLib.Variant] to set as the target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="set_detailed_action_name" c:identifier="gtk_actionable_set_detailed_action_name">
<doc xml:space="preserve">Sets the action-name and associated string target value of an
actionable widget.
@detailed_action_name is a string in the format accepted by
[func@Gio.Action.parse_detailed_name].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</instance-parameter>
<parameter name="detailed_action_name" transfer-ownership="none">
<doc xml:space="preserve">the detailed action name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="action-name" writable="1" transfer-ownership="none" setter="set_action_name" getter="get_action_name">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="action-target" writable="1" transfer-ownership="none" setter="set_action_target">
<type name="GLib.Variant"/>
</property>
</interface>
<record name="ActionableInterface" c:type="GtkActionableInterface" glib:is-gtype-struct-for="Actionable">
<doc xml:space="preserve">The interface vtable for `GtkActionable`.</doc>
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="get_action_name">
<callback name="get_action_name">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the action name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_action_name">
<callback name="set_action_name">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an action name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_action_target_value">
<callback name="get_action_target_value">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_action_target_value">
<callback name="set_action_target_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="actionable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkActionable` widget</doc>
<type name="Actionable" c:type="GtkActionable*"/>
</parameter>
<parameter name="target_value" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a [struct@GLib.Variant] to set as the target value</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="ActivateAction" c:symbol-prefix="activate_action" c:type="GtkActivateAction" parent="ShortcutAction" glib:type-name="GtkActivateAction" glib:get-type="gtk_activate_action_get_type" glib:type-struct="ActivateActionClass">
<doc xml:space="preserve">A `GtkShortcutAction` that calls gtk_widget_activate().</doc>
<function name="get" c:identifier="gtk_activate_action_get">
<doc xml:space="preserve">Gets the activate action.
This is an action that calls gtk_widget_activate()
on the given widget upon activation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The activate action</doc>
<type name="ActivateAction" c:type="GtkShortcutAction*"/>
</return-value>
</function>
</class>
<record name="ActivateActionClass" c:type="GtkActivateActionClass" disguised="1" glib:is-gtype-struct-for="ActivateAction"/>
<class name="Adjustment" c:symbol-prefix="adjustment" c:type="GtkAdjustment" parent="GObject.InitiallyUnowned" glib:type-name="GtkAdjustment" glib:get-type="gtk_adjustment_get_type" glib:type-struct="AdjustmentClass">
<doc xml:space="preserve">`GtkAdjustment` is a model for a numeric value.
The `GtkAdjustment has an associated lower and upper bound.
It also contains step and page increments, and a page size.
Adjustments are used within several GTK widgets, including
[class@Gtk.SpinButton], [class@Gtk.Viewport], [class@Gtk.Scrollbar]
and [class@Gtk.Scale].
The `GtkAdjustment` object does not update the value itself. Instead
it is left up to the owner of the `GtkAdjustment` to control the value.</doc>
<constructor name="new" c:identifier="gtk_adjustment_new">
<doc xml:space="preserve">Creates a new `GtkAdjustment`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the initial value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="lower" transfer-ownership="none">
<doc xml:space="preserve">the minimum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="upper" transfer-ownership="none">
<doc xml:space="preserve">the maximum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="step_increment" transfer-ownership="none">
<doc xml:space="preserve">the step increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page_increment" transfer-ownership="none">
<doc xml:space="preserve">the page increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page_size" transfer-ownership="none">
<doc xml:space="preserve">the page size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="clamp_page" c:identifier="gtk_adjustment_clamp_page">
<doc xml:space="preserve">Updates the value property to ensure that the range
between @lower and @upper is in the current page.
The current page goes from `value` to `value` + `page-size`.
If the range is larger than the page size, then only the
start of it will be in the current page.
A [signal@Gtk.Adjustment::value-changed] signal will be emitted
if the value is changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="lower" transfer-ownership="none">
<doc xml:space="preserve">the lower value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="upper" transfer-ownership="none">
<doc xml:space="preserve">the upper value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="configure" c:identifier="gtk_adjustment_configure">
<doc xml:space="preserve">Sets all properties of the adjustment at once.
Use this function to avoid multiple emissions of the
[signal@Gtk.Adjustment::changed] signal. See
[method@Gtk.Adjustment.set_lower] for an alternative
way of compressing multiple emissions of
[signal@Gtk.Adjustment::changed] into one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="lower" transfer-ownership="none">
<doc xml:space="preserve">the new minimum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="upper" transfer-ownership="none">
<doc xml:space="preserve">the new maximum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="step_increment" transfer-ownership="none">
<doc xml:space="preserve">the new step increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page_increment" transfer-ownership="none">
<doc xml:space="preserve">the new page increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page_size" transfer-ownership="none">
<doc xml:space="preserve">the new page size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="get_lower" c:identifier="gtk_adjustment_get_lower" glib:get-property="lower">
<attribute name="org.gtk.Method.get_property" value="lower"/>
<doc xml:space="preserve">Retrieves the minimum value of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current minimum value of the adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_minimum_increment" c:identifier="gtk_adjustment_get_minimum_increment">
<doc xml:space="preserve">Gets the smaller of step increment and page increment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minimum increment of @adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_increment" c:identifier="gtk_adjustment_get_page_increment" glib:get-property="page-increment">
<attribute name="org.gtk.Method.get_property" value="page-increment"/>
<doc xml:space="preserve">Retrieves the page increment of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current page increment of the adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_size" c:identifier="gtk_adjustment_get_page_size" glib:get-property="page-size">
<attribute name="org.gtk.Method.get_property" value="page-size"/>
<doc xml:space="preserve">Retrieves the page size of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current page size of the adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_step_increment" c:identifier="gtk_adjustment_get_step_increment" glib:get-property="step-increment">
<attribute name="org.gtk.Method.get_property" value="step-increment"/>
<doc xml:space="preserve">Retrieves the step increment of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current step increment of the adjustment.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_upper" c:identifier="gtk_adjustment_get_upper" glib:get-property="upper">
<attribute name="org.gtk.Method.get_property" value="upper"/>
<doc xml:space="preserve">Retrieves the maximum value of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current maximum value of the adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_adjustment_get_value" glib:get-property="value">
<attribute name="org.gtk.Method.get_property" value="value"/>
<doc xml:space="preserve">Gets the current value of the adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current value of the adjustment</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_lower" c:identifier="gtk_adjustment_set_lower" glib:set-property="lower">
<attribute name="org.gtk.Method.set_property" value="lower"/>
<doc xml:space="preserve">Sets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual
setters, multiple [signal@Gtk.Adjustment::changed] signals will
be emitted. However, since the emission of the
[signal@Gtk.Adjustment::changed] signal is tied to the emission
of the ::notify signals of the changed properties, it&#x2019;s possible
to compress the [signal@Gtk.Adjustment::changed] signals into one
by calling g_object_freeze_notify() and g_object_thaw_notify()
around the calls to the individual setters.
Alternatively, using a single g_object_set() for all the properties
to change, or using [method@Gtk.Adjustment.configure] has the same effect.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="lower" transfer-ownership="none">
<doc xml:space="preserve">the new minimum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_page_increment" c:identifier="gtk_adjustment_set_page_increment" glib:set-property="page-increment">
<attribute name="org.gtk.Method.set_property" value="page-increment"/>
<doc xml:space="preserve">Sets the page increment of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="page_increment" transfer-ownership="none">
<doc xml:space="preserve">the new page increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_page_size" c:identifier="gtk_adjustment_set_page_size" glib:set-property="page-size">
<attribute name="org.gtk.Method.set_property" value="page-size"/>
<doc xml:space="preserve">Sets the page size of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="page_size" transfer-ownership="none">
<doc xml:space="preserve">the new page size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_step_increment" c:identifier="gtk_adjustment_set_step_increment" glib:set-property="step-increment">
<attribute name="org.gtk.Method.set_property" value="step-increment"/>
<doc xml:space="preserve">Sets the step increment of the adjustment.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="step_increment" transfer-ownership="none">
<doc xml:space="preserve">the new step increment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_upper" c:identifier="gtk_adjustment_set_upper" glib:set-property="upper">
<attribute name="org.gtk.Method.set_property" value="upper"/>
<doc xml:space="preserve">Sets the maximum value of the adjustment.
Note that values will be restricted by `upper - page-size`
if the page-size property is nonzero.
See [method@Gtk.Adjustment.set_lower] about how to compress
multiple emissions of the [signal@Gtk.Adjustment::changed]
signal when setting multiple adjustment properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="upper" transfer-ownership="none">
<doc xml:space="preserve">the new maximum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_adjustment_set_value" glib:set-property="value">
<attribute name="org.gtk.Method.set_property" value="value"/>
<doc xml:space="preserve">Sets the `GtkAdjustment` value.
The value is clamped to lie between [property@Gtk.Adjustment:lower]
and [property@Gtk.Adjustment:upper].
Note that for adjustments which are used in a `GtkScrollbar`,
the effective range of allowed values goes from
[property@Gtk.Adjustment:lower] to
[property@Gtk.Adjustment:upper] - [property@Gtk.Adjustment:page-size].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<property name="lower" writable="1" transfer-ownership="none" setter="set_lower" getter="get_lower">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_lower"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_lower"/>
<doc xml:space="preserve">The minimum value of the adjustment.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="page-increment" writable="1" transfer-ownership="none" setter="set_page_increment" getter="get_page_increment">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_page_increment"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_page_increment"/>
<doc xml:space="preserve">The page increment of the adjustment.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="page-size" writable="1" transfer-ownership="none" setter="set_page_size" getter="get_page_size">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_page_size"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_page_size"/>
<doc xml:space="preserve">The page size of the adjustment.
Note that the page-size is irrelevant and should be set to zero
if the adjustment is used for a simple scalar value, e.g. in a
`GtkSpinButton`.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="step-increment" writable="1" transfer-ownership="none" setter="set_step_increment" getter="get_step_increment">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_step_increment"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_step_increment"/>
<doc xml:space="preserve">The step increment of the adjustment.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="upper" writable="1" transfer-ownership="none" setter="set_upper" getter="get_upper">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_upper"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_upper"/>
<doc xml:space="preserve">The maximum value of the adjustment.
Note that values will be restricted by `upper - page-size` if the page-size
property is nonzero.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="value" writable="1" transfer-ownership="none" setter="set_value" getter="get_value">
<attribute name="org.gtk.Property.get" value="gtk_adjustment_get_value"/>
<attribute name="org.gtk.Property.set" value="gtk_adjustment_set_value"/>
<doc xml:space="preserve">The value of the adjustment.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<field name="parent_instance">
<type name="GObject.InitiallyUnowned" c:type="GInitiallyUnowned"/>
</field>
<glib:signal name="changed" when="first" no-recurse="1">
<doc xml:space="preserve">Emitted when one or more of the `GtkAdjustment` properties have been
changed.
Note that the [property@Gtk.Adjustment:value] property is
covered by the [signal@Gtk.Adjustment::value-changed] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="value-changed" when="first" no-recurse="1">
<doc xml:space="preserve">Emitted when the value has been changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="AdjustmentClass" c:type="GtkAdjustmentClass" glib:is-gtype-struct-for="Adjustment">
<field name="parent_class">
<type name="GObject.InitiallyUnownedClass" c:type="GInitiallyUnownedClass"/>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="adjustment" transfer-ownership="none">
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="value_changed">
<callback name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="adjustment" transfer-ownership="none">
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<enumeration name="Align" glib:type-name="GtkAlign" glib:get-type="gtk_align_get_type" c:type="GtkAlign">
<doc xml:space="preserve">Controls how a widget deals with extra space in a single dimension.
Alignment only matters if the widget receives a &#x201C;too large&#x201D; allocation,
for example if you packed the widget with the [property@Gtk.Widget:hexpand]
property inside a [class@Box], then the widget might get extra space.
If you have for example a 16x16 icon inside a 32x32 space, the icon
could be scaled and stretched, it could be centered, or it could be
positioned to one side of the space.
Note that in horizontal context %GTK_ALIGN_START and %GTK_ALIGN_END
are interpreted relative to text direction.
%GTK_ALIGN_BASELINE support is optional for containers and widgets, and
it is only supported for vertical alignment. When it's not supported by
a child or a container it is treated as %GTK_ALIGN_FILL.</doc>
<member name="fill" value="0" c:identifier="GTK_ALIGN_FILL" glib:nick="fill" glib:name="GTK_ALIGN_FILL">
<doc xml:space="preserve">stretch to fill all space if possible, center if
no meaningful way to stretch</doc>
</member>
<member name="start" value="1" c:identifier="GTK_ALIGN_START" glib:nick="start" glib:name="GTK_ALIGN_START">
<doc xml:space="preserve">snap to left or top side, leaving space on right or bottom</doc>
</member>
<member name="end" value="2" c:identifier="GTK_ALIGN_END" glib:nick="end" glib:name="GTK_ALIGN_END">
<doc xml:space="preserve">snap to right or bottom side, leaving space on left or top</doc>
</member>
<member name="center" value="3" c:identifier="GTK_ALIGN_CENTER" glib:nick="center" glib:name="GTK_ALIGN_CENTER">
<doc xml:space="preserve">center natural width of widget inside the allocation</doc>
</member>
<member name="baseline" value="4" c:identifier="GTK_ALIGN_BASELINE" glib:nick="baseline" glib:name="GTK_ALIGN_BASELINE">
<doc xml:space="preserve">align the widget according to the baseline.
See [class@Gtk.Widget].</doc>
</member>
</enumeration>
<class name="AlternativeTrigger" c:symbol-prefix="alternative_trigger" c:type="GtkAlternativeTrigger" parent="ShortcutTrigger" glib:type-name="GtkAlternativeTrigger" glib:get-type="gtk_alternative_trigger_get_type" glib:type-struct="AlternativeTriggerClass">
<doc xml:space="preserve">A `GtkShortcutTrigger` that combines two triggers.
The `GtkAlternativeTrigger` triggers when either of two trigger.
This can be cascaded to combine more than two triggers.</doc>
<constructor name="new" c:identifier="gtk_alternative_trigger_new">
<doc xml:space="preserve">Creates a `GtkShortcutTrigger` that will trigger whenever
either of the two given triggers gets triggered.
Note that nesting is allowed, so if you want more than two
alternative, create a new alternative trigger for each option.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<parameter name="first" transfer-ownership="full">
<doc xml:space="preserve">The first trigger that may trigger</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</parameter>
<parameter name="second" transfer-ownership="full">
<doc xml:space="preserve">The second trigger that may trigger</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</parameter>
</parameters>
</constructor>
<method name="get_first" c:identifier="gtk_alternative_trigger_get_first" glib:get-property="first">
<attribute name="org.gtk.Method.get_property" value="first"/>
<doc xml:space="preserve">Gets the first of the two alternative triggers that may
trigger @self.
[method@Gtk.AlternativeTrigger.get_second] will return
the other one.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the first alternative trigger</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">an alternative `GtkShortcutTrigger`</doc>
<type name="AlternativeTrigger" c:type="GtkAlternativeTrigger*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_second" c:identifier="gtk_alternative_trigger_get_second" glib:get-property="second">
<attribute name="org.gtk.Method.get_property" value="second"/>
<doc xml:space="preserve">Gets the second of the two alternative triggers that may
trigger @self.
[method@Gtk.AlternativeTrigger.get_first] will return
the other one.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the second alternative trigger</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">an alternative `GtkShortcutTrigger`</doc>
<type name="AlternativeTrigger" c:type="GtkAlternativeTrigger*"/>
</instance-parameter>
</parameters>
</method>
<property name="first" writable="1" construct-only="1" transfer-ownership="none" getter="get_first">
<attribute name="org.gtk.Property.get" value="gtk_alternative_trigger_get_first"/>
<doc xml:space="preserve">The first `GtkShortcutTrigger` to check.</doc>
<type name="ShortcutTrigger"/>
</property>
<property name="second" writable="1" construct-only="1" transfer-ownership="none" getter="get_second">
<attribute name="org.gtk.Property.get" value="gtk_alternative_trigger_get_second"/>
<doc xml:space="preserve">The second `GtkShortcutTrigger` to check.</doc>
<type name="ShortcutTrigger"/>
</property>
</class>
<record name="AlternativeTriggerClass" c:type="GtkAlternativeTriggerClass" disguised="1" glib:is-gtype-struct-for="AlternativeTrigger"/>
<class name="AnyFilter" c:symbol-prefix="any_filter" c:type="GtkAnyFilter" parent="MultiFilter" glib:type-name="GtkAnyFilter" glib:get-type="gtk_any_filter_get_type" glib:type-struct="AnyFilterClass">
<doc xml:space="preserve">`GtkAnyFilter` matches an item when at least one of its filters matches.
To add filters to a `GtkAnyFilter`, use [method@Gtk.MultiFilter.append].</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_any_filter_new">
<doc xml:space="preserve">Creates a new empty "any" filter.
Use [method@Gtk.MultiFilter.append] to add filters to it.
This filter matches an item if any of the filters added to it
matches the item. In particular, this means that if no filter
has been added to it, the filter matches no item.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkAnyFilter`</doc>
<type name="AnyFilter" c:type="GtkAnyFilter*"/>
</return-value>
</constructor>
</class>
<record name="AnyFilterClass" c:type="GtkAnyFilterClass" disguised="1" glib:is-gtype-struct-for="AnyFilter"/>
<interface name="AppChooser" c:symbol-prefix="app_chooser" c:type="GtkAppChooser" glib:type-name="GtkAppChooser" glib:get-type="gtk_app_chooser_get_type">
<doc xml:space="preserve">`GtkAppChooser` is an interface for widgets which allow the user to
choose an application.
The main objects that implement this interface are
[class@Gtk.AppChooserWidget],
[class@Gtk.AppChooserDialog] and [class@Gtk.AppChooserButton].
Applications are represented by GIO `GAppInfo` objects here.
GIO has a concept of recommended and fallback applications for a
given content type. Recommended applications are those that claim
to handle the content type itself, while fallback also includes
applications that handle a more generic content type. GIO also
knows the default and last-used application for a given content
type. The `GtkAppChooserWidget` provides detailed control over
whether the shown list of applications should include default,
recommended or fallback applications.
To obtain the application that has been selected in a `GtkAppChooser`,
use [method@Gtk.AppChooser.get_app_info].</doc>
<prerequisite name="Widget"/>
<method name="get_app_info" c:identifier="gtk_app_chooser_get_app_info">
<doc xml:space="preserve">Returns the currently selected application.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GAppInfo` for the
currently selected application</doc>
<type name="Gio.AppInfo" c:type="GAppInfo*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooser`</doc>
<type name="AppChooser" c:type="GtkAppChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_content_type" c:identifier="gtk_app_chooser_get_content_type" glib:get-property="content-type">
<attribute name="org.gtk.Method.get_property" value="content-type"/>
<doc xml:space="preserve">Returns the content type for which the `GtkAppChooser`
shows applications.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the content type of @self. Free with g_free()</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooser`</doc>
<type name="AppChooser" c:type="GtkAppChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="refresh" c:identifier="gtk_app_chooser_refresh">
<doc xml:space="preserve">Reloads the list of applications.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooser`</doc>
<type name="AppChooser" c:type="GtkAppChooser*"/>
</instance-parameter>
</parameters>
</method>
<property name="content-type" writable="1" construct-only="1" transfer-ownership="none" getter="get_content_type">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_get_content_type"/>
<doc xml:space="preserve">The content type of the `GtkAppChooser` object.
See `GContentType` for more information about content types.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</interface>
<class name="AppChooserButton" c:symbol-prefix="app_chooser_button" c:type="GtkAppChooserButton" parent="Widget" glib:type-name="GtkAppChooserButton" glib:get-type="gtk_app_chooser_button_get_type">
<doc xml:space="preserve">The `GtkAppChooserButton` lets the user select an application.
![An example GtkAppChooserButton](appchooserbutton.png)
Initially, a `GtkAppChooserButton` selects the first application
in its list, which will either be the most-recently used application
or, if [property@Gtk.AppChooserButton:show-default-item] is %TRUE, the
default application.
The list of applications shown in a `GtkAppChooserButton` includes
the recommended applications for the given content type. When
[property@Gtk.AppChooserButton:show-default-item] is set, the default
application is also included. To let the user chooser other applications,
you can set the [property@Gtk.AppChooserButton:show-dialog-item] property,
which allows to open a full [class@Gtk.AppChooserDialog].
It is possible to add custom items to the list, using
[method@Gtk.AppChooserButton.append_custom_item]. These items cause
the [signal@Gtk.AppChooserButton::custom-item-activated] signal to be
emitted when they are selected.
To track changes in the selected application, use the
[signal@Gtk.AppChooserButton::changed] signal.
# CSS nodes
`GtkAppChooserButton` has a single CSS node with the name &#x201C;appchooserbutton&#x201D;.</doc>
<implements name="Accessible"/>
<implements name="AppChooser"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_app_chooser_button_new">
<doc xml:space="preserve">Creates a new `GtkAppChooserButton` for applications
that can handle content of the given type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAppChooserButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="content_type" transfer-ownership="none">
<doc xml:space="preserve">the content type to show applications for</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="append_custom_item" c:identifier="gtk_app_chooser_button_append_custom_item">
<doc xml:space="preserve">Appends a custom item to the list of applications that is shown
in the popup.
The item name must be unique per-widget. Clients can use the
provided name as a detail for the
[signal@Gtk.AppChooserButton::custom-item-activated] signal, to add a
callback for the activation of a particular custom item in the list.
See also [method@Gtk.AppChooserButton.append_separator].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the custom item</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">the label for the custom item</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="icon" transfer-ownership="none">
<doc xml:space="preserve">the icon for the custom item</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</method>
<method name="append_separator" c:identifier="gtk_app_chooser_button_append_separator">
<doc xml:space="preserve">Appends a separator to the list of applications that is shown
in the popup.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_heading" c:identifier="gtk_app_chooser_button_get_heading" glib:get-property="heading">
<attribute name="org.gtk.Method.get_property" value="heading"/>
<doc xml:space="preserve">Returns the text to display at the top of the dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text to display at the top of the dialog,
or %NULL, in which case a default text is displayed</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modal" c:identifier="gtk_app_chooser_button_get_modal" glib:get-property="modal">
<attribute name="org.gtk.Method.get_property" value="modal"/>
<doc xml:space="preserve">Gets whether the dialog is modal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_default_item" c:identifier="gtk_app_chooser_button_get_show_default_item" glib:get-property="show-default-item">
<attribute name="org.gtk.Method.get_property" value="show-default-item"/>
<doc xml:space="preserve">Returns whether the dropdown menu should show the default
application at the top.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserButton:show-default-item]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_dialog_item" c:identifier="gtk_app_chooser_button_get_show_dialog_item" glib:get-property="show-dialog-item">
<attribute name="org.gtk.Method.get_property" value="show-dialog-item"/>
<doc xml:space="preserve">Returns whether the dropdown menu shows an item
for a `GtkAppChooserDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserButton:show-dialog-item]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_active_custom_item" c:identifier="gtk_app_chooser_button_set_active_custom_item">
<doc xml:space="preserve">Selects a custom item.
See [method@Gtk.AppChooserButton.append_custom_item].
Use [method@Gtk.AppChooser.refresh] to bring the selection
to its initial state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the custom item</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_heading" c:identifier="gtk_app_chooser_button_set_heading" glib:set-property="heading">
<attribute name="org.gtk.Method.set_property" value="heading"/>
<doc xml:space="preserve">Sets the text to display at the top of the dialog.
If the heading is not set, the dialog displays a default text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="heading" transfer-ownership="none">
<doc xml:space="preserve">a string containing Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_modal" c:identifier="gtk_app_chooser_button_set_modal" glib:set-property="modal">
<attribute name="org.gtk.Method.set_property" value="modal"/>
<doc xml:space="preserve">Sets whether the dialog should be modal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="modal" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the dialog modal</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_default_item" c:identifier="gtk_app_chooser_button_set_show_default_item" glib:set-property="show-default-item">
<attribute name="org.gtk.Method.set_property" value="show-default-item"/>
<doc xml:space="preserve">Sets whether the dropdown menu of this button should show the
default application for the given content type at top.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserButton:show-default-item]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_dialog_item" c:identifier="gtk_app_chooser_button_set_show_dialog_item" glib:set-property="show-dialog-item">
<attribute name="org.gtk.Method.set_property" value="show-dialog-item"/>
<doc xml:space="preserve">Sets whether the dropdown menu of this button should show an
entry to trigger a `GtkAppChooserDialog`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserButton`</doc>
<type name="AppChooserButton" c:type="GtkAppChooserButton*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserButton:show-dialog-item]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="heading" writable="1" transfer-ownership="none" setter="set_heading" getter="get_heading">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_button_get_heading"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_button_set_heading"/>
<doc xml:space="preserve">The text to show at the top of the dialog that can be
opened from the button.
The string may contain Pango markup.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="modal" writable="1" construct="1" transfer-ownership="none" setter="set_modal" getter="get_modal">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_button_get_modal"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_button_set_modal"/>
<doc xml:space="preserve">Whether the app chooser dialog should be modal.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-default-item" writable="1" construct="1" transfer-ownership="none" setter="set_show_default_item" getter="get_show_default_item">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_button_get_show_default_item"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_button_set_show_default_item"/>
<doc xml:space="preserve">Determines whether the dropdown menu shows the default application
on top for the provided content type.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-dialog-item" writable="1" construct="1" transfer-ownership="none" setter="set_show_dialog_item" getter="get_show_dialog_item">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_button_get_show_dialog_item"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_button_set_show_dialog_item"/>
<doc xml:space="preserve">Determines whether the dropdown menu shows an item to open
a `GtkAppChooserDialog`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="first" action="1" version="4.4">
<doc xml:space="preserve">Emitted to when the button is activated.
The `::activate` signal on `GtkAppChooserButton` is an action signal and
emitting it causes the button to pop up its dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted when the active application changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="custom-item-activated" when="first" detailed="1">
<doc xml:space="preserve">Emitted when a custom item is activated.
Use [method@Gtk.AppChooserButton.append_custom_item],
to add custom items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="item_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the activated item</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="AppChooserDialog" c:symbol-prefix="app_chooser_dialog" c:type="GtkAppChooserDialog" parent="Dialog" glib:type-name="GtkAppChooserDialog" glib:get-type="gtk_app_chooser_dialog_get_type">
<doc xml:space="preserve">`GtkAppChooserDialog` shows a `GtkAppChooserWidget` inside a `GtkDialog`.
![An example GtkAppChooserDialog](appchooserdialog.png)
Note that `GtkAppChooserDialog` does not have any interesting methods
of its own. Instead, you should get the embedded `GtkAppChooserWidget`
using [method@Gtk.AppChooserDialog.get_widget] and call its methods if
the generic [iface@Gtk.AppChooser] interface is not sufficient for
your needs.
To set the heading that is shown above the `GtkAppChooserWidget`,
use [method@Gtk.AppChooserDialog.set_heading].</doc>
<implements name="Accessible"/>
<implements name="AppChooser"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_app_chooser_dialog_new">
<doc xml:space="preserve">Creates a new `GtkAppChooserDialog` for the provided `GFile`.
The dialog will show applications that can open the file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAppChooserDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags for this dialog</doc>
<type name="DialogFlags" c:type="GtkDialogFlags"/>
</parameter>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">a `GFile`</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_content_type" c:identifier="gtk_app_chooser_dialog_new_for_content_type">
<doc xml:space="preserve">Creates a new `GtkAppChooserDialog` for the provided content type.
The dialog will show applications that can open the content type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAppChooserDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags for this dialog</doc>
<type name="DialogFlags" c:type="GtkDialogFlags"/>
</parameter>
<parameter name="content_type" transfer-ownership="none">
<doc xml:space="preserve">a content type string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_heading" c:identifier="gtk_app_chooser_dialog_get_heading" glib:get-property="heading">
<attribute name="org.gtk.Method.get_property" value="heading"/>
<doc xml:space="preserve">Returns the text to display at the top of the dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text to display at the top of the dialog,
or %NULL, in which case a default text is displayed</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserDialog`</doc>
<type name="AppChooserDialog" c:type="GtkAppChooserDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widget" c:identifier="gtk_app_chooser_dialog_get_widget">
<doc xml:space="preserve">Returns the `GtkAppChooserWidget` of this dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkAppChooserWidget` of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserDialog`</doc>
<type name="AppChooserDialog" c:type="GtkAppChooserDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_heading" c:identifier="gtk_app_chooser_dialog_set_heading" glib:set-property="heading">
<attribute name="org.gtk.Method.set_property" value="heading"/>
<doc xml:space="preserve">Sets the text to display at the top of the dialog.
If the heading is not set, the dialog displays a default text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserDialog`</doc>
<type name="AppChooserDialog" c:type="GtkAppChooserDialog*"/>
</instance-parameter>
<parameter name="heading" transfer-ownership="none">
<doc xml:space="preserve">a string containing Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="gfile" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The GFile used by the `GtkAppChooserDialog`.
The dialog's `GtkAppChooserWidget` content type will
be guessed from the file, if present.</doc>
<type name="Gio.File"/>
</property>
<property name="heading" writable="1" transfer-ownership="none" setter="set_heading" getter="get_heading">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_dialog_get_heading"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_dialog_set_heading"/>
<doc xml:space="preserve">The text to show at the top of the dialog.
The string may contain Pango markup.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="AppChooserWidget" c:symbol-prefix="app_chooser_widget" c:type="GtkAppChooserWidget" parent="Widget" glib:type-name="GtkAppChooserWidget" glib:get-type="gtk_app_chooser_widget_get_type">
<doc xml:space="preserve">`GtkAppChooserWidget` is a widget for selecting applications.
It is the main building block for [class@Gtk.AppChooserDialog].
Most applications only need to use the latter; but you can use
this widget as part of a larger widget if you have special needs.
`GtkAppChooserWidget` offers detailed control over what applications
are shown, using the
[property@Gtk.AppChooserWidget:show-default],
[property@Gtk.AppChooserWidget:show-recommended],
[property@Gtk.AppChooserWidget:show-fallback],
[property@Gtk.AppChooserWidget:show-other] and
[property@Gtk.AppChooserWidget:show-all] properties. See the
[iface@Gtk.AppChooser] documentation for more information about these
groups of applications.
To keep track of the selected application, use the
[signal@Gtk.AppChooserWidget::application-selected] and
[signal@Gtk.AppChooserWidget::application-activated] signals.
# CSS nodes
`GtkAppChooserWidget` has a single CSS node with name appchooser.</doc>
<implements name="Accessible"/>
<implements name="AppChooser"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_app_chooser_widget_new">
<doc xml:space="preserve">Creates a new `GtkAppChooserWidget` for applications
that can handle content of the given type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAppChooserWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="content_type" transfer-ownership="none">
<doc xml:space="preserve">the content type to show applications for</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_default_text" c:identifier="gtk_app_chooser_widget_get_default_text" glib:get-property="default-text">
<attribute name="org.gtk.Method.get_property" value="default-text"/>
<doc xml:space="preserve">Returns the text that is shown if there are not applications
that can handle the content type.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:default-text]</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_all" c:identifier="gtk_app_chooser_widget_get_show_all" glib:get-property="show-all">
<attribute name="org.gtk.Method.get_property" value="show-all"/>
<doc xml:space="preserve">Gets whether the app chooser should show all applications
in a flat list.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:show-all]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_default" c:identifier="gtk_app_chooser_widget_get_show_default" glib:get-property="show-default">
<attribute name="org.gtk.Method.get_property" value="show-default"/>
<doc xml:space="preserve">Gets whether the app chooser should show the default handler
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:show-default]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_fallback" c:identifier="gtk_app_chooser_widget_get_show_fallback" glib:get-property="show-fallback">
<attribute name="org.gtk.Method.get_property" value="show-fallback"/>
<doc xml:space="preserve">Gets whether the app chooser should show related applications
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:show-fallback]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_other" c:identifier="gtk_app_chooser_widget_get_show_other" glib:get-property="show-other">
<attribute name="org.gtk.Method.get_property" value="show-other"/>
<doc xml:space="preserve">Gets whether the app chooser should show applications
which are unrelated to the content type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:show-other]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_recommended" c:identifier="gtk_app_chooser_widget_get_show_recommended" glib:get-property="show-recommended">
<attribute name="org.gtk.Method.get_property" value="show-recommended"/>
<doc xml:space="preserve">Gets whether the app chooser should show recommended applications
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of [property@Gtk.AppChooserWidget:show-recommended]</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_default_text" c:identifier="gtk_app_chooser_widget_set_default_text" glib:set-property="default-text">
<attribute name="org.gtk.Method.set_property" value="default-text"/>
<doc xml:space="preserve">Sets the text that is shown if there are not applications
that can handle the content type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:default-text]</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_show_all" c:identifier="gtk_app_chooser_widget_set_show_all" glib:set-property="show-all">
<attribute name="org.gtk.Method.set_property" value="show-all"/>
<doc xml:space="preserve">Sets whether the app chooser should show all applications
in a flat list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:show-all]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_default" c:identifier="gtk_app_chooser_widget_set_show_default" glib:set-property="show-default">
<attribute name="org.gtk.Method.set_property" value="show-default"/>
<doc xml:space="preserve">Sets whether the app chooser should show the default handler
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:show-default]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_fallback" c:identifier="gtk_app_chooser_widget_set_show_fallback" glib:set-property="show-fallback">
<attribute name="org.gtk.Method.set_property" value="show-fallback"/>
<doc xml:space="preserve">Sets whether the app chooser should show related applications
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:show-fallback]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_other" c:identifier="gtk_app_chooser_widget_set_show_other" glib:set-property="show-other">
<attribute name="org.gtk.Method.set_property" value="show-other"/>
<doc xml:space="preserve">Sets whether the app chooser should show applications
which are unrelated to the content type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:show-other]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_recommended" c:identifier="gtk_app_chooser_widget_set_show_recommended" glib:set-property="show-recommended">
<attribute name="org.gtk.Method.set_property" value="show-recommended"/>
<doc xml:space="preserve">Sets whether the app chooser should show recommended applications
for the content type in a separate section.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAppChooserWidget`</doc>
<type name="AppChooserWidget" c:type="GtkAppChooserWidget*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value for [property@Gtk.AppChooserWidget:show-recommended]</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="default-text" writable="1" transfer-ownership="none" setter="set_default_text" getter="get_default_text">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_default_text"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_default_text"/>
<doc xml:space="preserve">The text that appears in the widget when there are no applications
for the given content type.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="show-all" writable="1" construct="1" transfer-ownership="none" setter="set_show_all" getter="get_show_all">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_show_all"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_show_all"/>
<doc xml:space="preserve">If %TRUE, the app chooser presents all applications
in a single list, without subsections for default,
recommended or related applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-default" writable="1" construct="1" transfer-ownership="none" setter="set_show_default" getter="get_show_default">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_show_default"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_show_default"/>
<doc xml:space="preserve">Determines whether the app chooser should show the default
handler for the content type in a separate section.
If %FALSE, the default handler is listed among the recommended
applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-fallback" writable="1" construct="1" transfer-ownership="none" setter="set_show_fallback" getter="get_show_fallback">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_show_fallback"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_show_fallback"/>
<doc xml:space="preserve">Determines whether the app chooser should show a section
for fallback applications.
If %FALSE, the fallback applications are listed among the
other applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-other" writable="1" construct="1" transfer-ownership="none" setter="set_show_other" getter="get_show_other">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_show_other"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_show_other"/>
<doc xml:space="preserve">Determines whether the app chooser should show a section
for other applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-recommended" writable="1" construct="1" transfer-ownership="none" setter="set_show_recommended" getter="get_show_recommended">
<attribute name="org.gtk.Property.get" value="gtk_app_chooser_widget_get_show_recommended"/>
<attribute name="org.gtk.Property.set" value="gtk_app_chooser_widget_set_show_recommended"/>
<doc xml:space="preserve">Determines whether the app chooser should show a section
for recommended applications.
If %FALSE, the recommended applications are listed
among the other applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="application-activated" when="first">
<doc xml:space="preserve">Emitted when an application item is activated from the widget's list.
This usually happens when the user double clicks an item, or an item
is selected and the user presses one of the keys Space, Shift+Space,
Return or Enter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">the activated `GAppInfo`</doc>
<type name="Gio.AppInfo"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="application-selected" when="first">
<doc xml:space="preserve">Emitted when an application item is selected from the widget's list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">the selected `GAppInfo`</doc>
<type name="Gio.AppInfo"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="Application" c:symbol-prefix="application" c:type="GtkApplication" parent="Gio.Application" glib:type-name="GtkApplication" glib:get-type="gtk_application_get_type" glib:type-struct="ApplicationClass">
<doc xml:space="preserve">`GtkApplication` is a high-level API for writing applications.
It supports many aspects of writing a GTK application in a convenient
fashion, without enforcing a one-size-fits-all model.
Currently, `GtkApplication` handles GTK initialization, application
uniqueness, session management, provides some basic scriptability and
desktop shell integration by exporting actions and menus and manages a
list of toplevel windows whose life-cycle is automatically tied to the
life-cycle of your application.
While `GtkApplication` works fine with plain [class@Gtk.Window]s, it is
recommended to use it together with [class@Gtk.ApplicationWindow].
## Automatic resources
`GtkApplication` will automatically load menus from the `GtkBuilder`
resource located at "gtk/menus.ui", relative to the application's
resource base path (see `g_application_set_resource_base_path()`).
The menu with the ID "menubar" is taken as the application's
menubar. Additional menus (most interesting submenus) can be named
and accessed via [method@Gtk.Application.get_menu_by_id] which allows for
dynamic population of a part of the menu structure.
It is also possible to provide the menubar manually using
[method@Gtk.Application.set_menubar].
`GtkApplication` will also automatically setup an icon search path for
the default icon theme by appending "icons" to the resource base
path. This allows your application to easily store its icons as
resources. See [method@Gtk.IconTheme.add_resource_path] for more
information.
If there is a resource located at "gtk/help-overlay.ui" which
defines a [class@Gtk.ShortcutsWindow] with ID "help_overlay" then
`GtkApplication` associates an instance of this shortcuts window with
each [class@Gtk.ApplicationWindow] and sets up the keyboard accelerator
&lt;kbd&gt;Control&lt;/kbd&gt;+&lt;kbd&gt;?&lt;/kbd&gt; to open it. To create a menu item that
displays the shortcuts window, associate the item with the action
`win.show-help-overlay`.
## A simple application
[A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/main/examples/bp/bloatpad.c)
is available in the GTK source code repository
`GtkApplication` optionally registers with a session manager of the
users session (if you set the [property@Gtk.Application:register-session]
property) and offers various functionality related to the session
life-cycle.
An application can block various ways to end the session with
the [method@Gtk.Application.inhibit] function. Typical use cases for
this kind of inhibiting are long-running, uninterruptible operations,
such as burning a CD or performing a disk backup. The session
manager may not honor the inhibitor, but it can be expected to
inform the user about the negative consequences of ending the
session while inhibitors are present.
## See Also
[HowDoI: Using GtkApplication](https://wiki.gnome.org/HowDoI/GtkApplication),
[Getting Started with GTK: Basics](getting_started.html#basics)</doc>
<implements name="Gio.ActionGroup"/>
<implements name="Gio.ActionMap"/>
<constructor name="new" c:identifier="gtk_application_new">
<doc xml:space="preserve">Creates a new `GtkApplication` instance.
When using `GtkApplication`, it is not necessary to call [func@Gtk.init]
manually. It is called as soon as the application gets registered as
the primary instance.
Concretely, [func@Gtk.init] is called in the default handler for the
`GApplication::startup` signal. Therefore, `GtkApplication` subclasses should
always chain up in their `GApplication::startup` handler before using any GTK
API.
Note that commandline arguments are not passed to [func@Gtk.init].
If `application_id` is not %NULL, then it must be valid. See
`g_application_id_is_valid()`.
If no application ID is given then some features (most notably application
uniqueness) will be disabled.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkApplication` instance</doc>
<type name="Application" c:type="GtkApplication*"/>
</return-value>
<parameters>
<parameter name="application_id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The application ID</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the application flags</doc>
<type name="Gio.ApplicationFlags" c:type="GApplicationFlags"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="window_added">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="window_removed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</virtual-method>
<method name="add_window" c:identifier="gtk_application_add_window">
<doc xml:space="preserve">Adds a window to `application`.
This call can only happen after the `application` has started;
typically, you should add new application windows in response
to the emission of the `GApplication::activate` signal.
This call is equivalent to setting the [property@Gtk.Window:application]
property of `window` to `application`.
Normally, the connection between the application and the window
will remain until the window is destroyed, but you can explicitly
remove it with [method@Gtk.Application.remove_window].
GTK will keep the `application` running as long as it has
any windows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="get_accels_for_action" c:identifier="gtk_application_get_accels_for_action">
<doc xml:space="preserve">Gets the accelerators that are currently associated with
the given action.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">
accelerators for `detailed_action_name`</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="detailed_action_name" transfer-ownership="none">
<doc xml:space="preserve">a detailed action name, specifying an action
and target to obtain accelerators for</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_actions_for_accel" c:identifier="gtk_application_get_actions_for_accel">
<doc xml:space="preserve">Returns the list of actions (possibly empty) that `accel` maps to.
Each item in the list is a detailed action name in the usual form.
This might be useful to discover if an accel already exists in
order to prevent installation of a conflicting accelerator (from
an accelerator editor or a plugin system, for example). Note that
having more than one action per accelerator may not be a bad thing
and might make sense in cases where the actions never appear in the
same context.
In case there are no actions for a given accelerator, an empty array
is returned. `NULL` is never returned.
It is a programmer error to pass an invalid accelerator string.
If you are unsure, check it with [func@Gtk.accelerator_parse] first.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a %NULL-terminated array of actions for `accel`</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="accel" transfer-ownership="none">
<doc xml:space="preserve">an accelerator that can be parsed by [func@Gtk.accelerator_parse]</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_active_window" c:identifier="gtk_application_get_active_window" glib:get-property="active-window">
<attribute name="org.gtk.Method.get_property" value="active-window"/>
<doc xml:space="preserve">Gets the &#x201C;active&#x201D; window for the application.
The active window is the one that was most recently focused (within
the application). This window may not have the focus at the moment
if another application has it &#x2014; this is just the most
recently-focused window within this application.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the active window</doc>
<type name="Window" c:type="GtkWindow*"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_menu_by_id" c:identifier="gtk_application_get_menu_by_id">
<doc xml:space="preserve">Gets a menu from automatically loaded resources.
See [the section on Automatic resources](class.Application.html#automatic-resources)
for more information.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">Gets the menu with the
given id from the automatically loaded resources</doc>
<type name="Gio.Menu" c:type="GMenu*"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the id of the menu to look up</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_menubar" c:identifier="gtk_application_get_menubar" glib:get-property="menubar">
<attribute name="org.gtk.Method.get_property" value="menubar"/>
<doc xml:space="preserve">Returns the menu model that has been set with
[method@Gtk.Application.set_menubar].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menubar for windows of `application`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_window_by_id" c:identifier="gtk_application_get_window_by_id">
<doc xml:space="preserve">Returns the [class@Gtk.ApplicationWindow] with the given ID.
The ID of a `GtkApplicationWindow` can be retrieved with
[method@Gtk.ApplicationWindow.get_id].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the window for the given `id`</doc>
<type name="Window" c:type="GtkWindow*"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">an identifier number</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_windows" c:identifier="gtk_application_get_windows">
<doc xml:space="preserve">Gets a list of the [class@Gtk.Window] instances associated with `application`.
The list is sorted by most recently focused window, such that the first
element is the currently focused window. (Useful for choosing a parent
for a transient window.)
The list that is returned should not be modified in any way. It will
only remain valid until the next focus change or window creation or
deletion.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GList` of `GtkWindow`
instances</doc>
<type name="GLib.List" c:type="GList*">
<type name="Window"/>
</type>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
</parameters>
</method>
<method name="inhibit" c:identifier="gtk_application_inhibit">
<doc xml:space="preserve">Inform the session manager that certain types of actions should be
inhibited.
This is not guaranteed to work on all platforms and for all types of
actions.
Applications should invoke this method when they begin an operation
that should not be interrupted, such as creating a CD or DVD. The
types of actions that may be blocked are specified by the `flags`
parameter. When the application completes the operation it should
call [method@Gtk.Application.uninhibit] to remove the inhibitor. Note
that an application can have multiple inhibitors, and all of them must
be individually removed. Inhibitors are also cleared when the
application exits.
Applications should not expect that they will always be able to block
the action. In most cases, users will be given the option to force
the action to take place.
The `reason` message should be short and to the point.
If `window` is given, the session manager may point the user to
this window to find out more about why the action is inhibited.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A non-zero cookie that is used to uniquely identify this
request. It should be used as an argument to [method@Gtk.Application.uninhibit]
in order to remove the request. If the platform does not support
inhibiting or the request failed for some reason, 0 is returned.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">the `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">what types of actions should be inhibited</doc>
<type name="ApplicationInhibitFlags" c:type="GtkApplicationInhibitFlags"/>
</parameter>
<parameter name="reason" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a short, human-readable string that explains
why these operations are inhibited</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="list_action_descriptions" c:identifier="gtk_application_list_action_descriptions">
<doc xml:space="preserve">Lists the detailed action names which have associated accelerators.
See [method@Gtk.Application.set_accels_for_action].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the detailed action names</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_window" c:identifier="gtk_application_remove_window">
<doc xml:space="preserve">Remove a window from `application`.
If `window` belongs to `application` then this call is equivalent to
setting the [property@Gtk.Window:application] property of `window` to
`NULL`.
The application may stop running as a result of a call to this
function, if `window` was the last window of the `application`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="set_accels_for_action" c:identifier="gtk_application_set_accels_for_action">
<doc xml:space="preserve">Sets zero or more keyboard accelerators that will trigger the
given action.
The first item in `accels` will be the primary accelerator, which may be
displayed in the UI.
To remove all accelerators for an action, use an empty, zero-terminated
array for `accels`.
For the `detailed_action_name`, see `g_action_parse_detailed_name()` and
`g_action_print_detailed_name()`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="detailed_action_name" transfer-ownership="none">
<doc xml:space="preserve">a detailed action name, specifying an action
and target to associate accelerators with</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="accels" transfer-ownership="none">
<doc xml:space="preserve">a list of accelerators in the format
understood by [func@Gtk.accelerator_parse]</doc>
<array c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_menubar" c:identifier="gtk_application_set_menubar" glib:set-property="menubar">
<attribute name="org.gtk.Method.set_property" value="menubar"/>
<doc xml:space="preserve">Sets or unsets the menubar for windows of `application`.
This is a menubar in the traditional sense.
This can only be done in the primary instance of the application,
after it has been registered. `GApplication::startup` is a good place
to call this.
Depending on the desktop environment, this may appear at the top of
each window, or at the top of the screen. In some environments, if
both the application menu and the menubar are set, the application
menu will be presented as if it were the first item of the menubar.
Other environments treat the two as completely separate &#x2014; for example,
the application menu may be rendered by the desktop shell while the
menubar (if set) remains in each individual window.
Use the base `GActionMap` interface to add actions, to respond to the
user selecting these menu items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="menubar" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="uninhibit" c:identifier="gtk_application_uninhibit">
<doc xml:space="preserve">Removes an inhibitor that has been previously established.
See [method@Gtk.Application.inhibit].
Inhibitors are also cleared when the application exits.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">the `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</instance-parameter>
<parameter name="cookie" transfer-ownership="none">
<doc xml:space="preserve">a cookie that was returned by [method@Gtk.Application.inhibit]</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="active-window" transfer-ownership="none" getter="get_active_window">
<attribute name="org.gtk.Property.get" value="gtk_application_get_active_window"/>
<doc xml:space="preserve">The currently focused window of the application.</doc>
<type name="Window"/>
</property>
<property name="menubar" writable="1" transfer-ownership="none" setter="set_menubar" getter="get_menubar">
<attribute name="org.gtk.Property.get" value="gtk_application_get_menubar"/>
<attribute name="org.gtk.Property.set" value="gtk_application_set_menubar"/>
<doc xml:space="preserve">The `GMenuModel` to be used for the application's menu bar.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="register-session" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Set this property to `TRUE` to register with the session manager.
This will make GTK track the session state (such as the
[property@Gtk.Application:screensaver-active] property).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="screensaver-active" transfer-ownership="none">
<doc xml:space="preserve">This property is `TRUE` if GTK believes that the screensaver is
currently active.
GTK only tracks session state (including this) when
[property@Gtk.Application:register-session] is set to %TRUE.
Tracking the screensaver state is currently only supported on
Linux.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Gio.Application" c:type="GApplication"/>
</field>
<glib:signal name="query-end" when="first">
<doc xml:space="preserve">Emitted when the session manager is about to end the session.
This signal is only emitted if [property@Gtk.Application:register-session]
is `TRUE`. Applications can connect to this signal and call
[method@Gtk.Application.inhibit] with `GTK_APPLICATION_INHIBIT_LOGOUT`
to delay the end of the session until state has been saved.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="window-added" when="first">
<doc xml:space="preserve">Emitted when a [class@Gtk.Window] is added to `application` through
[method@Gtk.Application.add_window].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">the newly-added [class@Gtk.Window]</doc>
<type name="Window"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="window-removed" when="first">
<doc xml:space="preserve">Emitted when a [class@Gtk.Window] is removed from `application`.
This can happen as a side-effect of the window being destroyed
or explicitly through [method@Gtk.Application.remove_window].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">the [class@Gtk.Window] that is being removed</doc>
<type name="Window"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="ApplicationClass" c:type="GtkApplicationClass" glib:is-gtype-struct-for="Application">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="Gio.ApplicationClass" c:type="GApplicationClass"/>
</field>
<field name="window_added">
<callback name="window_added">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="application" transfer-ownership="none">
<type name="Application" c:type="GtkApplication*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="window_removed">
<callback name="window_removed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="application" transfer-ownership="none">
<type name="Application" c:type="GtkApplication*"/>
</parameter>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<bitfield name="ApplicationInhibitFlags" glib:type-name="GtkApplicationInhibitFlags" glib:get-type="gtk_application_inhibit_flags_get_type" c:type="GtkApplicationInhibitFlags">
<doc xml:space="preserve">Types of user actions that may be blocked by `GtkApplication`.
See [method@Gtk.Application.inhibit].</doc>
<member name="logout" value="1" c:identifier="GTK_APPLICATION_INHIBIT_LOGOUT" glib:nick="logout" glib:name="GTK_APPLICATION_INHIBIT_LOGOUT">
<doc xml:space="preserve">Inhibit ending the user session
by logging out or by shutting down the computer</doc>
</member>
<member name="switch" value="2" c:identifier="GTK_APPLICATION_INHIBIT_SWITCH" glib:nick="switch" glib:name="GTK_APPLICATION_INHIBIT_SWITCH">
<doc xml:space="preserve">Inhibit user switching</doc>
</member>
<member name="suspend" value="4" c:identifier="GTK_APPLICATION_INHIBIT_SUSPEND" glib:nick="suspend" glib:name="GTK_APPLICATION_INHIBIT_SUSPEND">
<doc xml:space="preserve">Inhibit suspending the
session or computer</doc>
</member>
<member name="idle" value="8" c:identifier="GTK_APPLICATION_INHIBIT_IDLE" glib:nick="idle" glib:name="GTK_APPLICATION_INHIBIT_IDLE">
<doc xml:space="preserve">Inhibit the session being
marked as idle (and possibly locked)</doc>
</member>
</bitfield>
<class name="ApplicationWindow" c:symbol-prefix="application_window" c:type="GtkApplicationWindow" parent="Window" glib:type-name="GtkApplicationWindow" glib:get-type="gtk_application_window_get_type" glib:type-struct="ApplicationWindowClass">
<doc xml:space="preserve">`GtkApplicationWindow` is a `GtkWindow` subclass that integrates with
`GtkApplication`.
Notably, `GtkApplicationWindow` can handle an application menubar.
This class implements the `GActionGroup` and `GActionMap` interfaces,
to let you add window-specific actions that will be exported by the
associated [class@Gtk.Application], together with its application-wide
actions. Window-specific actions are prefixed with the &#x201C;win.&#x201D;
prefix and application-wide actions are prefixed with the &#x201C;app.&#x201D;
prefix. Actions must be addressed with the prefixed name when
referring to them from a `GMenuModel`.
Note that widgets that are placed inside a `GtkApplicationWindow`
can also activate these actions, if they implement the
[iface@Gtk.Actionable] interface.
The settings [property@Gtk.Settings:gtk-shell-shows-app-menu] and
[property@Gtk.Settings:gtk-shell-shows-menubar] tell GTK whether the
desktop environment is showing the application menu and menubar
models outside the application as part of the desktop shell.
For instance, on OS X, both menus will be displayed remotely;
on Windows neither will be.
If the desktop environment does not display the menubar, then
`GtkApplicationWindow` will automatically show a menubar for it.
This behaviour can be overridden with the
[property@Gtk.ApplicationWindow:show-menubar] property. If the
desktop environment does not display the application menu, then
it will automatically be included in the menubar or in the windows
client-side decorations.
See [class@Gtk.PopoverMenu] for information about the XML language
used by `GtkBuilder` for menu models.
See also: [method@Gtk.Application.set_menubar].
## A GtkApplicationWindow with a menubar
The code sample below shows how to set up a `GtkApplicationWindow`
with a menu bar defined on the [class@Gtk.Application]:
```c
GtkApplication *app = gtk_application_new ("org.gtk.test", 0);
GtkBuilder *builder = gtk_builder_new_from_string (
"&lt;interface&gt;"
" &lt;menu id='menubar'&gt;"
" &lt;submenu&gt;"
" &lt;attribute name='label' translatable='yes'&gt;_Edit&lt;/attribute&gt;"
" &lt;item&gt;"
" &lt;attribute name='label' translatable='yes'&gt;_Copy&lt;/attribute&gt;"
" &lt;attribute name='action'&gt;win.copy&lt;/attribute&gt;"
" &lt;/item&gt;"
" &lt;item&gt;"
" &lt;attribute name='label' translatable='yes'&gt;_Paste&lt;/attribute&gt;"
" &lt;attribute name='action'&gt;win.paste&lt;/attribute&gt;"
" &lt;/item&gt;"
" &lt;/submenu&gt;"
" &lt;/menu&gt;"
"&lt;/interface&gt;",
-1);
GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder, "menubar"));
gtk_application_set_menubar (GTK_APPLICATION (app), menubar);
g_object_unref (builder);
// ...
GtkWidget *window = gtk_application_window_new (app);
```</doc>
<implements name="Gio.ActionGroup"/>
<implements name="Gio.ActionMap"/>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_application_window_new">
<doc xml:space="preserve">Creates a new `GtkApplicationWindow`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkApplicationWindow`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="application" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</parameter>
</parameters>
</constructor>
<method name="get_help_overlay" c:identifier="gtk_application_window_get_help_overlay">
<doc xml:space="preserve">Gets the `GtkShortcutsWindow` that is associated with @window.
See [method@Gtk.ApplicationWindow.set_help_overlay].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the help overlay associated
with @window</doc>
<type name="ShortcutsWindow" c:type="GtkShortcutsWindow*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplicationWindow`</doc>
<type name="ApplicationWindow" c:type="GtkApplicationWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_id" c:identifier="gtk_application_window_get_id">
<doc xml:space="preserve">Returns the unique ID of the window.
If the window has not yet been added to a `GtkApplication`, returns `0`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the unique ID for @window, or `0` if the window
has not yet been added to a `GtkApplication`</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplicationWindow`</doc>
<type name="ApplicationWindow" c:type="GtkApplicationWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_menubar" c:identifier="gtk_application_window_get_show_menubar" glib:get-property="show-menubar">
<attribute name="org.gtk.Method.get_property" value="show-menubar"/>
<doc xml:space="preserve">Returns whether the window will display a menubar for the app menu
and menubar as needed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @window will display a menubar when needed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplicationWindow`</doc>
<type name="ApplicationWindow" c:type="GtkApplicationWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_help_overlay" c:identifier="gtk_application_window_set_help_overlay">
<doc xml:space="preserve">Associates a shortcuts window with the application window.
Additionally, sets up an action with the name
`win.show-help-overlay` to present it.
@window takes responsibility for destroying @help_overlay.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplicationWindow`</doc>
<type name="ApplicationWindow" c:type="GtkApplicationWindow*"/>
</instance-parameter>
<parameter name="help_overlay" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkShortcutsWindow`</doc>
<type name="ShortcutsWindow" c:type="GtkShortcutsWindow*"/>
</parameter>
</parameters>
</method>
<method name="set_show_menubar" c:identifier="gtk_application_window_set_show_menubar" glib:set-property="show-menubar">
<attribute name="org.gtk.Method.set_property" value="show-menubar"/>
<doc xml:space="preserve">Sets whether the window will display a menubar for the app menu
and menubar as needed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkApplicationWindow`</doc>
<type name="ApplicationWindow" c:type="GtkApplicationWindow*"/>
</instance-parameter>
<parameter name="show_menubar" transfer-ownership="none">
<doc xml:space="preserve">whether to show a menubar when needed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="show-menubar" writable="1" construct="1" transfer-ownership="none" setter="set_show_menubar" getter="get_show_menubar">
<attribute name="org.gtk.Property.get" value="gtk_application_window_get_show_menubar"/>
<attribute name="org.gtk.Property.set" value="gtk_application_window_set_show_menubar"/>
<doc xml:space="preserve">If this property is %TRUE, the window will display a menubar
unless it is shown by the desktop shell.
See [method@Gtk.Application.set_menubar].
If %FALSE, the window will not display a menubar, regardless
of whether the desktop shell is showing it or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Window" c:type="GtkWindow"/>
</field>
</class>
<record name="ApplicationWindowClass" c:type="GtkApplicationWindowClass" glib:is-gtype-struct-for="ApplicationWindow">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WindowClass" c:type="GtkWindowClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<enumeration name="ArrowType" glib:type-name="GtkArrowType" glib:get-type="gtk_arrow_type_get_type" c:type="GtkArrowType">
<doc xml:space="preserve">Used to indicate the direction in which an arrow should point.</doc>
<member name="up" value="0" c:identifier="GTK_ARROW_UP" glib:nick="up" glib:name="GTK_ARROW_UP">
<doc xml:space="preserve">Represents an upward pointing arrow.</doc>
</member>
<member name="down" value="1" c:identifier="GTK_ARROW_DOWN" glib:nick="down" glib:name="GTK_ARROW_DOWN">
<doc xml:space="preserve">Represents a downward pointing arrow.</doc>
</member>
<member name="left" value="2" c:identifier="GTK_ARROW_LEFT" glib:nick="left" glib:name="GTK_ARROW_LEFT">
<doc xml:space="preserve">Represents a left pointing arrow.</doc>
</member>
<member name="right" value="3" c:identifier="GTK_ARROW_RIGHT" glib:nick="right" glib:name="GTK_ARROW_RIGHT">
<doc xml:space="preserve">Represents a right pointing arrow.</doc>
</member>
<member name="none" value="4" c:identifier="GTK_ARROW_NONE" glib:nick="none" glib:name="GTK_ARROW_NONE">
<doc xml:space="preserve">No arrow.</doc>
</member>
</enumeration>
<class name="AspectFrame" c:symbol-prefix="aspect_frame" c:type="GtkAspectFrame" parent="Widget" glib:type-name="GtkAspectFrame" glib:get-type="gtk_aspect_frame_get_type">
<doc xml:space="preserve">`GtkAspectFrame` preserves the aspect ratio of its child.
The frame can respect the aspect ratio of the child widget,
or use its own aspect ratio.
# CSS nodes
`GtkAspectFrame` uses a CSS node with name `frame`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_aspect_frame_new">
<doc xml:space="preserve">Create a new `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkAspectFrame`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">Horizontal alignment of the child within the parent.
Ranges from 0.0 (left aligned) to 1.0 (right aligned)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">Vertical alignment of the child within the parent.
Ranges from 0.0 (top aligned) to 1.0 (bottom aligned)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="ratio" transfer-ownership="none">
<doc xml:space="preserve">The desired aspect ratio.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="obey_child" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, @ratio is ignored, and the aspect
ratio is taken from the requistion of the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="get_child" c:identifier="gtk_aspect_frame_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of self@</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_obey_child" c:identifier="gtk_aspect_frame_get_obey_child" glib:get-property="obey-child">
<attribute name="org.gtk.Method.get_property" value="obey-child"/>
<doc xml:space="preserve">Returns whether the child's size request should override
the set aspect ratio of the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to obey the child's size request</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ratio" c:identifier="gtk_aspect_frame_get_ratio" glib:get-property="ratio">
<attribute name="org.gtk.Method.get_property" value="ratio"/>
<doc xml:space="preserve">Returns the desired aspect ratio of the child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the desired aspect ratio</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_xalign" c:identifier="gtk_aspect_frame_get_xalign" glib:get-property="xalign">
<attribute name="org.gtk.Method.get_property" value="xalign"/>
<doc xml:space="preserve">Returns the horizontal alignment of the child within the
allocation of the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal alignment</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_yalign" c:identifier="gtk_aspect_frame_get_yalign" glib:get-property="yalign">
<attribute name="org.gtk.Method.get_property" value="yalign"/>
<doc xml:space="preserve">Returns the vertical alignment of the child within the
allocation of the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical alignment</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_aspect_frame_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_obey_child" c:identifier="gtk_aspect_frame_set_obey_child" glib:set-property="obey-child">
<attribute name="org.gtk.Method.set_propery" value="obey-child"/>
<doc xml:space="preserve">Sets whether the aspect ratio of the child's size
request should override the set aspect ratio of
the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
<parameter name="obey_child" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, @ratio is ignored, and the aspect
ratio is taken from the requistion of the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_ratio" c:identifier="gtk_aspect_frame_set_ratio" glib:set-property="ratio">
<attribute name="org.gtk.Method.set_property" value="ratio"/>
<doc xml:space="preserve">Sets the desired aspect ratio of the child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
<parameter name="ratio" transfer-ownership="none">
<doc xml:space="preserve">aspect ratio of the child</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_xalign" c:identifier="gtk_aspect_frame_set_xalign" glib:set-property="xalign">
<attribute name="org.gtk.Method.set_property" value="xalign"/>
<doc xml:space="preserve">Sets the horizontal alignment of the child within the allocation
of the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">horizontal alignment, from 0.0 (left aligned) to 1.0 (right aligned)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_yalign" c:identifier="gtk_aspect_frame_set_yalign" glib:set-property="yalign">
<attribute name="org.gtk.Method.set_property" value="yalign"/>
<doc xml:space="preserve">Sets the vertical alignment of the child within the allocation
of the `GtkAspectFrame`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAspectFrame`</doc>
<type name="AspectFrame" c:type="GtkAspectFrame*"/>
</instance-parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">horizontal alignment, from 0.0 (top aligned) to 1.0 (bottom aligned)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_aspect_frame_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_aspect_frame_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="obey-child" writable="1" transfer-ownership="none" setter="set_obey_child" getter="get_obey_child">
<attribute name="org.gtk.Property.get" value="gtk_aspect_frame_get_obey_child"/>
<attribute name="org.gtk.Property.set" value="gtk_aspect_frame_set_obey_child"/>
<doc xml:space="preserve">Whether the `GtkAspectFrame` should use the aspect ratio of its child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="ratio" writable="1" transfer-ownership="none" setter="set_ratio" getter="get_ratio">
<attribute name="org.gtk.Property.get" value="gtk_aspect_frame_get_ratio"/>
<attribute name="org.gtk.Property.set" value="gtk_aspect_frame_set_ratio"/>
<doc xml:space="preserve">The aspect ratio to be used by the `GtkAspectFrame`.
This property is only used if
[property@Gtk.AspectFrame:obey-child] is set to %FALSE.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="xalign" writable="1" transfer-ownership="none" setter="set_xalign" getter="get_xalign">
<attribute name="org.gtk.Property.get" value="gtk_aspect_frame_get_xalign"/>
<attribute name="org.gtk.Property.set" value="gtk_aspect_frame_set_xalign"/>
<doc xml:space="preserve">The horizontal alignment of the child.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="yalign" writable="1" transfer-ownership="none" setter="set_yalign" getter="get_yalign">
<attribute name="org.gtk.Property.get" value="gtk_aspect_frame_get_yalign"/>
<attribute name="org.gtk.Property.set" value="gtk_aspect_frame_set_yalign"/>
<doc xml:space="preserve">The vertical alignment of the child.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
</class>
<class name="Assistant" c:symbol-prefix="assistant" c:type="GtkAssistant" parent="Window" glib:type-name="GtkAssistant" glib:get-type="gtk_assistant_get_type">
<doc xml:space="preserve">`GtkAssistant` is used to represent a complex as a series of steps.
![An example GtkAssistant](assistant.png)
Each step consists of one or more pages. `GtkAssistant` guides the user
through the pages, and controls the page flow to collect the data needed
for the operation.
`GtkAssistant` handles which buttons to show and to make sensitive based
on page sequence knowledge and the [enum@Gtk.AssistantPageType] of each
page in addition to state information like the *completed* and *committed*
page statuses.
If you have a case that doesn&#x2019;t quite fit in `GtkAssistant`s way of
handling buttons, you can use the %GTK_ASSISTANT_PAGE_CUSTOM page
type and handle buttons yourself.
`GtkAssistant` maintains a `GtkAssistantPage` object for each added
child, which holds additional per-child properties. You
obtain the `GtkAssistantPage` for a child with [method@Gtk.Assistant.get_page].
# GtkAssistant as GtkBuildable
The `GtkAssistant` implementation of the `GtkBuildable` interface
exposes the @action_area as internal children with the name
&#x201C;action_area&#x201D;.
To add pages to an assistant in `GtkBuilder`, simply add it as a
child to the `GtkAssistant` object. If you need to set per-object
properties, create a `GtkAssistantPage` object explicitly, and
set the child widget as a property on it.
# CSS nodes
`GtkAssistant` has a single CSS node with the name window and style
class .assistant.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_assistant_new">
<doc xml:space="preserve">Creates a new `GtkAssistant`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkAssistant`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="add_action_widget" c:identifier="gtk_assistant_add_action_widget">
<doc xml:space="preserve">Adds a widget to the action area of a `GtkAssistant`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="append_page" c:identifier="gtk_assistant_append_page">
<doc xml:space="preserve">Appends a page to the @assistant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting at 0) of the inserted page</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="commit" c:identifier="gtk_assistant_commit">
<doc xml:space="preserve">Erases the visited page history.
GTK will then hide the back button on the current page,
and removes the cancel button from subsequent pages.
Use this when the information provided up to the current
page is hereafter deemed permanent and cannot be modified
or undone. For example, showing a progress page to track
a long-running, unreversible operation after the user has
clicked apply on a confirmation page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_page" c:identifier="gtk_assistant_get_current_page">
<doc xml:space="preserve">Returns the page number of the current page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The index (starting from 0) of the current
page in the @assistant, or -1 if the @assistant has no pages,
or no current page</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_pages" c:identifier="gtk_assistant_get_n_pages">
<doc xml:space="preserve">Returns the number of pages in the @assistant</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of pages in the @assistant</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_nth_page" c:identifier="gtk_assistant_get_nth_page">
<doc xml:space="preserve">Returns the child widget contained in page number @page_num.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget, or %NULL
if @page_num is out of bounds</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the index of a page in the @assistant,
or -1 to get the last page</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_page" c:identifier="gtk_assistant_get_page">
<doc xml:space="preserve">Returns the `GtkAssistantPage` object for @child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkAssistantPage` for @child</doc>
<type name="AssistantPage" c:type="GtkAssistantPage*"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_page_complete" c:identifier="gtk_assistant_get_page_complete">
<doc xml:space="preserve">Gets whether @page is complete.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @page is complete.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_page_title" c:identifier="gtk_assistant_get_page_title">
<doc xml:space="preserve">Gets the title for @page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the title for @page</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_page_type" c:identifier="gtk_assistant_get_page_type">
<doc xml:space="preserve">Gets the page type of @page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page type of @page</doc>
<type name="AssistantPageType" c:type="GtkAssistantPageType"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_pages" c:identifier="gtk_assistant_get_pages" glib:get-property="pages">
<doc xml:space="preserve">Gets a list model of the assistant pages.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkAssistantPage"/>
<doc xml:space="preserve">A list model of the pages.</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_page" c:identifier="gtk_assistant_insert_page">
<doc xml:space="preserve">Inserts a page in the @assistant at a given position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the inserted page</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the index (starting at 0) at which to insert the page,
or -1 to append the page to the @assistant</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="next_page" c:identifier="gtk_assistant_next_page">
<doc xml:space="preserve">Navigate to the next page.
It is a programming error to call this function when
there is no next page.
This function is for use when creating pages of the
%GTK_ASSISTANT_PAGE_CUSTOM type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepend_page" c:identifier="gtk_assistant_prepend_page">
<doc xml:space="preserve">Prepends a page to the @assistant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting at 0) of the inserted page</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="previous_page" c:identifier="gtk_assistant_previous_page">
<doc xml:space="preserve">Navigate to the previous visited page.
It is a programming error to call this function when
no previous page is available.
This function is for use when creating pages of the
%GTK_ASSISTANT_PAGE_CUSTOM type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_action_widget" c:identifier="gtk_assistant_remove_action_widget">
<doc xml:space="preserve">Removes a widget from the action area of a `GtkAssistant`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove_page" c:identifier="gtk_assistant_remove_page">
<doc xml:space="preserve">Removes the @page_num&#x2019;s page from @assistant.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the index of a page in the @assistant,
or -1 to remove the last page</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_current_page" c:identifier="gtk_assistant_set_current_page">
<doc xml:space="preserve">Switches the page to @page_num.
Note that this will only be necessary in custom buttons,
as the @assistant flow can be set with
gtk_assistant_set_forward_page_func().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">index of the page to switch to, starting from 0.
If negative, the last page will be used. If greater
than the number of pages in the @assistant, nothing
will be done.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_forward_page_func" c:identifier="gtk_assistant_set_forward_page_func">
<doc xml:space="preserve">Sets the page forwarding function to be @page_func.
This function will be used to determine what will be
the next page when the user presses the forward button.
Setting @page_func to %NULL will make the assistant to
use the default forward function, which just goes to the
next visible page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the `GtkAssistantPageFunc`, or %NULL
to use the default one</doc>
<type name="AssistantPageFunc" c:type="GtkAssistantPageFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @page_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_page_complete" c:identifier="gtk_assistant_set_page_complete">
<doc xml:space="preserve">Sets whether @page contents are complete.
This will make @assistant update the buttons state
to be able to continue the task.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="complete" transfer-ownership="none">
<doc xml:space="preserve">the completeness status of the page</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_page_title" c:identifier="gtk_assistant_set_page_title">
<doc xml:space="preserve">Sets a title for @page.
The title is displayed in the header area of the assistant
when @page is the current page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">the new title for @page</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_page_type" c:identifier="gtk_assistant_set_page_type">
<doc xml:space="preserve">Sets the page type for @page.
The page type determines the page behavior in the @assistant.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a page of @assistant</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the new type for @page</doc>
<type name="AssistantPageType" c:type="GtkAssistantPageType"/>
</parameter>
</parameters>
</method>
<method name="update_buttons_state" c:identifier="gtk_assistant_update_buttons_state">
<doc xml:space="preserve">Forces @assistant to recompute the buttons state.
GTK automatically takes care of this in most situations,
e.g. when the user goes to a different page, or when the
visibility or completeness of a page changes.
One situation where it can be necessary to call this
function is when changing a value on the current page
affects the future page flow of the assistant.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="assistant" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistant`</doc>
<type name="Assistant" c:type="GtkAssistant*"/>
</instance-parameter>
</parameters>
</method>
<property name="pages" transfer-ownership="none" getter="get_pages">
<doc xml:space="preserve">`GListModel` containing the pages.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="use-header-bar" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the assistant uses a `GtkHeaderBar` for action buttons
instead of the action-area.
For technical reasons, this property is declared as an integer
property, but you should only set it to %TRUE or %FALSE.</doc>
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="apply" when="last">
<doc xml:space="preserve">Emitted when the apply button is clicked.
The default behavior of the `GtkAssistant` is to switch to the page
after the current page, unless the current page is the last one.
A handler for the ::apply signal should carry out the actions for
which the wizard has collected data. If the action takes a long time
to complete, you might consider putting a page of type
%GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle
this operation within the [signal@Gtk.Assistant::prepare] signal of
the progress page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="cancel" when="last">
<doc xml:space="preserve">Emitted when then the cancel button is clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="close" when="last">
<doc xml:space="preserve">Emitted either when the close button of a summary page is clicked,
or when the apply button in the last page in the flow (of type
%GTK_ASSISTANT_PAGE_CONFIRM) is clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="escape" when="first" action="1">
<doc xml:space="preserve">The action signal for the Escape binding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="prepare" when="last">
<doc xml:space="preserve">Emitted when a new page is set as the assistant's current page,
before making the new page visible.
A handler for this signal can do any preparations which are
necessary before showing @page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">the current page</doc>
<type name="Widget"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="AssistantPage" c:symbol-prefix="assistant_page" c:type="GtkAssistantPage" parent="GObject.Object" glib:type-name="GtkAssistantPage" glib:get-type="gtk_assistant_page_get_type">
<doc xml:space="preserve">`GtkAssistantPage` is an auxiliary object used by `GtkAssistant.</doc>
<method name="get_child" c:identifier="gtk_assistant_page_get_child" glib:get-property="child">
<doc xml:space="preserve">Returns the child to which @page belongs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the child to which @page belongs</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAssistantPage`</doc>
<type name="AssistantPage" c:type="GtkAssistantPage*"/>
</instance-parameter>
</parameters>
</method>
<property name="child" writable="1" construct-only="1" transfer-ownership="none" getter="get_child">
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="complete" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether all required fields are filled in.
GTK uses this information to control the sensitivity
of the navigation buttons.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="page-type" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The type of the assistant page.</doc>
<type name="AssistantPageType"/>
</property>
<property name="title" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The title of the page.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<callback name="AssistantPageFunc" c:type="GtkAssistantPageFunc">
<doc xml:space="preserve">Type of callback used to calculate the next page in a `GtkAssistant`.
It&#x2019;s called both for computing the next page when the user presses the
&#x201C;forward&#x201D; button and for handling the behavior of the &#x201C;last&#x201D; button.
See [method@Gtk.Assistant.set_forward_page_func].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The next page number</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="current_page" transfer-ownership="none">
<doc xml:space="preserve">The page number used to calculate the next page.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="AssistantPageType" glib:type-name="GtkAssistantPageType" glib:get-type="gtk_assistant_page_type_get_type" c:type="GtkAssistantPageType">
<doc xml:space="preserve">Determines the page role inside a `GtkAssistant`.
The role is used to handle buttons sensitivity and visibility.
Note that an assistant needs to end its page flow with a page of type
%GTK_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or
%GTK_ASSISTANT_PAGE_PROGRESS to be correct.
The Cancel button will only be shown if the page isn&#x2019;t &#x201C;committed&#x201D;.
See gtk_assistant_commit() for details.</doc>
<member name="content" value="0" c:identifier="GTK_ASSISTANT_PAGE_CONTENT" glib:nick="content" glib:name="GTK_ASSISTANT_PAGE_CONTENT">
<doc xml:space="preserve">The page has regular contents. Both the
Back and forward buttons will be shown.</doc>
</member>
<member name="intro" value="1" c:identifier="GTK_ASSISTANT_PAGE_INTRO" glib:nick="intro" glib:name="GTK_ASSISTANT_PAGE_INTRO">
<doc xml:space="preserve">The page contains an introduction to the
assistant task. Only the Forward button will be shown if there is a
next page.</doc>
</member>
<member name="confirm" value="2" c:identifier="GTK_ASSISTANT_PAGE_CONFIRM" glib:nick="confirm" glib:name="GTK_ASSISTANT_PAGE_CONFIRM">
<doc xml:space="preserve">The page lets the user confirm or deny the
changes. The Back and Apply buttons will be shown.</doc>
</member>
<member name="summary" value="3" c:identifier="GTK_ASSISTANT_PAGE_SUMMARY" glib:nick="summary" glib:name="GTK_ASSISTANT_PAGE_SUMMARY">
<doc xml:space="preserve">The page informs the user of the changes
done. Only the Close button will be shown.</doc>
</member>
<member name="progress" value="4" c:identifier="GTK_ASSISTANT_PAGE_PROGRESS" glib:nick="progress" glib:name="GTK_ASSISTANT_PAGE_PROGRESS">
<doc xml:space="preserve">Used for tasks that take a long time to
complete, blocks the assistant until the page is marked as complete.
Only the back button will be shown.</doc>
</member>
<member name="custom" value="5" c:identifier="GTK_ASSISTANT_PAGE_CUSTOM" glib:nick="custom" glib:name="GTK_ASSISTANT_PAGE_CUSTOM">
<doc xml:space="preserve">Used for when other page types are not
appropriate. No buttons will be shown, and the application must
add its own buttons through gtk_assistant_add_action_widget().</doc>
</member>
</enumeration>
<constant name="BINARY_AGE" value="602" c:type="GTK_BINARY_AGE">
<doc xml:space="preserve">Like [func@get_binary_age], but from the headers used at
application compile time, rather than from the library linked
against at application run time.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="BOX" c:identifier="GTK_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BOX_CLASS" c:identifier="GTK_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="BOX_GET_CLASS" c:identifier="GTK_BOX_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDABLE" c:identifier="GTK_BUILDABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDABLE_GET_IFACE" c:identifier="GTK_BUILDABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER" c:identifier="GTK_BUILDER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_CLASS" c:identifier="GTK_BUILDER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_GET_CLASS" c:identifier="GTK_BUILDER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_LIST_ITEM_FACTORY" c:identifier="GTK_BUILDER_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_BUILDER_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_LIST_ITEM_FACTORY_GET_CLASS" c:identifier="GTK_BUILDER_LIST_ITEM_FACTORY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUILDER_WARN_INVALID_CHILD_TYPE" c:identifier="GTK_BUILDER_WARN_INVALID_CHILD_TYPE" introspectable="0">
<doc xml:space="preserve">This macro should be used to emit a warning about and unexpected @type value
in a `GtkBuildable` add_child implementation.</doc>
<parameters>
<parameter name="object">
<doc xml:space="preserve">the `GtkBuildable` on which the warning occurred</doc>
</parameter>
<parameter name="type">
<doc xml:space="preserve">the unexpected type value</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="BUTTON" c:identifier="GTK_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUTTON_CLASS" c:identifier="GTK_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="BUTTON_GET_CLASS" c:identifier="GTK_BUTTON_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<enumeration name="BaselinePosition" glib:type-name="GtkBaselinePosition" glib:get-type="gtk_baseline_position_get_type" c:type="GtkBaselinePosition">
<doc xml:space="preserve">Baseline position in a row of widgets.
Whenever a container has some form of natural row it may align
children in that row along a common typographical baseline. If
the amount of vertical space in the row is taller than the total
requested height of the baseline-aligned children then it can use a
`GtkBaselinePosition` to select where to put the baseline inside the
extra available space.</doc>
<member name="top" value="0" c:identifier="GTK_BASELINE_POSITION_TOP" glib:nick="top" glib:name="GTK_BASELINE_POSITION_TOP">
<doc xml:space="preserve">Align the baseline at the top</doc>
</member>
<member name="center" value="1" c:identifier="GTK_BASELINE_POSITION_CENTER" glib:nick="center" glib:name="GTK_BASELINE_POSITION_CENTER">
<doc xml:space="preserve">Center the baseline</doc>
</member>
<member name="bottom" value="2" c:identifier="GTK_BASELINE_POSITION_BOTTOM" glib:nick="bottom" glib:name="GTK_BASELINE_POSITION_BOTTOM">
<doc xml:space="preserve">Align the baseline at the bottom</doc>
</member>
</enumeration>
<class name="BinLayout" c:symbol-prefix="bin_layout" c:type="GtkBinLayout" parent="LayoutManager" glib:type-name="GtkBinLayout" glib:get-type="gtk_bin_layout_get_type" glib:type-struct="BinLayoutClass">
<doc xml:space="preserve">`GtkBinLayout` is a `GtkLayoutManager` subclass useful for create "bins" of
widgets.
`GtkBinLayout` will stack each child of a widget on top of each other,
using the [property@Gtk.Widget:hexpand], [property@Gtk.Widget:vexpand],
[property@Gtk.Widget:halign], and [property@Gtk.Widget:valign] properties
of each child to determine where they should be positioned.</doc>
<constructor name="new" c:identifier="gtk_bin_layout_new">
<doc xml:space="preserve">Creates a new `GtkBinLayout` instance.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkBinLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
</class>
<record name="BinLayoutClass" c:type="GtkBinLayoutClass" glib:is-gtype-struct-for="BinLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<record name="Bitset" c:type="GtkBitset" glib:type-name="GtkBitset" glib:get-type="gtk_bitset_get_type" c:symbol-prefix="bitset">
<doc xml:space="preserve">A `GtkBitset` represents a set of unsigned integers.
Another name for this data structure is "bitmap".
The current implementation is based on [roaring bitmaps](https://roaringbitmap.org/).
A bitset allows adding a set of integers and provides support for set operations
like unions, intersections and checks for equality or if a value is contained
in the set. `GtkBitset` also contains various functions to query metadata about
the bitset, such as the minimum or maximum values or its size.
The fastest way to iterate values in a bitset is [struct@Gtk.BitsetIter].
The main use case for `GtkBitset` is implementing complex selections for
[iface@Gtk.SelectionModel].</doc>
<constructor name="new_empty" c:identifier="gtk_bitset_new_empty">
<doc xml:space="preserve">Creates a new empty bitset.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new empty bitset</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
</constructor>
<constructor name="new_range" c:identifier="gtk_bitset_new_range">
<doc xml:space="preserve">Creates a bitset with the given range set.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new bitset</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">first value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of consecutive values to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</constructor>
<method name="add" c:identifier="gtk_bitset_add">
<doc xml:space="preserve">Adds @value to @self if it wasn't part of it before.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @value was not part of @self and @self
was changed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="add_range" c:identifier="gtk_bitset_add_range">
<doc xml:space="preserve">Adds all values from @start (inclusive) to @start + @n_items
(exclusive) in @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">first value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of consecutive values to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="add_range_closed" c:identifier="gtk_bitset_add_range_closed">
<doc xml:space="preserve">Adds the closed range [@first, @last], so @first, @last and all
values in between. @first must be smaller than @last.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="first" transfer-ownership="none">
<doc xml:space="preserve">first value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="last" transfer-ownership="none">
<doc xml:space="preserve">last value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="add_rectangle" c:identifier="gtk_bitset_add_rectangle">
<doc xml:space="preserve">Interprets the values as a 2-dimensional boolean grid with the given @stride
and inside that grid, adds a rectangle with the given @width and @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">first value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width of the rectangle</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height of the rectangle</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="stride" transfer-ownership="none">
<doc xml:space="preserve">row stride of the grid</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="contains" c:identifier="gtk_bitset_contains">
<doc xml:space="preserve">Checks if the given @value has been added to @self</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self contains @value</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the value to check</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="copy" c:identifier="gtk_bitset_copy">
<doc xml:space="preserve">Creates a copy of @self.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new bitset that contains the same
values as @self</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="difference" c:identifier="gtk_bitset_difference">
<doc xml:space="preserve">Sets @self to be the symmetric difference of @self and @other.
The symmetric difference is set @self to contain all values that
were either contained in @self or in @other, but not in both.
This operation is also called an XOR.
It is allowed for @self and @other to be the same bitset. The bitset
will be emptied in that case.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">the `GtkBitset` to compute the difference from</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="equals" c:identifier="gtk_bitset_equals">
<doc xml:space="preserve">Returns %TRUE if @self and @other contain the same values.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self and @other contain the same values</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">another `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="get_maximum" c:identifier="gtk_bitset_get_maximum">
<doc xml:space="preserve">Returns the largest value in @self.
If @self is empty, 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The largest value in @self</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_minimum" c:identifier="gtk_bitset_get_minimum">
<doc xml:space="preserve">Returns the smallest value in @self.
If @self is empty, `G_MAXUINT` is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The smallest value in @self</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_nth" c:identifier="gtk_bitset_get_nth">
<doc xml:space="preserve">Returns the value of the @nth item in self.
If @nth is &gt;= the size of @self, 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of the @nth item in @self</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
<parameter name="nth" transfer-ownership="none">
<doc xml:space="preserve">index of the item to get</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_size" c:identifier="gtk_bitset_get_size">
<doc xml:space="preserve">Gets the number of values that were added to the set.
For example, if the set is empty, 0 is returned.
Note that this function returns a `guint64`, because when all
values are set, the return value is `G_MAXUINT + 1`. Unless you
are sure this cannot happen (it can't with `GListModel`), be sure
to use a 64bit type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of values in the set.</doc>
<type name="guint64" c:type="guint64"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_size_in_range" c:identifier="gtk_bitset_get_size_in_range">
<doc xml:space="preserve">Gets the number of values that are part of the set from @first to @last
(inclusive).
Note that this function returns a `guint64`, because when all values are
set, the return value is `G_MAXUINT + 1`. Unless you are sure this cannot
happen (it can't with `GListModel`), be sure to use a 64bit type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of values in the set from @first to @last.</doc>
<type name="guint64" c:type="guint64"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
<parameter name="first" transfer-ownership="none">
<doc xml:space="preserve">the first element to include</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="last" transfer-ownership="none">
<doc xml:space="preserve">the last element to include</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="intersect" c:identifier="gtk_bitset_intersect">
<doc xml:space="preserve">Sets @self to be the intersection of @self and @other.
In other words, remove all values from @self that are not part of @other.
It is allowed for @self and @other to be the same bitset. Nothing will
happen in that case.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">the `GtkBitset` to intersect with</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="is_empty" c:identifier="gtk_bitset_is_empty">
<doc xml:space="preserve">Check if no value is contained in bitset.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self is empty</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="ref" c:identifier="gtk_bitset_ref">
<doc xml:space="preserve">Acquires a reference on the given `GtkBitset`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkBitset` with an additional reference</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_bitset_remove">
<doc xml:space="preserve">Removes @value from @self if it was part of it before.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @value was part of @self and @self
was changed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="remove_all" c:identifier="gtk_bitset_remove_all">
<doc xml:space="preserve">Removes all values from the bitset so that it is empty again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_range" c:identifier="gtk_bitset_remove_range">
<doc xml:space="preserve">Removes all values from @start (inclusive) to @start + @n_items (exclusive)
in @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">first value to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of consecutive values to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="remove_range_closed" c:identifier="gtk_bitset_remove_range_closed">
<doc xml:space="preserve">Removes the closed range [@first, @last], so @first, @last and all
values in between. @first must be smaller than @last.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="first" transfer-ownership="none">
<doc xml:space="preserve">first value to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="last" transfer-ownership="none">
<doc xml:space="preserve">last value to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="remove_rectangle" c:identifier="gtk_bitset_remove_rectangle">
<doc xml:space="preserve">Interprets the values as a 2-dimensional boolean grid with the given @stride
and inside that grid, removes a rectangle with the given @width and @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">first value to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width of the rectangle</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height of the rectangle</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="stride" transfer-ownership="none">
<doc xml:space="preserve">row stride of the grid</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="shift_left" c:identifier="gtk_bitset_shift_left">
<doc xml:space="preserve">Shifts all values in @self to the left by @amount.
Values smaller than @amount are discarded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="amount" transfer-ownership="none">
<doc xml:space="preserve">amount to shift all values to the left</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="shift_right" c:identifier="gtk_bitset_shift_right">
<doc xml:space="preserve">Shifts all values in @self to the right by @amount.
Values that end up too large to be held in a #guint are discarded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="amount" transfer-ownership="none">
<doc xml:space="preserve">amount to shift all values to the right</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="splice" c:identifier="gtk_bitset_splice">
<doc xml:space="preserve">This is a support function for `GListModel` handling, by mirroring
the `GlistModel::items-changed` signal.
First, it "cuts" the values from @position to @removed from
the bitset. That is, it removes all those values and shifts
all larger values to the left by @removed places.
Then, it "pastes" new room into the bitset by shifting all values
larger than @position by @added spaces to the right. This frees
up space that can then be filled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which to slice</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="removed" transfer-ownership="none">
<doc xml:space="preserve">number of values to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="added" transfer-ownership="none">
<doc xml:space="preserve">number of values to add</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="subtract" c:identifier="gtk_bitset_subtract">
<doc xml:space="preserve">Sets @self to be the subtraction of @other from @self.
In other words, remove all values from @self that are part of @other.
It is allowed for @self and @other to be the same bitset. The bitset
will be emptied in that case.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">the `GtkBitset` to subtract</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="union" c:identifier="gtk_bitset_union">
<doc xml:space="preserve">Sets @self to be the union of @self and @other.
That is, add all values from @other into @self that weren't part of it.
It is allowed for @self and @other to be the same bitset. Nothing will
happen in that case.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">the `GtkBitset` to union with</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="unref" c:identifier="gtk_bitset_unref">
<doc xml:space="preserve">Releases a reference on the given `GtkBitset`.
If the reference was the last, the resources associated to the @self are
freed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</instance-parameter>
</parameters>
</method>
</record>
<record name="BitsetIter" c:type="GtkBitsetIter" glib:type-name="GtkBitsetIter" glib:get-type="gtk_bitset_iter_get_type" c:symbol-prefix="bitset_iter">
<doc xml:space="preserve">An opaque, stack-allocated struct for iterating
over the elements of a `GtkBitset`.
Before a `GtkBitsetIter` can be used, it needs to be initialized with
[func@Gtk.BitsetIter.init_first], [func@Gtk.BitsetIter.init_last]
or [func@Gtk.BitsetIter.init_at].</doc>
<field name="private_data" readable="0" private="1">
<array zero-terminated="0" fixed-size="10">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
<method name="get_value" c:identifier="gtk_bitset_iter_get_value">
<doc xml:space="preserve">Gets the current value that @iter points to.
If @iter is not valid and [method@Gtk.BitsetIter.is_valid]
returns %FALSE, this function returns 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current value pointer to by @iter</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="const GtkBitsetIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_valid" c:identifier="gtk_bitset_iter_is_valid">
<doc xml:space="preserve">Checks if @iter points to a valid value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter points to a valid value</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="const GtkBitsetIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="next" c:identifier="gtk_bitset_iter_next">
<doc xml:space="preserve">Moves @iter to the next value in the set.
If it was already pointing to the last value in the set,
%FALSE is returned and @iter is invalidated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a next value existed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a pointer to a valid `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</instance-parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the next value</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
<method name="previous" c:identifier="gtk_bitset_iter_previous">
<doc xml:space="preserve">Moves @iter to the previous value in the set.
If it was already pointing to the first value in the set,
%FALSE is returned and @iter is invalidated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a previous value existed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a pointer to a valid `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</instance-parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the previous value</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
<function name="init_at" c:identifier="gtk_bitset_iter_init_at">
<doc xml:space="preserve">Initializes @iter to point to @target.
If @target is not found, finds the next value after it.
If no value &gt;= @target exists in @set, this function returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a value was found.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">target value to start iterating at</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the found value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="init_first" c:identifier="gtk_bitset_iter_init_first">
<doc xml:space="preserve">Initializes an iterator for @set and points it to the first
value in @set.
If @set is empty, %FALSE is returned and @value is set to %G_MAXUINT.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @set isn't empty.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the first value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="init_last" c:identifier="gtk_bitset_iter_init_last">
<doc xml:space="preserve">Initializes an iterator for @set and points it to the last
value in @set.
If @set is empty, %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @set isn't empty.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the last value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
</record>
<class name="BookmarkList" c:symbol-prefix="bookmark_list" c:type="GtkBookmarkList" parent="GObject.Object" glib:type-name="GtkBookmarkList" glib:get-type="gtk_bookmark_list_get_type" glib:type-struct="BookmarkListClass">
<doc xml:space="preserve">`GtkBookmarkList` is a list model that wraps `GBookmarkFile`.
It presents a `GListModel` and fills it asynchronously with the
`GFileInfo`s returned from that function.
The `GFileInfo`s in the list have some attributes in the recent
namespace added: `recent::private` (boolean) and `recent:applications`
(stringv).</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_bookmark_list_new">
<doc xml:space="preserve">Creates a new `GtkBookmarkList` with the given @attributes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The bookmark file to load</doc>
<type name="filename" c:type="const char*"/>
</parameter>
<parameter name="attributes" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The attributes to query</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_attributes" c:identifier="gtk_bookmark_list_get_attributes" glib:get-property="attributes">
<attribute name="org.gtk.Method.get_property" value="attributes"/>
<doc xml:space="preserve">Gets the attributes queried on the children.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The queried attributes</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_filename" c:identifier="gtk_bookmark_list_get_filename" glib:get-property="filename">
<attribute name="org.gtk.Method.get_property" value="filename"/>
<doc xml:space="preserve">Returns the filename of the bookmark file that
this list is loading.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the filename of the .xbel file</doc>
<type name="filename" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_io_priority" c:identifier="gtk_bookmark_list_get_io_priority" glib:get-property="io-priority">
<attribute name="org.gtk.Method.get_property" value="io-priority"/>
<doc xml:space="preserve">Gets the IO priority to use while loading file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The IO priority.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_loading" c:identifier="gtk_bookmark_list_is_loading">
<attribute name="org.gtk.Method.get_property" value="loading"/>
<doc xml:space="preserve">Returns %TRUE if the files are currently being loaded.
Files will be added to @self from time to time while loading is
going on. The order in which are added is undefined and may change
in between runs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self is loading</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_bookmark_list_set_attributes" glib:set-property="attributes">
<attribute name="org.gtk.Method.set_property" value="attributes"/>
<doc xml:space="preserve">Sets the @attributes to be enumerated and starts the enumeration.
If @attributes is %NULL, no attributes will be queried, but a list
of `GFileInfo`s will still be created.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
<parameter name="attributes" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the attributes to enumerate</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_io_priority" c:identifier="gtk_bookmark_list_set_io_priority" glib:set-property="io-priority">
<attribute name="org.gtk.Method.set_property" value="io-priority"/>
<doc xml:space="preserve">Sets the IO priority to use while loading files.
The default IO priority is %G_PRIORITY_DEFAULT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBookmarkList`</doc>
<type name="BookmarkList" c:type="GtkBookmarkList*"/>
</instance-parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">IO priority to use</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="attributes" writable="1" transfer-ownership="none" setter="set_attributes" getter="get_attributes">
<attribute name="org.gtk.Property.get" value="gtk_bookmark_list_get_attributes"/>
<attribute name="org.gtk.Property.set" value="gtk_bookmark_list_set_attributes"/>
<doc xml:space="preserve">The attributes to query.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="filename" writable="1" construct-only="1" transfer-ownership="none" getter="get_filename">
<attribute name="org.gtk.Property.get" value="gtk_bookmark_list_get_filename"/>
<doc xml:space="preserve">The bookmark file to load.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="io-priority" writable="1" transfer-ownership="none" setter="set_io_priority" getter="get_io_priority">
<attribute name="org.gtk.Property.get" value="gtk_bookmark_list_get_io_priority"/>
<attribute name="org.gtk.Property.set" value="gtk_bookmark_list_set_io_priority"/>
<doc xml:space="preserve">Priority used when loading.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="loading" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_bookmark_list_is_loading"/>
<doc xml:space="preserve">%TRUE if files are being loaded.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="BookmarkListClass" c:type="GtkBookmarkListClass" glib:is-gtype-struct-for="BookmarkList">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="BoolFilter" c:symbol-prefix="bool_filter" c:type="GtkBoolFilter" parent="Filter" glib:type-name="GtkBoolFilter" glib:get-type="gtk_bool_filter_get_type" glib:type-struct="BoolFilterClass">
<doc xml:space="preserve">`GtkBoolFilter` evaluates a boolean `GtkExpression`
to determine whether to include items.</doc>
<constructor name="new" c:identifier="gtk_bool_filter_new">
<doc xml:space="preserve">Creates a new bool filter.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkBoolFilter`</doc>
<type name="BoolFilter" c:type="GtkBoolFilter*"/>
</return-value>
<parameters>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The expression to evaluate</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</constructor>
<method name="get_expression" c:identifier="gtk_bool_filter_get_expression" glib:get-property="expression">
<attribute name="org.gtk.Method.get_property" value="expression"/>
<doc xml:space="preserve">Gets the expression that the filter uses to evaluate if
an item should be filtered.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoolFilter`</doc>
<type name="BoolFilter" c:type="GtkBoolFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_invert" c:identifier="gtk_bool_filter_get_invert" glib:get-property="invert">
<attribute name="org.gtk.Method.get_property" value="invert"/>
<doc xml:space="preserve">Returns whether the filter inverts the expression.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the filter inverts</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoolFilter`</doc>
<type name="BoolFilter" c:type="GtkBoolFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expression" c:identifier="gtk_bool_filter_set_expression" glib:set-property="expression">
<attribute name="org.gtk.Method.set_property" value="expression"/>
<doc xml:space="preserve">Sets the expression that the filter uses to check if items
should be filtered.
The expression must have a value type of %G_TYPE_BOOLEAN.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoolFilter`</doc>
<type name="BoolFilter" c:type="GtkBoolFilter*"/>
</instance-parameter>
<parameter name="expression" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</method>
<method name="set_invert" c:identifier="gtk_bool_filter_set_invert" glib:set-property="invert">
<attribute name="org.gtk.Method.set_property" value="invert"/>
<doc xml:space="preserve">Sets whether the filter should invert the expression.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoolFilter`</doc>
<type name="BoolFilter" c:type="GtkBoolFilter*"/>
</instance-parameter>
<parameter name="invert" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to invert</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="expression" writable="1" transfer-ownership="none" setter="set_expression" getter="get_expression">
<attribute name="org.gtk.Property.get" value="gtk_bool_filter_get_expression"/>
<attribute name="org.gtk.Property.set" value="gtk_bool_filter_set_expression"/>
<doc xml:space="preserve">The boolean expression to evaluate on item.</doc>
<type name="Expression"/>
</property>
<property name="invert" writable="1" transfer-ownership="none" setter="set_invert" getter="get_invert">
<attribute name="org.gtk.Property.get" value="gtk_bool_filter_get_invert"/>
<attribute name="org.gtk.Property.set" value="gtk_bool_filter_set_invert"/>
<doc xml:space="preserve">If the expression result should be inverted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="BoolFilterClass" c:type="GtkBoolFilterClass" glib:is-gtype-struct-for="BoolFilter">
<field name="parent_class">
<type name="FilterClass" c:type="GtkFilterClass"/>
</field>
</record>
<record name="Border" c:type="GtkBorder" glib:type-name="GtkBorder" glib:get-type="gtk_border_get_type" c:symbol-prefix="border">
<doc xml:space="preserve">A struct that specifies a border around a rectangular area.
Each side can have different width.</doc>
<field name="left" writable="1">
<doc xml:space="preserve">The width of the left border</doc>
<type name="gint16" c:type="gint16"/>
</field>
<field name="right" writable="1">
<doc xml:space="preserve">The width of the right border</doc>
<type name="gint16" c:type="gint16"/>
</field>
<field name="top" writable="1">
<doc xml:space="preserve">The width of the top border</doc>
<type name="gint16" c:type="gint16"/>
</field>
<field name="bottom" writable="1">
<doc xml:space="preserve">The width of the bottom border</doc>
<type name="gint16" c:type="gint16"/>
</field>
<constructor name="new" c:identifier="gtk_border_new">
<doc xml:space="preserve">Allocates a new `GtkBorder` struct and initializes its elements to zero.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated `GtkBorder` struct.
Free with [method@Gtk.Border.free]</doc>
<type name="Border" c:type="GtkBorder*"/>
</return-value>
</constructor>
<method name="copy" c:identifier="gtk_border_copy">
<doc xml:space="preserve">Copies a `GtkBorder`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of @border_.</doc>
<type name="Border" c:type="GtkBorder*"/>
</return-value>
<parameters>
<instance-parameter name="border_" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBorder` struct</doc>
<type name="Border" c:type="const GtkBorder*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_border_free">
<doc xml:space="preserve">Frees a `GtkBorder`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="border_" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBorder` struct</doc>
<type name="Border" c:type="GtkBorder*"/>
</instance-parameter>
</parameters>
</method>
</record>
<enumeration name="BorderStyle" glib:type-name="GtkBorderStyle" glib:get-type="gtk_border_style_get_type" c:type="GtkBorderStyle">
<doc xml:space="preserve">Describes how the border of a UI element should be rendered.</doc>
<member name="none" value="0" c:identifier="GTK_BORDER_STYLE_NONE" glib:nick="none" glib:name="GTK_BORDER_STYLE_NONE">
<doc xml:space="preserve">No visible border</doc>
</member>
<member name="hidden" value="1" c:identifier="GTK_BORDER_STYLE_HIDDEN" glib:nick="hidden" glib:name="GTK_BORDER_STYLE_HIDDEN">
<doc xml:space="preserve">Same as %GTK_BORDER_STYLE_NONE</doc>
</member>
<member name="solid" value="2" c:identifier="GTK_BORDER_STYLE_SOLID" glib:nick="solid" glib:name="GTK_BORDER_STYLE_SOLID">
<doc xml:space="preserve">A single line segment</doc>
</member>
<member name="inset" value="3" c:identifier="GTK_BORDER_STYLE_INSET" glib:nick="inset" glib:name="GTK_BORDER_STYLE_INSET">
<doc xml:space="preserve">Looks as if the content is sunken into the canvas</doc>
</member>
<member name="outset" value="4" c:identifier="GTK_BORDER_STYLE_OUTSET" glib:nick="outset" glib:name="GTK_BORDER_STYLE_OUTSET">
<doc xml:space="preserve">Looks as if the content is coming out of the canvas</doc>
</member>
<member name="dotted" value="5" c:identifier="GTK_BORDER_STYLE_DOTTED" glib:nick="dotted" glib:name="GTK_BORDER_STYLE_DOTTED">
<doc xml:space="preserve">A series of round dots</doc>
</member>
<member name="dashed" value="6" c:identifier="GTK_BORDER_STYLE_DASHED" glib:nick="dashed" glib:name="GTK_BORDER_STYLE_DASHED">
<doc xml:space="preserve">A series of square-ended dashes</doc>
</member>
<member name="double" value="7" c:identifier="GTK_BORDER_STYLE_DOUBLE" glib:nick="double" glib:name="GTK_BORDER_STYLE_DOUBLE">
<doc xml:space="preserve">Two parallel lines with some space between them</doc>
</member>
<member name="groove" value="8" c:identifier="GTK_BORDER_STYLE_GROOVE" glib:nick="groove" glib:name="GTK_BORDER_STYLE_GROOVE">
<doc xml:space="preserve">Looks as if it were carved in the canvas</doc>
</member>
<member name="ridge" value="9" c:identifier="GTK_BORDER_STYLE_RIDGE" glib:nick="ridge" glib:name="GTK_BORDER_STYLE_RIDGE">
<doc xml:space="preserve">Looks as if it were coming out of the canvas</doc>
</member>
</enumeration>
<class name="Box" c:symbol-prefix="box" c:type="GtkBox" parent="Widget" glib:type-name="GtkBox" glib:get-type="gtk_box_get_type" glib:type-struct="BoxClass">
<doc xml:space="preserve">The `GtkBox` widget arranges child widgets into a single row or column.
![An example GtkBox](box.png)
Whether it is a row or column depends on the value of its
[property@Gtk.Orientable:orientation] property. Within the other
dimension, all children are allocated the same size. Of course, the
[property@Gtk.Widget:halign] and [property@Gtk.Widget:valign] properties
can be used on the children to influence their allocation.
Use repeated calls to [method@Gtk.Box.append] to pack widgets into a
`GtkBox` from start to end. Use [method@Gtk.Box.remove] to remove widgets
from the `GtkBox`. [method@Gtk.Box.insert_child_after] can be used to add
a child at a particular position.
Use [method@Gtk.Box.set_homogeneous] to specify whether or not all children
of the `GtkBox` are forced to get the same amount of space.
Use [method@Gtk.Box.set_spacing] to determine how much space will be minimally
placed between all children in the `GtkBox`. Note that spacing is added
*between* the children.
Use [method@Gtk.Box.reorder_child_after] to move a child to a different
place in the box.
# CSS nodes
`GtkBox` uses a single CSS node with name box.
# Accessibility
`GtkBox` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_box_new">
<doc xml:space="preserve">Creates a new `GtkBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkBox`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the box&#x2019;s orientation</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the number of pixels to place by default between children</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</constructor>
<method name="append" c:identifier="gtk_box_append">
<doc xml:space="preserve">Adds @child as the last child to @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to append</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_baseline_position" c:identifier="gtk_box_get_baseline_position" glib:get-property="baseline-position">
<attribute name="org.gtk.Method.get_property" value="baseline-position"/>
<doc xml:space="preserve">Gets the value set by gtk_box_set_baseline_position().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline position</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_homogeneous" c:identifier="gtk_box_get_homogeneous" glib:get-property="homogeneous">
<attribute name="org.gtk.Method.get_property" value="homogeneous"/>
<doc xml:space="preserve">Returns whether the box is homogeneous (all children are the
same size).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the box is homogeneous.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_spacing" c:identifier="gtk_box_get_spacing" glib:get-property="spacing">
<attribute name="org.gtk.Method.get_property" value="spacing"/>
<doc xml:space="preserve">Gets the value set by gtk_box_set_spacing().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">spacing between children</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_child_after" c:identifier="gtk_box_insert_child_after">
<doc xml:space="preserve">Inserts @child in the position after @sibling in the list
of @box children.
If @sibling is %NULL, insert @child at the first position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to insert</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the sibling after which to insert @child</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_box_prepend">
<doc xml:space="preserve">Adds @child as the first child to @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to prepend</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_box_remove">
<doc xml:space="preserve">Removes a child widget from @box.
The child must have been added before with
[method@Gtk.Box.append], [method@Gtk.Box.prepend], or
[method@Gtk.Box.insert_child_after].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="reorder_child_after" c:identifier="gtk_box_reorder_child_after">
<doc xml:space="preserve">Moves @child to the position after @sibling in the list
of @box children.
If @sibling is %NULL, move @child to the first position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to move, must be a child of @box</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the sibling to move @child after</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_baseline_position" c:identifier="gtk_box_set_baseline_position" glib:set-property="baseline-position">
<attribute name="org.gtk.Method.set_property" value="baseline-position"/>
<doc xml:space="preserve">Sets the baseline position of a box.
This affects only horizontal boxes with at least one baseline
aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then
@position is used to allocate the baseline with respect to the
extra space available.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBaselinePosition`</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_homogeneous" c:identifier="gtk_box_set_homogeneous" glib:set-property="homogeneous">
<attribute name="org.gtk.Method.set_property" value="homogeneous"/>
<doc xml:space="preserve">Sets whether or not all children of @box are given equal space
in the box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">a boolean value, %TRUE to create equal allotments,
%FALSE for variable allotments</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_spacing" c:identifier="gtk_box_set_spacing" glib:set-property="spacing">
<attribute name="org.gtk.Method.set_property" value="spacing"/>
<doc xml:space="preserve">Sets the number of pixels to place between children of @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBox`</doc>
<type name="Box" c:type="GtkBox*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the number of pixels to put between children</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="baseline-position" writable="1" transfer-ownership="none" setter="set_baseline_position" getter="get_baseline_position">
<attribute name="org.gtk.Property.get" value="gtk_box_get_baseline_position"/>
<attribute name="org.gtk.Property.set" value="gtk_box_set_baseline_position"/>
<doc xml:space="preserve">The position of the baseline aligned widgets if extra space is available.</doc>
<type name="BaselinePosition"/>
</property>
<property name="homogeneous" writable="1" transfer-ownership="none" setter="set_homogeneous" getter="get_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_box_get_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_box_set_homogeneous"/>
<doc xml:space="preserve">Whether the children should all be the same size.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="spacing" writable="1" transfer-ownership="none" setter="set_spacing" getter="get_spacing">
<attribute name="org.gtk.Property.get" value="gtk_box_get_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_box_set_spacing"/>
<doc xml:space="preserve">The amount of space between children.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
</class>
<record name="BoxClass" c:type="GtkBoxClass" glib:is-gtype-struct-for="Box">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="BoxLayout" c:symbol-prefix="box_layout" c:type="GtkBoxLayout" parent="LayoutManager" glib:type-name="GtkBoxLayout" glib:get-type="gtk_box_layout_get_type" glib:type-struct="BoxLayoutClass">
<doc xml:space="preserve">`GtkBoxLayout` is a layout manager that arranges children in a single
row or column.
Whether it is a row or column depends on the value of its
[property@Gtk.Orientable:orientation] property. Within the other dimension
all children all allocated the same size. The `GtkBoxLayout` will respect
the [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign]
properties of each child widget.
If you want all children to be assigned the same size, you can use
the [property@Gtk.BoxLayout:homogeneous] property.
If you want to specify the amount of space placed between each child,
you can use the [property@Gtk.BoxLayout:spacing] property.</doc>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_box_layout_new">
<doc xml:space="preserve">Creates a new `GtkBoxLayout`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new box layout</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation for the new layout</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</constructor>
<method name="get_baseline_position" c:identifier="gtk_box_layout_get_baseline_position" glib:get-property="baseline-position">
<attribute name="org.gtk.Method.get_property" value="baseline-position"/>
<doc xml:space="preserve">Gets the value set by gtk_box_layout_set_baseline_position().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline position</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_homogeneous" c:identifier="gtk_box_layout_get_homogeneous" glib:get-property="homogeneous">
<attribute name="org.gtk.Method.get_property" value="homogeneous"/>
<doc xml:space="preserve">Returns whether the layout is set to be homogeneous.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the layout is homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_spacing" c:identifier="gtk_box_layout_get_spacing" glib:get-property="spacing">
<attribute name="org.gtk.Method.get_property" value="spacing"/>
<doc xml:space="preserve">Returns the space that @box_layout puts between children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the spacing of the layout</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_baseline_position" c:identifier="gtk_box_layout_set_baseline_position" glib:set-property="baseline-position">
<attribute name="org.gtk.Method.set_property" value="baseline-position"/>
<doc xml:space="preserve">Sets the baseline position of a box layout.
The baseline position affects only horizontal boxes with at least one
baseline aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then the
given @position is used to allocate the baseline within the extra
space available.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBaselinePosition`</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_homogeneous" c:identifier="gtk_box_layout_set_homogeneous" glib:set-property="homogeneous">
<attribute name="org.gtk.Method.set_property" value="homogeneous"/>
<doc xml:space="preserve">Sets whether the box layout will allocate the same
size to all children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to set the box layout as homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_spacing" c:identifier="gtk_box_layout_set_spacing" glib:set-property="spacing">
<attribute name="org.gtk.Method.set_property" value="spacing"/>
<doc xml:space="preserve">Sets how much spacing to put between children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBoxLayout`</doc>
<type name="BoxLayout" c:type="GtkBoxLayout*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the spacing to apply between children</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="baseline-position" writable="1" transfer-ownership="none" setter="set_baseline_position" getter="get_baseline_position">
<attribute name="org.gtk.Property.get" value="gtk_box_layout_get_baseline_position"/>
<attribute name="org.gtk.Property.set" value="gtk_box_layout_set_baseline_position"/>
<doc xml:space="preserve">The position of the allocated baseline within the extra space
allocated to each child.
This property is only relevant for horizontal layouts containing
at least one child with a baseline alignment.</doc>
<type name="BaselinePosition"/>
</property>
<property name="homogeneous" writable="1" transfer-ownership="none" setter="set_homogeneous" getter="get_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_box_layout_get_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_box_layout_set_homogeneous"/>
<doc xml:space="preserve">Whether the box layout should distribute the available space
equally among the children.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="spacing" writable="1" transfer-ownership="none" setter="set_spacing" getter="get_spacing">
<attribute name="org.gtk.Property.get" value="gtk_box_layout_get_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_box_layout_set_spacing"/>
<doc xml:space="preserve">The space to put between the children.</doc>
<type name="gint" c:type="gint"/>
</property>
</class>
<record name="BoxLayoutClass" c:type="GtkBoxLayoutClass" glib:is-gtype-struct-for="BoxLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<interface name="Buildable" c:symbol-prefix="buildable" c:type="GtkBuildable" glib:type-name="GtkBuildable" glib:get-type="gtk_buildable_get_type" glib:type-struct="BuildableIface">
<doc xml:space="preserve">`GtkBuildable` allows objects to extend and customize their deserialization
from ui files.
The interface includes methods for setting names and properties of objects,
parsing custom tags and constructing child objects.
The `GtkBuildable` interface is implemented by all widgets and
many of the non-widget objects that are provided by GTK. The
main user of this interface is [class@Gtk.Builder]. There should be
very little need for applications to call any of these functions directly.
An object only needs to implement this interface if it needs to extend the
`GtkBuilder` XML format or run any extra routines at deserialization time.</doc>
<virtual-method name="add_child">
<doc xml:space="preserve">Adds a child to @buildable. @type is an optional string
describing how the child should be added.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">child to add</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="type" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">kind of child or %NULL</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="construct_child" introspectable="0">
<return-value>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="custom_finished">
<doc xml:space="preserve">Similar to gtk_buildable_parser_finished() but is
called once for each custom tag handled by the @buildable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">the name of the tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data created in custom_tag_start</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="custom_tag_end">
<doc xml:space="preserve">Called at the end of each custom element handled by
the buildable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">`GtkBuilder` used to construct this object</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">name of tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data that will be passed in to parser functions</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="custom_tag_start">
<doc xml:space="preserve">Called for each unknown element under `&lt;child&gt;`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an object has a custom implementation, %FALSE
if it doesn't.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder` used to construct this object</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">name of tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parser" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParser` to fill in</doc>
<type name="BuildableParser" c:type="GtkBuildableParser*"/>
</parameter>
<parameter name="data" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">return location for user data that will be passed in
to parser functions</doc>
<type name="gpointer" c:type="gpointer*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_id">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_internal_child">
<doc xml:space="preserve">Retrieves the internal child called @childname of the @buildable object.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the internal child of the buildable object</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="childname" transfer-ownership="none">
<doc xml:space="preserve">name of child</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="parser_finished">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_buildable_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_id">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_buildable_id" c:identifier="gtk_buildable_get_buildable_id">
<doc xml:space="preserve">Gets the ID of the @buildable object.
`GtkBuilder` sets the name based on the ID attribute
of the &lt;object&gt; tag used to construct the @buildable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the ID of the buildable object</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</instance-parameter>
</parameters>
</method>
</interface>
<record name="BuildableIface" c:type="GtkBuildableIface" glib:is-gtype-struct-for="Buildable">
<doc xml:space="preserve">The `GtkBuildableIface` interface contains methods that are
necessary to allow `GtkBuilder` to construct an object from
a `GtkBuilder` UI definition.</doc>
<field name="g_iface">
<doc xml:space="preserve">the parent class</doc>
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="set_id">
<callback name="set_id">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="id" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_id">
<callback name="get_id">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="add_child">
<callback name="add_child">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">child to add</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="type" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">kind of child or %NULL</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_buildable_property">
<callback name="set_buildable_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="construct_child" introspectable="0">
<callback name="construct_child" introspectable="0">
<return-value>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="custom_tag_start">
<callback name="custom_tag_start">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an object has a custom implementation, %FALSE
if it doesn't.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder` used to construct this object</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">name of tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parser" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParser` to fill in</doc>
<type name="BuildableParser" c:type="GtkBuildableParser*"/>
</parameter>
<parameter name="data" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">return location for user data that will be passed in
to parser functions</doc>
<type name="gpointer" c:type="gpointer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="custom_tag_end">
<callback name="custom_tag_end">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">`GtkBuilder` used to construct this object</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">name of tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data that will be passed in to parser functions</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="custom_finished">
<callback name="custom_finished">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">child object or %NULL for non-child tags</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="tagname" transfer-ownership="none">
<doc xml:space="preserve">the name of the tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data created in custom_tag_start</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="parser_finished">
<callback name="parser_finished">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_internal_child">
<callback name="get_internal_child">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the internal child of the buildable object</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<parameter name="buildable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildable`</doc>
<type name="Buildable" c:type="GtkBuildable*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="childname" transfer-ownership="none">
<doc xml:space="preserve">name of child</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<record name="BuildableParseContext" c:type="GtkBuildableParseContext" disguised="1">
<doc xml:space="preserve">An opaque context struct for `GtkBuildableParser`.</doc>
<method name="get_element" c:identifier="gtk_buildable_parse_context_get_element">
<doc xml:space="preserve">Retrieves the name of the currently open element.
If called from the start_element or end_element handlers this will
give the element_name as passed to those functions. For the parent
elements, see gtk_buildable_parse_context_get_element_stack().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the name of the currently open element</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildablParseContext`</doc>
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_element_stack" c:identifier="gtk_buildable_parse_context_get_element_stack">
<doc xml:space="preserve">Retrieves the element stack from the internal state of the parser.
The returned `GPtrArray` is an array of strings where the last item is
the currently open tag (as would be returned by
gtk_buildable_parse_context_get_element()) and the previous item is its
immediate parent.
This function is intended to be used in the start_element and
end_element handlers where gtk_buildable_parse_context_get_element()
would merely return the name of the element that is being
processed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the element stack, which must not be modified</doc>
<array name="GLib.PtrArray" c:type="GPtrArray*">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParseContext`</doc>
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_buildable_parse_context_get_position">
<doc xml:space="preserve">Retrieves the current line number and the number of the character on
that line. Intended for use in error messages; there are no strict
semantics for what constitutes the "current" line number other than
"the best number we could come up with for error messages."</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParseContext`</doc>
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</instance-parameter>
<parameter name="line_number" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for a line number</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="char_number" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for a char-on-line number</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="pop" c:identifier="gtk_buildable_parse_context_pop">
<doc xml:space="preserve">Completes the process of a temporary sub-parser redirection.
This function exists to collect the user_data allocated by a
matching call to gtk_buildable_parse_context_push(). It must be called
in the end_element handler corresponding to the start_element
handler during which gtk_buildable_parse_context_push() was called.
You must not call this function from the error callback -- the
@user_data is provided directly to the callback in that case.
This function is not intended to be directly called by users
interested in invoking subparsers. Instead, it is intended to
be used by the subparsers themselves to implement a higher-level
interface.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the user data passed to gtk_buildable_parse_context_push()</doc>
<type name="gpointer" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParseContext`</doc>
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="push" c:identifier="gtk_buildable_parse_context_push">
<doc xml:space="preserve">Temporarily redirects markup data to a sub-parser.
This function may only be called from the start_element handler of
a `GtkBuildableParser`. It must be matched with a corresponding call to
gtk_buildable_parse_context_pop() in the matching end_element handler
(except in the case that the parser aborts due to an error).
All tags, text and other data between the matching tags is
redirected to the subparser given by @parser. @user_data is used
as the user_data for that parser. @user_data is also passed to the
error callback in the event that an error occurs. This includes
errors that occur in subparsers of the subparser.
The end tag matching the start tag for which this call was made is
handled by the previous parser (which is given its own user_data)
which is why gtk_buildable_parse_context_pop() is provided to allow "one
last access" to the @user_data provided to this function. In the
case of error, the @user_data provided here is passed directly to
the error callback of the subparser and gtk_buildable_parse_context_pop()
should not be called. In either case, if @user_data was allocated
then it ought to be freed from both of these locations.
This function is not intended to be directly called by users
interested in invoking subparsers. Instead, it is intended to be
used by the subparsers themselves to implement a higher-level
interface.
For an example of how to use this, see g_markup_parse_context_push() which
has the same kind of API.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParseContext`</doc>
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</instance-parameter>
<parameter name="parser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuildableParser`</doc>
<type name="BuildableParser" c:type="const GtkBuildableParser*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to `GtkBuildableParser` functions</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
</record>
<record name="BuildableParser" c:type="GtkBuildableParser">
<doc xml:space="preserve">A sub-parser for `GtkBuildable` implementations.</doc>
<field name="start_element">
<callback name="start_element" throws="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</parameter>
<parameter name="element_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="attribute_names" transfer-ownership="none">
<type name="utf8" c:type="const char**"/>
</parameter>
<parameter name="attribute_values" transfer-ownership="none">
<type name="utf8" c:type="const char**"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="end_element">
<callback name="end_element" throws="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</parameter>
<parameter name="element_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="text">
<callback name="text" throws="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="text_len" transfer-ownership="none">
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="error">
<callback name="error">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="BuildableParseContext" c:type="GtkBuildableParseContext*"/>
</parameter>
<parameter name="error" transfer-ownership="none">
<type name="GLib.Error" c:type="GError*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="4">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="Builder" c:symbol-prefix="builder" c:type="GtkBuilder" parent="GObject.Object" glib:type-name="GtkBuilder" glib:get-type="gtk_builder_get_type" glib:type-struct="BuilderClass">
<doc xml:space="preserve">A `GtkBuilder` reads XML descriptions of a user interface and
instantiates the described objects.
To create a `GtkBuilder` from a user interface description, call
[ctor@Gtk.Builder.new_from_file], [ctor@Gtk.Builder.new_from_resource]
or [ctor@Gtk.Builder.new_from_string].
In the (unusual) case that you want to add user interface
descriptions from multiple sources to the same `GtkBuilder` you can
call [ctor@Gtk.Builder.new] to get an empty builder and populate it by
(multiple) calls to [method@Gtk.Builder.add_from_file],
[method@Gtk.Builder.add_from_resource] or
[method@Gtk.Builder.add_from_string].
A `GtkBuilder` holds a reference to all objects that it has constructed
and drops these references when it is finalized. This finalization can
cause the destruction of non-widget objects or widgets which are not
contained in a toplevel window. For toplevel windows constructed by a
builder, it is the responsibility of the user to call
[method@Gtk.Window.destroy] to get rid of them and all the widgets
they contain.
The functions [method@Gtk.Builder.get_object] and
[method@Gtk.Builder.get_objects] can be used to access the widgets in
the interface by the names assigned to them inside the UI description.
Toplevel windows returned by these functions will stay around until the
user explicitly destroys them with [method@Gtk.Window.destroy]. Other
widgets will either be part of a larger hierarchy constructed by the
builder (in which case you should not have to worry about their lifecycle),
or without a parent, in which case they have to be added to some container
to make use of them. Non-widget objects need to be reffed with
g_object_ref() to keep them beyond the lifespan of the builder.
# GtkBuilder UI Definitions
`GtkBuilder` parses textual descriptions of user interfaces which are
specified in XML format. We refer to these descriptions as &#x201C;GtkBuilder
UI definitions&#x201D; or just &#x201C;UI definitions&#x201D; if the context is clear.
The toplevel element is `&lt;interface&gt;`. It optionally takes a &#x201C;domain&#x201D;
attribute, which will make the builder look for translated strings
using `dgettext()` in the domain specified. This can also be done by
calling [method@Gtk.Builder.set_translation_domain] on the builder.
Objects are described by `&lt;object&gt;` elements, which can contain
`&lt;property&gt;` elements to set properties, `&lt;signal&gt;` elements which
connect signals to handlers, and `&lt;child&gt;` elements, which describe
child objects (most often widgets inside a container, but also e.g.
actions in an action group, or columns in a tree model). A `&lt;child&gt;`
element contains an `&lt;object&gt;` element which describes the child object.
The target toolkit version(s) are described by `&lt;requires&gt;` elements,
the &#x201C;lib&#x201D; attribute specifies the widget library in question (currently
the only supported value is &#x201C;gtk&#x201D;) and the &#x201C;version&#x201D; attribute specifies
the target version in the form &#x201C;`&lt;major&gt;`.`&lt;minor&gt;`&#x201D;. `GtkBuilder` will
error out if the version requirements are not met.
Typically, the specific kind of object represented by an `&lt;object&gt;`
element is specified by the &#x201C;class&#x201D; attribute. If the type has not
been loaded yet, GTK tries to find the `get_type()` function from the
class name by applying heuristics. This works in most cases, but if
necessary, it is possible to specify the name of the `get_type()`
function explicitly with the "type-func" attribute.
Objects may be given a name with the &#x201C;id&#x201D; attribute, which allows the
application to retrieve them from the builder with
[method@Gtk.Builder.get_object]. An id is also necessary to use the
object as property value in other parts of the UI definition. GTK
reserves ids starting and ending with `___` (three consecutive
underscores) for its own purposes.
Setting properties of objects is pretty straightforward with the
`&lt;property&gt;` element: the &#x201C;name&#x201D; attribute specifies the name of the
property, and the content of the element specifies the value.
If the &#x201C;translatable&#x201D; attribute is set to a true value, GTK uses
`gettext()` (or `dgettext()` if the builder has a translation domain set)
to find a translation for the value. This happens before the value
is parsed, so it can be used for properties of any type, but it is
probably most useful for string properties. It is also possible to
specify a context to disambiguate short strings, and comments which
may help the translators.
`GtkBuilder` can parse textual representations for the most common
property types: characters, strings, integers, floating-point numbers,
booleans (strings like &#x201C;TRUE&#x201D;, &#x201C;t&#x201D;, &#x201C;yes&#x201D;, &#x201C;y&#x201D;, &#x201C;1&#x201D; are interpreted
as %TRUE, strings like &#x201C;FALSE&#x201D;, &#x201C;f&#x201D;, &#x201C;no&#x201D;, &#x201C;n&#x201D;, &#x201C;0&#x201D; are interpreted
as %FALSE), enumerations (can be specified by their name, nick or
integer value), flags (can be specified by their name, nick, integer
value, optionally combined with &#x201C;|&#x201D;, e.g.
&#x201C;GTK_INPUT_HINT_EMOJI|GTK_INPUT_HINT_LOWERCASE&#x201D;)
and colors (in a format understood by [method@Gdk.RGBA.parse]).
`GVariant`s can be specified in the format understood by
g_variant_parse(), and pixbufs can be specified as a filename of an
image file to load.
Objects can be referred to by their name and by default refer to
objects declared in the local XML fragment and objects exposed via
[method@Gtk.Builder.expose_object]. In general, `GtkBuilder` allows
forward references to objects &#x2014; declared in the local XML; an object
doesn&#x2019;t have to be constructed before it can be referred to. The
exception to this rule is that an object has to be constructed before
it can be used as the value of a construct-only property.
It is also possible to bind a property value to another object's
property value using the attributes "bind-source" to specify the
source object of the binding, and optionally, "bind-property" and
"bind-flags" to specify the source property and source binding flags
respectively. Internally, `GtkBuilder` implements this using `GBinding`
objects. For more information see g_object_bind_property().
Sometimes it is necessary to refer to widgets which have implicitly
been constructed by GTK as part of a composite widget, to set
properties on them or to add further children (e.g. the content area
of a `GtkDialog`). This can be achieved by setting the &#x201C;internal-child&#x201D;
property of the `&lt;child&gt;` element to a true value. Note that `GtkBuilder`
still requires an `&lt;object&gt;` element for the internal child, even if it
has already been constructed.
A number of widgets have different places where a child can be added
(e.g. tabs vs. page content in notebooks). This can be reflected in
a UI definition by specifying the &#x201C;type&#x201D; attribute on a `&lt;child&gt;`
The possible values for the &#x201C;type&#x201D; attribute are described in the
sections describing the widget-specific portions of UI definitions.
# Signal handlers and function pointers
Signal handlers are set up with the `&lt;signal&gt;` element. The &#x201C;name&#x201D;
attribute specifies the name of the signal, and the &#x201C;handler&#x201D; attribute
specifies the function to connect to the signal.
The remaining attributes, &#x201C;after&#x201D;, &#x201C;swapped&#x201D; and &#x201C;object&#x201D;, have the
same meaning as the corresponding parameters of the
g_signal_connect_object() or g_signal_connect_data() functions. A
&#x201C;last_modification_time&#x201D; attribute is also allowed, but it does not
have a meaning to the builder.
If you rely on `GModule` support to lookup callbacks in the symbol table,
the following details should be noted:
When compiling applications for Windows, you must declare signal callbacks
with %G_MODULE_EXPORT, or they will not be put in the symbol table.
On Linux and Unix, this is not necessary; applications should instead
be compiled with the -Wl,--export-dynamic `CFLAGS`, and linked against
`gmodule-export-2.0`.
# A GtkBuilder UI Definition
```xml
&lt;interface&gt;
&lt;object class="GtkDialog" id="dialog1"&gt;
&lt;child internal-child="content_area"&gt;
&lt;object class="GtkBox" id="vbox1"&gt;
&lt;child internal-child="action_area"&gt;
&lt;object class="GtkBox" id="hbuttonbox1"&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="ok_button"&gt;
&lt;property name="label" translatable="yes"&gt;_Ok&lt;/property&gt;
&lt;property name="use-underline"&gt;True&lt;/property&gt;
&lt;signal name="clicked" handler="ok_button_clicked"/&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/interface&gt;
```
Beyond this general structure, several object classes define their
own XML DTD fragments for filling in the ANY placeholders in the DTD
above. Note that a custom element in a &lt;child&gt; element gets parsed by
the custom tag handler of the parent object, while a custom element in
an &lt;object&gt; element gets parsed by the custom tag handler of the object.
These XML fragments are explained in the documentation of the
respective objects.
A `&lt;template&gt;` tag can be used to define a widget class&#x2019;s components.
See the [GtkWidget documentation](class.Widget.html#building-composite-widgets-from-template-xml) for details.</doc>
<constructor name="new" c:identifier="gtk_builder_new">
<doc xml:space="preserve">Creates a new empty builder object.
This function is only useful if you intend to make multiple calls
to [method@Gtk.Builder.add_from_file], [method@Gtk.Builder.add_from_resource]
or [method@Gtk.Builder.add_from_string] in order to merge multiple UI
descriptions into a single builder.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new (empty) `GtkBuilder` object</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</return-value>
</constructor>
<constructor name="new_from_file" c:identifier="gtk_builder_new_from_file">
<doc xml:space="preserve">Parses the UI definition in the file @filename.
If there is an error opening the file or parsing the description then
the program will be aborted. You should only ever attempt to parse
user interface descriptions that are shipped as part of your program.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkBuilder` containing the described interface</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">filename of user interface description file</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_resource" c:identifier="gtk_builder_new_from_resource">
<doc xml:space="preserve">Parses the UI definition at @resource_path.
If there is an error locating the resource or parsing the
description, then the program will be aborted.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkBuilder` containing the described interface</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</return-value>
<parameters>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">a `GResource` resource path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_string" c:identifier="gtk_builder_new_from_string">
<doc xml:space="preserve">Parses the UI definition in @string.
If @string is %NULL-terminated, then @length should be -1.
If @length is not -1, then it is the length of @string.
If there is an error parsing @string then the program will be
aborted. You should not attempt to parse user interface description
from untrusted sources.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkBuilder` containing the interface described by @string</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">a user interface (XML) description</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of @string, or -1</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
</parameters>
</constructor>
<method name="add_from_file" c:identifier="gtk_builder_add_from_file" throws="1">
<doc xml:space="preserve">Parses a file containing a UI definition and merges it with
the current contents of @builder.
This function is useful if you need to call
[method@Gtk.Builder.set_current_object]) to add user data to
callbacks before loading GtkBuilder UI. Otherwise, you probably
want [ctor@Gtk.Builder.new_from_file] instead.
If an error occurs, 0 will be returned and @error will be assigned a
`GError` from the `GTK_BUILDER_ERROR`, `G_MARKUP_ERROR` or `G_FILE_ERROR`
domains.
It&#x2019;s not really reasonable to attempt to handle failures of this
call. You should not use this function with untrusted files (ie:
files that are not part of your application). Broken `GtkBuilder`
files can easily crash your program, and it&#x2019;s possible that memory
was leaked leading up to the reported failure. The only reasonable
thing to do when an error is detected is to call `g_error()`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">the name of the file to parse</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_from_resource" c:identifier="gtk_builder_add_from_resource" throws="1">
<doc xml:space="preserve">Parses a resource file containing a UI definition
and merges it with the current contents of @builder.
This function is useful if you need to call
[method@Gtk.Builder.set_current_object] to add user data to
callbacks before loading GtkBuilder UI. Otherwise, you probably
want [ctor@Gtk.Builder.new_from_resource] instead.
If an error occurs, 0 will be returned and @error will be assigned a
`GError` from the %GTK_BUILDER_ERROR, %G_MARKUP_ERROR or %G_RESOURCE_ERROR
domain.
It&#x2019;s not really reasonable to attempt to handle failures of this
call. The only reasonable thing to do when an error is detected is
to call g_error().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">the path of the resource file to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_from_string" c:identifier="gtk_builder_add_from_string" throws="1">
<doc xml:space="preserve">Parses a string containing a UI definition and merges it
with the current contents of @builder.
This function is useful if you need to call
[method@Gtk.Builder.set_current_object] to add user data to
callbacks before loading `GtkBuilder` UI. Otherwise, you probably
want [ctor@Gtk.Builder.new_from_string] instead.
Upon errors %FALSE will be returned and @error will be assigned a
`GError` from the %GTK_BUILDER_ERROR, %G_MARKUP_ERROR or
%G_VARIANT_PARSE_ERROR domain.
It&#x2019;s not really reasonable to attempt to handle failures of this
call. The only reasonable thing to do when an error is detected is
to call g_error().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">the string to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of @buffer (may be -1 if @buffer is nul-terminated)</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
</parameters>
</method>
<method name="add_objects_from_file" c:identifier="gtk_builder_add_objects_from_file" throws="1">
<doc xml:space="preserve">Parses a file containing a UI definition building only the
requested objects and merges them with the current contents
of @builder.
Upon errors, 0 will be returned and @error will be assigned a
`GError` from the %GTK_BUILDER_ERROR, %G_MARKUP_ERROR or %G_FILE_ERROR
domain.
If you are adding an object that depends on an object that is not
its child (for instance a `GtkTreeView` that depends on its
`GtkTreeModel`), you have to explicitly list all of them in @object_ids.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">the name of the file to parse</doc>
<type name="filename" c:type="const char*"/>
</parameter>
<parameter name="object_ids" transfer-ownership="none">
<doc xml:space="preserve">nul-terminated array of objects to build</doc>
<array c:type="const char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</method>
<method name="add_objects_from_resource" c:identifier="gtk_builder_add_objects_from_resource" throws="1">
<doc xml:space="preserve">Parses a resource file containing a UI definition, building
only the requested objects and merges them with the current
contents of @builder.
Upon errors, 0 will be returned and @error will be assigned a
`GError` from the %GTK_BUILDER_ERROR, %G_MARKUP_ERROR or %G_RESOURCE_ERROR
domain.
If you are adding an object that depends on an object that is not
its child (for instance a `GtkTreeView` that depends on its
`GtkTreeModel`), you have to explicitly list all of them in @object_ids.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">the path of the resource file to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="object_ids" transfer-ownership="none">
<doc xml:space="preserve">nul-terminated array of objects to build</doc>
<array c:type="const char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</method>
<method name="add_objects_from_string" c:identifier="gtk_builder_add_objects_from_string" throws="1">
<doc xml:space="preserve">Parses a string containing a UI definition, building only the
requested objects and merges them with the current contents of
@builder.
Upon errors %FALSE will be returned and @error will be assigned a
`GError` from the %GTK_BUILDER_ERROR or %G_MARKUP_ERROR domain.
If you are adding an object that depends on an object that is not
its child (for instance a `GtkTreeView` that depends on its
`GtkTreeModel`), you have to explicitly list all of them in @object_ids.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success, %FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">the string to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of @buffer (may be -1 if @buffer is nul-terminated)</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
<parameter name="object_ids" transfer-ownership="none">
<doc xml:space="preserve">nul-terminated array of objects to build</doc>
<array c:type="const char**">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</method>
<method name="create_closure" c:identifier="gtk_builder_create_closure" throws="1">
<doc xml:space="preserve">Creates a closure to invoke the function called @function_name.
This is using the create_closure() implementation of @builder's
[iface@Gtk.BuilderScope].
If no closure could be created, %NULL will be returned and @error
will be set.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A new closure for invoking @function_name</doc>
<type name="GObject.Closure" c:type="GClosure*"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="function_name" transfer-ownership="none">
<doc xml:space="preserve">name of the function to look up</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">closure creation flags</doc>
<type name="BuilderClosureFlags" c:type="GtkBuilderClosureFlags"/>
</parameter>
<parameter name="object" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Object to create the closure with</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</method>
<method name="expose_object" c:identifier="gtk_builder_expose_object">
<doc xml:space="preserve">Add @object to the @builder object pool so it can be
referenced just like any other object built by builder.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the object exposed to the builder</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">the object to expose</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</method>
<method name="extend_with_template" c:identifier="gtk_builder_extend_with_template" throws="1">
<doc xml:space="preserve">Main private entry point for building composite components
from template XML.
This is exported purely to let `gtk-builder-tool` validate
templates, applications have no need to call this function.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A positive value on success, 0 if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">the object that is being extended</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="template_type" transfer-ownership="none">
<doc xml:space="preserve">the type that the template is for</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">the string to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of @buffer (may be -1 if @buffer is nul-terminated)</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
</parameters>
</method>
<method name="get_current_object" c:identifier="gtk_builder_get_current_object" glib:get-property="current-object">
<attribute name="org.gtk.Method.get_property" value="current-object"/>
<doc xml:space="preserve">Gets the current object set via gtk_builder_set_current_object().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current object</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_object" c:identifier="gtk_builder_get_object">
<doc xml:space="preserve">Gets the object named @name.
Note that this function does not increment the reference count
of the returned object.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the object named @name</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of object to get</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_objects" c:identifier="gtk_builder_get_objects">
<doc xml:space="preserve">Gets all objects that have been constructed by @builder.
Note that this function does not increment the reference
counts of the returned objects.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">a
newly-allocated `GSList` containing all the objects
constructed by the `GtkBuilder instance`. It should be
freed by g_slist_free()</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="GObject.Object"/>
</type>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scope" c:identifier="gtk_builder_get_scope" glib:get-property="scope">
<attribute name="org.gtk.Method.get_property" value="scope"/>
<doc xml:space="preserve">Gets the scope in use that was set via gtk_builder_set_scope().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current scope</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_translation_domain" c:identifier="gtk_builder_get_translation_domain" glib:get-property="translation-domain">
<attribute name="org.gtk.Method.get_property" value="translation-domain"/>
<doc xml:space="preserve">Gets the translation domain of @builder.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the translation domain</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_type_from_name" c:identifier="gtk_builder_get_type_from_name">
<doc xml:space="preserve">Looks up a type by name.
This is using the virtual function that `GtkBuilder` has
for that purpose. This is mainly used when implementing
the `GtkBuildable` interface on a type.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GType` found for @type_name or %G_TYPE_INVALID
if no type was found</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="type_name" transfer-ownership="none">
<doc xml:space="preserve">type name to lookup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_current_object" c:identifier="gtk_builder_set_current_object" glib:set-property="current-object">
<attribute name="org.gtk.Method.set_property" value="current-object"/>
<doc xml:space="preserve">Sets the current object for the @builder.
The current object can be thought of as the `this` object that the
builder is working for and will often be used as the default object
when an object is optional.
[method@Gtk.Widget.init_template] for example will set the current
object to the widget the template is inited for. For functions like
[ctor@Gtk.Builder.new_from_resource], the current object will be %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="current_object" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new current object</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</method>
<method name="set_scope" c:identifier="gtk_builder_set_scope" glib:set-property="scope">
<attribute name="org.gtk.Method.set_property" value="scope"/>
<doc xml:space="preserve">Sets the scope the builder should operate in.
If @scope is %NULL, a new [class@Gtk.BuilderCScope] will be created.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="scope" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the scope to use</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
</parameters>
</method>
<method name="set_translation_domain" c:identifier="gtk_builder_set_translation_domain" glib:set-property="translation-domain">
<attribute name="org.gtk.Method.set_property" value="translation-domain"/>
<doc xml:space="preserve">Sets the translation domain of @builder.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="domain" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the translation domain</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="value_from_string" c:identifier="gtk_builder_value_from_string" throws="1">
<doc xml:space="preserve">Demarshals a value from a string.
This function calls g_value_init() on the @value argument,
so it need not be initialised beforehand.
Can handle char, uchar, boolean, int, uint, long,
ulong, enum, flags, float, double, string, `GdkRGBA` and
`GtkAdjustment` type values.
Upon errors %FALSE will be returned and @error will be
assigned a `GError` from the %GTK_BUILDER_ERROR domain.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string representation of the value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the `GValue` to store the result in</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="value_from_string_type" c:identifier="gtk_builder_value_from_string_type" throws="1">
<doc xml:space="preserve">Demarshals a value from a string.
Unlike [method@Gtk.Builder.value_from_string], this function
takes a `GType` instead of `GParamSpec`.
Calls g_value_init() on the @value argument, so it
need not be initialised beforehand.
Upon errors %FALSE will be returned and @error will be
assigned a `GError` from the %GTK_BUILDER_ERROR domain.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="builder" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilder`</doc>
<type name="Builder" c:type="GtkBuilder*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the `GType` of the value</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string representation of the value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the `GValue` to store the result in</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<property name="current-object" writable="1" transfer-ownership="none" setter="set_current_object" getter="get_current_object">
<attribute name="org.gtk.Property.get" value="gtk_builder_get_current_object"/>
<attribute name="org.gtk.Property.set" value="gtk_builder_set_current_object"/>
<doc xml:space="preserve">The object the builder is evaluating for.</doc>
<type name="GObject.Object"/>
</property>
<property name="scope" writable="1" construct="1" transfer-ownership="none" setter="set_scope" getter="get_scope">
<attribute name="org.gtk.Property.get" value="gtk_builder_get_scope"/>
<attribute name="org.gtk.Property.set" value="gtk_builder_set_scope"/>
<doc xml:space="preserve">The scope the builder is operating in</doc>
<type name="BuilderScope"/>
</property>
<property name="translation-domain" writable="1" transfer-ownership="none" setter="set_translation_domain" getter="get_translation_domain">
<attribute name="org.gtk.Property.get" value="gtk_builder_get_translation_domain"/>
<attribute name="org.gtk.Property.set" value="gtk_builder_set_translation_domain"/>
<doc xml:space="preserve">The translation domain used when translating property values that
have been marked as translatable.
If the translation domain is %NULL, `GtkBuilder` uses gettext(),
otherwise g_dgettext().</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="BuilderCScope" c:symbol-prefix="builder_cscope" c:type="GtkBuilderCScope" parent="GObject.Object" glib:type-name="GtkBuilderCScope" glib:get-type="gtk_builder_cscope_get_type" glib:type-struct="BuilderCScopeClass">
<doc xml:space="preserve">A `GtkBuilderScope` implementation for the C language.
`GtkBuilderCScope` instances use symbols explicitly added to @builder
with prior calls to [method@Gtk.BuilderCScope.add_callback_symbol].
If developers want to do that, they are encouraged to create their
own scopes for that purpose.
In the case that symbols are not explicitly added; GTK will uses
`GModule`&#x2019;s introspective features (by opening the module %NULL) to
look at the application&#x2019;s symbol table. From here it tries to match
the signal function names given in the interface description with
symbols in the application.
Note that unless [method@Gtk.BuilderCScope.add_callback_symbol] is
called for all signal callbacks which are referenced by the loaded XML,
this functionality will require that `GModule` be supported on the platform.</doc>
<implements name="BuilderScope"/>
<constructor name="new" c:identifier="gtk_builder_cscope_new">
<doc xml:space="preserve">Creates a new `GtkBuilderCScope` object to use with future
`GtkBuilder` instances.
Calling this function is only necessary if you want to add
custom callbacks via [method@Gtk.BuilderCScope.add_callback_symbol].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkBuilderCScope`</doc>
<type name="BuilderCScope" c:type="GtkBuilderScope*"/>
</return-value>
</constructor>
<method name="add_callback_symbol" c:identifier="gtk_builder_cscope_add_callback_symbol">
<doc xml:space="preserve">Adds the @callback_symbol to the scope of @builder under the
given @callback_name.
Using this function overrides the behavior of
[method@Gtk.Builder.create_closure] for any callback symbols that
are added. Using this method allows for better encapsulation as it
does not require that callback symbols be declared in the global
namespace.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderCScope`</doc>
<type name="BuilderCScope" c:type="GtkBuilderCScope*"/>
</instance-parameter>
<parameter name="callback_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the callback, as expected in the XML</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="callback_symbol" transfer-ownership="none" scope="async">
<doc xml:space="preserve">The callback pointer</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</parameter>
</parameters>
</method>
<method name="add_callback_symbols" c:identifier="gtk_builder_cscope_add_callback_symbols" introspectable="0">
<doc xml:space="preserve">A convenience function to add many callbacks.
This is equivalent to calling [method@Gtk.BuilderCScope.add_callback_symbol]
for each symbol.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderCScope`</doc>
<type name="BuilderCScope" c:type="GtkBuilderCScope*"/>
</instance-parameter>
<parameter name="first_callback_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the callback, as expected in the XML</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="first_callback_symbol" transfer-ownership="none" scope="async">
<doc xml:space="preserve">The callback pointer</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">A list of callback name and callback symbol pairs terminated with %NULL</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="lookup_callback_symbol" c:identifier="gtk_builder_cscope_lookup_callback_symbol" introspectable="0">
<doc xml:space="preserve">Fetches a symbol previously added with
gtk_builder_cscope_add_callback_symbol().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The callback symbol
in @builder for @callback_name</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderCScope`</doc>
<type name="BuilderCScope" c:type="GtkBuilderCScope*"/>
</instance-parameter>
<parameter name="callback_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the callback</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="BuilderCScopeClass" c:type="GtkBuilderCScopeClass" glib:is-gtype-struct-for="BuilderCScope">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<record name="BuilderClass" c:type="GtkBuilderClass" disguised="1" glib:is-gtype-struct-for="Builder"/>
<bitfield name="BuilderClosureFlags" glib:type-name="GtkBuilderClosureFlags" glib:get-type="gtk_builder_closure_flags_get_type" c:type="GtkBuilderClosureFlags">
<doc xml:space="preserve">The list of flags that can be passed to gtk_builder_create_closure().
New values may be added in the future for new features, so external
implementations of [iface@Gtk.BuilderScope] should test the flags
for unknown values and raise a %GTK_BUILDER_ERROR_INVALID_ATTRIBUTE error
when they encounter one.</doc>
<member name="swapped" value="1" c:identifier="GTK_BUILDER_CLOSURE_SWAPPED" glib:nick="swapped" glib:name="GTK_BUILDER_CLOSURE_SWAPPED">
<doc xml:space="preserve">The closure should be created swapped. See
g_cclosure_new_swap() for details.</doc>
</member>
</bitfield>
<enumeration name="BuilderError" glib:type-name="GtkBuilderError" glib:get-type="gtk_builder_error_get_type" c:type="GtkBuilderError" glib:error-domain="gtk-builder-error-quark">
<doc xml:space="preserve">Error codes that identify various errors that can occur while using
`GtkBuilder`.</doc>
<member name="invalid_type_function" value="0" c:identifier="GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION" glib:nick="invalid-type-function" glib:name="GTK_BUILDER_ERROR_INVALID_TYPE_FUNCTION">
<doc xml:space="preserve">A type-func attribute didn&#x2019;t name
a function that returns a `GType`.</doc>
</member>
<member name="unhandled_tag" value="1" c:identifier="GTK_BUILDER_ERROR_UNHANDLED_TAG" glib:nick="unhandled-tag" glib:name="GTK_BUILDER_ERROR_UNHANDLED_TAG">
<doc xml:space="preserve">The input contained a tag that `GtkBuilder`
can&#x2019;t handle.</doc>
</member>
<member name="missing_attribute" value="2" c:identifier="GTK_BUILDER_ERROR_MISSING_ATTRIBUTE" glib:nick="missing-attribute" glib:name="GTK_BUILDER_ERROR_MISSING_ATTRIBUTE">
<doc xml:space="preserve">An attribute that is required by
`GtkBuilder` was missing.</doc>
</member>
<member name="invalid_attribute" value="3" c:identifier="GTK_BUILDER_ERROR_INVALID_ATTRIBUTE" glib:nick="invalid-attribute" glib:name="GTK_BUILDER_ERROR_INVALID_ATTRIBUTE">
<doc xml:space="preserve">`GtkBuilder` found an attribute that
it doesn&#x2019;t understand.</doc>
</member>
<member name="invalid_tag" value="4" c:identifier="GTK_BUILDER_ERROR_INVALID_TAG" glib:nick="invalid-tag" glib:name="GTK_BUILDER_ERROR_INVALID_TAG">
<doc xml:space="preserve">`GtkBuilder` found a tag that
it doesn&#x2019;t understand.</doc>
</member>
<member name="missing_property_value" value="5" c:identifier="GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE" glib:nick="missing-property-value" glib:name="GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE">
<doc xml:space="preserve">A required property value was
missing.</doc>
</member>
<member name="invalid_value" value="6" c:identifier="GTK_BUILDER_ERROR_INVALID_VALUE" glib:nick="invalid-value" glib:name="GTK_BUILDER_ERROR_INVALID_VALUE">
<doc xml:space="preserve">`GtkBuilder` couldn&#x2019;t parse
some attribute value.</doc>
</member>
<member name="version_mismatch" value="7" c:identifier="GTK_BUILDER_ERROR_VERSION_MISMATCH" glib:nick="version-mismatch" glib:name="GTK_BUILDER_ERROR_VERSION_MISMATCH">
<doc xml:space="preserve">The input file requires a newer version
of GTK.</doc>
</member>
<member name="duplicate_id" value="8" c:identifier="GTK_BUILDER_ERROR_DUPLICATE_ID" glib:nick="duplicate-id" glib:name="GTK_BUILDER_ERROR_DUPLICATE_ID">
<doc xml:space="preserve">An object id occurred twice.</doc>
</member>
<member name="object_type_refused" value="9" c:identifier="GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED" glib:nick="object-type-refused" glib:name="GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED">
<doc xml:space="preserve">A specified object type is of the same type or
derived from the type of the composite class being extended with builder XML.</doc>
</member>
<member name="template_mismatch" value="10" c:identifier="GTK_BUILDER_ERROR_TEMPLATE_MISMATCH" glib:nick="template-mismatch" glib:name="GTK_BUILDER_ERROR_TEMPLATE_MISMATCH">
<doc xml:space="preserve">The wrong type was specified in a composite class&#x2019;s template XML</doc>
</member>
<member name="invalid_property" value="11" c:identifier="GTK_BUILDER_ERROR_INVALID_PROPERTY" glib:nick="invalid-property" glib:name="GTK_BUILDER_ERROR_INVALID_PROPERTY">
<doc xml:space="preserve">The specified property is unknown for the object class.</doc>
</member>
<member name="invalid_signal" value="12" c:identifier="GTK_BUILDER_ERROR_INVALID_SIGNAL" glib:nick="invalid-signal" glib:name="GTK_BUILDER_ERROR_INVALID_SIGNAL">
<doc xml:space="preserve">The specified signal is unknown for the object class.</doc>
</member>
<member name="invalid_id" value="13" c:identifier="GTK_BUILDER_ERROR_INVALID_ID" glib:nick="invalid-id" glib:name="GTK_BUILDER_ERROR_INVALID_ID">
<doc xml:space="preserve">An object id is unknown.</doc>
</member>
<member name="invalid_function" value="14" c:identifier="GTK_BUILDER_ERROR_INVALID_FUNCTION" glib:nick="invalid-function" glib:name="GTK_BUILDER_ERROR_INVALID_FUNCTION">
<doc xml:space="preserve">A function could not be found. This often happens
when symbols are set to be kept private. Compiling code with -rdynamic or using the
`gmodule-export-2.0` pkgconfig module can fix this problem.</doc>
</member>
<function name="quark" c:identifier="gtk_builder_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<class name="BuilderListItemFactory" c:symbol-prefix="builder_list_item_factory" c:type="GtkBuilderListItemFactory" parent="ListItemFactory" glib:type-name="GtkBuilderListItemFactory" glib:get-type="gtk_builder_list_item_factory_get_type" glib:type-struct="BuilderListItemFactoryClass">
<doc xml:space="preserve">`GtkBuilderListItemFactory` is a `GtkListItemFactory` that creates
widgets by instantiating `GtkBuilder` UI templates.
The templates must be extending `GtkListItem`, and typically use
`GtkExpression`s to obtain data from the items in the model.
Example:
```xml
&lt;interface&gt;
&lt;template class="GtkListItem"&gt;
&lt;property name="child"&gt;
&lt;object class="GtkLabel"&gt;
&lt;property name="xalign"&gt;0&lt;/property&gt;
&lt;binding name="label"&gt;
&lt;lookup name="name" type="SettingsKey"&gt;
&lt;lookup name="item"&gt;GtkListItem&lt;/lookup&gt;
&lt;/lookup&gt;
&lt;/binding&gt;
&lt;/object&gt;
&lt;/property&gt;
&lt;/template&gt;
&lt;/interface&gt;
```</doc>
<constructor name="new_from_bytes" c:identifier="gtk_builder_list_item_factory_new_from_bytes">
<doc xml:space="preserve">Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using @bytes as the data to pass to `GtkBuilder`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkBuilderListItemFactory`</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<parameter name="scope" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A scope to use when instantiating</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
<parameter name="bytes" transfer-ownership="none">
<doc xml:space="preserve">the `GBytes` containing the ui file to instantiate</doc>
<type name="GLib.Bytes" c:type="GBytes*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_resource" c:identifier="gtk_builder_list_item_factory_new_from_resource">
<doc xml:space="preserve">Creates a new `GtkBuilderListItemFactory` that instantiates widgets
using data read from the given @resource_path to pass to `GtkBuilder`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkBuilderListItemFactory`</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<parameter name="scope" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A scope to use when instantiating</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">valid path to a resource that contains the data</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_bytes" c:identifier="gtk_builder_list_item_factory_get_bytes" glib:get-property="bytes">
<attribute name="org.gtk.Method.get_property" value="bytes"/>
<doc xml:space="preserve">Gets the data used as the `GtkBuilder` UI template for constructing
listitems.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkBuilder` data</doc>
<type name="GLib.Bytes" c:type="GBytes*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderListItemFactory`</doc>
<type name="BuilderListItemFactory" c:type="GtkBuilderListItemFactory*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resource" c:identifier="gtk_builder_list_item_factory_get_resource" glib:get-property="resource">
<attribute name="org.gtk.Method.get_property" value="resource"/>
<doc xml:space="preserve">If the data references a resource, gets the path of that resource.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The path to the resource</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderListItemFactory`</doc>
<type name="BuilderListItemFactory" c:type="GtkBuilderListItemFactory*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scope" c:identifier="gtk_builder_list_item_factory_get_scope" glib:get-property="scope">
<attribute name="org.gtk.Method.get_property" value="scope"/>
<doc xml:space="preserve">Gets the scope used when constructing listitems.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The scope used when constructing listitems</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBuilderListItemFactory`</doc>
<type name="BuilderListItemFactory" c:type="GtkBuilderListItemFactory*"/>
</instance-parameter>
</parameters>
</method>
<property name="bytes" writable="1" construct-only="1" transfer-ownership="none" getter="get_bytes">
<attribute name="org.gtk.Property.get" value="gtk_builder_list_item_factory_get_bytes"/>
<doc xml:space="preserve">`GBytes` containing the UI definition.</doc>
<type name="GLib.Bytes"/>
</property>
<property name="resource" writable="1" construct-only="1" transfer-ownership="none" getter="get_resource">
<attribute name="org.gtk.Property.get" value="gtk_builder_list_item_factory_get_resource"/>
<doc xml:space="preserve">Path of the resource containing the UI definition.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="scope" writable="1" construct-only="1" transfer-ownership="none" getter="get_scope">
<attribute name="org.gtk.Property.get" value="gtk_builder_list_item_factory_get_scope"/>
<doc xml:space="preserve">`GtkBuilderScope` to use when instantiating listitems</doc>
<type name="BuilderScope"/>
</property>
</class>
<record name="BuilderListItemFactoryClass" c:type="GtkBuilderListItemFactoryClass" disguised="1" glib:is-gtype-struct-for="BuilderListItemFactory"/>
<interface name="BuilderScope" c:symbol-prefix="builder_scope" c:type="GtkBuilderScope" glib:type-name="GtkBuilderScope" glib:get-type="gtk_builder_scope_get_type" glib:type-struct="BuilderScopeInterface">
<doc xml:space="preserve">`GtkBuilderScope` is an interface to provide language binding support
to `GtkBuilder`.
The goal of `GtkBuilderScope` is to look up programming-language-specific
values for strings that are given in a `GtkBuilder` UI file.
The primary intended audience is bindings that want to provide deeper
integration of `GtkBuilder` into the language.
A `GtkBuilderScope` instance may be used with multiple `GtkBuilder` objects,
even at once.
By default, GTK will use its own implementation of `GtkBuilderScope`
for the C language which can be created via [ctor@Gtk.BuilderCScope.new].</doc>
<virtual-method name="create_closure" throws="1">
<return-value transfer-ownership="full">
<type name="GObject.Closure" c:type="GClosure*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="function_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<type name="BuilderClosureFlags" c:type="GtkBuilderClosureFlags"/>
</parameter>
<parameter name="object" transfer-ownership="none">
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_type_from_function">
<return-value transfer-ownership="none">
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="function_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_type_from_name">
<return-value transfer-ownership="none">
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</instance-parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="type_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
</interface>
<record name="BuilderScopeInterface" c:type="GtkBuilderScopeInterface" glib:is-gtype-struct-for="BuilderScope">
<doc xml:space="preserve">The virtual function table to implement for `GtkBuilderScope` implementations.
Default implementations for each function do exist, but they usually just fail,
so it is suggested that implementations implement all of them.</doc>
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="get_type_from_name">
<callback name="get_type_from_name">
<return-value transfer-ownership="none">
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="type_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_type_from_function">
<callback name="get_type_from_function">
<return-value transfer-ownership="none">
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="function_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="create_closure">
<callback name="create_closure" throws="1">
<return-value transfer-ownership="full">
<type name="GObject.Closure" c:type="GClosure*"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
<parameter name="builder" transfer-ownership="none">
<type name="Builder" c:type="GtkBuilder*"/>
</parameter>
<parameter name="function_name" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<type name="BuilderClosureFlags" c:type="GtkBuilderClosureFlags"/>
</parameter>
<parameter name="object" transfer-ownership="none">
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="Button" c:symbol-prefix="button" c:type="GtkButton" parent="Widget" glib:type-name="GtkButton" glib:get-type="gtk_button_get_type" glib:type-struct="ButtonClass">
<doc xml:space="preserve">The `GtkButton` widget is generally used to trigger a callback function that is
called when the button is pressed.
![An example GtkButton](button.png)
The `GtkButton` widget can hold any valid child widget. That is, it can hold
almost any other standard `GtkWidget`. The most commonly used child is the
`GtkLabel`.
# CSS nodes
`GtkButton` has a single CSS node with name button. The node will get the
style classes .image-button or .text-button, if the content is just an
image or label, respectively. It may also receive the .flat style class.
When activating a button via the keyboard, the button will temporarily
gain the .keyboard-activating style class.
Other style classes that are commonly used with `GtkButton` include
.suggested-action and .destructive-action. In special cases, buttons
can be made round by adding the .circular style class.
Button-like widgets like [class@Gtk.ToggleButton], [class@Gtk.MenuButton],
[class@Gtk.VolumeButton], [class@Gtk.LockButton], [class@Gtk.ColorButton]
or [class@Gtk.FontButton] use style classes such as .toggle, .popup, .scale,
.lock, .color on the button node to differentiate themselves from a plain
`GtkButton`.
# Accessibility
`GtkButton` uses the %GTK_ACCESSIBLE_ROLE_BUTTON role.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_button_new">
<doc xml:space="preserve">Creates a new `GtkButton` widget.
To add a child widget to the button, use [method@Gtk.Button.set_child].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The newly created `GtkButton` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_from_icon_name" c:identifier="gtk_button_new_from_icon_name">
<doc xml:space="preserve">Creates a new button containing an icon from the current icon theme.
If the icon name isn&#x2019;t known, a &#x201C;broken image&#x201D; icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkButton` displaying the themed icon</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_label" c:identifier="gtk_button_new_with_label">
<doc xml:space="preserve">Creates a `GtkButton` widget with a `GtkLabel` child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The newly created `GtkButton` widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">The text you want the `GtkLabel` to hold</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_mnemonic" c:identifier="gtk_button_new_with_mnemonic">
<doc xml:space="preserve">Creates a new `GtkButton` containing a label.
If characters in @label are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use &#x201C;__&#x201D; (two
underscores). The first underlined character represents a keyboard
accelerator called a mnemonic. Pressing Alt and that key activates the button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">The text of the button, with an underscore in front of the
mnemonic character</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="clicked">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_child" c:identifier="gtk_button_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @button</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_frame" c:identifier="gtk_button_get_has_frame" glib:get-property="has-frame">
<attribute name="org.gtk.Method.get_property" value="has-frame"/>
<doc xml:space="preserve">Returns whether the button has a frame.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the button has a frame</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_button_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Returns the icon name of the button.
If the icon name has not been set with [method@Gtk.Button.set_icon_name]
the return value will be %NULL. This will be the case if you create
an empty button with [ctor@Gtk.Button.new] to use as a container.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The icon name set via [method@Gtk.Button.set_icon_name]</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">A `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_button_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Fetches the text from the label of the button.
If the label text has not been set with [method@Gtk.Button.set_label]
the return value will be %NULL. This will be the case if you create
an empty button with [ctor@Gtk.Button.new] to use as a container.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The text of the label widget. This string is owned
by the widget and must not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_button_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">gets whether underlines are interpreted as mnemonics.
See [method@Gtk.Button.set_use_underline].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an embedded underline in the button label
indicates the mnemonic accelerator keys.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_button_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @button.
Note that by using this API, you take full responsibility for setting
up the proper accessibility label and description information for @button.
Most likely, you'll either set the accessibility label or description
for @button explicitly, or you'll set a labelled-by or described-by
relations from @child to @button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_has_frame" c:identifier="gtk_button_set_has_frame" glib:set-property="has-frame">
<attribute name="org.gtk.Method.set_property" value="has-frame"/>
<doc xml:space="preserve">Sets the style of the button.
Buttons can has a flat appearance or have a frame drawn around them.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
<parameter name="has_frame" transfer-ownership="none">
<doc xml:space="preserve">whether the button should have a visible frame</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_name" c:identifier="gtk_button_set_icon_name" glib:set-property="icon-name">
<attribute name="org.gtk.Method.set_property" value="icon-name"/>
<doc xml:space="preserve">Adds a `GtkImage` with the given icon name as a child.
If @button already contains a child widget, that child widget will
be removed and replaced with the image.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">A `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:space="preserve">An icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_button_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Sets the text of the label of the button to @label.
This will also clear any previously set labels.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">a string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_button_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">Sets whether to use underlines as mnemonics.
If true, an underline in the text of the button label indicates
the next character should be used for the mnemonic accelerator key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkButton`</doc>
<type name="Button" c:type="GtkButton*"/>
</instance-parameter>
<parameter name="use_underline" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if underlines in the text indicate mnemonics</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_button_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_button_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="has-frame" writable="1" transfer-ownership="none" setter="set_has_frame" getter="get_has_frame">
<attribute name="org.gtk.Property.get" value="gtk_button_get_has_frame"/>
<attribute name="org.gtk.Property.set" value="gtk_button_set_has_frame"/>
<doc xml:space="preserve">Whether the button has a frame.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none" setter="set_icon_name" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_button_get_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_button_set_icon_name"/>
<doc xml:space="preserve">The name of the icon used to automatically populate the button.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="label" writable="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_button_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_button_set_label"/>
<doc xml:space="preserve">Text of the label inside the button, if the button contains a label widget.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="use-underline" writable="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_button_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_button_set_use_underline"/>
<doc xml:space="preserve">If set, an underline in the text indicates that the following character is
to be used as mnemonic.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="first" action="1">
<doc xml:space="preserve">Emitted to animate press then release.
This is an action signal. Applications should never connect
to this signal, but use the [signal@Gtk.Button::clicked] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="clicked" when="first" action="1">
<doc xml:space="preserve">Emitted when the button has been activated (pressed and released).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="ButtonClass" c:type="GtkButtonClass" glib:is-gtype-struct-for="Button">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="clicked">
<callback name="clicked">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="button" transfer-ownership="none">
<type name="Button" c:type="GtkButton*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="button" transfer-ownership="none">
<type name="Button" c:type="GtkButton*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="ButtonPrivate" c:type="GtkButtonPrivate" disguised="1"/>
<enumeration name="ButtonsType" glib:type-name="GtkButtonsType" glib:get-type="gtk_buttons_type_get_type" c:type="GtkButtonsType">
<doc xml:space="preserve">Prebuilt sets of buttons for `GtkDialog`.
If none of these choices are appropriate, simply use
%GTK_BUTTONS_NONE and call [method@Gtk.Dialog.add_buttons].
&gt; Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
&gt; and %GTK_BUTTONS_OK_CANCEL are discouraged by the
&gt; [GNOME Human Interface Guidelines](http://library.gnome.org/devel/hig-book/stable/).</doc>
<member name="none" value="0" c:identifier="GTK_BUTTONS_NONE" glib:nick="none" glib:name="GTK_BUTTONS_NONE">
<doc xml:space="preserve">no buttons at all</doc>
</member>
<member name="ok" value="1" c:identifier="GTK_BUTTONS_OK" glib:nick="ok" glib:name="GTK_BUTTONS_OK">
<doc xml:space="preserve">an OK button</doc>
</member>
<member name="close" value="2" c:identifier="GTK_BUTTONS_CLOSE" glib:nick="close" glib:name="GTK_BUTTONS_CLOSE">
<doc xml:space="preserve">a Close button</doc>
</member>
<member name="cancel" value="3" c:identifier="GTK_BUTTONS_CANCEL" glib:nick="cancel" glib:name="GTK_BUTTONS_CANCEL">
<doc xml:space="preserve">a Cancel button</doc>
</member>
<member name="yes_no" value="4" c:identifier="GTK_BUTTONS_YES_NO" glib:nick="yes-no" glib:name="GTK_BUTTONS_YES_NO">
<doc xml:space="preserve">Yes and No buttons</doc>
</member>
<member name="ok_cancel" value="5" c:identifier="GTK_BUTTONS_OK_CANCEL" glib:nick="ok-cancel" glib:name="GTK_BUTTONS_OK_CANCEL">
<doc xml:space="preserve">OK and Cancel buttons</doc>
</member>
</enumeration>
<function-macro name="CALENDAR" c:identifier="GTK_CALENDAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="CClosureExpression" c:symbol-prefix="cclosure_expression" c:type="GtkCClosureExpression" parent="Expression" glib:type-name="GtkCClosureExpression" glib:get-type="gtk_cclosure_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">A variant of `GtkClosureExpression` using a C closure.</doc>
<constructor name="new" c:identifier="gtk_cclosure_expression_new">
<doc xml:space="preserve">Creates a `GtkExpression` that calls `callback_func` when it is evaluated.
This function is a variant of [ctor@Gtk.ClosureExpression.new] that
creates a `GClosure` by calling g_cclosure_new() with the given
`callback_func`, `user_data` and `user_destroy`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="CClosureExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value_type" transfer-ownership="none">
<doc xml:space="preserve">the type of the value that this expression evaluates to</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="marshal" transfer-ownership="none" nullable="1" allow-none="1" scope="call">
<doc xml:space="preserve">marshaller used for creating a closure</doc>
<type name="GObject.ClosureMarshal" c:type="GClosureMarshal"/>
</parameter>
<parameter name="n_params" transfer-ownership="none">
<doc xml:space="preserve">the number of params needed for evaluating @closure</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="params" transfer-ownership="full">
<doc xml:space="preserve">expressions for each parameter</doc>
<array length="2" zero-terminated="0" c:type="GtkExpression**">
<type name="Expression" c:type="GtkExpression*"/>
</array>
</parameter>
<parameter name="callback_func" transfer-ownership="none" scope="notified" closure="5" destroy="6">
<doc xml:space="preserve">callback used for creating a closure</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data used for creating a closure</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="notified">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GObject.ClosureNotify" c:type="GClosureNotify"/>
</parameter>
</parameters>
</constructor>
</class>
<function-macro name="CELL_AREA" c:identifier="GTK_CELL_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_BOX" c:identifier="GTK_CELL_AREA_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_CLASS" c:identifier="GTK_CELL_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_CONTEXT" c:identifier="GTK_CELL_AREA_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_CONTEXT_CLASS" c:identifier="GTK_CELL_AREA_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_CONTEXT_GET_CLASS" c:identifier="GTK_CELL_AREA_CONTEXT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_GET_CLASS" c:identifier="GTK_CELL_AREA_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_AREA_WARN_INVALID_CELL_PROPERTY_ID" c:identifier="GTK_CELL_AREA_WARN_INVALID_CELL_PROPERTY_ID" introspectable="0">
<doc xml:space="preserve">This macro should be used to emit a standard warning about unexpected
properties in set_cell_property() and get_cell_property() implementations.</doc>
<parameters>
<parameter name="object">
<doc xml:space="preserve">the `GObject` on which set_cell_property() or get_cell_property()
was called</doc>
</parameter>
<parameter name="property_id">
<doc xml:space="preserve">the numeric id of the property</doc>
</parameter>
<parameter name="pspec">
<doc xml:space="preserve">the `GParamSpec` of the property</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_EDITABLE" c:identifier="GTK_CELL_EDITABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_EDITABLE_GET_IFACE" c:identifier="GTK_CELL_EDITABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_LAYOUT" c:identifier="GTK_CELL_LAYOUT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_LAYOUT_GET_IFACE" c:identifier="GTK_CELL_LAYOUT_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER" c:identifier="GTK_CELL_RENDERER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_ACCEL" c:identifier="GTK_CELL_RENDERER_ACCEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_CLASS" c:identifier="GTK_CELL_RENDERER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_COMBO" c:identifier="GTK_CELL_RENDERER_COMBO" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_GET_CLASS" c:identifier="GTK_CELL_RENDERER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_PIXBUF" c:identifier="GTK_CELL_RENDERER_PIXBUF" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_PROGRESS" c:identifier="GTK_CELL_RENDERER_PROGRESS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_SPIN" c:identifier="GTK_CELL_RENDERER_SPIN" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_SPINNER" c:identifier="GTK_CELL_RENDERER_SPINNER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_TEXT" c:identifier="GTK_CELL_RENDERER_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_TEXT_CLASS" c:identifier="GTK_CELL_RENDERER_TEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_TEXT_GET_CLASS" c:identifier="GTK_CELL_RENDERER_TEXT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_RENDERER_TOGGLE" c:identifier="GTK_CELL_RENDERER_TOGGLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CELL_VIEW" c:identifier="GTK_CELL_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CENTER_BOX" c:identifier="GTK_CENTER_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CENTER_BOX_CLASS" c:identifier="GTK_CENTER_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CENTER_BOX_GET_CLASS" c:identifier="GTK_CENTER_BOX_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CHECK_BUTTON" c:identifier="GTK_CHECK_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CHECK_BUTTON_CLASS" c:identifier="GTK_CHECK_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="CHECK_BUTTON_GET_CLASS" c:identifier="GTK_CHECK_BUTTON_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CHECK_VERSION" c:identifier="GTK_CHECK_VERSION" introspectable="0">
<doc xml:space="preserve">Returns %TRUE if the version of the GTK header files
is the same as or newer than the passed-in version.</doc>
<parameters>
<parameter name="major">
<doc xml:space="preserve">major version (e.g. 1 for version 1.2.5)</doc>
</parameter>
<parameter name="minor">
<doc xml:space="preserve">minor version (e.g. 2 for version 1.2.5)</doc>
</parameter>
<parameter name="micro">
<doc xml:space="preserve">micro version (e.g. 5 for version 1.2.5)</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="COLOR_BUTTON" c:identifier="GTK_COLOR_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLOR_CHOOSER" c:identifier="GTK_COLOR_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLOR_CHOOSER_DIALOG" c:identifier="GTK_COLOR_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLOR_CHOOSER_GET_IFACE" c:identifier="GTK_COLOR_CHOOSER_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLOR_CHOOSER_WIDGET" c:identifier="GTK_COLOR_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW" c:identifier="GTK_COLUMN_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW_CLASS" c:identifier="GTK_COLUMN_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW_COLUMN" c:identifier="GTK_COLUMN_VIEW_COLUMN" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW_COLUMN_CLASS" c:identifier="GTK_COLUMN_VIEW_COLUMN_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW_COLUMN_GET_CLASS" c:identifier="GTK_COLUMN_VIEW_COLUMN_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="COLUMN_VIEW_GET_CLASS" c:identifier="GTK_COLUMN_VIEW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="COMBO_BOX" c:identifier="GTK_COMBO_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="COMBO_BOX_CLASS" c:identifier="GTK_COMBO_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="vtable">
</parameter>
</parameters>
</function-macro>
<function-macro name="COMBO_BOX_GET_CLASS" c:identifier="GTK_COMBO_BOX_GET_CLASS" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="COMBO_BOX_TEXT" c:identifier="GTK_COMBO_BOX_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="CSS_PROVIDER" c:identifier="GTK_CSS_PROVIDER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<class name="Calendar" c:symbol-prefix="calendar" c:type="GtkCalendar" parent="Widget" glib:type-name="GtkCalendar" glib:get-type="gtk_calendar_get_type">
<doc xml:space="preserve">`GtkCalendar` is a widget that displays a Gregorian calendar, one month
at a time.
![An example GtkCalendar](calendar.png)
A `GtkCalendar` can be created with [ctor@Gtk.Calendar.new].
The date that is currently displayed can be altered with
[method@Gtk.Calendar.select_day].
To place a visual marker on a particular day, use
[method@Gtk.Calendar.mark_day] and to remove the marker,
[method@Gtk.Calendar.unmark_day]. Alternative, all
marks can be cleared with [method@Gtk.Calendar.clear_marks].
The selected date can be retrieved from a `GtkCalendar` using
[method@Gtk.Calendar.get_date].
Users should be aware that, although the Gregorian calendar is the
legal calendar in most countries, it was adopted progressively
between 1582 and 1929. Display before these dates is likely to be
historically incorrect.
# CSS nodes
```
calendar.view
&#x251C;&#x2500;&#x2500; header
&#x2502; &#x251C;&#x2500;&#x2500; button
&#x2502; &#x251C;&#x2500;&#x2500; stack.month
&#x2502; &#x251C;&#x2500;&#x2500; button
&#x2502; &#x251C;&#x2500;&#x2500; button
&#x2502; &#x251C;&#x2500;&#x2500; label.year
&#x2502; &#x2570;&#x2500;&#x2500; button
&#x2570;&#x2500;&#x2500; grid
&#x2570;&#x2500;&#x2500; label[.day-name][.week-number][.day-number][.other-month][.today]
```
`GtkCalendar` has a main node with name calendar. It contains a subnode
called header containing the widgets for switching between years and months.
The grid subnode contains all day labels, including week numbers on the left
(marked with the .week-number css class) and day names on top (marked with the
.day-name css class).
Day labels that belong to the previous or next month get the .other-month
style class. The label of the current day get the .today style class.
Marked day labels get the :selected state assigned.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_calendar_new">
<doc xml:space="preserve">Creates a new calendar, with the current date being selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly `GtkCalendar` widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="clear_marks" c:identifier="gtk_calendar_clear_marks">
<doc xml:space="preserve">Remove all visual markers.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="calendar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_date" c:identifier="gtk_calendar_get_date">
<doc xml:space="preserve">Returns a `GDateTime` representing the shown
year, month and the selected day.
The returned date is in the local time zone.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the `GDate` representing the shown date</doc>
<type name="GLib.DateTime" c:type="GDateTime*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_day_is_marked" c:identifier="gtk_calendar_get_day_is_marked">
<doc xml:space="preserve">Returns if the @day of the @calendar is already marked.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the day is marked.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="calendar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="day" transfer-ownership="none">
<doc xml:space="preserve">the day number between 1 and 31.</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_show_day_names" c:identifier="gtk_calendar_get_show_day_names" glib:get-property="show-day-names">
<attribute name="org.gtk.Method.get_property" value="show-day-names"/>
<doc xml:space="preserve">Returns whether @self is currently showing the names
of the week days.
This is the value of the [property@Gtk.Calendar:show-day-names]
property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the calendar shows day names.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_heading" c:identifier="gtk_calendar_get_show_heading" glib:get-property="show-heading">
<attribute name="org.gtk.Method.get_property" value="show-heading"/>
<doc xml:space="preserve">Returns whether @self is currently showing the heading.
This is the value of the [property@Gtk.Calendar:show-heading]
property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the calendar is showing a heading.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_week_numbers" c:identifier="gtk_calendar_get_show_week_numbers" glib:get-property="show-week-numbers">
<attribute name="org.gtk.Method.get_property" value="show-week-numbers"/>
<doc xml:space="preserve">Returns whether @self is showing week numbers right
now.
This is the value of the [property@Gtk.Calendar:show-week-numbers]
property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the calendar is showing week numbers.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
</parameters>
</method>
<method name="mark_day" c:identifier="gtk_calendar_mark_day">
<doc xml:space="preserve">Places a visual marker on a particular day.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="calendar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="day" transfer-ownership="none">
<doc xml:space="preserve">the day number to mark between 1 and 31.</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="select_day" c:identifier="gtk_calendar_select_day">
<doc xml:space="preserve">Switches to @date's year and month and select its day.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`.</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="date" transfer-ownership="none">
<doc xml:space="preserve">a `GDateTime` representing the day to select</doc>
<type name="GLib.DateTime" c:type="GDateTime*"/>
</parameter>
</parameters>
</method>
<method name="set_show_day_names" c:identifier="gtk_calendar_set_show_day_names" glib:set-property="show-day-names">
<attribute name="org.gtk.Method.set_property" value="show-day-names"/>
<doc xml:space="preserve">Sets whether the calendar shows day names.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">Whether to show day names above the day numbers</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_heading" c:identifier="gtk_calendar_set_show_heading" glib:set-property="show-heading">
<attribute name="org.gtk.Method.set_property" value="show-heading"/>
<doc xml:space="preserve">Sets whether the calendar should show a heading.
The heading contains the current year and month as well as
buttons for changing both.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">Whether to show the heading in the calendar</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_week_numbers" c:identifier="gtk_calendar_set_show_week_numbers" glib:set-property="show-week-numbers">
<attribute name="org.gtk.Method.set_property" value="show-week-numbers"/>
<doc xml:space="preserve">Sets whether week numbers are shown in the calendar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">whether to show week numbers on the left of the days</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="unmark_day" c:identifier="gtk_calendar_unmark_day">
<doc xml:space="preserve">Removes the visual marker from a particular day.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="calendar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCalendar`.</doc>
<type name="Calendar" c:type="GtkCalendar*"/>
</instance-parameter>
<parameter name="day" transfer-ownership="none">
<doc xml:space="preserve">the day number to unmark between 1 and 31.</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="day" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The selected day (as a number between 1 and 31).</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="month" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The selected month (as a number between 0 and 11).
This property gets initially set to the current month.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="show-day-names" writable="1" transfer-ownership="none" setter="set_show_day_names" getter="get_show_day_names">
<attribute name="org.gtk.Property.get" value="gtk_calendar_get_show_day_names"/>
<attribute name="org.gtk.Property.set" value="gtk_calendar_set_show_day_names"/>
<doc xml:space="preserve">Determines whether day names are displayed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-heading" writable="1" transfer-ownership="none" setter="set_show_heading" getter="get_show_heading">
<attribute name="org.gtk.Property.get" value="gtk_calendar_get_show_heading"/>
<attribute name="org.gtk.Property.set" value="gtk_calendar_set_show_heading"/>
<doc xml:space="preserve">Determines whether a heading is displayed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-week-numbers" writable="1" transfer-ownership="none" setter="set_show_week_numbers" getter="get_show_week_numbers">
<attribute name="org.gtk.Property.get" value="gtk_calendar_get_show_week_numbers"/>
<attribute name="org.gtk.Property.set" value="gtk_calendar_set_show_week_numbers"/>
<doc xml:space="preserve">Determines whether week numbers are displayed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="year" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The selected year.
This property gets initially set to the current year.</doc>
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="day-selected" when="first">
<doc xml:space="preserve">Emitted when the user selects a day.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="next-month" when="first">
<doc xml:space="preserve">Emitted when the user switched to the next month.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="next-year" when="first">
<doc xml:space="preserve">Emitted when user switched to the next year.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="prev-month" when="first">
<doc xml:space="preserve">Emitted when the user switched to the previous month.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="prev-year" when="first">
<doc xml:space="preserve">Emitted when user switched to the previous year.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="CallbackAction" c:symbol-prefix="callback_action" c:type="GtkCallbackAction" parent="ShortcutAction" glib:type-name="GtkCallbackAction" glib:get-type="gtk_callback_action_get_type" glib:type-struct="CallbackActionClass">
<doc xml:space="preserve">A `GtkShortcutAction` that invokes a callback.</doc>
<constructor name="new" c:identifier="gtk_callback_action_new">
<doc xml:space="preserve">Create a custom action that calls the given @callback when
activated.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new shortcut action</doc>
<type name="CallbackAction" c:type="GtkShortcutAction*"/>
</return-value>
<parameters>
<parameter name="callback" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the callback to call</doc>
<type name="ShortcutFunc" c:type="GtkShortcutFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="0">
<doc xml:space="preserve">the data to be passed to @callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async" destroy="1">
<doc xml:space="preserve">the function to be called when the
callback action is finalized</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</constructor>
</class>
<record name="CallbackActionClass" c:type="GtkCallbackActionClass" disguised="1" glib:is-gtype-struct-for="CallbackAction"/>
<callback name="CellAllocCallback" c:type="GtkCellAllocCallback">
<doc xml:space="preserve">The type of the callback functions used for iterating over the
cell renderers and their allocated areas inside a `GtkCellArea`,
see gtk_cell_area_foreach_alloc().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop iterating over cells.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the cell renderer to operate on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the area allocated to @renderer inside the rectangle
provided to gtk_cell_area_foreach_alloc().</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_background" transfer-ownership="none">
<doc xml:space="preserve">the background area for @renderer inside the
background area provided to gtk_cell_area_foreach_alloc().</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">user-supplied data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="CellArea" c:symbol-prefix="cell_area" c:type="GtkCellArea" parent="GObject.InitiallyUnowned" abstract="1" glib:type-name="GtkCellArea" glib:get-type="gtk_cell_area_get_type" glib:type-struct="CellAreaClass">
<doc xml:space="preserve">An abstract class for laying out `GtkCellRenderer`s
The `GtkCellArea` is an abstract class for [iface@Gtk.CellLayout]
widgets (also referred to as "layouting widgets") to interface with
an arbitrary number of [class@Gtk.CellRenderer]s and interact with the user
for a given [iface@Gtk.TreeModel] row.
The cell area handles events, focus navigation, drawing and
size requests and allocations for a given row of data.
Usually users dont have to interact with the `GtkCellArea` directly
unless they are implementing a cell-layouting widget themselves.
# Requesting area sizes
As outlined in
[GtkWidget&#x2019;s geometry management section](class.Widget.html#height-for-width-geometry-management),
GTK uses a height-for-width
geometry management system to compute the sizes of widgets and user
interfaces. `GtkCellArea` uses the same semantics to calculate the
size of an area for an arbitrary number of `GtkTreeModel` rows.
When requesting the size of a cell area one needs to calculate
the size for a handful of rows, and this will be done differently by
different layouting widgets. For instance a [class@Gtk.TreeViewColumn]
always lines up the areas from top to bottom while a [class@Gtk.IconView]
on the other hand might enforce that all areas received the same
width and wrap the areas around, requesting height for more cell
areas when allocated less width.
It&#x2019;s also important for areas to maintain some cell
alignments with areas rendered for adjacent rows (cells can
appear &#x201C;columnized&#x201D; inside an area even when the size of
cells are different in each row). For this reason the `GtkCellArea`
uses a [class@Gtk.CellAreaContext] object to store the alignments
and sizes along the way (as well as the overall largest minimum
and natural size for all the rows which have been calculated
with the said context).
The [class@Gtk.CellAreaContext] is an opaque object specific to the
`GtkCellArea` which created it (see [method@Gtk.CellArea.create_context]).
The owning cell-layouting widget can create as many contexts as
it wishes to calculate sizes of rows which should receive the
same size in at least one orientation (horizontally or vertically),
However, it&#x2019;s important that the same [class@Gtk.CellAreaContext] which
was used to request the sizes for a given `GtkTreeModel` row be
used when rendering or processing events for that row.
In order to request the width of all the rows at the root level
of a `GtkTreeModel` one would do the following:
```c
GtkTreeIter iter;
int minimum_width;
int natural_width;
valid = gtk_tree_model_get_iter_first (model, &amp;iter);
while (valid)
{
gtk_cell_area_apply_attributes (area, model, &amp;iter, FALSE, FALSE);
gtk_cell_area_get_preferred_width (area, context, widget, NULL, NULL);
valid = gtk_tree_model_iter_next (model, &amp;iter);
}
gtk_cell_area_context_get_preferred_width (context, &amp;minimum_width, &amp;natural_width);
```
Note that in this example it&#x2019;s not important to observe the
returned minimum and natural width of the area for each row
unless the cell-layouting object is actually interested in the
widths of individual rows. The overall width is however stored
in the accompanying `GtkCellAreaContext` object and can be consulted
at any time.
This can be useful since `GtkCellLayout` widgets usually have to
support requesting and rendering rows in treemodels with an
exceedingly large amount of rows. The `GtkCellLayout` widget in
that case would calculate the required width of the rows in an
idle or timeout source (see [func@GLib.timeout_add]) and when the widget
is requested its actual width in [vfunc@Gtk.Widget.measure]
it can simply consult the width accumulated so far in the
`GtkCellAreaContext` object.
A simple example where rows are rendered from top to bottom and
take up the full width of the layouting widget would look like:
```c
static void
foo_get_preferred_width (GtkWidget *widget,
int *minimum_size,
int *natural_size)
{
Foo *self = FOO (widget);
FooPrivate *priv = foo_get_instance_private (self);
foo_ensure_at_least_one_handfull_of_rows_have_been_requested (self);
gtk_cell_area_context_get_preferred_width (priv-&gt;context, minimum_size, natural_size);
}
```
In the above example the `Foo` widget has to make sure that some
row sizes have been calculated (the amount of rows that `Foo` judged
was appropriate to request space for in a single timeout iteration)
before simply returning the amount of space required by the area via
the `GtkCellAreaContext`.
Requesting the height for width (or width for height) of an area is
a similar task except in this case the `GtkCellAreaContext` does not
store the data (actually, it does not know how much space the layouting
widget plans to allocate it for every row. It&#x2019;s up to the layouting
widget to render each row of data with the appropriate height and
width which was requested by the `GtkCellArea`).
In order to request the height for width of all the rows at the
root level of a `GtkTreeModel` one would do the following:
```c
GtkTreeIter iter;
int minimum_height;
int natural_height;
int full_minimum_height = 0;
int full_natural_height = 0;
valid = gtk_tree_model_get_iter_first (model, &amp;iter);
while (valid)
{
gtk_cell_area_apply_attributes (area, model, &amp;iter, FALSE, FALSE);
gtk_cell_area_get_preferred_height_for_width (area, context, widget,
width, &amp;minimum_height, &amp;natural_height);
if (width_is_for_allocation)
cache_row_height (&amp;iter, minimum_height, natural_height);
full_minimum_height += minimum_height;
full_natural_height += natural_height;
valid = gtk_tree_model_iter_next (model, &amp;iter);
}
```
Note that in the above example we would need to cache the heights
returned for each row so that we would know what sizes to render the
areas for each row. However we would only want to really cache the
heights if the request is intended for the layouting widgets real
allocation.
In some cases the layouting widget is requested the height for an
arbitrary for_width, this is a special case for layouting widgets
who need to request size for tens of thousands of rows. For this
case it&#x2019;s only important that the layouting widget calculate
one reasonably sized chunk of rows and return that height
synchronously. The reasoning here is that any layouting widget is
at least capable of synchronously calculating enough height to fill
the screen height (or scrolled window height) in response to a single
call to [vfunc@Gtk.Widget.measure]. Returning
a perfect height for width that is larger than the screen area is
inconsequential since after the layouting receives an allocation
from a scrolled window it simply continues to drive the scrollbar
values while more and more height is required for the row heights
that are calculated in the background.
# Rendering Areas
Once area sizes have been acquired at least for the rows in the
visible area of the layouting widget they can be rendered at
[vfunc@Gtk.Widget.snapshot] time.
A crude example of how to render all the rows at the root level
runs as follows:
```c
GtkAllocation allocation;
GdkRectangle cell_area = { 0, };
GtkTreeIter iter;
int minimum_width;
int natural_width;
gtk_widget_get_allocation (widget, &amp;allocation);
cell_area.width = allocation.width;
valid = gtk_tree_model_get_iter_first (model, &amp;iter);
while (valid)
{
cell_area.height = get_cached_height_for_row (&amp;iter);
gtk_cell_area_apply_attributes (area, model, &amp;iter, FALSE, FALSE);
gtk_cell_area_render (area, context, widget, cr,
&amp;cell_area, &amp;cell_area, state_flags, FALSE);
cell_area.y += cell_area.height;
valid = gtk_tree_model_iter_next (model, &amp;iter);
}
```
Note that the cached height in this example really depends on how
the layouting widget works. The layouting widget might decide to
give every row its minimum or natural height or, if the model content
is expected to fit inside the layouting widget without scrolling, it
would make sense to calculate the allocation for each row at
the time the widget is allocated using [func@Gtk.distribute_natural_allocation].
# Handling Events and Driving Keyboard Focus
Passing events to the area is as simple as handling events on any
normal widget and then passing them to the [method@Gtk.CellArea.event]
API as they come in. Usually `GtkCellArea` is only interested in
button events, however some customized derived areas can be implemented
who are interested in handling other events. Handling an event can
trigger the [`signal@Gtk.CellArea::focus-changed`] signal to fire; as well
as [`signal@GtkCellArea::add-editable`] in the case that an editable cell
was clicked and needs to start editing. You can call
[method@Gtk.CellArea.stop_editing] at any time to cancel any cell editing
that is currently in progress.
The `GtkCellArea` drives keyboard focus from cell to cell in a way
similar to `GtkWidget`. For layouting widgets that support giving
focus to cells it&#x2019;s important to remember to pass `GTK_CELL_RENDERER_FOCUSED`
to the area functions for the row that has focus and to tell the
area to paint the focus at render time.
Layouting widgets that accept focus on cells should implement the
[vfunc@Gtk.Widget.focus] virtual method. The layouting widget is always
responsible for knowing where `GtkTreeModel` rows are rendered inside
the widget, so at [vfunc@Gtk.Widget.focus] time the layouting widget
should use the `GtkCellArea` methods to navigate focus inside the area
and then observe the [enum@Gtk.DirectionType] to pass the focus to adjacent
rows and areas.
A basic example of how the [vfunc@Gtk.Widget.focus] virtual method
should be implemented:
```
static gboolean
foo_focus (GtkWidget *widget,
GtkDirectionType direction)
{
Foo *self = FOO (widget);
FooPrivate *priv = foo_get_instance_private (self);
int focus_row = priv-&gt;focus_row;
gboolean have_focus = FALSE;
if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
valid = gtk_tree_model_iter_nth_child (priv-&gt;model, &amp;iter, NULL, priv-&gt;focus_row);
while (valid)
{
gtk_cell_area_apply_attributes (priv-&gt;area, priv-&gt;model, &amp;iter, FALSE, FALSE);
if (gtk_cell_area_focus (priv-&gt;area, direction))
{
priv-&gt;focus_row = focus_row;
have_focus = TRUE;
break;
}
else
{
if (direction == GTK_DIR_RIGHT ||
direction == GTK_DIR_LEFT)
break;
else if (direction == GTK_DIR_UP ||
direction == GTK_DIR_TAB_BACKWARD)
{
if (focus_row == 0)
break;
else
{
focus_row--;
valid = gtk_tree_model_iter_nth_child (priv-&gt;model, &amp;iter, NULL, focus_row);
}
}
else
{
if (focus_row == last_row)
break;
else
{
focus_row++;
valid = gtk_tree_model_iter_next (priv-&gt;model, &amp;iter);
}
}
}
}
return have_focus;
}
```
Note that the layouting widget is responsible for matching the
`GtkDirectionType` values to the way it lays out its cells.
# Cell Properties
The `GtkCellArea` introduces cell properties for `GtkCellRenderer`s.
This provides some general interfaces for defining the relationship
cell areas have with their cells. For instance in a [class@Gtk.CellAreaBox]
a cell might &#x201C;expand&#x201D; and receive extra space when the area is allocated
more than its full natural request, or a cell might be configured to &#x201C;align&#x201D;
with adjacent rows which were requested and rendered with the same
`GtkCellAreaContext`.
Use [method@Gtk.CellAreaClass.install_cell_property] to install cell
properties for a cell area class and [method@Gtk.CellAreaClass.find_cell_property]
or [method@Gtk.CellAreaClass.list_cell_properties] to get information about
existing cell properties.
To set the value of a cell property, use [method@Gtk.CellArea.cell_set_property],
[method@Gtk.CellArea.cell_set] or [method@Gtk.CellArea.cell_set_valist]. To obtain
the value of a cell property, use [method@Gtk.CellArea.cell_get_property]
[method@Gtk.CellArea.cell_get] or [method@Gtk.CellArea.cell_get_valist].</doc>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<virtual-method name="activate" invoker="activate">
<doc xml:space="preserve">Activates @area, usually by activating the currently focused
cell, however some subclasses which embed widgets in the area
can also activate a widget if it currently has the focus.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether @area was successfully activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context in context with the current row data</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering on</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the size and location of @area relative to @widget&#x2019;s allocation</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State flags for @area for this row of data.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="edit_only" transfer-ownership="none">
<doc xml:space="preserve">if %TRUE then only cell renderers that are %GTK_CELL_RENDERER_MODE_EDITABLE
will be activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="add" invoker="add">
<doc xml:space="preserve">Adds @renderer to @area with the default child cell properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add to @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="apply_attributes" invoker="apply_attributes">
<doc xml:space="preserve">Applies any connected attributes to the renderers in
@area by pulling the values from @tree_model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` to pull values from</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` in @tree_model to apply values for</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">whether @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">whether @iter is expanded in the view and
children are visible</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="copy_context" invoker="copy_context">
<doc xml:space="preserve">This is sometimes needed for cases where rows need to share
alignments in one orientation but may be separately grouped
in the opposing orientation.
For instance, `GtkIconView` creates all icons (rows) to have
the same width and the cells theirin to have the same
horizontal alignments. However each row of icons may have
a separate collective height. `GtkIconView` uses this to
request the heights of each row based on a context which
was already used to request all the row widths that are
to be displayed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context copy of @context.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to copy</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="create_context" invoker="create_context">
<doc xml:space="preserve">Creates a `GtkCellArea`Context to be used with @area for
all purposes. `GtkCellArea`Context stores geometry information
for rows for which it was operated on, it is important to use
the same context for the same row of data at all times (i.e.
one should render and handle events with the same `GtkCellArea`Context
which was used to request the size of those rows of data).</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context which can be used with @area.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="event" invoker="event">
<doc xml:space="preserve">Delegates event handling to a `GtkCellArea`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was handled by @area.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the `GdkEvent` to handle</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="focus" invoker="focus">
<doc xml:space="preserve">This should be called by the @area&#x2019;s owning layout widget
when focus is to be passed to @area, or moved within @area
for a given @direction and row data.
Implementing `GtkCellArea` classes should implement this
method to receive and navigate focus in its own way particular
to how it lays out cells.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus remains inside @area as a result of this call.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the `GtkDirectionType`</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="foreach" invoker="foreach">
<doc xml:space="preserve">Calls @callback for every `GtkCellRenderer` in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">the `GtkCellCallback` to call</doc>
<type name="CellCallback" c:type="GtkCellCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="foreach_alloc" invoker="foreach_alloc">
<doc xml:space="preserve">Calls @callback for every `GtkCellRenderer` in @area with the
allocated rectangle inside @cell_area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates and size for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates of the background area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="5">
<doc xml:space="preserve">the `GtkCellAllocCallback` to call</doc>
<type name="CellAllocCallback" c:type="GtkCellAllocCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_cell_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_id" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_height" invoker="get_preferred_height">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s initial minimum and natural height.
@area will store some geometrical information in @context along the way;
when requesting sizes over an arbitrary number of rows, it&#x2019;s not important
to check the @minimum_height and @natural_height of this call but rather to
consult gtk_cell_area_context_get_preferred_height() after a series of
requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_height_for_width" invoker="get_preferred_height_for_width">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s minimum and natural height if it would be given
the specified @width.
@area stores some geometrical information in @context along the way
while calling gtk_cell_area_get_preferred_width(). It&#x2019;s important to
perform a series of gtk_cell_area_get_preferred_width() requests with
@context first and then call gtk_cell_area_get_preferred_height_for_width()
on each cell area individually to get the height for width of each
fully requested row.
If at some point, the width of a single row changes, it should be
requested with gtk_cell_area_get_preferred_width() again and then
the full width of the requested rows checked again with
gtk_cell_area_context_get_preferred_width().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width for which to check the height of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_width" invoker="get_preferred_width">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s initial minimum and natural width.
@area will store some geometrical information in @context along the way;
when requesting sizes over an arbitrary number of rows, it&#x2019;s not important
to check the @minimum_width and @natural_width of this call but rather to
consult gtk_cell_area_context_get_preferred_width() after a series of
requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_width_for_height" invoker="get_preferred_width_for_height">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s minimum and natural width if it would be given
the specified @height.
@area stores some geometrical information in @context along the way
while calling gtk_cell_area_get_preferred_height(). It&#x2019;s important to
perform a series of gtk_cell_area_get_preferred_height() requests with
@context first and then call gtk_cell_area_get_preferred_width_for_height()
on each cell area individually to get the height for width of each
fully requested row.
If at some point, the height of a single row changes, it should be
requested with gtk_cell_area_get_preferred_height() again and then
the full height of the requested rows checked again with
gtk_cell_area_context_get_preferred_height().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height for which to check the width of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_request_mode" invoker="get_request_mode">
<doc xml:space="preserve">Gets whether the area prefers a height-for-width layout
or a width-for-height layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @area.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="is_activatable" invoker="is_activatable">
<doc xml:space="preserve">Returns whether the area can do anything when activated,
after applying new attributes to @area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @area can do anything when activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="remove" invoker="remove">
<doc xml:space="preserve">Removes @renderer from @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to remove from @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_cell_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_id" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="snapshot" invoker="snapshot">
<doc xml:space="preserve">Snapshots @area&#x2019;s cells according to @area&#x2019;s layout onto at
the given coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">the `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area&#x2019;s background</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="paint_focus" transfer-ownership="none">
<doc xml:space="preserve">whether @area should paint focus on focused cells for focused rows or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<method name="activate" c:identifier="gtk_cell_area_activate">
<doc xml:space="preserve">Activates @area, usually by activating the currently focused
cell, however some subclasses which embed widgets in the area
can also activate a widget if it currently has the focus.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether @area was successfully activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context in context with the current row data</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering on</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the size and location of @area relative to @widget&#x2019;s allocation</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State flags for @area for this row of data.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="edit_only" transfer-ownership="none">
<doc xml:space="preserve">if %TRUE then only cell renderers that are %GTK_CELL_RENDERER_MODE_EDITABLE
will be activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="activate_cell" c:identifier="gtk_cell_area_activate_cell">
<doc xml:space="preserve">This is used by `GtkCellArea` subclasses when handling events
to activate cells, the base `GtkCellArea` class activates cells
for keyboard events for free in its own GtkCellArea-&gt;activate()
implementation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether cell activation was successful</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering onto</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` in @area to activate</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the `GdkEvent` for which cell activation should occur</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the `GdkRectangle` in @widget relative coordinates
of @renderer for the current row.</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @renderer</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="add" c:identifier="gtk_cell_area_add">
<doc xml:space="preserve">Adds @renderer to @area with the default child cell properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add to @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="add_focus_sibling" c:identifier="gtk_cell_area_add_focus_sibling">
<doc xml:space="preserve">Adds @sibling to @renderer&#x2019;s focusable area, focus will be drawn
around @renderer and all of its siblings if @renderer can
focus for a given row.
Events handled by focus siblings can also activate the given
focusable @renderer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` expected to have focus</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add to @renderer&#x2019;s focus area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="add_with_properties" c:identifier="gtk_cell_area_add_with_properties" introspectable="0">
<doc xml:space="preserve">Adds @renderer to @area, setting cell properties at the same time.
See gtk_cell_area_add() and gtk_cell_area_cell_set() for more details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to be placed inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="first_prop_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first cell property to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a %NULL-terminated list of property names and values, starting
with @first_prop_name</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="apply_attributes" c:identifier="gtk_cell_area_apply_attributes">
<doc xml:space="preserve">Applies any connected attributes to the renderers in
@area by pulling the values from @tree_model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` to pull values from</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` in @tree_model to apply values for</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">whether @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">whether @iter is expanded in the view and
children are visible</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="attribute_connect" c:identifier="gtk_cell_area_attribute_connect">
<doc xml:space="preserve">Connects an @attribute to apply values from @column for the
`GtkTreeModel` in use.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to connect an attribute for</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">the attribute name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` column to fetch attribute values from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="attribute_disconnect" c:identifier="gtk_cell_area_attribute_disconnect">
<doc xml:space="preserve">Disconnects @attribute for the @renderer in @area so that
attribute will no longer be updated with values from the
model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to disconnect an attribute for</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">the attribute name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="attribute_get_column" c:identifier="gtk_cell_area_attribute_get_column">
<doc xml:space="preserve">Returns the model column that an attribute has been mapped to,
or -1 if the attribute is not mapped.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the model column, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">an attribute on the renderer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="cell_get" c:identifier="gtk_cell_area_cell_get" introspectable="0">
<doc xml:space="preserve">Gets the values of one or more cell properties for @renderer in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` which is inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="first_prop_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first cell property to get</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">return location for the first cell property, followed
optionally by more name/return location pairs, followed by %NULL</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="cell_get_property" c:identifier="gtk_cell_area_cell_get_property">
<doc xml:space="preserve">Gets the value of a cell property for @renderer in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the property to get</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a location to return the value</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="cell_get_valist" c:identifier="gtk_cell_area_cell_get_valist" introspectable="0">
<doc xml:space="preserve">Gets the values of one or more cell properties for @renderer in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="first_property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first property to get</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="var_args" transfer-ownership="none">
<doc xml:space="preserve">return location for the first property, followed
optionally by more name/return location pairs, followed by %NULL</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="cell_set" c:identifier="gtk_cell_area_cell_set" introspectable="0">
<doc xml:space="preserve">Sets one or more cell properties for @cell in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` which is a cell inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="first_prop_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first cell property to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a %NULL-terminated list of property names and values, starting
with @first_prop_name</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="cell_set_property" c:identifier="gtk_cell_area_cell_set_property">
<doc xml:space="preserve">Sets a cell property for @renderer in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the cell property to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the value to set the cell property to</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</method>
<method name="cell_set_valist" c:identifier="gtk_cell_area_cell_set_valist" introspectable="0">
<doc xml:space="preserve">Sets one or more cell properties for @renderer in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` which inside @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="first_property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first cell property to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="var_args" transfer-ownership="none">
<doc xml:space="preserve">a %NULL-terminated list of property names and values, starting
with @first_prop_name</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="copy_context" c:identifier="gtk_cell_area_copy_context">
<doc xml:space="preserve">This is sometimes needed for cases where rows need to share
alignments in one orientation but may be separately grouped
in the opposing orientation.
For instance, `GtkIconView` creates all icons (rows) to have
the same width and the cells theirin to have the same
horizontal alignments. However each row of icons may have
a separate collective height. `GtkIconView` uses this to
request the heights of each row based on a context which
was already used to request all the row widths that are
to be displayed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context copy of @context.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to copy</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
</parameters>
</method>
<method name="create_context" c:identifier="gtk_cell_area_create_context">
<doc xml:space="preserve">Creates a `GtkCellArea`Context to be used with @area for
all purposes. `GtkCellArea`Context stores geometry information
for rows for which it was operated on, it is important to use
the same context for the same row of data at all times (i.e.
one should render and handle events with the same `GtkCellArea`Context
which was used to request the size of those rows of data).</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context which can be used with @area.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="event" c:identifier="gtk_cell_area_event">
<doc xml:space="preserve">Delegates event handling to a `GtkCellArea`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was handled by @area.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the `GdkEvent` to handle</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="focus" c:identifier="gtk_cell_area_focus">
<doc xml:space="preserve">This should be called by the @area&#x2019;s owning layout widget
when focus is to be passed to @area, or moved within @area
for a given @direction and row data.
Implementing `GtkCellArea` classes should implement this
method to receive and navigate focus in its own way particular
to how it lays out cells.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus remains inside @area as a result of this call.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the `GtkDirectionType`</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</method>
<method name="foreach" c:identifier="gtk_cell_area_foreach">
<doc xml:space="preserve">Calls @callback for every `GtkCellRenderer` in @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">the `GtkCellCallback` to call</doc>
<type name="CellCallback" c:type="GtkCellCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="foreach_alloc" c:identifier="gtk_cell_area_foreach_alloc">
<doc xml:space="preserve">Calls @callback for every `GtkCellRenderer` in @area with the
allocated rectangle inside @cell_area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates and size for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates of the background area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="5">
<doc xml:space="preserve">the `GtkCellAllocCallback` to call</doc>
<type name="CellAllocCallback" c:type="GtkCellAllocCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get_cell_allocation" c:identifier="gtk_cell_area_get_cell_allocation">
<doc xml:space="preserve">Derives the allocation of @renderer inside @area if @area
were to be renderered in @cell_area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context used to hold sizes for @area.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering on</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to get the allocation for</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the whole allocated area for @area in @widget
for this row</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="allocation" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">where to store the allocation for @renderer</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_cell_at_position" c:identifier="gtk_cell_area_get_cell_at_position">
<doc xml:space="preserve">Gets the `GtkCellRenderer` at @x and @y coordinates inside @area and optionally
returns the full cell allocation for it inside @cell_area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` at @x and @y.</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context used to hold sizes for @area.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering on</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the whole allocated area for @area in @widget
for this row</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="alloc_area" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">where to store the inner allocated area of the
returned cell renderer</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_current_path_string" c:identifier="gtk_cell_area_get_current_path_string">
<doc xml:space="preserve">Gets the current `GtkTreePath` string for the currently
applied `GtkTreeIter`, this is implicitly updated when
gtk_cell_area_apply_attributes() is called and can be
used to interact with renderers from `GtkCellArea`
subclasses.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current `GtkTreePath` string for the current
attributes applied to @area. This string belongs to the area and
should not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_edit_widget" c:identifier="gtk_cell_area_get_edit_widget" glib:get-property="edit-widget">
<doc xml:space="preserve">Gets the `GtkCellEditable` widget currently used
to edit the currently edited cell.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The currently active `GtkCellEditable` widget</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_edited_cell" c:identifier="gtk_cell_area_get_edited_cell" glib:get-property="edited-cell">
<doc xml:space="preserve">Gets the `GtkCellRenderer` in @area that is currently
being edited.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The currently edited `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus_cell" c:identifier="gtk_cell_area_get_focus_cell" glib:get-property="focus-cell">
<doc xml:space="preserve">Retrieves the currently focused cell for @area</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the currently focused cell in @area.</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus_from_sibling" c:identifier="gtk_cell_area_get_focus_from_sibling">
<doc xml:space="preserve">Gets the `GtkCellRenderer` which is expected to be focusable
for which @renderer is, or may be a sibling.
This is handy for `GtkCellArea` subclasses when handling events,
after determining the renderer at the event location it can
then chose to activate the focus cell for which the event
cell may have been a sibling.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkCellRenderer`
for which @renderer is a sibling</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="get_focus_siblings" c:identifier="gtk_cell_area_get_focus_siblings">
<doc xml:space="preserve">Gets the focus sibling cell renderers for @renderer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GList` of `GtkCellRenderer`s.
The returned list is internal and should not be freed.</doc>
<type name="GLib.List" c:type="const GList*">
<type name="CellRenderer"/>
</type>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` expected to have focus</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_height" c:identifier="gtk_cell_area_get_preferred_height">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s initial minimum and natural height.
@area will store some geometrical information in @context along the way;
when requesting sizes over an arbitrary number of rows, it&#x2019;s not important
to check the @minimum_height and @natural_height of this call but rather to
consult gtk_cell_area_context_get_preferred_height() after a series of
requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_height_for_width" c:identifier="gtk_cell_area_get_preferred_height_for_width">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s minimum and natural height if it would be given
the specified @width.
@area stores some geometrical information in @context along the way
while calling gtk_cell_area_get_preferred_width(). It&#x2019;s important to
perform a series of gtk_cell_area_get_preferred_width() requests with
@context first and then call gtk_cell_area_get_preferred_height_for_width()
on each cell area individually to get the height for width of each
fully requested row.
If at some point, the width of a single row changes, it should be
requested with gtk_cell_area_get_preferred_width() again and then
the full width of the requested rows checked again with
gtk_cell_area_context_get_preferred_width().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width for which to check the height of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width" c:identifier="gtk_cell_area_get_preferred_width">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s initial minimum and natural width.
@area will store some geometrical information in @context along the way;
when requesting sizes over an arbitrary number of rows, it&#x2019;s not important
to check the @minimum_width and @natural_width of this call but rather to
consult gtk_cell_area_context_get_preferred_width() after a series of
requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width_for_height" c:identifier="gtk_cell_area_get_preferred_width_for_height">
<doc xml:space="preserve">Retrieves a cell area&#x2019;s minimum and natural width if it would be given
the specified @height.
@area stores some geometrical information in @context along the way
while calling gtk_cell_area_get_preferred_height(). It&#x2019;s important to
perform a series of gtk_cell_area_get_preferred_height() requests with
@context first and then call gtk_cell_area_get_preferred_width_for_height()
on each cell area individually to get the height for width of each
fully requested row.
If at some point, the height of a single row changes, it should be
requested with gtk_cell_area_get_preferred_height() again and then
the full height of the requested rows checked again with
gtk_cell_area_context_get_preferred_height().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height for which to check the width of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_request_mode" c:identifier="gtk_cell_area_get_request_mode">
<doc xml:space="preserve">Gets whether the area prefers a height-for-width layout
or a width-for-height layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @area.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_renderer" c:identifier="gtk_cell_area_has_renderer">
<doc xml:space="preserve">Checks if @area contains @renderer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @renderer is in the @area.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to check</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="inner_cell_area" c:identifier="gtk_cell_area_inner_cell_area">
<doc xml:space="preserve">This is a convenience function for `GtkCellArea` implementations
to get the inner area where a given `GtkCellRenderer` will be
rendered. It removes any padding previously added by gtk_cell_area_request_renderer().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering onto</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates where one of @area&#x2019;s cells
is to be placed</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="inner_area" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the return location for the inner cell area</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="is_activatable" c:identifier="gtk_cell_area_is_activatable">
<doc xml:space="preserve">Returns whether the area can do anything when activated,
after applying new attributes to @area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @area can do anything when activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_focus_sibling" c:identifier="gtk_cell_area_is_focus_sibling">
<doc xml:space="preserve">Returns whether @sibling is one of @renderer&#x2019;s focus siblings
(see gtk_cell_area_add_focus_sibling()).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @sibling is a focus sibling of @renderer</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` expected to have focus</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to check against @renderer&#x2019;s sibling list</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_cell_area_remove">
<doc xml:space="preserve">Removes @renderer from @area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to remove from @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="remove_focus_sibling" c:identifier="gtk_cell_area_remove_focus_sibling">
<doc xml:space="preserve">Removes @sibling from @renderer&#x2019;s focus sibling list
(see gtk_cell_area_add_focus_sibling()).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` expected to have focus</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to remove from @renderer&#x2019;s focus area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="request_renderer" c:identifier="gtk_cell_area_request_renderer">
<doc xml:space="preserve">This is a convenience function for `GtkCellArea` implementations
to request size for cell renderers. It&#x2019;s important to use this
function to request size and then use gtk_cell_area_inner_cell_area()
at render and event time since this function will add padding
around the cell for focus painting.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to request size for</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the `GtkOrientation` in which to request size</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering onto</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">the allocation contextual size to request for, or -1 if
the base request for the orientation is to be returned.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="set_focus_cell" c:identifier="gtk_cell_area_set_focus_cell" glib:set-property="focus-cell">
<doc xml:space="preserve">Explicitly sets the currently focused cell to @renderer.
This is generally called by implementations of
`GtkCellAreaClass.focus()` or `GtkCellAreaClass.event()`,
however it can also be used to implement functions such
as gtk_tree_view_set_cursor_on_cell().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkCellRenderer` to give focus to</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="snapshot" c:identifier="gtk_cell_area_snapshot">
<doc xml:space="preserve">Snapshots @area&#x2019;s cells according to @area&#x2019;s layout onto at
the given coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">the `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area&#x2019;s background</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="paint_focus" transfer-ownership="none">
<doc xml:space="preserve">whether @area should paint focus on focused cells for focused rows or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="stop_editing" c:identifier="gtk_cell_area_stop_editing">
<doc xml:space="preserve">Explicitly stops the editing of the currently edited cell.
If @canceled is %TRUE, the currently edited cell renderer
will emit the ::editing-canceled signal, otherwise the
the ::editing-done signal will be emitted on the current
edit widget.
See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</instance-parameter>
<parameter name="canceled" transfer-ownership="none">
<doc xml:space="preserve">whether editing was canceled.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="edit-widget" transfer-ownership="none" getter="get_edit_widget">
<doc xml:space="preserve">The widget currently editing the edited cell
This property is read-only and only changes as
a result of a call gtk_cell_area_activate_cell().</doc>
<type name="CellEditable"/>
</property>
<property name="edited-cell" transfer-ownership="none" getter="get_edited_cell">
<doc xml:space="preserve">The cell in the area that is currently edited
This property is read-only and only changes as
a result of a call gtk_cell_area_activate_cell().</doc>
<type name="CellRenderer"/>
</property>
<property name="focus-cell" writable="1" transfer-ownership="none" setter="set_focus_cell" getter="get_focus_cell">
<doc xml:space="preserve">The cell in the area that currently has focus</doc>
<type name="CellRenderer"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="GObject.InitiallyUnowned" c:type="GInitiallyUnowned"/>
</field>
<glib:signal name="add-editable" when="first">
<doc xml:space="preserve">Indicates that editing has started on @renderer and that @editable
should be added to the owning cell-layouting widget at @cell_area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` that started the edited</doc>
<type name="CellRenderer"/>
</parameter>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellEditable` widget to add</doc>
<type name="CellEditable"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` relative `GdkRectangle` coordinates
where @editable should be added</doc>
<type name="Gdk.Rectangle"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath` string this edit was initiated for</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="apply-attributes" when="first">
<doc xml:space="preserve">This signal is emitted whenever applying attributes to @area from @model</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` to apply the attributes from</doc>
<type name="TreeModel"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` indicating which row to apply the attributes of</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">whether the view shows children for this row</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">whether the view is currently showing the children of this row</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="focus-changed" when="first">
<doc xml:space="preserve">Indicates that focus changed on this @area. This signal
is emitted either as a result of focus handling or event
handling.
It's possible that the signal is emitted even if the
currently focused renderer did not change, this is
because focus may change to the same renderer in the
same cell area for a different row of data.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` that has focus</doc>
<type name="CellRenderer"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the current `GtkTreePath` string set for @area</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="remove-editable" when="first">
<doc xml:space="preserve">Indicates that editing finished on @renderer and that @editable
should be removed from the owning cell-layouting widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` that finished editeding</doc>
<type name="CellRenderer"/>
</parameter>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellEditable` widget to remove</doc>
<type name="CellEditable"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="CellAreaBox" c:symbol-prefix="cell_area_box" c:type="GtkCellAreaBox" parent="CellArea" glib:type-name="GtkCellAreaBox" glib:get-type="gtk_cell_area_box_get_type">
<doc xml:space="preserve">A cell area that renders GtkCellRenderers into a row or a column
The `GtkCellAreaBox` renders cell renderers into a row or a column
depending on its `GtkOrientation`.
GtkCellAreaBox uses a notion of packing. Packing
refers to adding cell renderers with reference to a particular position
in a `GtkCellAreaBox`. There are two reference positions: the
start and the end of the box.
When the `GtkCellAreaBox` is oriented in the %GTK_ORIENTATION_VERTICAL
orientation, the start is defined as the top of the box and the end is
defined as the bottom. In the %GTK_ORIENTATION_HORIZONTAL orientation
start is defined as the left side and the end is defined as the right
side.
Alignments of `GtkCellRenderer`s rendered in adjacent rows can be
configured by configuring the `GtkCellAreaBox` align child cell property
with gtk_cell_area_cell_set_property() or by specifying the "align"
argument to gtk_cell_area_box_pack_start() and gtk_cell_area_box_pack_end().</doc>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_cell_area_box_new">
<doc xml:space="preserve">Creates a new `GtkCellAreaBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkCellAreaBox`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</return-value>
</constructor>
<method name="get_spacing" c:identifier="gtk_cell_area_box_get_spacing" glib:get-property="spacing">
<doc xml:space="preserve">Gets the spacing added between cell renderers.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the space added between cell renderers in @box.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaBox`</doc>
<type name="CellAreaBox" c:type="GtkCellAreaBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="pack_end" c:identifier="gtk_cell_area_box_pack_end">
<doc xml:space="preserve">Adds @renderer to @box, packed with reference to the end of @box.
The @renderer is packed after (away from end of) any other
`GtkCellRenderer` packed with reference to the end of @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaBox`</doc>
<type name="CellAreaBox" c:type="GtkCellAreaBox*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should receive extra space when the area receives
more than its natural size</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="align" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should be aligned in adjacent rows</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should have the same size in all rows</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="pack_start" c:identifier="gtk_cell_area_box_pack_start">
<doc xml:space="preserve">Adds @renderer to @box, packed with reference to the start of @box.
The @renderer is packed after any other `GtkCellRenderer` packed
with reference to the start of @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaBox`</doc>
<type name="CellAreaBox" c:type="GtkCellAreaBox*"/>
</instance-parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should receive extra space when the area receives
more than its natural size</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="align" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should be aligned in adjacent rows</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">whether @renderer should have the same size in all rows</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_spacing" c:identifier="gtk_cell_area_box_set_spacing" glib:set-property="spacing">
<doc xml:space="preserve">Sets the spacing to add between cell renderers in @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaBox`</doc>
<type name="CellAreaBox" c:type="GtkCellAreaBox*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the space to add between `GtkCellRenderer`s</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="spacing" writable="1" transfer-ownership="none" setter="set_spacing" getter="get_spacing">
<doc xml:space="preserve">The amount of space to reserve between cells.</doc>
<type name="gint" c:type="gint"/>
</property>
</class>
<record name="CellAreaClass" c:type="GtkCellAreaClass" glib:is-gtype-struct-for="CellArea">
<field name="parent_class" readable="0" private="1">
<type name="GObject.InitiallyUnownedClass" c:type="GInitiallyUnownedClass"/>
</field>
<field name="add">
<callback name="add">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to add to @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="remove">
<callback name="remove">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to remove from @area</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="foreach">
<callback name="foreach">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="2">
<doc xml:space="preserve">the `GtkCellCallback` to call</doc>
<type name="CellCallback" c:type="GtkCellCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="foreach_alloc">
<callback name="foreach_alloc">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates and size for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates of the background area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="callback" transfer-ownership="none" scope="call" closure="6">
<doc xml:space="preserve">the `GtkCellAllocCallback` to call</doc>
<type name="CellAllocCallback" c:type="GtkCellAllocCallback"/>
</parameter>
<parameter name="callback_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user provided data pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="event">
<callback name="event">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was handled by @area.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the `GdkEvent` to handle</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</callback>
</field>
<field name="snapshot">
<callback name="snapshot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context for this row of data.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">the `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area&#x2019;s background</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the @widget relative coordinates for @area</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State for @area in this row.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="paint_focus" transfer-ownership="none">
<doc xml:space="preserve">whether @area should paint focus on focused cells for focused rows or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="apply_attributes">
<callback name="apply_attributes">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` to pull values from</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` in @tree_model to apply values for</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">whether @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">whether @iter is expanded in the view and
children are visible</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="create_context">
<callback name="create_context">
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context which can be used with @area.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="copy_context">
<callback name="copy_context">
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkCellArea`Context copy of @context.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to copy</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_request_mode">
<callback name="get_request_mode">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @area.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_width">
<callback name="get_preferred_width">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_height_for_width">
<callback name="get_preferred_height_for_width">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width for which to check the height of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_height">
<callback name="get_preferred_height">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context to perform this request with</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_width_for_height">
<callback name="get_preferred_width_for_height">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context which has already been requested for widths.</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` where @area will be rendering</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height for which to check the width of this area</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_cell_property">
<callback name="set_cell_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_id" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_cell_property">
<callback name="get_cell_property">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="renderer" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="property_id" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="focus">
<callback name="focus">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus remains inside @area as a result of this call.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the `GtkDirectionType`</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="is_activatable">
<callback name="is_activatable">
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @area can do anything when activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether @area was successfully activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellArea`</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea`Context in context with the current row data</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` that @area is rendering on</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">the size and location of @area relative to @widget&#x2019;s allocation</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer`State flags for @area for this row of data.</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="edit_only" transfer-ownership="none">
<doc xml:space="preserve">if %TRUE then only cell renderers that are %GTK_CELL_RENDERER_MODE_EDITABLE
will be activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
<method name="find_cell_property" c:identifier="gtk_cell_area_class_find_cell_property">
<doc xml:space="preserve">Finds a cell property of a cell area class by name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` of the child property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</return-value>
<parameters>
<instance-parameter name="aclass" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaClass`</doc>
<type name="CellAreaClass" c:type="GtkCellAreaClass*"/>
</instance-parameter>
<parameter name="property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the child property to find</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="install_cell_property" c:identifier="gtk_cell_area_class_install_cell_property">
<doc xml:space="preserve">Installs a cell property on a cell area class.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="aclass" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaClass`</doc>
<type name="CellAreaClass" c:type="GtkCellAreaClass*"/>
</instance-parameter>
<parameter name="property_id" transfer-ownership="none">
<doc xml:space="preserve">the id for the property</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</method>
<method name="list_cell_properties" c:identifier="gtk_cell_area_class_list_cell_properties">
<doc xml:space="preserve">Returns all cell properties of a cell area class.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">a newly
allocated %NULL-terminated array of `GParamSpec`*. The array
must be freed with g_free().</doc>
<array length="0" zero-terminated="0" c:type="GParamSpec**">
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</array>
</return-value>
<parameters>
<instance-parameter name="aclass" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaClass`</doc>
<type name="CellAreaClass" c:type="GtkCellAreaClass*"/>
</instance-parameter>
<parameter name="n_properties" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to return the number of cell properties found</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
</record>
<class name="CellAreaContext" c:symbol-prefix="cell_area_context" c:type="GtkCellAreaContext" parent="GObject.Object" glib:type-name="GtkCellAreaContext" glib:get-type="gtk_cell_area_context_get_type" glib:type-struct="CellAreaContextClass">
<doc xml:space="preserve">Stores geometrical information for a series of rows in a GtkCellArea
The `GtkCellAreaContext` object is created by a given `GtkCellArea`
implementation via its `GtkCellAreaClass.create_context()` virtual
method and is used to store cell sizes and alignments for a series of
`GtkTreeModel` rows that are requested and rendered in the same context.
`GtkCellLayout` widgets can create any number of contexts in which to
request and render groups of data rows. However, it&#x2019;s important that the
same context which was used to request sizes for a given `GtkTreeModel`
row also be used for the same row when calling other `GtkCellArea` APIs
such as gtk_cell_area_render() and gtk_cell_area_event().</doc>
<virtual-method name="allocate" invoker="allocate">
<doc xml:space="preserve">Allocates a width and/or a height for all rows which are to be
rendered with @context.
Usually allocation is performed only horizontally or sometimes
vertically since a group of rows are usually rendered side by
side vertically or horizontally and share either the same width
or the same height. Sometimes they are allocated in both horizontal
and vertical orientations producing a homogeneous effect of the
rows. This is generally the case for `GtkTreeView` when
`GtkTreeView:fixed-height-mode` is enabled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the allocated width for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the allocated height for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_height_for_width" invoker="get_preferred_height_for_width">
<doc xml:space="preserve">Gets the accumulative preferred height for @width for all rows
which have been requested for the same said @width with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">a proposed width for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_width_for_height" invoker="get_preferred_width_for_height">
<doc xml:space="preserve">Gets the accumulative preferred width for @height for all rows which
have been requested for the same said @height with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">a proposed height for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="reset" invoker="reset">
<doc xml:space="preserve">Resets any previously cached request and allocation
data.
When underlying `GtkTreeModel` data changes its
important to reset the context if the content
size is allowed to shrink. If the content size
is only allowed to grow (this is usually an option
for views rendering large data stores as a measure
of optimization), then only the row that changed
or was inserted needs to be (re)requested with
gtk_cell_area_get_preferred_width().
When the new overall size of the context requires
that the allocated size changes (or whenever this
allocation changes at all), the variable row
sizes need to be re-requested for every row.
For instance, if the rows are displayed all with
the same width from top to bottom then a change
in the allocated width necessitates a recalculation
of all the displayed row heights using
gtk_cell_area_get_preferred_height_for_width().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="allocate" c:identifier="gtk_cell_area_context_allocate">
<doc xml:space="preserve">Allocates a width and/or a height for all rows which are to be
rendered with @context.
Usually allocation is performed only horizontally or sometimes
vertically since a group of rows are usually rendered side by
side vertically or horizontally and share either the same width
or the same height. Sometimes they are allocated in both horizontal
and vertical orientations producing a homogeneous effect of the
rows. This is generally the case for `GtkTreeView` when
`GtkTreeView:fixed-height-mode` is enabled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the allocated width for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the allocated height for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_allocation" c:identifier="gtk_cell_area_context_get_allocation">
<doc xml:space="preserve">Fetches the current allocation size for @context.
If the context was not allocated in width or height, or if the
context was recently reset with gtk_cell_area_context_reset(),
the returned value will be -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the allocated width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the allocated height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_area" c:identifier="gtk_cell_area_context_get_area" glib:get-property="area">
<doc xml:space="preserve">Fetches the `GtkCellArea` this @context was created by.
This is generally unneeded by layouting widgets; however,
it is important for the context implementation itself to
fetch information about the area it is being used for.
For instance at `GtkCellAreaContextClass.allocate()` time
it&#x2019;s important to know details about any cell spacing
that the `GtkCellArea` is configured with in order to
compute a proper allocation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea` this context was created by.</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_preferred_height" c:identifier="gtk_cell_area_context_get_preferred_height">
<doc xml:space="preserve">Gets the accumulative preferred height for all rows which have been
requested with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_height_for_width" c:identifier="gtk_cell_area_context_get_preferred_height_for_width">
<doc xml:space="preserve">Gets the accumulative preferred height for @width for all rows
which have been requested for the same said @width with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">a proposed width for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width" c:identifier="gtk_cell_area_context_get_preferred_width">
<doc xml:space="preserve">Gets the accumulative preferred width for all rows which have been
requested with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width_for_height" c:identifier="gtk_cell_area_context_get_preferred_width_for_height">
<doc xml:space="preserve">Gets the accumulative preferred width for @height for all rows which
have been requested for the same said @height with this context.
After gtk_cell_area_context_reset() is called and/or before ever
requesting the size of a `GtkCellArea`, the returned values are -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">a proposed height for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="push_preferred_height" c:identifier="gtk_cell_area_context_push_preferred_height">
<doc xml:space="preserve">Causes the minimum and/or natural height to grow if the new
proposed sizes exceed the current minimum and natural height.
This is used by `GtkCellAreaContext` implementations during
the request process over a series of `GtkTreeModel` rows to
progressively push the requested height over a series of
gtk_cell_area_get_preferred_height() requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="minimum_height" transfer-ownership="none">
<doc xml:space="preserve">the proposed new minimum height for @context</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="natural_height" transfer-ownership="none">
<doc xml:space="preserve">the proposed new natural height for @context</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="push_preferred_width" c:identifier="gtk_cell_area_context_push_preferred_width">
<doc xml:space="preserve">Causes the minimum and/or natural width to grow if the new
proposed sizes exceed the current minimum and natural width.
This is used by `GtkCellAreaContext` implementations during
the request process over a series of `GtkTreeModel` rows to
progressively push the requested width over a series of
gtk_cell_area_get_preferred_width() requests.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
<parameter name="minimum_width" transfer-ownership="none">
<doc xml:space="preserve">the proposed new minimum width for @context</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="natural_width" transfer-ownership="none">
<doc xml:space="preserve">the proposed new natural width for @context</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="reset" c:identifier="gtk_cell_area_context_reset">
<doc xml:space="preserve">Resets any previously cached request and allocation
data.
When underlying `GtkTreeModel` data changes its
important to reset the context if the content
size is allowed to shrink. If the content size
is only allowed to grow (this is usually an option
for views rendering large data stores as a measure
of optimization), then only the row that changed
or was inserted needs to be (re)requested with
gtk_cell_area_get_preferred_width().
When the new overall size of the context requires
that the allocated size changes (or whenever this
allocation changes at all), the variable row
sizes need to be re-requested for every row.
For instance, if the rows are displayed all with
the same width from top to bottom then a change
in the allocated width necessitates a recalculation
of all the displayed row heights using
gtk_cell_area_get_preferred_height_for_width().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</instance-parameter>
</parameters>
</method>
<property name="area" writable="1" construct-only="1" transfer-ownership="none" getter="get_area">
<doc xml:space="preserve">The `GtkCellArea` this context was created by</doc>
<type name="CellArea"/>
</property>
<property name="minimum-height" transfer-ownership="none">
<doc xml:space="preserve">The minimum height for the `GtkCellArea` in this context
for all `GtkTreeModel` rows that this context was requested
for using gtk_cell_area_get_preferred_height().</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="minimum-width" transfer-ownership="none">
<doc xml:space="preserve">The minimum width for the `GtkCellArea` in this context
for all `GtkTreeModel` rows that this context was requested
for using gtk_cell_area_get_preferred_width().</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="natural-height" transfer-ownership="none">
<doc xml:space="preserve">The natural height for the `GtkCellArea` in this context
for all `GtkTreeModel` rows that this context was requested
for using gtk_cell_area_get_preferred_height().</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="natural-width" transfer-ownership="none">
<doc xml:space="preserve">The natural width for the `GtkCellArea` in this context
for all `GtkTreeModel` rows that this context was requested
for using gtk_cell_area_get_preferred_width().</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="CellAreaContextClass" c:type="GtkCellAreaContextClass" glib:is-gtype-struct-for="CellAreaContext">
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="allocate">
<callback name="allocate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the allocated width for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the allocated height for all `GtkTreeModel` rows rendered
with @context, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="reset">
<callback name="reset">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_height_for_width">
<callback name="get_preferred_height_for_width">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">a proposed width for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_width_for_height">
<callback name="get_preferred_width_for_height">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellAreaContext`</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">a proposed height for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="CellAreaContextPrivate" c:type="GtkCellAreaContextPrivate" disguised="1"/>
<callback name="CellCallback" c:type="GtkCellCallback">
<doc xml:space="preserve">The type of the callback functions used for iterating over
the cell renderers of a `GtkCellArea`, see gtk_cell_area_foreach().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop iterating over cells.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">the cell renderer to operate on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user-supplied data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<interface name="CellEditable" c:symbol-prefix="cell_editable" c:type="GtkCellEditable" glib:type-name="GtkCellEditable" glib:get-type="gtk_cell_editable_get_type" glib:type-struct="CellEditableIface">
<doc xml:space="preserve">Interface for widgets that can be used for editing cells
The `GtkCellEditable` interface must be implemented for widgets to be usable
to edit the contents of a `GtkTreeView` cell. It provides a way to specify how
temporary widgets should be configured for editing, get the new value, etc.</doc>
<prerequisite name="Widget"/>
<virtual-method name="editing_done" invoker="editing_done">
<doc xml:space="preserve">Emits the `GtkCellEditable::editing-done` signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="remove_widget" invoker="remove_widget">
<doc xml:space="preserve">Emits the `GtkCellEditable::remove-widget` signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="start_editing" invoker="start_editing">
<doc xml:space="preserve">Begins editing on a @cell_editable.
The `GtkCellRenderer` for the cell creates and returns a `GtkCellEditable` from
gtk_cell_renderer_start_editing(), configured for the `GtkCellRenderer` type.
gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
Note that the @cell_editable is created on-demand for the current edit; its
lifetime is temporary and does not persist across other edits and/or cells.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GdkEvent` that began the editing process, or
%NULL if editing was initiated programmatically</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</virtual-method>
<method name="editing_done" c:identifier="gtk_cell_editable_editing_done">
<doc xml:space="preserve">Emits the `GtkCellEditable::editing-done` signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_widget" c:identifier="gtk_cell_editable_remove_widget">
<doc xml:space="preserve">Emits the `GtkCellEditable::remove-widget` signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="start_editing" c:identifier="gtk_cell_editable_start_editing">
<doc xml:space="preserve">Begins editing on a @cell_editable.
The `GtkCellRenderer` for the cell creates and returns a `GtkCellEditable` from
gtk_cell_renderer_start_editing(), configured for the `GtkCellRenderer` type.
gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
Note that the @cell_editable is created on-demand for the current edit; its
lifetime is temporary and does not persist across other edits and/or cells.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GdkEvent` that began the editing process, or
%NULL if editing was initiated programmatically</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</method>
<property name="editing-canceled" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Indicates whether editing on the cell has been canceled.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="editing-done" when="last">
<doc xml:space="preserve">This signal is a sign for the cell renderer to update its
value from the @cell_editable.
Implementations of `GtkCellEditable` are responsible for
emitting this signal when they are done editing, e.g.
`GtkEntry` emits this signal when the user presses Enter. Typical things to
do in a handler for ::editing-done are to capture the edited value,
disconnect the @cell_editable from signals on the `GtkCellRenderer`, etc.
gtk_cell_editable_editing_done() is a convenience method
for emitting `GtkCellEditable::editing-done`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="remove-widget" when="last">
<doc xml:space="preserve">This signal is meant to indicate that the cell is finished
editing, and the @cell_editable widget is being removed and may
subsequently be destroyed.
Implementations of `GtkCellEditable` are responsible for
emitting this signal when they are done editing. It must
be emitted after the `GtkCellEditable::editing-done` signal,
to give the cell renderer a chance to update the cell's value
before the widget is removed.
gtk_cell_editable_remove_widget() is a convenience method
for emitting `GtkCellEditable::remove-widget`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</interface>
<record name="CellEditableIface" c:type="GtkCellEditableIface" glib:is-gtype-struct-for="CellEditable">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="editing_done">
<callback name="editing_done">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="remove_widget">
<callback name="remove_widget">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="start_editing">
<callback name="start_editing">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_editable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellEditable`</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GdkEvent` that began the editing process, or
%NULL if editing was initiated programmatically</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<interface name="CellLayout" c:symbol-prefix="cell_layout" c:type="GtkCellLayout" glib:type-name="GtkCellLayout" glib:get-type="gtk_cell_layout_get_type" glib:type-struct="CellLayoutIface">
<doc xml:space="preserve">An interface for packing cells
`GtkCellLayout` is an interface to be implemented by all objects which
want to provide a `GtkTreeViewColumn` like API for packing cells,
setting attributes and data funcs.
One of the notable features provided by implementations of
`GtkCellLayout` are attributes. Attributes let you set the properties
in flexible ways. They can just be set to constant values like regular
properties. But they can also be mapped to a column of the underlying
tree model with gtk_cell_layout_set_attributes(), which means that the value
of the attribute can change from cell to cell as they are rendered by
the cell renderer. Finally, it is possible to specify a function with
gtk_cell_layout_set_cell_data_func() that is called to determine the
value of the attribute for each cell that is rendered.
# GtkCellLayouts as GtkBuildable
Implementations of GtkCellLayout which also implement the GtkBuildable
interface (`GtkCellView`, `GtkIconView`, `GtkComboBox`,
`GtkEntryCompletion`, `GtkTreeViewColumn`) accept `GtkCellRenderer` objects
as `&lt;child&gt;` elements in UI definitions. They support a custom `&lt;attributes&gt;`
element for their children, which can contain multiple `&lt;attribute&gt;`
elements. Each `&lt;attribute&gt;` element has a name attribute which specifies
a property of the cell renderer; the content of the element is the
attribute value.
This is an example of a UI definition fragment specifying attributes:
```xml
&lt;object class="GtkCellView"&gt;
&lt;child&gt;
&lt;object class="GtkCellRendererText"/&gt;
&lt;attributes&gt;
&lt;attribute name="text"&gt;0&lt;/attribute&gt;
&lt;/attributes&gt;
&lt;/child&gt;
&lt;/object&gt;
```
Furthermore for implementations of `GtkCellLayout` that use a `GtkCellArea`
to lay out cells (all `GtkCellLayout`s in GTK use a `GtkCellArea`)
[cell properties](class.CellArea.html#cell-properties) can also be defined
in the format by specifying the custom `&lt;cell-packing&gt;` attribute which can
contain multiple `&lt;property&gt;` elements.
Here is a UI definition fragment specifying cell properties:
```xml
&lt;object class="GtkTreeViewColumn"&gt;
&lt;child&gt;
&lt;object class="GtkCellRendererText"/&gt;
&lt;cell-packing&gt;
&lt;property name="align"&gt;True&lt;/property&gt;
&lt;property name="expand"&gt;False&lt;/property&gt;
&lt;/cell-packing&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# Subclassing GtkCellLayout implementations
When subclassing a widget that implements `GtkCellLayout` like
`GtkIconView` or `GtkComboBox`, there are some considerations related
to the fact that these widgets internally use a `GtkCellArea`.
The cell area is exposed as a construct-only property by these
widgets. This means that it is possible to e.g. do
```c
GtkWIdget *combo =
g_object_new (GTK_TYPE_COMBO_BOX, "cell-area", my_cell_area, NULL);
```
to use a custom cell area with a combo box. But construct properties
are only initialized after instance `init()`
functions have run, which means that using functions which rely on
the existence of the cell area in your subclass `init()` function will
cause the default cell area to be instantiated. In this case, a provided
construct property value will be ignored (with a warning, to alert
you to the problem).
```c
static void
my_combo_box_init (MyComboBox *b)
{
GtkCellRenderer *cell;
cell = gtk_cell_renderer_pixbuf_new ();
// The following call causes the default cell area for combo boxes,
// a GtkCellAreaBox, to be instantiated
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (b), cell, FALSE);
...
}
GtkWidget *
my_combo_box_new (GtkCellArea *area)
{
// This call is going to cause a warning about area being ignored
return g_object_new (MY_TYPE_COMBO_BOX, "cell-area", area, NULL);
}
```
If supporting alternative cell areas with your derived widget is
not important, then this does not have to concern you. If you want
to support alternative cell areas, you can do so by moving the
problematic calls out of `init()` and into a `constructor()`
for your class.</doc>
<virtual-method name="add_attribute" invoker="add_attribute">
<doc xml:space="preserve">Adds an attribute mapping to the list in @cell_layout.
The @column is the column of the model to get a value from, and the
@attribute is the property on @cell to be set from that value. So for
example if column 2 of the model contains strings, you could have the
&#x201C;text&#x201D; attribute of a `GtkCellRendererText` get its values from column 2.
In this context "attribute" and "property" are used interchangeably.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">a property on the renderer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column position on the model to get the attribute from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="clear" invoker="clear">
<doc xml:space="preserve">Unsets all the mappings on all renderers on @cell_layout and
removes all renderers from @cell_layout.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="clear_attributes" invoker="clear_attributes">
<doc xml:space="preserve">Clears all existing attributes previously set with
gtk_cell_layout_set_attributes().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to clear the attribute mapping on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_area" invoker="get_area">
<doc xml:space="preserve">Returns the underlying `GtkCellArea` which might be @cell_layout
if called on a `GtkCellArea` or might be %NULL if no `GtkCellArea`
is used by @cell_layout.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the cell area used by @cell_layout</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_cells" invoker="get_cells">
<doc xml:space="preserve">Returns the cell renderers which have been added to @cell_layout.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">
a list of cell renderers. The list, but not the renderers has
been newly allocated and should be freed with g_list_free()
when no longer needed.</doc>
<type name="GLib.List" c:type="GList*">
<type name="CellRenderer"/>
</type>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="pack_end" invoker="pack_end">
<doc xml:space="preserve">Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
@cell is allocated no more space than it needs. Any unused space is
divided evenly between cells for which @expand is %TRUE.
Note that reusing the same cell renderer is not supported.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="pack_start" invoker="pack_start">
<doc xml:space="preserve">Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
then the @cell is allocated no more space than it needs. Any unused space
is divided evenly between cells for which @expand is %TRUE.
Note that reusing the same cell renderer is not supported.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="reorder" invoker="reorder">
<doc xml:space="preserve">Re-inserts @cell at @position.
Note that @cell has already to be packed into @cell_layout
for this to function properly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to reorder</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">new position to insert @cell at</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_cell_data_func" invoker="set_cell_data_func">
<doc xml:space="preserve">Sets the `GtkCellLayout`DataFunc to use for @cell_layout.
This function is used instead of the standard attributes mapping
for setting the column value, and should set the value of @cell_layout&#x2019;s
cell renderer(s) as appropriate.
@func may be %NULL to remove a previously set function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">the `GtkCellLayout`DataFunc to use</doc>
<type name="CellLayoutDataFunc" c:type="GtkCellLayoutDataFunc"/>
</parameter>
<parameter name="func_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @func_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</virtual-method>
<method name="add_attribute" c:identifier="gtk_cell_layout_add_attribute">
<doc xml:space="preserve">Adds an attribute mapping to the list in @cell_layout.
The @column is the column of the model to get a value from, and the
@attribute is the property on @cell to be set from that value. So for
example if column 2 of the model contains strings, you could have the
&#x201C;text&#x201D; attribute of a `GtkCellRendererText` get its values from column 2.
In this context "attribute" and "property" are used interchangeably.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">a property on the renderer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column position on the model to get the attribute from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="clear" c:identifier="gtk_cell_layout_clear">
<doc xml:space="preserve">Unsets all the mappings on all renderers on @cell_layout and
removes all renderers from @cell_layout.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="clear_attributes" c:identifier="gtk_cell_layout_clear_attributes">
<doc xml:space="preserve">Clears all existing attributes previously set with
gtk_cell_layout_set_attributes().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to clear the attribute mapping on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="get_area" c:identifier="gtk_cell_layout_get_area">
<doc xml:space="preserve">Returns the underlying `GtkCellArea` which might be @cell_layout
if called on a `GtkCellArea` or might be %NULL if no `GtkCellArea`
is used by @cell_layout.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the cell area used by @cell_layout</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cells" c:identifier="gtk_cell_layout_get_cells">
<doc xml:space="preserve">Returns the cell renderers which have been added to @cell_layout.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">
a list of cell renderers. The list, but not the renderers has
been newly allocated and should be freed with g_list_free()
when no longer needed.</doc>
<type name="GLib.List" c:type="GList*">
<type name="CellRenderer"/>
</type>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="pack_end" c:identifier="gtk_cell_layout_pack_end">
<doc xml:space="preserve">Adds the @cell to the end of @cell_layout. If @expand is %FALSE, then the
@cell is allocated no more space than it needs. Any unused space is
divided evenly between cells for which @expand is %TRUE.
Note that reusing the same cell renderer is not supported.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="pack_start" c:identifier="gtk_cell_layout_pack_start">
<doc xml:space="preserve">Packs the @cell into the beginning of @cell_layout. If @expand is %FALSE,
then the @cell is allocated no more space than it needs. Any unused space
is divided evenly between cells for which @expand is %TRUE.
Note that reusing the same cell renderer is not supported.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="reorder" c:identifier="gtk_cell_layout_reorder">
<doc xml:space="preserve">Re-inserts @cell at @position.
Note that @cell has already to be packed into @cell_layout
for this to function properly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to reorder</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">new position to insert @cell at</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_cell_layout_set_attributes" introspectable="0">
<doc xml:space="preserve">Sets the attributes in the parameter list as the attributes
of @cell_layout.
See [method@Gtk.CellLayout.add_attribute] for more details.
The attributes should be in attribute/column order, as in
gtk_cell_layout_add_attribute(). All existing attributes are
removed, and replaced with the new attributes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a %NULL-terminated list of attributes</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="set_cell_data_func" c:identifier="gtk_cell_layout_set_cell_data_func">
<doc xml:space="preserve">Sets the `GtkCellLayout`DataFunc to use for @cell_layout.
This function is used instead of the standard attributes mapping
for setting the column value, and should set the value of @cell_layout&#x2019;s
cell renderer(s) as appropriate.
@func may be %NULL to remove a previously set function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">the `GtkCellLayout`DataFunc to use</doc>
<type name="CellLayoutDataFunc" c:type="GtkCellLayoutDataFunc"/>
</parameter>
<parameter name="func_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @func_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
</interface>
<callback name="CellLayoutDataFunc" c:type="GtkCellLayoutDataFunc">
<doc xml:space="preserve">A function which should set the value of @cell_layout&#x2019;s cell renderer(s)
as appropriate.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">the cell renderer whose value is to be set</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">the model</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` indicating the row to set the value for</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data passed to gtk_cell_layout_set_cell_data_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="CellLayoutIface" c:type="GtkCellLayoutIface" glib:is-gtype-struct-for="CellLayout">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="pack_start">
<callback name="pack_start">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="pack_end">
<callback name="pack_end">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @cell_layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="clear">
<callback name="clear">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="add_attribute">
<callback name="add_attribute">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">a property on the renderer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column position on the model to get the attribute from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_cell_data_func">
<callback name="set_cell_data_func">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="3" destroy="4">
<doc xml:space="preserve">the `GtkCellLayout`DataFunc to use</doc>
<type name="CellLayoutDataFunc" c:type="GtkCellLayoutDataFunc"/>
</parameter>
<parameter name="func_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @func_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</callback>
</field>
<field name="clear_attributes">
<callback name="clear_attributes">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to clear the attribute mapping on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="reorder">
<callback name="reorder">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to reorder</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">new position to insert @cell at</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_cells">
<callback name="get_cells">
<return-value transfer-ownership="container">
<doc xml:space="preserve">
a list of cell renderers. The list, but not the renderers has
been newly allocated and should be freed with g_list_free()
when no longer needed.</doc>
<type name="GLib.List" c:type="GList*">
<type name="CellRenderer"/>
</type>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_area">
<callback name="get_area">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the cell area used by @cell_layout</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</return-value>
<parameters>
<parameter name="cell_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellLayout`</doc>
<type name="CellLayout" c:type="GtkCellLayout*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="CellRenderer" c:symbol-prefix="cell_renderer" c:type="GtkCellRenderer" parent="GObject.InitiallyUnowned" abstract="1" glib:type-name="GtkCellRenderer" glib:get-type="gtk_cell_renderer_get_type" glib:type-struct="CellRendererClass">
<doc xml:space="preserve">An object for rendering a single cell
The `GtkCellRenderer` is a base class of a set of objects used for
rendering a cell to a `cairo_t`. These objects are used primarily by
the `GtkTreeView` widget, though they aren&#x2019;t tied to them in any
specific way. It is worth noting that `GtkCellRenderer` is not a
`GtkWidget` and cannot be treated as such.
The primary use of a `GtkCellRenderer` is for drawing a certain graphical
elements on a `cairo_t`. Typically, one cell renderer is used to
draw many cells on the screen. To this extent, it isn&#x2019;t expected that a
CellRenderer keep any permanent state around. Instead, any state is set
just prior to use using `GObject`s property system. Then, the
cell is measured using gtk_cell_renderer_get_preferred_size(). Finally, the cell
is rendered in the correct location using gtk_cell_renderer_snapshot().
There are a number of rules that must be followed when writing a new
`GtkCellRenderer`. First and foremost, it&#x2019;s important that a certain set
of properties will always yield a cell renderer of the same size,
barring a style change. The `GtkCellRenderer` also has a number of
generic properties that are expected to be honored by all children.
Beyond merely rendering a cell, cell renderers can optionally
provide active user interface elements. A cell renderer can be
&#x201C;activatable&#x201D; like `GtkCellRenderer`Toggle,
which toggles when it gets activated by a mouse click, or it can be
&#x201C;editable&#x201D; like `GtkCellRenderer`Text, which
allows the user to edit the text using a widget implementing the
`GtkCellEditable` interface, e.g. `GtkEntry`.
To make a cell renderer activatable or editable, you have to
implement the `GtkCellRenderer`Class.activate or
`GtkCellRenderer`Class.start_editing virtual functions, respectively.
Many properties of `GtkCellRenderer` and its subclasses have a
corresponding &#x201C;set&#x201D; property, e.g. &#x201C;cell-background-set&#x201D; corresponds
to &#x201C;cell-background&#x201D;. These &#x201C;set&#x201D; properties reflect whether a property
has been set or not. You should not set them independently.</doc>
<virtual-method name="activate" invoker="activate">
<doc xml:space="preserve">Passes an activate event to the cell renderer for possible processing.
Some cell renderers may use events; for example, `GtkCellRendererToggle`
toggles when it gets a mouse click.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was consumed/handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="editing_canceled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="editing_started">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="editable" transfer-ownership="none">
<type name="CellEditable" c:type="GtkCellEditable*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_aligned_area" invoker="get_aligned_area">
<doc xml:space="preserve">Gets the aligned area used by @cell inside @cell_area. Used for finding
the appropriate edit and focus rectangle.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area which would be passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="aligned_area" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the return location for the space inside @cell_area
that would actually be used to render.</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_height" invoker="get_preferred_height">
<doc xml:space="preserve">Retrieves a renderer&#x2019;s natural size when rendered to @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_height_for_width" invoker="get_preferred_height_for_width">
<doc xml:space="preserve">Retrieves a cell renderers&#x2019;s minimum and natural height if it were rendered to
@widget with the specified @width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_width" invoker="get_preferred_width">
<doc xml:space="preserve">Retrieves a renderer&#x2019;s natural size when rendered to @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preferred_width_for_height" invoker="get_preferred_width_for_height">
<doc xml:space="preserve">Retrieves a cell renderers&#x2019;s minimum and natural width if it were rendered to
@widget with the specified @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_request_mode" invoker="get_request_mode">
<doc xml:space="preserve">Gets whether the cell renderer prefers a height-for-width layout
or a width-for-height layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by this renderer.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="snapshot" invoker="snapshot">
<doc xml:space="preserve">Invokes the virtual render function of the `GtkCellRenderer`. The three
passed-in rectangles are areas in @cr. Most renderers will draw within
@cell_area; the xalign, yalign, xpad, and ypad fields of the `GtkCellRenderer`
should be honored with respect to @cell_area. @background_area includes the
blank space around the cell, and also the area containing the tree expander;
so the @background_area rectangles for all cells tile to cover the entire
@window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget owning @window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">entire cell area (including tree expanders and maybe
padding on the sides)</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">area normally rendered by a cell renderer</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags that affect rendering</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="start_editing" invoker="start_editing">
<doc xml:space="preserve">Starts editing the contents of this @cell, through a new `GtkCellEditable`
widget created by the `GtkCellRenderer`Class.start_editing virtual function.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A new `GtkCellEditable` for editing this
@cell, or %NULL if editing is not possible</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</virtual-method>
<method name="activate" c:identifier="gtk_cell_renderer_activate">
<doc xml:space="preserve">Passes an activate event to the cell renderer for possible processing.
Some cell renderers may use events; for example, `GtkCellRendererToggle`
toggles when it gets a mouse click.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was consumed/handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="get_aligned_area" c:identifier="gtk_cell_renderer_get_aligned_area">
<doc xml:space="preserve">Gets the aligned area used by @cell inside @cell_area. Used for finding
the appropriate edit and focus rectangle.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area which would be passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="aligned_area" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the return location for the space inside @cell_area
that would actually be used to render.</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_alignment" c:identifier="gtk_cell_renderer_get_alignment">
<doc xml:space="preserve">Fills in @xalign and @yalign with the appropriate values of @cell.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="xalign" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the x alignment of the cell</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
<parameter name="yalign" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the y alignment of the cell</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
</parameters>
</method>
<method name="get_fixed_size" c:identifier="gtk_cell_renderer_get_fixed_size">
<doc xml:space="preserve">Fills in @width and @height with the appropriate size of @cell.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the fixed width of the cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the fixed height of the cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_is_expanded" c:identifier="gtk_cell_renderer_get_is_expanded" glib:get-property="is-expanded">
<doc xml:space="preserve">Checks whether the given `GtkCellRenderer` is expanded.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer is expanded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_is_expander" c:identifier="gtk_cell_renderer_get_is_expander" glib:get-property="is-expander">
<doc xml:space="preserve">Checks whether the given `GtkCellRenderer` is an expander.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is an expander, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_padding" c:identifier="gtk_cell_renderer_get_padding">
<doc xml:space="preserve">Fills in @xpad and @ypad with the appropriate values of @cell.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="xpad" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the x padding of the cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="ypad" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to fill in with the y padding of the cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_height" c:identifier="gtk_cell_renderer_get_preferred_height">
<doc xml:space="preserve">Retrieves a renderer&#x2019;s natural size when rendered to @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_height_for_width" c:identifier="gtk_cell_renderer_get_preferred_height_for_width">
<doc xml:space="preserve">Retrieves a cell renderers&#x2019;s minimum and natural height if it were rendered to
@widget with the specified @width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_size" c:identifier="gtk_cell_renderer_get_preferred_size">
<doc xml:space="preserve">Retrieves the minimum and natural size of a cell taking
into account the widget&#x2019;s preference for height-for-width management.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the natural size</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width" c:identifier="gtk_cell_renderer_get_preferred_width">
<doc xml:space="preserve">Retrieves a renderer&#x2019;s natural size when rendered to @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_preferred_width_for_height" c:identifier="gtk_cell_renderer_get_preferred_width_for_height">
<doc xml:space="preserve">Retrieves a cell renderers&#x2019;s minimum and natural width if it were rendered to
@widget with the specified @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_request_mode" c:identifier="gtk_cell_renderer_get_request_mode">
<doc xml:space="preserve">Gets whether the cell renderer prefers a height-for-width layout
or a width-for-height layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by this renderer.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sensitive" c:identifier="gtk_cell_renderer_get_sensitive" glib:get-property="sensitive">
<doc xml:space="preserve">Returns the cell renderer&#x2019;s sensitivity.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer is sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_state" c:identifier="gtk_cell_renderer_get_state">
<doc xml:space="preserve">Translates the cell renderer state to `GtkStateFlags`,
based on the cell renderer and widget sensitivity, and
the given `GtkCellRenderer`State.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the widget state flags applying to @cell</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="cell_state" transfer-ownership="none">
<doc xml:space="preserve">cell renderer state</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_cell_renderer_get_visible" glib:get-property="visible">
<doc xml:space="preserve">Returns the cell renderer&#x2019;s visibility.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_activatable" c:identifier="gtk_cell_renderer_is_activatable">
<doc xml:space="preserve">Checks whether the cell renderer can do something when activated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer can do anything when activated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_alignment" c:identifier="gtk_cell_renderer_set_alignment">
<doc xml:space="preserve">Sets the renderer&#x2019;s alignment within its available space.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">the x alignment of the cell renderer</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">the y alignment of the cell renderer</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_fixed_size" c:identifier="gtk_cell_renderer_set_fixed_size">
<doc xml:space="preserve">Sets the renderer size to be explicit, independent of the properties set.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width of the cell renderer, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height of the cell renderer, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_is_expanded" c:identifier="gtk_cell_renderer_set_is_expanded" glib:set-property="is-expanded">
<doc xml:space="preserve">Sets whether the given `GtkCellRenderer` is expanded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">whether @cell should be expanded</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_is_expander" c:identifier="gtk_cell_renderer_set_is_expander" glib:set-property="is-expander">
<doc xml:space="preserve">Sets whether the given `GtkCellRenderer` is an expander.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">whether @cell is an expander</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_padding" c:identifier="gtk_cell_renderer_set_padding">
<doc xml:space="preserve">Sets the renderer&#x2019;s padding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="xpad" transfer-ownership="none">
<doc xml:space="preserve">the x padding of the cell renderer</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="ypad" transfer-ownership="none">
<doc xml:space="preserve">the y padding of the cell renderer</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_sensitive" c:identifier="gtk_cell_renderer_set_sensitive" glib:set-property="sensitive">
<doc xml:space="preserve">Sets the cell renderer&#x2019;s sensitivity.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="sensitive" transfer-ownership="none">
<doc xml:space="preserve">the sensitivity of the cell</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_cell_renderer_set_visible" glib:set-property="visible">
<doc xml:space="preserve">Sets the cell renderer&#x2019;s visibility.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">the visibility of the cell</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="snapshot" c:identifier="gtk_cell_renderer_snapshot">
<doc xml:space="preserve">Invokes the virtual render function of the `GtkCellRenderer`. The three
passed-in rectangles are areas in @cr. Most renderers will draw within
@cell_area; the xalign, yalign, xpad, and ypad fields of the `GtkCellRenderer`
should be honored with respect to @cell_area. @background_area includes the
blank space around the cell, and also the area containing the tree expander;
so the @background_area rectangles for all cells tile to cover the entire
@window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget owning @window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">entire cell area (including tree expanders and maybe
padding on the sides)</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">area normally rendered by a cell renderer</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags that affect rendering</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="start_editing" c:identifier="gtk_cell_renderer_start_editing">
<doc xml:space="preserve">Starts editing the contents of this @cell, through a new `GtkCellEditable`
widget created by the `GtkCellRenderer`Class.start_editing virtual function.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A new `GtkCellEditable` for editing this
@cell, or %NULL if editing is not possible</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</method>
<method name="stop_editing" c:identifier="gtk_cell_renderer_stop_editing">
<doc xml:space="preserve">Informs the cell renderer that the editing is stopped.
If @canceled is %TRUE, the cell renderer will emit the
`GtkCellRenderer`::editing-canceled signal.
This function should be called by cell renderer implementations
in response to the `GtkCellEditable::editing-done` signal of
`GtkCellEditable`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</instance-parameter>
<parameter name="canceled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the editing has been canceled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="cell-background" readable="0" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="cell-background-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Cell background as a `GdkRGBA`</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="cell-background-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="editing" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="height" writable="1" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</property>
<property name="is-expanded" writable="1" transfer-ownership="none" setter="set_is_expanded" getter="get_is_expanded">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="is-expander" writable="1" transfer-ownership="none" setter="set_is_expander" getter="get_is_expander">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="mode" writable="1" transfer-ownership="none">
<type name="CellRendererMode"/>
</property>
<property name="sensitive" writable="1" transfer-ownership="none" setter="set_sensitive" getter="get_sensitive">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" setter="set_visible" getter="get_visible">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="width" writable="1" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</property>
<property name="xalign" writable="1" transfer-ownership="none">
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="xpad" writable="1" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</property>
<property name="yalign" writable="1" transfer-ownership="none">
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="ypad" writable="1" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</property>
<field name="parent_instance">
<type name="GObject.InitiallyUnowned" c:type="GInitiallyUnowned"/>
</field>
<field name="priv" readable="0" private="1">
<type name="CellRendererPrivate" c:type="GtkCellRendererPrivate*"/>
</field>
<glib:signal name="editing-canceled" when="first">
<doc xml:space="preserve">This signal gets emitted when the user cancels the process of editing a
cell. For example, an editable cell renderer could be written to cancel
editing when the user presses Escape.
See also: gtk_cell_renderer_stop_editing().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="editing-started" when="first">
<doc xml:space="preserve">This signal gets emitted when a cell starts to be edited.
The intended use of this signal is to do special setup
on @editable, e.g. adding a `GtkEntryCompletion` or setting
up additional columns in a `GtkComboBox`.
See gtk_cell_editable_start_editing() for information on the lifecycle of
the @editable and a way to do setup that doesn&#x2019;t depend on the @renderer.
Note that GTK doesn't guarantee that cell renderers will
continue to use the same kind of widget for editing in future
releases, therefore you should check the type of @editable
before doing any specific setup, as in the following example:
|[&lt;!-- language="C" --&gt;
static void
text_editing_started (GtkCellRenderer *cell,
GtkCellEditable *editable,
const char *path,
gpointer data)
{
if (GTK_IS_ENTRY (editable))
{
GtkEntry *entry = GTK_ENTRY (editable);
// ... create a GtkEntryCompletion
gtk_entry_set_completion (entry, completion);
}
}
]|</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellEditable`</doc>
<type name="CellEditable"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the path identifying the edited cell</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="CellRendererAccel" c:symbol-prefix="cell_renderer_accel" c:type="GtkCellRendererAccel" parent="CellRendererText" glib:type-name="GtkCellRendererAccel" glib:get-type="gtk_cell_renderer_accel_get_type">
<doc xml:space="preserve">Renders a keyboard accelerator in a cell
`GtkCellRendererAccel` displays a keyboard accelerator (i.e. a key
combination like `Control + a`). If the cell renderer is editable,
the accelerator can be changed by simply typing the new combination.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_accel_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererAccel`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="accel-key" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The keyval of the accelerator.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="accel-mode" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Determines if the edited accelerators are GTK accelerators. If
they are, consumed modifiers are suppressed, only accelerators
accepted by GTK are allowed, and the accelerators are rendered
in the same way as they are in menus.</doc>
<type name="CellRendererAccelMode"/>
</property>
<property name="accel-mods" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The modifier mask of the accelerator.</doc>
<type name="Gdk.ModifierType"/>
</property>
<property name="keycode" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The hardware keycode of the accelerator. Note that the hardware keycode is
only relevant if the key does not have a keyval. Normally, the keyboard
configuration should assign keyvals to all keys.</doc>
<type name="guint" c:type="guint"/>
</property>
<glib:signal name="accel-cleared" when="last">
<doc xml:space="preserve">Gets emitted when the user has removed the accelerator.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path_string" transfer-ownership="none">
<doc xml:space="preserve">the path identifying the row of the edited cell</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="accel-edited" when="last">
<doc xml:space="preserve">Gets emitted when the user has selected a new accelerator.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path_string" transfer-ownership="none">
<doc xml:space="preserve">the path identifying the row of the edited cell</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="accel_key" transfer-ownership="none">
<doc xml:space="preserve">the new accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="accel_mods" transfer-ownership="none">
<doc xml:space="preserve">the new acclerator modifier mask</doc>
<type name="Gdk.ModifierType"/>
</parameter>
<parameter name="hardware_keycode" transfer-ownership="none">
<doc xml:space="preserve">the keycode of the new accelerator</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="CellRendererAccelMode" glib:type-name="GtkCellRendererAccelMode" glib:get-type="gtk_cell_renderer_accel_mode_get_type" c:type="GtkCellRendererAccelMode">
<doc xml:space="preserve">The available modes for [property@Gtk.CellRendererAccel:accel-mode].</doc>
<member name="gtk" value="0" c:identifier="GTK_CELL_RENDERER_ACCEL_MODE_GTK" glib:nick="gtk" glib:name="GTK_CELL_RENDERER_ACCEL_MODE_GTK">
<doc xml:space="preserve">GTK accelerators mode</doc>
</member>
<member name="other" value="1" c:identifier="GTK_CELL_RENDERER_ACCEL_MODE_OTHER" glib:nick="other" glib:name="GTK_CELL_RENDERER_ACCEL_MODE_OTHER">
<doc xml:space="preserve">Other accelerator mode</doc>
</member>
</enumeration>
<record name="CellRendererClass" c:type="GtkCellRendererClass" glib:is-gtype-struct-for="CellRenderer">
<field name="parent_class" readable="0" private="1">
<type name="GObject.InitiallyUnownedClass" c:type="GInitiallyUnownedClass"/>
</field>
<field name="get_request_mode">
<callback name="get_request_mode">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by this renderer.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_width">
<callback name="get_preferred_width">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_height_for_width">
<callback name="get_preferred_height_for_width">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_height">
<callback name="get_preferred_height">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="minimum_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preferred_width_for_height">
<callback name="get_preferred_width_for_height">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the size which is available for allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the preferred size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_aligned_area">
<callback name="get_aligned_area">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` instance</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` this cell will be rendering to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area which would be passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="aligned_area" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the return location for the space inside @cell_area
that would actually be used to render.</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="snapshot">
<callback name="snapshot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot` to draw to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget owning @window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">entire cell area (including tree expanders and maybe
padding on the sides)</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">area normally rendered by a cell renderer</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags that affect rendering</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the event was consumed/handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</callback>
</field>
<field name="start_editing">
<callback name="start_editing">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A new `GtkCellEditable` for editing this
@cell, or %NULL if editing is not possible</doc>
<type name="CellEditable" c:type="GtkCellEditable*"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="event" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEvent`</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">widget that received the event</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">widget-dependent string representation of the event location;
e.g. for `GtkTreeView`, a string representation of `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="background_area" transfer-ownership="none">
<doc xml:space="preserve">background area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="cell_area" transfer-ownership="none">
<doc xml:space="preserve">cell area as passed to gtk_cell_renderer_render()</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">render flags</doc>
<type name="CellRendererState" c:type="GtkCellRendererState"/>
</parameter>
</parameters>
</callback>
</field>
<field name="editing_canceled">
<callback name="editing_canceled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="editing_started">
<callback name="editing_started">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell" transfer-ownership="none">
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="editable" transfer-ownership="none">
<type name="CellEditable" c:type="GtkCellEditable*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="CellRendererClassPrivate" c:type="GtkCellRendererClassPrivate" disguised="1"/>
<class name="CellRendererCombo" c:symbol-prefix="cell_renderer_combo" c:type="GtkCellRendererCombo" parent="CellRendererText" glib:type-name="GtkCellRendererCombo" glib:get-type="gtk_cell_renderer_combo_get_type">
<doc xml:space="preserve">Renders a combobox in a cell
`GtkCellRendererCombo` renders text in a cell like `GtkCellRendererText` from
which it is derived. But while `GtkCellRendererText` offers a simple entry to
edit the text, `GtkCellRendererCombo` offers a `GtkComboBox`
widget to edit the text. The values to display in the combo box are taken from
the tree model specified in the `GtkCellRendererCombo`:model property.
The combo cell renderer takes care of adding a text cell renderer to the combo
box and sets it to display the column specified by its
`GtkCellRendererCombo`:text-column property. Further properties of the combo box
can be set in a handler for the `GtkCellRenderer::editing-started` signal.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_combo_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererCombo`.
Adjust how text is drawn using object properties.
Object properties can be set globally (with g_object_set()).
Also, with `GtkTreeViewColumn`, you can bind a property to a value
in a `GtkTreeModel`. For example, you can bind the &#x201C;text&#x201D; property
on the cell renderer to a string value in the model, thus rendering
a different string in each row of the `GtkTreeView`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="has-entry" writable="1" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Holds a tree model containing the possible values for the combo box.
Use the text_column property to specify the column holding the values.</doc>
<type name="TreeModel"/>
</property>
<property name="text-column" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Specifies the model column which holds the possible values for the
combo box.
Note that this refers to the model specified in the model property,
not the model backing the tree view to which
this cell renderer is attached.
`GtkCellRendererCombo` automatically adds a text cell renderer for
this column to its combo box.</doc>
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">This signal is emitted each time after the user selected an item in
the combo box, either by using the mouse or the arrow keys. Contrary
to GtkComboBox, GtkCellRendererCombo::changed is not emitted for
changes made to a selected item in the entry. The argument @new_iter
corresponds to the newly selected item in the combo box and it is relative
to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view,
the tree view will immediately cease the editing operating. This
means that you most probably want to refrain from changing the model
until the combo cell renderer emits the edited or editing_canceled signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path_string" transfer-ownership="none">
<doc xml:space="preserve">a string of the path identifying the edited cell
(relative to the tree view model)</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="new_iter" transfer-ownership="none">
<doc xml:space="preserve">the new iter selected in the combo box
(relative to the combo box model)</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="CellRendererMode" glib:type-name="GtkCellRendererMode" glib:get-type="gtk_cell_renderer_mode_get_type" c:type="GtkCellRendererMode">
<doc xml:space="preserve">Identifies how the user can interact with a particular cell.</doc>
<member name="inert" value="0" c:identifier="GTK_CELL_RENDERER_MODE_INERT" glib:nick="inert" glib:name="GTK_CELL_RENDERER_MODE_INERT">
<doc xml:space="preserve">The cell is just for display
and cannot be interacted with. Note that this doesn&#x2019;t mean that eg. the
row being drawn can&#x2019;t be selected -- just that a particular element of
it cannot be individually modified.</doc>
</member>
<member name="activatable" value="1" c:identifier="GTK_CELL_RENDERER_MODE_ACTIVATABLE" glib:nick="activatable" glib:name="GTK_CELL_RENDERER_MODE_ACTIVATABLE">
<doc xml:space="preserve">The cell can be clicked.</doc>
</member>
<member name="editable" value="2" c:identifier="GTK_CELL_RENDERER_MODE_EDITABLE" glib:nick="editable" glib:name="GTK_CELL_RENDERER_MODE_EDITABLE">
<doc xml:space="preserve">The cell can be edited or otherwise modified.</doc>
</member>
</enumeration>
<class name="CellRendererPixbuf" c:symbol-prefix="cell_renderer_pixbuf" c:type="GtkCellRendererPixbuf" parent="CellRenderer" glib:type-name="GtkCellRendererPixbuf" glib:get-type="gtk_cell_renderer_pixbuf_get_type">
<doc xml:space="preserve">Renders a pixbuf in a cell
A `GtkCellRendererPixbuf` can be used to render an image in a cell. It allows
to render either a given `GdkPixbuf` (set via the
`GtkCellRendererPixbuf:pixbuf` property) or a named icon (set via the
`GtkCellRendererPixbuf:icon-name` property).
To support the tree view, `GtkCellRendererPixbuf` also supports rendering two
alternative pixbufs, when the `GtkCellRenderer:is-expander` property is %TRUE.
If the `GtkCellRenderer:is-expanded property` is %TRUE and the
`GtkCellRendererPixbuf:pixbuf-expander-open` property is set to a pixbuf, it
renders that pixbuf, if the `GtkCellRenderer:is-expanded` property is %FALSE
and the `GtkCellRendererPixbuf:pixbuf-expander-closed` property is set to a
pixbuf, it renders that one.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_pixbuf_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererPixbuf`. Adjust rendering
parameters using object properties. Object properties can be set
globally (with g_object_set()). Also, with `GtkTreeViewColumn`, you
can bind a property to a value in a `GtkTreeModel`. For example, you
can bind the &#x201C;pixbuf&#x201D; property on the cell renderer to a pixbuf value
in the model, thus rendering a different image in each row of the
`GtkTreeView`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="gicon" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The GIcon representing the icon to display.
If the icon theme is changed, the image will be updated
automatically.</doc>
<type name="Gio.Icon"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The name of the themed icon to display.
This property only has an effect if not overridden by the "pixbuf" property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="icon-size" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkIconSize` value that specifies the size of the rendered icon.</doc>
<type name="IconSize"/>
</property>
<property name="pixbuf" readable="0" writable="1" transfer-ownership="none">
<type name="GdkPixbuf.Pixbuf"/>
</property>
<property name="pixbuf-expander-closed" writable="1" transfer-ownership="none">
<type name="GdkPixbuf.Pixbuf"/>
</property>
<property name="pixbuf-expander-open" writable="1" transfer-ownership="none">
<type name="GdkPixbuf.Pixbuf"/>
</property>
<property name="texture" writable="1" transfer-ownership="none">
<type name="Gdk.Texture"/>
</property>
</class>
<record name="CellRendererPrivate" c:type="GtkCellRendererPrivate" disguised="1"/>
<class name="CellRendererProgress" c:symbol-prefix="cell_renderer_progress" c:type="GtkCellRendererProgress" parent="CellRenderer" glib:type-name="GtkCellRendererProgress" glib:get-type="gtk_cell_renderer_progress_get_type">
<doc xml:space="preserve">Renders numbers as progress bars
`GtkCellRendererProgress` renders a numeric value as a progress par in a cell.
Additionally, it can display a text on top of the progress bar.</doc>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_cell_renderer_progress_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererProgress`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="inverted" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pulse" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Setting this to a non-negative value causes the cell renderer to
enter "activity mode", where a block bounces back and forth to
indicate that some progress is made, without specifying exactly how
much.
Each increment of the property causes the block to move by a little
bit.
To indicate that the activity has not started yet, set the property
to zero. To indicate completion, set the property to %G_MAXINT.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The "text" property determines the label which will be drawn
over the progress bar. Setting this property to %NULL causes the default
label to be displayed. Setting this property to an empty string causes
no label to be displayed.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="text-xalign" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The "text-xalign" property controls the horizontal alignment of the
text in the progress bar. Valid values range from 0 (left) to 1
(right). Reserved for RTL layouts.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="text-yalign" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The "text-yalign" property controls the vertical alignment of the
text in the progress bar. Valid values range from 0 (top) to 1
(bottom).</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="value" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The "value" property determines the percentage to which the
progress bar will be "filled in".</doc>
<type name="gint" c:type="gint"/>
</property>
</class>
<class name="CellRendererSpin" c:symbol-prefix="cell_renderer_spin" c:type="GtkCellRendererSpin" parent="CellRendererText" glib:type-name="GtkCellRendererSpin" glib:get-type="gtk_cell_renderer_spin_get_type">
<doc xml:space="preserve">Renders a spin button in a cell
`GtkCellRendererSpin` renders text in a cell like `GtkCellRendererText` from
which it is derived. But while `GtkCellRendererText` offers a simple entry to
edit the text, `GtkCellRendererSpin` offers a `GtkSpinButton` widget. Of course,
that means that the text has to be parseable as a floating point number.
The range of the spinbutton is taken from the adjustment property of the
cell renderer, which can be set explicitly or mapped to a column in the
tree model, like all properties of cell renders. `GtkCellRendererSpin`
also has properties for the `GtkCellRendererSpin:climb-rate` and the number
of `GtkCellRendererSpin:digits` to display. Other `GtkSpinButton` properties
can be set in a handler for the `GtkCellRenderer::editing-started` signal.
The `GtkCellRendererSpin` cell renderer was added in GTK 2.10.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_spin_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererSpin`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkCellRendererSpin`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="adjustment" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The adjustment that holds the value of the spinbutton.
This must be non-%NULL for the cell renderer to be editable.</doc>
<type name="Adjustment"/>
</property>
<property name="climb-rate" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The acceleration rate when you hold down a button.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="digits" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The number of decimal places to display.</doc>
<type name="guint" c:type="guint"/>
</property>
</class>
<class name="CellRendererSpinner" c:symbol-prefix="cell_renderer_spinner" c:type="GtkCellRendererSpinner" parent="CellRenderer" glib:type-name="GtkCellRendererSpinner" glib:get-type="gtk_cell_renderer_spinner_get_type">
<doc xml:space="preserve">Renders a spinning animation in a cell
`GtkCellRendererSpinner` renders a spinning animation in a cell, very
similar to `GtkSpinner`. It can often be used as an alternative
to a `GtkCellRendererProgress` for displaying indefinite activity,
instead of actual progress.
To start the animation in a cell, set the `GtkCellRendererSpinner:active`
property to %TRUE and increment the `GtkCellRendererSpinner:pulse` property
at regular intervals. The usual way to set the cell renderer properties
for each cell is to bind them to columns in your tree model using e.g.
gtk_tree_view_column_add_attribute().</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_spinner_new">
<doc xml:space="preserve">Returns a new cell renderer which will show a spinner to indicate
activity.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<property name="active" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pulse" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Pulse of the spinner. Increment this value to draw the next frame of the
spinner animation. Usually, you would update this value in a timeout.
By default, the `GtkSpinner` widget draws one full cycle of the animation,
consisting of 12 frames, in 750 milliseconds.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="size" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkIconSize` value that specifies the size of the rendered spinner.</doc>
<type name="IconSize"/>
</property>
</class>
<bitfield name="CellRendererState" glib:type-name="GtkCellRendererState" glib:get-type="gtk_cell_renderer_state_get_type" c:type="GtkCellRendererState">
<doc xml:space="preserve">Tells how a cell is to be rendered.</doc>
<member name="selected" value="1" c:identifier="GTK_CELL_RENDERER_SELECTED" glib:nick="selected" glib:name="GTK_CELL_RENDERER_SELECTED">
<doc xml:space="preserve">The cell is currently selected, and
probably has a selection colored background to render to.</doc>
</member>
<member name="prelit" value="2" c:identifier="GTK_CELL_RENDERER_PRELIT" glib:nick="prelit" glib:name="GTK_CELL_RENDERER_PRELIT">
<doc xml:space="preserve">The mouse is hovering over the cell.</doc>
</member>
<member name="insensitive" value="4" c:identifier="GTK_CELL_RENDERER_INSENSITIVE" glib:nick="insensitive" glib:name="GTK_CELL_RENDERER_INSENSITIVE">
<doc xml:space="preserve">The cell is drawn in an insensitive manner</doc>
</member>
<member name="sorted" value="8" c:identifier="GTK_CELL_RENDERER_SORTED" glib:nick="sorted" glib:name="GTK_CELL_RENDERER_SORTED">
<doc xml:space="preserve">The cell is in a sorted row</doc>
</member>
<member name="focused" value="16" c:identifier="GTK_CELL_RENDERER_FOCUSED" glib:nick="focused" glib:name="GTK_CELL_RENDERER_FOCUSED">
<doc xml:space="preserve">The cell is in the focus row.</doc>
</member>
<member name="expandable" value="32" c:identifier="GTK_CELL_RENDERER_EXPANDABLE" glib:nick="expandable" glib:name="GTK_CELL_RENDERER_EXPANDABLE">
<doc xml:space="preserve">The cell is in a row that can be expanded</doc>
</member>
<member name="expanded" value="64" c:identifier="GTK_CELL_RENDERER_EXPANDED" glib:nick="expanded" glib:name="GTK_CELL_RENDERER_EXPANDED">
<doc xml:space="preserve">The cell is in a row that is expanded</doc>
</member>
</bitfield>
<class name="CellRendererText" c:symbol-prefix="cell_renderer_text" c:type="GtkCellRendererText" parent="CellRenderer" glib:type-name="GtkCellRendererText" glib:get-type="gtk_cell_renderer_text_get_type" glib:type-struct="CellRendererTextClass">
<doc xml:space="preserve">Renders text in a cell
A `GtkCellRendererText` renders a given text in its cell, using the font, color and
style information provided by its properties. The text will be ellipsized if it is
too long and the `GtkCellRendererText:ellipsize` property allows it.
If the `GtkCellRenderer:mode` is %GTK_CELL_RENDERER_MODE_EDITABLE,
the `GtkCellRendererText` allows to edit its text using an entry.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_text_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererText`. Adjust how text is drawn using
object properties. Object properties can be
set globally (with g_object_set()). Also, with `GtkTreeViewColumn`,
you can bind a property to a value in a `GtkTreeModel`. For example,
you can bind the &#x201C;text&#x201D; property on the cell renderer to a string
value in the model, thus rendering a different string in each row
of the `GtkTreeView`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<virtual-method name="edited">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_renderer_text" transfer-ownership="none">
<type name="CellRendererText" c:type="GtkCellRendererText*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="new_text" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<method name="set_fixed_height_from_font" c:identifier="gtk_cell_renderer_text_set_fixed_height_from_font">
<doc xml:space="preserve">Sets the height of a renderer to explicitly be determined by the &#x201C;font&#x201D; and
&#x201C;y_pad&#x201D; property set on it. Further changes in these properties do not
affect the height, so they must be accompanied by a subsequent call to this
function. Using this function is inflexible, and should really only be used
if calculating the size of a cell is too slow (ie, a massive number of cells
displayed). If @number_of_rows is -1, then the fixed height is unset, and
the height is determined by the properties again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="renderer" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRendererText`</doc>
<type name="CellRendererText" c:type="GtkCellRendererText*"/>
</instance-parameter>
<parameter name="number_of_rows" transfer-ownership="none">
<doc xml:space="preserve">Number of rows of text each cell renderer is allocated, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="align-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="alignment" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Specifies how to align the lines of text with respect to each other.
Note that this property describes how to align the lines of text in
case there are several of them. The "xalign" property of `GtkCellRenderer`,
on the other hand, sets the horizontal alignment of the whole text.</doc>
<type name="Pango.Alignment"/>
</property>
<property name="attributes" writable="1" transfer-ownership="none">
<type name="Pango.AttrList"/>
</property>
<property name="background" readable="0" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="background-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Background color as a `GdkRGBA`</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="background-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="editable" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="editable-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="ellipsize" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Specifies the preferred place to ellipsize the string, if the cell renderer
does not have enough room to display the entire string. Setting it to
%PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property
for another way of making the text fit into a given width.</doc>
<type name="Pango.EllipsizeMode"/>
</property>
<property name="ellipsize-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="family" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="family-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="font" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="font-desc" writable="1" transfer-ownership="none">
<type name="Pango.FontDescription"/>
</property>
<property name="foreground" readable="0" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="foreground-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Foreground color as a `GdkRGBA`</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="foreground-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="language" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="language-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="markup" readable="0" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="max-width-chars" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The desired maximum width of the cell, in characters. If this property
is set to -1, the width will be calculated automatically.
For cell renderers that ellipsize or wrap text; this property
controls the maximum reported width of the cell. The
cell should not receive any greater allocation unless it is
set to expand in its `GtkCellLayout` and all of the cell's siblings
have received their natural width.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="placeholder-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text that will be displayed in the `GtkCellRenderer` if
`GtkCellRendererText:editable` is %TRUE and the cell is empty.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="rise" writable="1" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</property>
<property name="rise-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="scale" writable="1" transfer-ownership="none">
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="scale-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="single-paragraph-mode" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="size" writable="1" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</property>
<property name="size-points" writable="1" transfer-ownership="none">
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="size-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="stretch" writable="1" transfer-ownership="none">
<type name="Pango.Stretch"/>
</property>
<property name="stretch-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="strikethrough" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="strikethrough-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="style" writable="1" transfer-ownership="none">
<type name="Pango.Style"/>
</property>
<property name="style-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="text" writable="1" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="underline" writable="1" transfer-ownership="none">
<type name="Pango.Underline"/>
</property>
<property name="underline-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="variant" writable="1" transfer-ownership="none">
<type name="Pango.Variant"/>
</property>
<property name="variant-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="weight" writable="1" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</property>
<property name="weight-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="width-chars" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The desired width of the cell, in characters. If this property is set to
-1, the width will be calculated automatically, otherwise the cell will
request either 3 characters or the property value, whichever is greater.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="wrap-mode" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Specifies how to break the string into multiple lines, if the cell
renderer does not have enough room to display the entire string.
This property has no effect unless the wrap-width property is set.</doc>
<type name="Pango.WrapMode"/>
</property>
<property name="wrap-width" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Specifies the minimum width at which the text is wrapped. The wrap-mode property can
be used to influence at what character positions the line breaks can be placed.
Setting wrap-width to -1 turns wrapping off.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent">
<type name="CellRenderer" c:type="GtkCellRenderer"/>
</field>
<glib:signal name="edited" when="last">
<doc xml:space="preserve">This signal is emitted after @renderer has been edited.
It is the responsibility of the application to update the model
and store @new_text at the position indicated by @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the path identifying the edited cell</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="new_text" transfer-ownership="none">
<doc xml:space="preserve">the new text</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="CellRendererTextClass" c:type="GtkCellRendererTextClass" glib:is-gtype-struct-for="CellRendererText">
<field name="parent_class">
<type name="CellRendererClass" c:type="GtkCellRendererClass"/>
</field>
<field name="edited">
<callback name="edited">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="cell_renderer_text" transfer-ownership="none">
<type name="CellRendererText" c:type="GtkCellRendererText*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="new_text" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="CellRendererToggle" c:symbol-prefix="cell_renderer_toggle" c:type="GtkCellRendererToggle" parent="CellRenderer" glib:type-name="GtkCellRendererToggle" glib:get-type="gtk_cell_renderer_toggle_get_type">
<doc xml:space="preserve">Renders a toggle button in a cell
`GtkCellRendererToggle` renders a toggle button in a cell. The
button is drawn as a radio or a checkbutton, depending on the
`GtkCellRendererToggle:radio` property.
When activated, it emits the `GtkCellRendererToggle::toggled` signal.</doc>
<constructor name="new" c:identifier="gtk_cell_renderer_toggle_new">
<doc xml:space="preserve">Creates a new `GtkCellRendererToggle`. Adjust rendering
parameters using object properties. Object properties can be set
globally (with g_object_set()). Also, with `GtkTreeViewColumn`, you
can bind a property to a value in a `GtkTreeModel`. For example, you
can bind the &#x201C;active&#x201D; property on the cell renderer to a boolean value
in the model, thus causing the check button to reflect the state of
the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new cell renderer</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</return-value>
</constructor>
<method name="get_activatable" c:identifier="gtk_cell_renderer_toggle_get_activatable" glib:get-property="activatable">
<doc xml:space="preserve">Returns whether the cell renderer is activatable. See
gtk_cell_renderer_toggle_set_activatable().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer is activatable.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_active" c:identifier="gtk_cell_renderer_toggle_get_active" glib:get-property="active">
<doc xml:space="preserve">Returns whether the cell renderer is active. See
gtk_cell_renderer_toggle_set_active().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cell renderer is active.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_radio" c:identifier="gtk_cell_renderer_toggle_get_radio" glib:get-property="radio">
<doc xml:space="preserve">Returns whether we&#x2019;re rendering radio toggles rather than checkboxes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we&#x2019;re rendering radio toggles rather than checkboxes</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_activatable" c:identifier="gtk_cell_renderer_toggle_set_activatable" glib:set-property="activatable">
<doc xml:space="preserve">Makes the cell renderer activatable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`.</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the value to set.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_active" c:identifier="gtk_cell_renderer_toggle_set_active" glib:set-property="active">
<doc xml:space="preserve">Activates or deactivates a cell renderer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`.</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the value to set.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_radio" c:identifier="gtk_cell_renderer_toggle_set_radio" glib:set-property="radio">
<doc xml:space="preserve">If @radio is %TRUE, the cell renderer renders a radio toggle
(i.e. a toggle in a group of mutually-exclusive toggles).
If %FALSE, it renders a check toggle (a standalone boolean option).
This can be set globally for the cell renderer, or changed just
before rendering each cell in the model (for `GtkTreeView`, you set
up a per-row setting using `GtkTreeViewColumn` to associate model
columns with cell renderer properties).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRendererToggle`</doc>
<type name="CellRendererToggle" c:type="GtkCellRendererToggle*"/>
</instance-parameter>
<parameter name="radio" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the toggle look like a radio button</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="activatable" writable="1" transfer-ownership="none" setter="set_activatable" getter="get_activatable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="active" writable="1" transfer-ownership="none" setter="set_active" getter="get_active">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="inconsistent" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="radio" writable="1" transfer-ownership="none" setter="set_radio" getter="get_radio">
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="toggled" when="last">
<doc xml:space="preserve">The ::toggled signal is emitted when the cell is toggled.
It is the responsibility of the application to update the model
with the correct value to store at @path. Often this is simply the
opposite of the value currently stored at @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">string representation of `GtkTreePath` describing the
event location</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="CellView" c:symbol-prefix="cell_view" c:type="GtkCellView" parent="Widget" glib:type-name="GtkCellView" glib:get-type="gtk_cell_view_get_type">
<doc xml:space="preserve">A widget displaying a single row of a GtkTreeModel
A `GtkCellView` displays a single row of a `GtkTreeModel` using a `GtkCellArea`
and `GtkCellAreaContext`. A `GtkCellAreaContext` can be provided to the
`GtkCellView` at construction time in order to keep the cellview in context
of a group of cell views, this ensures that the renderers displayed will
be properly aligned with each other (like the aligned cells in the menus
of `GtkComboBox`).
`GtkCellView` is `GtkOrientable` in order to decide in which orientation
the underlying `GtkCellAreaContext` should be allocated. Taking the `GtkComboBox`
menu as an example, cellviews should be oriented horizontally if the menus are
listed top-to-bottom and thus all share the same width but may have separate
individual heights (left-to-right menus should be allocated vertically since
they all share the same height but may have variable widths).
# CSS nodes
GtkCellView has a single CSS node with name cellview.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_cell_view_new">
<doc xml:space="preserve">Creates a new `GtkCellView` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkCellView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_context" c:identifier="gtk_cell_view_new_with_context">
<doc xml:space="preserve">Creates a new `GtkCellView` widget with a specific `GtkCellArea`
to layout cells and a specific `GtkCellAreaContext`.
Specifying the same context for a handful of cells lets
the underlying area synchronize the geometry for those cells,
in this way alignments with cellviews for other rows are
possible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkCellView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea` to layout cells</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellAreaContext` in which to calculate cell geometry</doc>
<type name="CellAreaContext" c:type="GtkCellAreaContext*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_markup" c:identifier="gtk_cell_view_new_with_markup">
<doc xml:space="preserve">Creates a new `GtkCellView` widget, adds a `GtkCellRendererText`
to it, and makes it show @markup. The text can be marked up with
the [Pango text markup language](https://docs.gtk.org/Pango/pango_markup.html).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkCellView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="markup" transfer-ownership="none">
<doc xml:space="preserve">the text to display in the cell view</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_text" c:identifier="gtk_cell_view_new_with_text">
<doc xml:space="preserve">Creates a new `GtkCellView` widget, adds a `GtkCellRendererText`
to it, and makes it show @text.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkCellView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to display in the cell view</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_texture" c:identifier="gtk_cell_view_new_with_texture">
<doc xml:space="preserve">Creates a new `GtkCellView` widget, adds a `GtkCellRendererPixbuf`
to it, and makes it show @texture.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkCellView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="texture" transfer-ownership="none">
<doc xml:space="preserve">the image to display in the cell view</doc>
<type name="Gdk.Texture" c:type="GdkTexture*"/>
</parameter>
</parameters>
</constructor>
<method name="get_displayed_row" c:identifier="gtk_cell_view_get_displayed_row">
<doc xml:space="preserve">Returns a `GtkTreePath` referring to the currently
displayed row. If no row is currently displayed,
%NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the currently displayed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_draw_sensitive" c:identifier="gtk_cell_view_get_draw_sensitive" glib:get-property="draw-sensitive">
<doc xml:space="preserve">Gets whether @cell_view is configured to draw all of its
cells in a sensitive state.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @cell_view draws all of its
cells in a sensitive state</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fit_model" c:identifier="gtk_cell_view_get_fit_model" glib:get-property="fit-model">
<doc xml:space="preserve">Gets whether @cell_view is configured to request space
to fit the entire `GtkTreeModel`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @cell_view requests space to fit
the entire `GtkTreeModel`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_cell_view_get_model" glib:get-property="model">
<doc xml:space="preserve">Returns the model for @cell_view. If no model is used %NULL is
returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkTreeModel` used</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_displayed_row" c:identifier="gtk_cell_view_set_displayed_row">
<doc xml:space="preserve">Sets the row of the model that is currently displayed
by the `GtkCellView`. If the path is unset, then the
contents of the cellview &#x201C;stick&#x201D; at their last value;
this is not normally a desired result, but may be
a needed intermediate state if say, the model for
the `GtkCellView` becomes temporarily empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreePath` or %NULL to unset.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="set_draw_sensitive" c:identifier="gtk_cell_view_set_draw_sensitive" glib:set-property="draw-sensitive">
<doc xml:space="preserve">Sets whether @cell_view should draw all of its
cells in a sensitive state, this is used by `GtkComboBox` menus
to ensure that rows with insensitive cells that contain
children appear sensitive in the parent menu item.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
<parameter name="draw_sensitive" transfer-ownership="none">
<doc xml:space="preserve">whether to draw all cells in a sensitive state.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_fit_model" c:identifier="gtk_cell_view_set_fit_model" glib:set-property="fit-model">
<doc xml:space="preserve">Sets whether @cell_view should request space to fit the entire `GtkTreeModel`.
This is used by `GtkComboBox` to ensure that the cell view displayed on
the combo box&#x2019;s button always gets enough space and does not resize
when selection changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
<parameter name="fit_model" transfer-ownership="none">
<doc xml:space="preserve">whether @cell_view should request space for the whole model.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_cell_view_set_model" glib:set-property="model">
<doc xml:space="preserve">Sets the model for @cell_view. If @cell_view already has a model
set, it will remove it before setting the new model. If @model is
%NULL, then it will unset the old model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="cell_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellView`</doc>
<type name="CellView" c:type="GtkCellView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</method>
<property name="cell-area" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellArea` rendering cells
If no area is specified when creating the cell view with gtk_cell_view_new_with_context()
a horizontally oriented `GtkCellArea`Box will be used.
since 3.0</doc>
<type name="CellArea"/>
</property>
<property name="cell-area-context" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellAreaContext` used to compute the geometry of the cell view.
A group of cell views can be assigned the same context in order to
ensure the sizes and cell alignments match across all the views with
the same context.
`GtkComboBox` menus uses this to assign the same context to all cell views
in the menu items for a single menu (each submenu creates its own
context since the size of each submenu does not depend on parent
or sibling menus).
since 3.0</doc>
<type name="CellAreaContext"/>
</property>
<property name="draw-sensitive" writable="1" transfer-ownership="none" setter="set_draw_sensitive" getter="get_draw_sensitive">
<doc xml:space="preserve">Whether all cells should be draw as sensitive for this view regardless
of the actual cell properties (used to make menus with submenus appear
sensitive when the items in submenus might be insensitive).
since 3.0</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="fit-model" writable="1" transfer-ownership="none" setter="set_fit_model" getter="get_fit_model">
<doc xml:space="preserve">Whether the view should request enough space to always fit
the size of every row in the model (used by the combo box to
ensure the combo box size doesn't change when different items
are selected).
since 3.0</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<doc xml:space="preserve">The model for cell view
since 2.10</doc>
<type name="TreeModel"/>
</property>
</class>
<class name="CenterBox" c:symbol-prefix="center_box" c:type="GtkCenterBox" parent="Widget" glib:type-name="GtkCenterBox" glib:get-type="gtk_center_box_get_type" glib:type-struct="CenterBoxClass">
<doc xml:space="preserve">`GtkCenterBox` arranges three children in a row, keeping the middle child
centered as well as possible.
![An example GtkCenterBox](centerbox.png)
To add children to `GtkCenterBox`, use [method@Gtk.CenterBox.set_start_widget],
[method@Gtk.CenterBox.set_center_widget] and
[method@Gtk.CenterBox.set_end_widget].
The sizing and positioning of children can be influenced with the
align and expand properties of the children.
# GtkCenterBox as GtkBuildable
The `GtkCenterBox` implementation of the `GtkBuildable` interface
supports placing children in the 3 positions by specifying &#x201C;start&#x201D;, &#x201C;center&#x201D;
or &#x201C;end&#x201D; as the &#x201C;type&#x201D; attribute of a &lt;child&gt; element.
# CSS nodes
`GtkCenterBox` uses a single CSS node with the name &#x201C;box&#x201D;,
The first child of the `GtkCenterBox` will be allocated depending on the
text direction, i.e. in left-to-right layouts it will be allocated on the
left and in right-to-left layouts on the right.
In vertical orientation, the nodes of the children are arranged from top to
bottom.
# Accessibility
`GtkCenterBox` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_center_box_new">
<doc xml:space="preserve">Creates a new `GtkCenterBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkCenterBox`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_baseline_position" c:identifier="gtk_center_box_get_baseline_position" glib:get-property="baseline-position">
<attribute name="org.gtk.Method.get_property" value="baseline-position"/>
<doc xml:space="preserve">Gets the value set by gtk_center_box_set_baseline_position().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline position</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_center_widget" c:identifier="gtk_center_box_get_center_widget">
<doc xml:space="preserve">Gets the center widget, or %NULL if there is none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the center widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_end_widget" c:identifier="gtk_center_box_get_end_widget">
<doc xml:space="preserve">Gets the end widget, or %NULL if there is none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the end widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_start_widget" c:identifier="gtk_center_box_get_start_widget">
<doc xml:space="preserve">Gets the start widget, or %NULL if there is none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the start widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_baseline_position" c:identifier="gtk_center_box_set_baseline_position" glib:set-property="baseline-position">
<attribute name="org.gtk.Method.set_property" value="baseline-position"/>
<doc xml:space="preserve">Sets the baseline position of a center box.
This affects only horizontal boxes with at least one baseline
aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then
@position is used to allocate the baseline wrt. the extra space
available.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBaselinePosition`</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_center_widget" c:identifier="gtk_center_box_set_center_widget">
<doc xml:space="preserve">Sets the center widget.
To remove the existing center widget, pas %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new center widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_end_widget" c:identifier="gtk_center_box_set_end_widget">
<doc xml:space="preserve">Sets the end widget.
To remove the existing end widget, pass %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new end widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_start_widget" c:identifier="gtk_center_box_set_start_widget">
<doc xml:space="preserve">Sets the start widget.
To remove the existing start widget, pass %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterBox`</doc>
<type name="CenterBox" c:type="GtkCenterBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new start widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="baseline-position" writable="1" transfer-ownership="none" setter="set_baseline_position" getter="get_baseline_position">
<attribute name="org.gtk.Property.get" value="gtk_center_box_get_baseline_position"/>
<attribute name="org.gtk.Property.set" value="gtk_center_box_set_baseline_position"/>
<doc xml:space="preserve">The position of the baseline aligned widget if extra space is available.</doc>
<type name="BaselinePosition"/>
</property>
</class>
<record name="CenterBoxClass" c:type="GtkCenterBoxClass" disguised="1" glib:is-gtype-struct-for="CenterBox"/>
<class name="CenterLayout" c:symbol-prefix="center_layout" c:type="GtkCenterLayout" parent="LayoutManager" glib:type-name="GtkCenterLayout" glib:get-type="gtk_center_layout_get_type" glib:type-struct="CenterLayoutClass">
<doc xml:space="preserve">`GtkCenterLayout` is a layout manager that manages up to three children.
The start widget is allocated at the start of the layout (left in
left-to-right locales and right in right-to-left ones), and the end
widget at the end.
The center widget is centered regarding the full width of the layout's.</doc>
<constructor name="new" c:identifier="gtk_center_layout_new">
<doc xml:space="preserve">Creates a new `GtkCenterLayout`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkCenterLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
<method name="get_baseline_position" c:identifier="gtk_center_layout_get_baseline_position">
<doc xml:space="preserve">Returns the baseline position of the layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current baseline position of @self.</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_center_widget" c:identifier="gtk_center_layout_get_center_widget">
<doc xml:space="preserve">Returns the center widget of the layout.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current center widget of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_end_widget" c:identifier="gtk_center_layout_get_end_widget">
<doc xml:space="preserve">Returns the end widget of the layout.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current end widget of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_orientation" c:identifier="gtk_center_layout_get_orientation">
<doc xml:space="preserve">Gets the current orienration of the layout manager.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current orientation of @self</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_start_widget" c:identifier="gtk_center_layout_get_start_widget">
<doc xml:space="preserve">Returns the start widget fo the layout.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current start widget of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_baseline_position" c:identifier="gtk_center_layout_set_baseline_position">
<doc xml:space="preserve">Sets the new baseline position of @self</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
<parameter name="baseline_position" transfer-ownership="none">
<doc xml:space="preserve">the new baseline position</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_center_widget" c:identifier="gtk_center_layout_set_center_widget">
<doc xml:space="preserve">Sets the new center widget of @self.
To remove the existing center widget, pass %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new center widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_end_widget" c:identifier="gtk_center_layout_set_end_widget">
<doc xml:space="preserve">Sets the new end widget of @self.
To remove the existing center widget, pass %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new end widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_orientation" c:identifier="gtk_center_layout_set_orientation">
<doc xml:space="preserve">Sets the orientation of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the new orientation</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<method name="set_start_widget" c:identifier="gtk_center_layout_set_start_widget">
<doc xml:space="preserve">Sets the new start widget of @self.
To remove the existing start widget, pass %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCenterLayout`</doc>
<type name="CenterLayout" c:type="GtkCenterLayout*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new start widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
</class>
<record name="CenterLayoutClass" c:type="GtkCenterLayoutClass" glib:is-gtype-struct-for="CenterLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<class name="CheckButton" c:symbol-prefix="check_button" c:type="GtkCheckButton" parent="Widget" glib:type-name="GtkCheckButton" glib:get-type="gtk_check_button_get_type" glib:type-struct="CheckButtonClass">
<doc xml:space="preserve">A `GtkCheckButton` places a label next to an indicator.
![Example GtkCheckButtons](check-button.png)
A `GtkCheckButton` is created by calling either [ctor@Gtk.CheckButton.new]
or [ctor@Gtk.CheckButton.new_with_label].
The state of a `GtkCheckButton` can be set specifically using
[method@Gtk.CheckButton.set_active], and retrieved using
[method@Gtk.CheckButton.get_active].
# Inconsistent state
In addition to "on" and "off", check buttons can be an
"in between" state that is neither on nor off. This can be used
e.g. when the user has selected a range of elements (such as some
text or spreadsheet cells) that are affected by a check button,
and the current values in that range are inconsistent.
To set a `GtkCheckButton` to inconsistent state, use
[method@Gtk.CheckButton.set_inconsistent].
# Grouping
Check buttons can be grouped together, to form mutually exclusive
groups - only one of the buttons can be toggled at a time, and toggling
another one will switch the currently toggled one off.
Grouped check buttons use a different indicator, and are commonly referred
to as *radio buttons*.
![Example GtkCheckButtons](radio-button.png)
To add a `GtkCheckButton` to a group, use [method@Gtk.CheckButton.set_group].
# CSS nodes
```
checkbutton[.text-button]
&#x251C;&#x2500;&#x2500; check
&#x2570;&#x2500;&#x2500; [label]
```
A `GtkCheckButton` has a main node with name checkbutton. If the
[property@Gtk.CheckButton:label] property is set, it contains a label
child. The indicator node is named check when no group is set, and
radio if the checkbutton is grouped together with other checkbuttons.
# Accessibility
`GtkCheckButton` uses the %GTK_ACCESSIBLE_ROLE_CHECKBOX role.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_check_button_new">
<doc xml:space="preserve">Creates a new `GtkCheckButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkCheckButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_label" c:identifier="gtk_check_button_new_with_label">
<doc xml:space="preserve">Creates a new `GtkCheckButton` with the given text.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkCheckButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text for the check button.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_mnemonic" c:identifier="gtk_check_button_new_with_mnemonic">
<doc xml:space="preserve">Creates a new `GtkCheckButton` with the given text and a mnemonic.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkCheckButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The text of the button, with an underscore
in front of the mnemonic character</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="check_button" transfer-ownership="none">
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="toggled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="check_button" transfer-ownership="none">
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_active" c:identifier="gtk_check_button_get_active" glib:get-property="active">
<attribute name="org.gtk.Method.get_property" value="active"/>
<doc xml:space="preserve">Returns whether the check button is active.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the check button is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_inconsistent" c:identifier="gtk_check_button_get_inconsistent" glib:get-property="inconsistent">
<attribute name="org.gtk.Method.get_property" value="inconsistent"/>
<doc xml:space="preserve">Returns whether the check button is in an inconsistent state.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @check_button is currently in an inconsistent state</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="check_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_check_button_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Returns the label of the check button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The label @self shows next
to the indicator. If no label is shown, %NULL will be returned.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_check_button_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">Returns whether underlines in the label indicate mnemonics.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The value of the [property@Gtk.CheckButton:use-underline] property.
See [method@Gtk.CheckButton.set_use_underline] for details on how to set
a new value.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_active" c:identifier="gtk_check_button_set_active" glib:set-property="active">
<attribute name="org.gtk.Method.set_property" value="active"/>
<doc xml:space="preserve">Changes the check buttons active state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_group" c:identifier="gtk_check_button_set_group" glib:set-property="group">
<attribute name="org.gtk.Method.set_property" value="group"/>
<doc xml:space="preserve">Adds @self to the group of @group.
In a group of multiple check buttons, only one button can be active
at a time. The behavior of a checkbutton in a group is also commonly
known as a *radio button*.
Setting the group of a check button also changes the css name of the
indicator widget's CSS node to 'radio'.
Setting up groups in a cycle leads to undefined behavior.
Note that the same effect can be achieved via the [iface@Gtk.Actionable]
API, by using the same action with parameter type and state type 's'
for all buttons in the group, and giving each button its own target
value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
<parameter name="group" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">another `GtkCheckButton` to
form a group with</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</parameter>
</parameters>
</method>
<method name="set_inconsistent" c:identifier="gtk_check_button_set_inconsistent" glib:set-property="inconsistent">
<attribute name="org.gtk.Method.set_property" value="inconsistent"/>
<doc xml:space="preserve">Sets the `GtkCheckButton` to inconsistent state.
You shoud turn off the inconsistent state again if the user checks
the check button. This has to be done manually.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="check_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
<parameter name="inconsistent" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if state is inconsistent</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_check_button_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Sets the text of @self.
If [property@Gtk.CheckButton:use-underline] is %TRUE, an underscore
in @label is interpreted as mnemonic indicator, see
[method@Gtk.CheckButton.set_use_underline] for details on this behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The text shown next to the indicator, or %NULL
to show no text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_check_button_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">Sets whether underlines in the label indicate mnemonics.
If @setting is %TRUE, an underscore character in @self's label
indicates a mnemonic accelerator key. This behavior is similar
to [property@Gtk.Label:use-underline].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCheckButton`</doc>
<type name="CheckButton" c:type="GtkCheckButton*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="active" writable="1" transfer-ownership="none" setter="set_active" getter="get_active">
<attribute name="org.gtk.Property.get" value="gtk_check_button_get_active"/>
<attribute name="org.gtk.Property.set" value="gtk_check_button_set_active"/>
<doc xml:space="preserve">If the check button is active.
Setting `active` to %TRUE will add the `:checked:` state to both
the check button and the indicator CSS node.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="group" readable="0" writable="1" transfer-ownership="none" setter="set_group">
<attribute name="org.gtk.Property.set" value="gtk_check_button_set_group"/>
<doc xml:space="preserve">The check button whose group this widget belongs to.</doc>
<type name="CheckButton"/>
</property>
<property name="inconsistent" writable="1" transfer-ownership="none" setter="set_inconsistent" getter="get_inconsistent">
<attribute name="org.gtk.Property.get" value="gtk_check_button_get_inconsistent"/>
<attribute name="org.gtk.Property.set" value="gtk_check_button_set_inconsistent"/>
<doc xml:space="preserve">If the check button is in an &#x201C;in between&#x201D; state.
The inconsistent state only affects visual appearance,
not the semantics of the button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="label" writable="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_check_button_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_check_button_set_label"/>
<doc xml:space="preserve">Text of the label inside the check button, if it contains a label widget.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="use-underline" writable="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_check_button_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_check_button_set_use_underline"/>
<doc xml:space="preserve">If set, an underline in the text indicates that the following
character is to be used as mnemonic.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="first" action="1" version="4.2">
<doc xml:space="preserve">Emitted to when the check button is activated.
The `::activate` signal on `GtkCheckButton` is an action signal and
emitting it causes the button to animate press then release.
Applications should never connect to this signal, but use the
[signal@Gtk.CheckButton::toggled] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggled" when="first">
<doc xml:space="preserve">Emitted when the buttons's [property@Gtk.CheckButton:active]
property changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="CheckButtonClass" c:type="GtkCheckButtonClass" glib:is-gtype-struct-for="CheckButton">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="toggled">
<callback name="toggled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="check_button" transfer-ownership="none">
<type name="CheckButton" c:type="GtkCheckButton*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="check_button" transfer-ownership="none">
<type name="CheckButton" c:type="GtkCheckButton*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="7">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="ClosureExpression" c:symbol-prefix="closure_expression" c:type="GtkClosureExpression" parent="Expression" glib:type-name="GtkClosureExpression" glib:get-type="gtk_closure_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">An expression using a custom `GClosure` to compute the value from
its parameters.</doc>
<constructor name="new" c:identifier="gtk_closure_expression_new">
<doc xml:space="preserve">Creates a `GtkExpression` that calls `closure` when it is evaluated.
`closure` is called with the `this` object and the results of evaluating
the `params` expressions.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="ClosureExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value_type" transfer-ownership="none">
<doc xml:space="preserve">the type of the value that this expression evaluates to</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="closure" transfer-ownership="none">
<doc xml:space="preserve">closure to call when evaluating this expression. If closure is floating, it is adopted</doc>
<type name="GObject.Closure" c:type="GClosure*"/>
</parameter>
<parameter name="n_params" transfer-ownership="none">
<doc xml:space="preserve">the number of params needed for evaluating `closure`</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="params" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">expressions for each parameter</doc>
<array length="2" zero-terminated="0" c:type="GtkExpression**">
<type name="Expression" c:type="GtkExpression*"/>
</array>
</parameter>
</parameters>
</constructor>
</class>
<class name="ColorButton" c:symbol-prefix="color_button" c:type="GtkColorButton" parent="Widget" glib:type-name="GtkColorButton" glib:get-type="gtk_color_button_get_type">
<doc xml:space="preserve">The `GtkColorButton` allows to open a color chooser dialog to change
the color.
![An example GtkColorButton](color-button.png)
It is suitable widget for selecting a color in a preference dialog.
# CSS nodes
```
colorbutton
&#x2570;&#x2500;&#x2500; button.color
&#x2570;&#x2500;&#x2500; [content]
```
`GtkColorButton` has a single CSS node with name colorbutton which
contains a button node. To differentiate it from a plain `GtkButton`,
it gets the .color style class.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ColorChooser"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_color_button_new">
<doc xml:space="preserve">Creates a new color button.
This returns a widget in the form of a small button containing
a swatch representing the current selected color. When the button
is clicked, a color chooser dialog will open, allowing the user
to select a color. The swatch will be updated to reflect the new
color when the user finishes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new color button</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_rgba" c:identifier="gtk_color_button_new_with_rgba">
<doc xml:space="preserve">Creates a new color button showing the given color.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new color button</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="rgba" transfer-ownership="none">
<doc xml:space="preserve">A `GdkRGBA` to set the current color with</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</constructor>
<method name="get_modal" c:identifier="gtk_color_button_get_modal" glib:get-property="modal">
<attribute name="org.gtk.Method.get_property" value="modal"/>
<doc xml:space="preserve">Gets whether the dialog is modal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorButton`</doc>
<type name="ColorButton" c:type="GtkColorButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_color_button_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Gets the title of the color chooser dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">An internal string, do not free the return value</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorButton`</doc>
<type name="ColorButton" c:type="GtkColorButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_modal" c:identifier="gtk_color_button_set_modal" glib:set-property="modal">
<attribute name="org.gtk.Method.set_property" value="modal"/>
<doc xml:space="preserve">Sets whether the dialog should be modal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorButton`</doc>
<type name="ColorButton" c:type="GtkColorButton*"/>
</instance-parameter>
<parameter name="modal" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the dialog modal</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_color_button_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the title for the color chooser dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorButton`</doc>
<type name="ColorButton" c:type="GtkColorButton*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">String containing new window title</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="modal" writable="1" transfer-ownership="none" setter="set_modal" getter="get_modal">
<attribute name="org.gtk.Property.get" value="gtk_color_button_get_modal"/>
<attribute name="org.gtk.Property.set" value="gtk_color_button_set_modal"/>
<doc xml:space="preserve">Whether the color chooser dialog should be modal.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-editor" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the color chooser should open in editor mode.
This property should be used in cases where the palette
in the editor would be redundant, such as when the color
button is already part of a palette.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_color_button_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_color_button_set_title"/>
<doc xml:space="preserve">The title of the color chooser dialog</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="activate" when="first" action="1" version="4.4">
<doc xml:space="preserve">Emitted to when the color button is activated.
The `::activate` signal on `GtkMenuButton` is an action signal and
emitting it causes the button to pop up its dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="color-set" when="first">
<doc xml:space="preserve">Emitted when the user selects a color.
When handling this signal, use [method@Gtk.ColorChooser.get_rgba]
to find out which color was just selected.
Note that this signal is only emitted when the user changes the color.
If you need to react to programmatic color changes as well, use
the notify::rgba signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<interface name="ColorChooser" c:symbol-prefix="color_chooser" c:type="GtkColorChooser" glib:type-name="GtkColorChooser" glib:get-type="gtk_color_chooser_get_type" glib:type-struct="ColorChooserInterface">
<doc xml:space="preserve">`GtkColorChooser` is an interface that is implemented by widgets
for choosing colors.
Depending on the situation, colors may be allowed to have alpha (translucency).
In GTK, the main widgets that implement this interface are
[class@Gtk.ColorChooserWidget], [class@Gtk.ColorChooserDialog] and
[class@Gtk.ColorButton].</doc>
<virtual-method name="add_palette" invoker="add_palette">
<doc xml:space="preserve">Adds a palette to the color chooser.
If @orientation is horizontal, the colors are grouped in rows,
with @colors_per_line colors in each row. If @horizontal is %FALSE,
the colors are grouped in columns instead.
The default color palette of [class@Gtk.ColorChooserWidget] has
45 colors, organized in columns of 5 colors (this includes some
grays).
The layout of the color chooser widget works best when the
palettes have 9-10 columns.
Calling this function for the first time has the side effect
of removing the default color palette from the color chooser.
If @colors is %NULL, removes all previously added palettes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORIENTATION_HORIZONTAL if the palette should
be displayed in rows, %GTK_ORIENTATION_VERTICAL for columns</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="colors_per_line" transfer-ownership="none">
<doc xml:space="preserve">the number of colors to show in each row/column</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">the total number of elements in @colors</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="colors" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the colors of the palette</doc>
<array length="2" zero-terminated="0" c:type="GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="color_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="color" transfer-ownership="none">
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_rgba" invoker="get_rgba">
<attribute name="org.gtk.Method.get_property" value="rgba"/>
<doc xml:space="preserve">Gets the currently-selected color.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GdkRGBA` to fill in with the current color</doc>
<type name="Gdk.RGBA" c:type="GdkRGBA*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_rgba" invoker="set_rgba">
<attribute name="org.gtk.Method.set_property" value="rgba"/>
<doc xml:space="preserve">Sets the color.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">the new color</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</virtual-method>
<method name="add_palette" c:identifier="gtk_color_chooser_add_palette">
<doc xml:space="preserve">Adds a palette to the color chooser.
If @orientation is horizontal, the colors are grouped in rows,
with @colors_per_line colors in each row. If @horizontal is %FALSE,
the colors are grouped in columns instead.
The default color palette of [class@Gtk.ColorChooserWidget] has
45 colors, organized in columns of 5 colors (this includes some
grays).
The layout of the color chooser widget works best when the
palettes have 9-10 columns.
Calling this function for the first time has the side effect
of removing the default color palette from the color chooser.
If @colors is %NULL, removes all previously added palettes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORIENTATION_HORIZONTAL if the palette should
be displayed in rows, %GTK_ORIENTATION_VERTICAL for columns</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="colors_per_line" transfer-ownership="none">
<doc xml:space="preserve">the number of colors to show in each row/column</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">the total number of elements in @colors</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="colors" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the colors of the palette</doc>
<array length="2" zero-terminated="0" c:type="GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
</parameters>
</method>
<method name="get_rgba" c:identifier="gtk_color_chooser_get_rgba" glib:get-property="rgba">
<attribute name="org.gtk.Method.get_property" value="rgba"/>
<doc xml:space="preserve">Gets the currently-selected color.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GdkRGBA` to fill in with the current color</doc>
<type name="Gdk.RGBA" c:type="GdkRGBA*"/>
</parameter>
</parameters>
</method>
<method name="get_use_alpha" c:identifier="gtk_color_chooser_get_use_alpha" glib:get-property="use-alpha">
<attribute name="org.gtk.Method.get_property" value="use-alpha"/>
<doc xml:space="preserve">Returns whether the color chooser shows the alpha channel.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the color chooser uses the alpha channel,
%FALSE if not</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_rgba" c:identifier="gtk_color_chooser_set_rgba" glib:set-property="rgba">
<attribute name="org.gtk.Method.set_property" value="rgba"/>
<doc xml:space="preserve">Sets the color.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">the new color</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</method>
<method name="set_use_alpha" c:identifier="gtk_color_chooser_set_use_alpha" glib:set-property="use-alpha">
<attribute name="org.gtk.Method.set_property" value="use-alpha"/>
<doc xml:space="preserve">Sets whether or not the color chooser should use the alpha channel.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</instance-parameter>
<parameter name="use_alpha" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if color chooser should use alpha channel, %FALSE if not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="rgba" writable="1" transfer-ownership="none" setter="set_rgba" getter="get_rgba">
<attribute name="org.gtk.Property.get" value="gtk_color_chooser_get_rgba"/>
<attribute name="org.gtk.Property.set" value="gtk_color_chooser_set_rgba"/>
<doc xml:space="preserve">The currently selected color, as a `GdkRGBA` struct.
The property can be set to change the current selection
programmatically.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="use-alpha" writable="1" transfer-ownership="none" setter="set_use_alpha" getter="get_use_alpha">
<attribute name="org.gtk.Property.get" value="gtk_color_chooser_get_use_alpha"/>
<attribute name="org.gtk.Property.set" value="gtk_color_chooser_set_use_alpha"/>
<doc xml:space="preserve">Whether colors may have alpha (translucency).
When ::use-alpha is %FALSE, the `GdkRGBA` struct obtained
via the [property@Gtk.ColorChooser:rgba] property will be
forced to have alpha == 1.
Implementations are expected to show alpha by rendering the color
over a non-uniform background (like a checkerboard pattern).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="color-activated" when="first">
<doc xml:space="preserve">Emitted when a color is activated from the color chooser.
This usually happens when the user clicks a color swatch,
or a color is selected and the user presses one of the keys
Space, Shift+Space, Return or Enter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">the color</doc>
<type name="Gdk.RGBA"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<class name="ColorChooserDialog" c:symbol-prefix="color_chooser_dialog" c:type="GtkColorChooserDialog" parent="Dialog" glib:type-name="GtkColorChooserDialog" glib:get-type="gtk_color_chooser_dialog_get_type">
<doc xml:space="preserve">A dialog for choosing a color.
![An example GtkColorChooserDialog](colorchooser.png)
`GtkColorChooserDialog` implements the [iface@Gtk.ColorChooser] interface
and does not provide much API of its own.
To create a `GtkColorChooserDialog`, use [ctor@Gtk.ColorChooserDialog.new].
To change the initially selected color, use
[method@Gtk.ColorChooser.set_rgba]. To get the selected color use
[method@Gtk.ColorChooser.get_rgba].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ColorChooser"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_color_chooser_dialog_new">
<doc xml:space="preserve">Creates a new `GtkColorChooserDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkColorChooserDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</constructor>
<property name="show-editor" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="ColorChooserInterface" c:type="GtkColorChooserInterface" glib:is-gtype-struct-for="ColorChooser">
<field name="base_interface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="get_rgba">
<callback name="get_rgba">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</parameter>
<parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GdkRGBA` to fill in with the current color</doc>
<type name="Gdk.RGBA" c:type="GdkRGBA*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_rgba">
<callback name="set_rgba">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">the new color</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="add_palette">
<callback name="add_palette">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColorChooser`</doc>
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORIENTATION_HORIZONTAL if the palette should
be displayed in rows, %GTK_ORIENTATION_VERTICAL for columns</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="colors_per_line" transfer-ownership="none">
<doc xml:space="preserve">the number of colors to show in each row/column</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">the total number of elements in @colors</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="colors" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the colors of the palette</doc>
<array length="3" zero-terminated="0" c:type="GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
</parameters>
</callback>
</field>
<field name="color_activated">
<callback name="color_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="chooser" transfer-ownership="none">
<type name="ColorChooser" c:type="GtkColorChooser*"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="12">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="ColorChooserWidget" c:symbol-prefix="color_chooser_widget" c:type="GtkColorChooserWidget" parent="Widget" glib:type-name="GtkColorChooserWidget" glib:get-type="gtk_color_chooser_widget_get_type">
<doc xml:space="preserve">The `GtkColorChooserWidget` widget lets the user select a color.
By default, the chooser presents a predefined palette of colors,
plus a small number of settable custom colors. It is also possible
to select a different color with the single-color editor.
To enter the single-color editing mode, use the context menu of any
color of the palette, or use the '+' button to add a new custom color.
The chooser automatically remembers the last selection, as well
as custom colors.
To create a `GtkColorChooserWidget`, use [ctor@Gtk.ColorChooserWidget.new].
To change the initially selected color, use
[method@Gtk.ColorChooser.set_rgba]. To get the selected color use
[method@Gtk.ColorChooser.get_rgba].
The `GtkColorChooserWidget` is used in the [class@Gtk.ColorChooserDialog]
to provide a dialog for selecting colors.
# CSS names
`GtkColorChooserWidget` has a single CSS node with name colorchooser.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ColorChooser"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_color_chooser_widget_new">
<doc xml:space="preserve">Creates a new `GtkColorChooserWidget`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkColorChooserWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<property name="show-editor" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE when the color chooser is showing the single-color editor.
It can be set to switch the color chooser into single-color editing mode.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="ColumnView" c:symbol-prefix="column_view" c:type="GtkColumnView" parent="Widget" glib:type-name="GtkColumnView" glib:get-type="gtk_column_view_get_type" glib:type-struct="ColumnViewClass">
<doc xml:space="preserve">`GtkColumnView` presents a large dynamic list of items using multiple columns
with headers.
`GtkColumnView` uses the factories of its columns to generate a cell widget for
each column, for each visible item and displays them together as the row for
this item.
The [property@Gtk.ColumnView:show-row-separators] and
[property@Gtk.ColumnView:show-column-separators] properties offer a simple way
to display separators between the rows or columns.
`GtkColumnView` allows the user to select items according to the selection
characteristics of the model. For models that allow multiple selected items,
it is possible to turn on *rubberband selection*, using
[property@Gtk.ColumnView:enable-rubberband].
The column view supports sorting that can be customized by the user by
clicking on column headers. To set this up, the `GtkSorter` returned by
[method@Gtk.ColumnView.get_sorter] must be attached to a sort model for the
data that the view is showing, and the columns must have sorters attached to
them by calling [method@Gtk.ColumnViewColumn.set_sorter]. The initial sort
order can be set with [method@Gtk.ColumnView.sort_by_column].
The column view also supports interactive resizing and reordering of
columns, via Drag-and-Drop of the column headers. This can be enabled or
disabled with the [property@Gtk.ColumnView:reorderable] and
[property@Gtk.ColumnViewColumn:resizable] properties.
To learn more about the list widget framework, see the
[overview](section-list-widget.html).
# CSS nodes
```
columnview[.column-separators][.rich-list][.navigation-sidebar][.data-table]
&#x251C;&#x2500;&#x2500; header
&#x2502; &#x251C;&#x2500;&#x2500; &lt;column header&gt;
&#x250A; &#x250A;
&#x2502; &#x2570;&#x2500;&#x2500; &lt;column header&gt;
&#x2502;
&#x251C;&#x2500;&#x2500; listview
&#x2502;
&#x250A;
&#x2570;&#x2500;&#x2500; [rubberband]
```
`GtkColumnView` uses a single CSS node named columnview. It may carry the
.column-separators style class, when [property@Gtk.ColumnView:show-column-separators]
property is set. Header widgets appear below a node with name header.
The rows are contained in a `GtkListView` widget, so there is a listview
node with the same structure as for a standalone `GtkListView` widget.
If [property@Gtk.ColumnView:show-row-separators] is set, it will be passed
on to the list view, causing its CSS node to carry the .separators style class.
For rubberband selection, a node with name rubberband is used.
The main columnview node may also carry style classes to select
the style of [list presentation](section-list-widget.html#list-styles):
.rich-list, .navigation-sidebar or .data-table.
# Accessibility
`GtkColumnView` uses the %GTK_ACCESSIBLE_ROLE_TREE_GRID role, header title
widgets are using the %GTK_ACCESSIBLE_ROLE_COLUMN_HEADER role. The row widgets
are using the %GTK_ACCESSIBLE_ROLE_ROW role, and individual cells are using
the %GTK_ACCESSIBLE_ROLE_GRID_CELL role</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_column_view_new">
<doc xml:space="preserve">Creates a new `GtkColumnView`.
You most likely want to call [method@Gtk.ColumnView.append_column]
to add columns next.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkColumnView`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the list model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</constructor>
<method name="append_column" c:identifier="gtk_column_view_append_column">
<doc xml:space="preserve">Appends the @column to the end of the columns in @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn` that hasn't been added to a
`GtkColumnView` yet</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="get_columns" c:identifier="gtk_column_view_get_columns" glib:get-property="columns">
<attribute name="org.gtk.Method.get_property" value="columns"/>
<doc xml:space="preserve">Gets the list of columns in this column view.
This list is constant over the lifetime of @self and can be used to
monitor changes to the columns of @self by connecting to the
::items-changed signal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The list managing the columns</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_enable_rubberband" c:identifier="gtk_column_view_get_enable_rubberband" glib:get-property="enable-rubberband">
<attribute name="org.gtk.Method.get_property" value="enable-rubberband"/>
<doc xml:space="preserve">Returns whether rows can be selected by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rubberband selection is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_column_view_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that's currently used to read the items displayed.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model in use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reorderable" c:identifier="gtk_column_view_get_reorderable" glib:get-property="reorderable">
<attribute name="org.gtk.Method.get_property" value="reorderable"/>
<doc xml:space="preserve">Returns whether columns are reorderable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if columns are reorderable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_column_separators" c:identifier="gtk_column_view_get_show_column_separators" glib:get-property="show-column-separators">
<attribute name="org.gtk.Method.get_property" value="show-column-separators"/>
<doc xml:space="preserve">Returns whether the list should show separators
between columns.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the list shows column separators</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_row_separators" c:identifier="gtk_column_view_get_show_row_separators" glib:get-property="show-row-separators">
<attribute name="org.gtk.Method.get_property" value="show-row-separators"/>
<doc xml:space="preserve">Returns whether the list should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the list shows separators</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_single_click_activate" c:identifier="gtk_column_view_get_single_click_activate" glib:get-property="single-click-activate">
<attribute name="org.gtk.Method.get_property" value="single-click-activate"/>
<doc xml:space="preserve">Returns whether rows will be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rows are activated on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sorter" c:identifier="gtk_column_view_get_sorter" glib:get-property="sorter">
<attribute name="org.gtk.Method.get_property" value="sorter"/>
<doc xml:space="preserve">Returns a special sorter that reflects the users sorting
choices in the column view.
To allow users to customizable sorting by clicking on column
headers, this sorter needs to be set on the sort model underneath
the model that is displayed by the view.
See [method@Gtk.ColumnViewColumn.set_sorter] for setting up
per-column sorting.
Here is an example:
```c
gtk_column_view_column_set_sorter (column, sorter);
gtk_column_view_append_column (view, column);
sorter = g_object_ref (gtk_column_view_get_sorter (view)));
model = gtk_sort_list_model_new (store, sorter);
selection = gtk_no_selection_new (model);
gtk_column_view_set_model (view, selection);
```</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkSorter` of @self</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_column" c:identifier="gtk_column_view_insert_column">
<doc xml:space="preserve">Inserts a column at the given position in the columns of @self.
If @column is already a column of @self, it will be repositioned.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to insert @column at</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the `GtkColumnViewColumn` to insert</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="remove_column" c:identifier="gtk_column_view_remove_column">
<doc xml:space="preserve">Removes the @column from the list of columns of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn` that's part of @self</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="set_enable_rubberband" c:identifier="gtk_column_view_set_enable_rubberband" glib:set-property="enable-rubberband">
<attribute name="org.gtk.Method.set_property" value="enable-rubberband"/>
<doc xml:space="preserve">Sets whether selections can be changed by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="enable_rubberband" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable rubberband selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_column_view_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to use.
This must be a [iface@Gtk.SelectionModel].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</method>
<method name="set_reorderable" c:identifier="gtk_column_view_set_reorderable" glib:set-property="reorderable">
<attribute name="org.gtk.Method.set_property" value="reorderable"/>
<doc xml:space="preserve">Sets whether columns should be reorderable by dragging.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="reorderable" transfer-ownership="none">
<doc xml:space="preserve">whether columns should be reorderable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_column_separators" c:identifier="gtk_column_view_set_show_column_separators" glib:set-property="show-column-separators">
<attribute name="org.gtk.Method.set_property" value="show-column-separators"/>
<doc xml:space="preserve">Sets whether the list should show separators
between columns.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="show_column_separators" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show column separators</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_row_separators" c:identifier="gtk_column_view_set_show_row_separators" glib:set-property="show-row-separators">
<attribute name="org.gtk.Method.set_property" value="show-row-separators"/>
<doc xml:space="preserve">Sets whether the list should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="show_row_separators" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show row separators</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_single_click_activate" c:identifier="gtk_column_view_set_single_click_activate" glib:set-property="single-click-activate">
<attribute name="org.gtk.Method.set_property" value="single-click-activate"/>
<doc xml:space="preserve">Sets whether rows should be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="single_click_activate" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to activate items on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="sort_by_column" c:identifier="gtk_column_view_sort_by_column">
<doc xml:space="preserve">Sets the sorting of the view.
This function should be used to set up the initial sorting.
At runtime, users can change the sorting of a column view
by clicking on the list headers.
This call only has an effect if the sorter returned by
[method@Gtk.ColumnView.get_sorter] is set on a sort model,
and [method@Gtk.ColumnViewColumn.set_sorter] has been called
on @column to associate a sorter with the column.
If @column is %NULL, the view will be unsorted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnView`</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkColumnViewColumn` to sort by</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the direction to sort in</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</method>
<property name="columns" transfer-ownership="none" getter="get_columns">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_columns"/>
<doc xml:space="preserve">The list of columns.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="enable-rubberband" writable="1" transfer-ownership="none" setter="set_enable_rubberband" getter="get_enable_rubberband">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_enable_rubberband"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_enable_rubberband"/>
<doc xml:space="preserve">Allow rubberband selection.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_model"/>
<doc xml:space="preserve">Model for the items displayed.</doc>
<type name="SelectionModel"/>
</property>
<property name="reorderable" writable="1" transfer-ownership="none" setter="set_reorderable" getter="get_reorderable">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_reorderable"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_reorderable"/>
<doc xml:space="preserve">Whether columns are reorderable.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-column-separators" writable="1" transfer-ownership="none" setter="set_show_column_separators" getter="get_show_column_separators">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_show_column_separators"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_show_column_separators"/>
<doc xml:space="preserve">Show separators between columns.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-row-separators" writable="1" transfer-ownership="none" setter="set_show_row_separators" getter="get_show_row_separators">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_show_row_separators"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_show_row_separators"/>
<doc xml:space="preserve">Show separators between rows.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="single-click-activate" writable="1" transfer-ownership="none" setter="set_single_click_activate" getter="get_single_click_activate">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_single_click_activate"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_set_single_click_activate"/>
<doc xml:space="preserve">Activate rows on single click and select them on hover.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sorter" transfer-ownership="none" getter="get_sorter">
<attribute name="org.gtk.Property.get" value="gtk_column_view_get_sorter"/>
<doc xml:space="preserve">Sorter with the sorting choices of the user.</doc>
<type name="Sorter"/>
</property>
<glib:signal name="activate" when="last">
<doc xml:space="preserve">Emitted when a row has been activated by the user, usually via activating
the GtkListBase|list.activate-item action.
This allows for a convenient way to handle activation in a columnview.
See [method@Gtk.ListItem.set_activatable] for details on how to use this
signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of item to activate</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="ColumnViewClass" c:type="GtkColumnViewClass" disguised="1" glib:is-gtype-struct-for="ColumnView"/>
<class name="ColumnViewColumn" c:symbol-prefix="column_view_column" c:type="GtkColumnViewColumn" parent="GObject.Object" glib:type-name="GtkColumnViewColumn" glib:get-type="gtk_column_view_column_get_type" glib:type-struct="ColumnViewColumnClass">
<doc xml:space="preserve">`GtkColumnViewColumn` represents the columns being added to `GtkColumnView`.
The main ingredient for a `GtkColumnViewColumn` is the `GtkListItemFactory`
that tells the columnview how to create cells for this column from items in
the model.
Columns have a title, and can optionally have a header menu set
with [method@Gtk.ColumnViewColumn.set_header_menu].
A sorter can be associated with a column using
[method@Gtk.ColumnViewColumn.set_sorter], to let users influence sorting
by clicking on the column header.</doc>
<constructor name="new" c:identifier="gtk_column_view_column_new">
<doc xml:space="preserve">Creates a new `GtkColumnViewColumn` that uses the given @factory for
mapping items to widgets.
You most likely want to call [method@Gtk.ColumnView.append_column] next.
The function takes ownership of the argument, so you can write code like:
```c
column = gtk_column_view_column_new (_("Name"),
gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
```</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkColumnViewColumn` using the given @factory</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title to use for this column</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="factory" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The factory to populate items with</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</constructor>
<method name="get_column_view" c:identifier="gtk_column_view_column_get_column_view" glib:get-property="column-view">
<attribute name="org.gtk.Method.get_property" value="column-view"/>
<doc xml:space="preserve">Gets the column view that's currently displaying this column.
If @self has not been added to a column view yet, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The column view displaying @self.</doc>
<type name="ColumnView" c:type="GtkColumnView*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expand" c:identifier="gtk_column_view_column_get_expand" glib:get-property="expand">
<attribute name="org.gtk.Method.get_property" value="expand"/>
<doc xml:space="preserve">Returns whether this column should expand.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this column expands</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_factory" c:identifier="gtk_column_view_column_get_factory" glib:get-property="factory">
<attribute name="org.gtk.Method.get_property" value="factory"/>
<doc xml:space="preserve">Gets the factory that's currently used to populate list items for
this column.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The factory in use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fixed_width" c:identifier="gtk_column_view_column_get_fixed_width" glib:get-property="fixed-width">
<attribute name="org.gtk.Method.get_property" value="fixed-width"/>
<doc xml:space="preserve">Gets the fixed width of the column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the fixed with of the column</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_header_menu" c:identifier="gtk_column_view_column_get_header_menu" glib:get-property="header-menu">
<attribute name="org.gtk.Method.get_property" value="header-menu"/>
<doc xml:space="preserve">Gets the menu model that is used to create the context menu
for the column header.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resizable" c:identifier="gtk_column_view_column_get_resizable" glib:get-property="resizable">
<attribute name="org.gtk.Method.get_property" value="resizable"/>
<doc xml:space="preserve">Returns whether this column is resizable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this column is resizable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sorter" c:identifier="gtk_column_view_column_get_sorter" glib:get-property="sorter">
<attribute name="org.gtk.Method.get_property" value="sorter"/>
<doc xml:space="preserve">Returns the sorter that is associated with the column.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkSorter` of @self</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_column_view_column_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Returns the title set with gtk_column_view_column_set_title().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The column's title</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_column_view_column_get_visible" glib:get-property="visible">
<attribute name="org.gtk.Method.get_property" value="visible"/>
<doc xml:space="preserve">Returns whether this column is visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this column is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expand" c:identifier="gtk_column_view_column_set_expand" glib:set-property="expand">
<attribute name="org.gtk.Method.set_property" value="expand"/>
<doc xml:space="preserve">Sets the column to take available extra space.
The extra space is shared equally amongst all columns that
have the expand set to %TRUE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this column should expand to fill available sace</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_factory" c:identifier="gtk_column_view_column_set_factory" glib:set-property="factory">
<attribute name="org.gtk.Method.set_property" value="factory"/>
<doc xml:space="preserve">Sets the `GtkListItemFactory` to use for populating list items for this
column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="factory" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the factory to use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</method>
<method name="set_fixed_width" c:identifier="gtk_column_view_column_set_fixed_width" glib:set-property="fixed-width">
<attribute name="org.gtk.Method.set_property" value="fixed-width"/>
<doc xml:space="preserve">If @fixed_width is not -1, sets the fixed width of @column;
otherwise unsets it.
Setting a fixed width overrides the automatically calculated
width. Interactive resizing also sets the &#x201C;fixed-width&#x201D; property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="fixed_width" transfer-ownership="none">
<doc xml:space="preserve">the new fixed width, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_header_menu" c:identifier="gtk_column_view_column_set_header_menu" glib:set-property="header-menu">
<attribute name="org.gtk.Method.set_property" value="header-menu"/>
<doc xml:space="preserve">Sets the menu model that is used to create the context menu
for the column header.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="menu" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_resizable" c:identifier="gtk_column_view_column_set_resizable" glib:set-property="resizable">
<attribute name="org.gtk.Method.set_property" value="resizable"/>
<doc xml:space="preserve">Sets whether this column should be resizable by dragging.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="resizable" transfer-ownership="none">
<doc xml:space="preserve">whether this column should be resizable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_sorter" c:identifier="gtk_column_view_column_set_sorter" glib:set-property="sorter">
<attribute name="org.gtk.Method.set_property" value="sorter"/>
<doc xml:space="preserve">Associates a sorter with the column.
If @sorter is %NULL, the column will not let users change
the sorting by clicking on its header.
This sorter can be made active by clicking on the column
header, or by calling [method@Gtk.ColumnView.sort_by_column].
See [method@Gtk.ColumnView.get_sorter] for the necessary steps
for setting up customizable sorting for [class@Gtk.ColumnView].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="sorter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkSorter` to associate with @column</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_column_view_column_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the title of this column.
The title is displayed in the header of a `GtkColumnView`
for this column and is therefore user-facing text that should
be translated.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title to use for this column</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_column_view_column_set_visible" glib:set-property="visible">
<attribute name="org.gtk.Method.set_property" value="visible"/>
<doc xml:space="preserve">Sets whether this column should be visible in views.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkColumnViewColumn`</doc>
<type name="ColumnViewColumn" c:type="GtkColumnViewColumn*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">whether this column should be visible</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="column-view" transfer-ownership="none" getter="get_column_view">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_column_view"/>
<doc xml:space="preserve">The `GtkColumnView` this column is a part of.</doc>
<type name="ColumnView"/>
</property>
<property name="expand" writable="1" transfer-ownership="none" setter="set_expand" getter="get_expand">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_expand"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_expand"/>
<doc xml:space="preserve">Column gets share of extra width allocated to the view.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="factory" writable="1" transfer-ownership="none" setter="set_factory" getter="get_factory">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_factory"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_factory"/>
<doc xml:space="preserve">Factory for populating list items.</doc>
<type name="ListItemFactory"/>
</property>
<property name="fixed-width" writable="1" transfer-ownership="none" setter="set_fixed_width" getter="get_fixed_width">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_fixed_width"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_fixed_width"/>
<doc xml:space="preserve">If not -1, this is the width that the column is allocated,
regardless of the size of its content.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="header-menu" writable="1" transfer-ownership="none" setter="set_header_menu" getter="get_header_menu">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_header_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_header_menu"/>
<doc xml:space="preserve">Menu model used to create the context menu for the column header.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="resizable" writable="1" transfer-ownership="none" setter="set_resizable" getter="get_resizable">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_resizable"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_resizable"/>
<doc xml:space="preserve">Whether this column is resizable.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sorter" writable="1" transfer-ownership="none" setter="set_sorter" getter="get_sorter">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_sorter"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_sorter"/>
<doc xml:space="preserve">Sorter for sorting items according to this column.</doc>
<type name="Sorter"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_title"/>
<doc xml:space="preserve">Title displayed in the header.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" setter="set_visible" getter="get_visible">
<attribute name="org.gtk.Property.get" value="gtk_column_view_column_get_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_column_view_column_set_visible"/>
<doc xml:space="preserve">Whether this column is visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="ColumnViewColumnClass" c:type="GtkColumnViewColumnClass" disguised="1" glib:is-gtype-struct-for="ColumnViewColumn"/>
<class name="ComboBox" c:symbol-prefix="combo_box" c:type="GtkComboBox" parent="Widget" glib:type-name="GtkComboBox" glib:get-type="gtk_combo_box_get_type" glib:type-struct="ComboBoxClass">
<doc xml:space="preserve">A `GtkComboBox` is a widget that allows the user to choose from a list of
valid choices.
![An example GtkComboBox](combo-box.png)
The `GtkComboBox` displays the selected choice; when activated, the
`GtkComboBox` displays a popup which allows the user to make a new choice.
The `GtkComboBox` uses the model-view pattern; the list of valid choices
is specified in the form of a tree model, and the display of the choices
can be adapted to the data in the model by using cell renderers, as you
would in a tree view. This is possible since `GtkComboBox` implements the
[iface@Gtk.CellLayout] interface. The tree model holding the valid
choices is not restricted to a flat list, it can be a real tree, and the
popup will reflect the tree structure.
To allow the user to enter values not in the model, the
[property@Gtk.ComboBox:has-entry] property allows the `GtkComboBox` to
contain a [class@Gtk.Entry]. This entry can be accessed by calling
[method@Gtk.ComboBox.get_child] on the combo box.
For a simple list of textual choices, the model-view API of `GtkComboBox`
can be a bit overwhelming. In this case, [class@Gtk.ComboBoxText] offers
a simple alternative. Both `GtkComboBox` and `GtkComboBoxText` can contain
an entry.
## CSS nodes
```
combobox
&#x251C;&#x2500;&#x2500; box.linked
&#x2502; &#x2570;&#x2500;&#x2500; button.combo
&#x2502; &#x2570;&#x2500;&#x2500; box
&#x2502; &#x251C;&#x2500;&#x2500; cellview
&#x2502; &#x2570;&#x2500;&#x2500; arrow
&#x2570;&#x2500;&#x2500; window.popup
```
A normal combobox contains a box with the .linked class, a button
with the .combo class and inside those buttons, there are a cellview and
an arrow.
```
combobox
&#x251C;&#x2500;&#x2500; box.linked
&#x2502; &#x251C;&#x2500;&#x2500; entry.combo
&#x2502; &#x2570;&#x2500;&#x2500; button.combo
&#x2502; &#x2570;&#x2500;&#x2500; box
&#x2502; &#x2570;&#x2500;&#x2500; arrow
&#x2570;&#x2500;&#x2500; window.popup
```
A `GtkComboBox` with an entry has a single CSS node with name combobox.
It contains a box with the .linked class. That box contains an entry and
a button, both with the .combo class added. The button also contains another
node with name arrow.
# Accessibility
`GtkComboBox` uses the %GTK_ACCESSIBLE_ROLE_COMBO_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellEditable"/>
<implements name="CellLayout"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_combo_box_new">
<doc xml:space="preserve">Creates a new empty `GtkComboBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A new `GtkComboBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_entry" c:identifier="gtk_combo_box_new_with_entry">
<doc xml:space="preserve">Creates a new empty `GtkComboBox` with an entry.
In order to use a combo box with entry, you need to tell it
which column of the model contains the text for the entry
by calling [method@Gtk.ComboBox.set_entry_text_column].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A new `GtkComboBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_model" c:identifier="gtk_combo_box_new_with_model">
<doc xml:space="preserve">Creates a new `GtkComboBox` with a model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A new `GtkComboBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_model_and_entry" c:identifier="gtk_combo_box_new_with_model_and_entry">
<doc xml:space="preserve">Creates a new empty `GtkComboBox` with an entry and a model.
See also [ctor@Gtk.ComboBox.new_with_entry].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A new `GtkComboBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="format_entry_text">
<return-value transfer-ownership="full">
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_active" c:identifier="gtk_combo_box_get_active" glib:get-property="active">
<doc xml:space="preserve">Returns the index of the currently active item.
If the model is a non-flat treemodel, and the active item is not
an immediate child of the root of the tree, this function returns
`gtk_tree_path_get_indices (path)[0]`, where `path` is the
[struct@Gtk.TreePath] of the active item.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">An integer which is the index of the currently active item,
or -1 if there&#x2019;s no active item</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_active_id" c:identifier="gtk_combo_box_get_active_id" glib:get-property="active-id">
<attribute name="org.gtk.Method.get_property" value="active-id"/>
<doc xml:space="preserve">Returns the ID of the active row of @combo_box.
This value is taken from the active row and the column specified
by the [property@Gtk.ComboBox:id-column] property of @combo_box
(see [method@Gtk.ComboBox.set_id_column]).
The returned value is an interned string which means that you can
compare the pointer by value to other interned strings and that you
must not free it.
If the [property@Gtk.ComboBox:id-column] property of @combo_box is
not set, or if no row is active, or if the active row has a %NULL
ID value, then %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the ID of the active row</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_active_iter" c:identifier="gtk_combo_box_get_active_iter">
<doc xml:space="preserve">Sets @iter to point to the currently active item.
If no item is active, @iter is left unchanged.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter was set, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_button_sensitivity" c:identifier="gtk_combo_box_get_button_sensitivity" glib:get-property="button-sensitivity">
<attribute name="org.gtk.Method.get_property" value="button-sensitivity"/>
<doc xml:space="preserve">Returns whether the combo box sets the dropdown button
sensitive or not when there are no items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%GTK_SENSITIVITY_ON if the dropdown button
is sensitive when the model is empty, %GTK_SENSITIVITY_OFF
if the button is always insensitive or %GTK_SENSITIVITY_AUTO
if it is only sensitive as long as the model has one item to
be selected.</doc>
<type name="SensitivityType" c:type="GtkSensitivityType"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_combo_box_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @combo_box.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @combo_box</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_entry_text_column" c:identifier="gtk_combo_box_get_entry_text_column" glib:get-property="entry-text-column">
<doc xml:space="preserve">Returns the column which @combo_box is using to get the strings
from to display in the internal entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A column in the data source model of @combo_box.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_entry" c:identifier="gtk_combo_box_get_has_entry" glib:get-property="has-entry">
<attribute name="org.gtk.Method.get_property" value="has-entry"/>
<doc xml:space="preserve">Returns whether the combo box has an entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there is an entry in @combo_box.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_id_column" c:identifier="gtk_combo_box_get_id_column" glib:get-property="id-column">
<attribute name="org.gtk.Method.get_property" value="id-column"/>
<doc xml:space="preserve">Returns the column which @combo_box is using to get string IDs
for values from.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A column in the data source model of @combo_box.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_combo_box_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Returns the `GtkTreeModel` of @combo_box.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `GtkTreeModel` which was passed
during construction.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popup_fixed_width" c:identifier="gtk_combo_box_get_popup_fixed_width" glib:get-property="popup-fixed-width">
<attribute name="org.gtk.Method.get_property" value="popup-fixed-width"/>
<doc xml:space="preserve">Gets whether the popup uses a fixed width.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popup uses a fixed width</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_separator_func" c:identifier="gtk_combo_box_get_row_separator_func" introspectable="0">
<doc xml:space="preserve">Returns the current row separator function.</doc>
<return-value nullable="1">
<doc xml:space="preserve">the current row separator function.</doc>
<type name="TreeViewRowSeparatorFunc" c:type="GtkTreeViewRowSeparatorFunc"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="popdown" c:identifier="gtk_combo_box_popdown">
<doc xml:space="preserve">Hides the menu or dropdown list of @combo_box.
This function is mostly intended for use by accessibility technologies;
applications should have little use for it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="popup" c:identifier="gtk_combo_box_popup">
<doc xml:space="preserve">Pops up the menu or dropdown list of @combo_box.
This function is mostly intended for use by accessibility technologies;
applications should have little use for it.
Before calling this, @combo_box must be mapped, or nothing will happen.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="popup_for_device" c:identifier="gtk_combo_box_popup_for_device">
<doc xml:space="preserve">Pops up the menu of @combo_box.
Note that currently this does not do anything with the device, as it was
previously only used for list-mode combo boxes, and those were removed
in GTK 4. However, it is retained in case similar functionality is added
back later.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="device" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDevice`</doc>
<type name="Gdk.Device" c:type="GdkDevice*"/>
</parameter>
</parameters>
</method>
<method name="set_active" c:identifier="gtk_combo_box_set_active" glib:set-property="active">
<attribute name="org.gtk.Method.set_property" value="active"/>
<doc xml:space="preserve">Sets the active item of @combo_box to be the item at @index.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">An index in the model passed during construction,
or -1 to have no active item</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_active_id" c:identifier="gtk_combo_box_set_active_id" glib:set-property="active-id">
<attribute name="org.gtk.Method.set_property" value="active-id"/>
<doc xml:space="preserve">Changes the active row of @combo_box to the one that has an ID equal to
@active_id.
If @active_id is %NULL, the active row is unset. Rows having
a %NULL ID string cannot be made active by this function.
If the [property@Gtk.ComboBox:id-column] property of @combo_box is
unset or if no row has the given ID then the function does nothing
and returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a row with a matching ID was found. If a %NULL
@active_id was given to unset the active row, the function
always returns %TRUE.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="active_id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the ID of the row to select</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_active_iter" c:identifier="gtk_combo_box_set_active_iter">
<doc xml:space="preserve">Sets the current active item to be the one referenced by @iter.
If @iter is %NULL, the active item is unset.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="set_button_sensitivity" c:identifier="gtk_combo_box_set_button_sensitivity" glib:set-property="button-sensitivity">
<attribute name="org.gtk.Method.set_property" value="button-sensitivity"/>
<doc xml:space="preserve">Sets whether the dropdown button of the combo box should update
its sensitivity depending on the model contents.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="sensitivity" transfer-ownership="none">
<doc xml:space="preserve">specify the sensitivity of the dropdown button</doc>
<type name="SensitivityType" c:type="GtkSensitivityType"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_combo_box_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @combo_box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_entry_text_column" c:identifier="gtk_combo_box_set_entry_text_column" glib:set-property="entry-text-column">
<doc xml:space="preserve">Sets the model column which @combo_box should use to get strings
from to be @text_column.
For this column no separate
[class@Gtk.CellRenderer] is needed.
The column @text_column in the model of @combo_box must be of
type %G_TYPE_STRING.
This is only relevant if @combo_box has been created with
[property@Gtk.ComboBox:has-entry] as %TRUE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="text_column" transfer-ownership="none">
<doc xml:space="preserve">A column in @model to get the strings from for
the internal entry</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_id_column" c:identifier="gtk_combo_box_set_id_column" glib:set-property="id-column">
<attribute name="org.gtk.Method.set_property" value="id-column"/>
<doc xml:space="preserve">Sets the model column which @combo_box should use to get string IDs
for values from.
The column @id_column in the model of @combo_box must be of type
%G_TYPE_STRING.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="id_column" transfer-ownership="none">
<doc xml:space="preserve">A column in @model to get string IDs for values from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_combo_box_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model used by @combo_box to be @model.
Will unset a previously set model (if applicable). If model is %NULL,
then it will unset the model.
Note that this function does not clear the cell renderers, you have to
call [method@Gtk.CellLayout.clear] yourself if you need to set up different
cell renderers for the new model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</method>
<method name="set_popup_fixed_width" c:identifier="gtk_combo_box_set_popup_fixed_width" glib:set-property="popup-fixed-width">
<attribute name="org.gtk.Method.set_property" value="popup-fixed-width"/>
<doc xml:space="preserve">Specifies whether the popup&#x2019;s width should be a fixed width.
If @fixed is %TRUE, the popup's width is set to match the
allocated width of the combo box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">whether to use a fixed popup width</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_row_separator_func" c:identifier="gtk_combo_box_set_row_separator_func">
<doc xml:space="preserve">Sets the row separator function, which is used to determine
whether a row should be drawn as a separator.
If the row separator function is %NULL, no separators are drawn.
This is the default value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkComboBox`</doc>
<type name="ComboBox" c:type="GtkComboBox*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">a `GtkTreeViewRowSeparatorFunc`</doc>
<type name="TreeViewRowSeparatorFunc" c:type="GtkTreeViewRowSeparatorFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">destroy notifier for @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<property name="active" writable="1" transfer-ownership="none" setter="set_active" getter="get_active">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_active"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_active"/>
<doc xml:space="preserve">The item which is currently active.
If the model is a non-flat treemodel, and the active item is not an
immediate child of the root of the tree, this property has the value
`gtk_tree_path_get_indices (path)[0]`, where `path` is the
[struct@Gtk.TreePath] of the active item.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="active-id" writable="1" transfer-ownership="none" setter="set_active_id" getter="get_active_id">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_active_id"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_active_id"/>
<doc xml:space="preserve">The value of the ID column of the active row.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="button-sensitivity" writable="1" transfer-ownership="none" setter="set_button_sensitivity" getter="get_button_sensitivity">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_button_sensitivity"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_button_sensitivity"/>
<doc xml:space="preserve">Whether the dropdown button is sensitive when
the model is empty.</doc>
<type name="SensitivityType"/>
</property>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="entry-text-column" writable="1" transfer-ownership="none" setter="set_entry_text_column" getter="get_entry_text_column">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_entry_text_column"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_entry_text_column"/>
<doc xml:space="preserve">The model column to associate with strings from the entry.
This is property only relevant if the combo was created with
[property@Gtk.ComboBox:has-entry] is %TRUE.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="has-entry" writable="1" construct-only="1" transfer-ownership="none" getter="get_has_entry">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_has_entry"/>
<doc xml:space="preserve">Whether the combo box has an entry.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-frame" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `has-frame` property controls whether a frame is drawn around the entry.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="id-column" writable="1" transfer-ownership="none" setter="set_id_column" getter="get_id_column">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_id_column"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_id_column"/>
<doc xml:space="preserve">The model column that provides string IDs for the values
in the model, if != -1.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_model"/>
<doc xml:space="preserve">The model from which the combo box takes its values.</doc>
<type name="TreeModel"/>
</property>
<property name="popup-fixed-width" writable="1" transfer-ownership="none" setter="set_popup_fixed_width" getter="get_popup_fixed_width">
<attribute name="org.gtk.Property.get" value="gtk_combo_box_get_popup_fixed_width"/>
<attribute name="org.gtk.Property.set" value="gtk_combo_box_set_popup_fixed_width"/>
<doc xml:space="preserve">Whether the popup's width should be a fixed width matching the
allocated width of the combo box.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="popup-shown" transfer-ownership="none">
<doc xml:space="preserve">Whether the combo boxes dropdown is popped up.
Note that this property is mainly useful, because
it allows you to connect to notify::popup-shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="first" action="1" version="4.6">
<doc xml:space="preserve">Emitted to when the combo box is activated.
The `::activate` signal on `GtkComboBox` is an action signal and
emitting it causes the combo box to pop up its dropdown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted when the active item is changed.
The can be due to the user selecting a different item from the list,
or due to a call to [method@Gtk.ComboBox.set_active_iter]. It will
also be emitted while typing into the entry of a combo box with an entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="format-entry-text" when="last">
<doc xml:space="preserve">Emitted to allow changing how the text in a combo box's entry is displayed.
See [property@Gtk.ComboBox:has-entry].
Connect a signal handler which returns an allocated string representing
@path. That string will then be used to set the text in the combo box's
entry. The default signal handler uses the text from the
[property@Gtk.ComboBox:entry-text-column] model column.
Here's an example signal handler which fetches data from the model and
displays it in the entry.
```c
static char *
format_entry_text_callback (GtkComboBox *combo,
const char *path,
gpointer user_data)
{
GtkTreeIter iter;
GtkTreeModel model;
double value;
model = gtk_combo_box_get_model (combo);
gtk_tree_model_get_iter_from_string (model, &amp;iter, path);
gtk_tree_model_get (model, &amp;iter,
THE_DOUBLE_VALUE_COLUMN, &amp;value,
-1);
return g_strdup_printf ("%g", value);
}
```</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated string representing @path
for the current `GtkComboBox` model.</doc>
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the [struct@Gtk.TreePath] string from the combo box's current model
to format text for</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-active" when="last" action="1">
<doc xml:space="preserve">Emitted to move the active selection.
This is an [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scroll_type" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollType`</doc>
<type name="ScrollType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="popdown" when="last" action="1">
<doc xml:space="preserve">Emitted to popdown the combo box list.
This is an [keybinding signal](class.SignalAction.html).
The default bindings for this signal are Alt+Up and Escape.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="popup" when="last" action="1">
<doc xml:space="preserve">Emitted to popup the combo box list.
This is an [keybinding signal](class.SignalAction.html).
The default binding for this signal is Alt+Down.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="ComboBoxClass" c:type="GtkComboBoxClass" glib:is-gtype-struct-for="ComboBox">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="format_entry_text">
<callback name="format_entry_text">
<return-value transfer-ownership="full">
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="combo_box" transfer-ownership="none">
<type name="ComboBox" c:type="GtkComboBox*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="7">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="ComboBoxText" c:symbol-prefix="combo_box_text" c:type="GtkComboBoxText" parent="ComboBox" glib:type-name="GtkComboBoxText" glib:get-type="gtk_combo_box_text_get_type">
<doc xml:space="preserve">A `GtkComboBoxText` is a simple variant of `GtkComboBox` for text-only
use cases.
![An example GtkComboBoxText](combo-box-text.png)
`GtkComboBoxText` hides the model-view complexity of `GtkComboBox`.
To create a `GtkComboBoxText`, use [ctor@Gtk.ComboBoxText.new] or
[ctor@Gtk.ComboBoxText.new_with_entry].
You can add items to a `GtkComboBoxText` with
[method@Gtk.ComboBoxText.append_text],
[method@Gtk.ComboBoxText.insert_text] or
[method@Gtk.ComboBoxText.prepend_text] and remove options with
[method@Gtk.ComboBoxText.remove].
If the `GtkComboBoxText` contains an entry (via the
[property@Gtk.ComboBox:has-entry] property), its contents can be retrieved
using [method@Gtk.ComboBoxText.get_active_text].
You should not call [method@Gtk.ComboBox.set_model] or attempt to pack more
cells into this combo box via its [iface@Gtk.CellLayout] interface.
# GtkComboBoxText as GtkBuildable
The `GtkComboBoxText` implementation of the `GtkBuildable` interface supports
adding items directly using the &lt;items&gt; element and specifying &lt;item&gt;
elements for each item. Each &lt;item&gt; element can specify the &#x201C;id&#x201D;
corresponding to the appended text and also supports the regular
translation attributes &#x201C;translatable&#x201D;, &#x201C;context&#x201D; and &#x201C;comments&#x201D;.
Here is a UI definition fragment specifying `GtkComboBoxText` items:
```xml
&lt;object class="GtkComboBoxText"&gt;
&lt;items&gt;
&lt;item translatable="yes" id="factory"&gt;Factory&lt;/item&gt;
&lt;item translatable="yes" id="home"&gt;Home&lt;/item&gt;
&lt;item translatable="yes" id="subway"&gt;Subway&lt;/item&gt;
&lt;/items&gt;
&lt;/object&gt;
```
# CSS nodes
```
combobox
&#x2570;&#x2500;&#x2500; box.linked
&#x251C;&#x2500;&#x2500; entry.combo
&#x251C;&#x2500;&#x2500; button.combo
&#x2570;&#x2500;&#x2500; window.popup
```
`GtkComboBoxText` has a single CSS node with name combobox. It adds
the style class .combo to the main CSS nodes of its entry and button
children, and the .linked class to the node of its internal box.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellEditable"/>
<implements name="CellLayout"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_combo_box_text_new">
<doc xml:space="preserve">Creates a new `GtkComboBoxText`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A new `GtkComboBoxText`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_entry" c:identifier="gtk_combo_box_text_new_with_entry">
<doc xml:space="preserve">Creates a new `GtkComboBoxText` with an entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkComboBoxText`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="append" c:identifier="gtk_combo_box_text_append">
<doc xml:space="preserve">Appends @text to the list of strings stored in @combo_box.
If @id is non-%NULL then it is used as the ID of the row.
This is the same as calling [method@Gtk.ComboBoxText.insert]
with a position of -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string ID for this value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">A string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="append_text" c:identifier="gtk_combo_box_text_append_text">
<doc xml:space="preserve">Appends @text to the list of strings stored in @combo_box.
This is the same as calling [method@Gtk.ComboBoxText.insert_text]
with a position of -1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">A string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_active_text" c:identifier="gtk_combo_box_text_get_active_text">
<doc xml:space="preserve">Returns the currently active string in @combo_box.
If no row is currently selected, %NULL is returned.
If @combo_box contains an entry, this function will
return its contents (which will not necessarily
be an item from the list).</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly allocated
string containing the currently active text.
Must be freed with g_free().</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_combo_box_text_insert">
<doc xml:space="preserve">Inserts @text at @position in the list of strings stored in @combo_box.
If @id is non-%NULL then it is used as the ID of the row.
See [property@Gtk.ComboBox:id-column].
If @position is negative then @text is appended.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">An index to insert @text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string ID for this value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">A string to display</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="insert_text" c:identifier="gtk_combo_box_text_insert_text">
<doc xml:space="preserve">Inserts @text at @position in the list of strings stored in @combo_box.
If @position is negative then @text is appended.
This is the same as calling [method@Gtk.ComboBoxText.insert]
with a %NULL ID string.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">An index to insert @text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">A string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_combo_box_text_prepend">
<doc xml:space="preserve">Prepends @text to the list of strings stored in @combo_box.
If @id is non-%NULL then it is used as the ID of the row.
This is the same as calling [method@Gtk.ComboBoxText.insert]
with a position of 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string ID for this value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">a string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="prepend_text" c:identifier="gtk_combo_box_text_prepend_text">
<doc xml:space="preserve">Prepends @text to the list of strings stored in @combo_box.
This is the same as calling [method@Gtk.ComboBoxText.insert_text]
with a position of 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">A string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_combo_box_text_remove">
<doc xml:space="preserve">Removes the string at @position from @combo_box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBox`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">Index of the item to remove</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="remove_all" c:identifier="gtk_combo_box_text_remove_all">
<doc xml:space="preserve">Removes all the text entries from the combo box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="combo_box" transfer-ownership="none">
<doc xml:space="preserve">A `GtkComboBoxText`</doc>
<type name="ComboBoxText" c:type="GtkComboBoxText*"/>
</instance-parameter>
</parameters>
</method>
</class>
<class name="ConstantExpression" c:symbol-prefix="constant_expression" c:type="GtkConstantExpression" parent="Expression" glib:type-name="GtkConstantExpression" glib:get-type="gtk_constant_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">A constant value in a `GtkExpression`.</doc>
<constructor name="new" c:identifier="gtk_constant_expression_new" introspectable="0">
<doc xml:space="preserve">Creates a `GtkExpression` that evaluates to the
object given by the arguments.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="ConstantExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value_type" transfer-ownership="none">
<doc xml:space="preserve">The type of the object</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments to create the object from</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_value" c:identifier="gtk_constant_expression_new_for_value">
<doc xml:space="preserve">Creates an expression that always evaluates to the given `value`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="ConstantExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue`</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</constructor>
<method name="get_value" c:identifier="gtk_constant_expression_get_value">
<doc xml:space="preserve">Gets the value that a constant expression evaluates to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</return-value>
<parameters>
<instance-parameter name="expression" transfer-ownership="none">
<doc xml:space="preserve">a constant `GtkExpression`</doc>
<type name="ConstantExpression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
</class>
<class name="Constraint" c:symbol-prefix="constraint" c:type="GtkConstraint" parent="GObject.Object" glib:type-name="GtkConstraint" glib:get-type="gtk_constraint_get_type" glib:type-struct="ConstraintClass">
<doc xml:space="preserve">`GtkConstraint` describes a constraint between attributes of two widgets,
expressed as a linear equation.
The typical equation for a constraint is:
```
target.target_attr = source.source_attr &#xD7; multiplier + constant
```
Each `GtkConstraint` is part of a system that will be solved by a
[class@Gtk.ConstraintLayout] in order to allocate and position each
child widget or guide.
The source and target, as well as their attributes, of a `GtkConstraint`
instance are immutable after creation.</doc>
<constructor name="new" c:identifier="gtk_constraint_new">
<doc xml:space="preserve">Creates a new constraint representing a relation between a layout
attribute on a source and a layout attribute on a target.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created constraint</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</return-value>
<parameters>
<parameter name="target" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the target of the constraint</doc>
<type name="ConstraintTarget" c:type="gpointer"/>
</parameter>
<parameter name="target_attribute" transfer-ownership="none">
<doc xml:space="preserve">the attribute of `target` to be set</doc>
<type name="ConstraintAttribute" c:type="GtkConstraintAttribute"/>
</parameter>
<parameter name="relation" transfer-ownership="none">
<doc xml:space="preserve">the relation equivalence between `target_attribute` and `source_attribute`</doc>
<type name="ConstraintRelation" c:type="GtkConstraintRelation"/>
</parameter>
<parameter name="source" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the source of the constraint</doc>
<type name="ConstraintTarget" c:type="gpointer"/>
</parameter>
<parameter name="source_attribute" transfer-ownership="none">
<doc xml:space="preserve">the attribute of `source` to be read</doc>
<type name="ConstraintAttribute" c:type="GtkConstraintAttribute"/>
</parameter>
<parameter name="multiplier" transfer-ownership="none">
<doc xml:space="preserve">a multiplication factor to be applied to `source_attribute`</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="constant" transfer-ownership="none">
<doc xml:space="preserve">a constant factor to be added to `source_attribute`</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="strength" transfer-ownership="none">
<doc xml:space="preserve">the strength of the constraint</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_constant" c:identifier="gtk_constraint_new_constant">
<doc xml:space="preserve">Creates a new constraint representing a relation between a layout
attribute on a target and a constant value.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created constraint</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</return-value>
<parameters>
<parameter name="target" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a the target of the constraint</doc>
<type name="ConstraintTarget" c:type="gpointer"/>
</parameter>
<parameter name="target_attribute" transfer-ownership="none">
<doc xml:space="preserve">the attribute of `target` to be set</doc>
<type name="ConstraintAttribute" c:type="GtkConstraintAttribute"/>
</parameter>
<parameter name="relation" transfer-ownership="none">
<doc xml:space="preserve">the relation equivalence between `target_attribute` and `constant`</doc>
<type name="ConstraintRelation" c:type="GtkConstraintRelation"/>
</parameter>
<parameter name="constant" transfer-ownership="none">
<doc xml:space="preserve">a constant factor to be set on `target_attribute`</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="strength" transfer-ownership="none">
<doc xml:space="preserve">the strength of the constraint</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</constructor>
<method name="get_constant" c:identifier="gtk_constraint_get_constant" glib:get-property="constant">
<attribute name="org.gtk.Method.get_property" value="constant"/>
<doc xml:space="preserve">Retrieves the constant factor added to the source attributes' value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a constant factor</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_multiplier" c:identifier="gtk_constraint_get_multiplier" glib:get-property="multiplier">
<attribute name="org.gtk.Method.get_property" value="multiplier"/>
<doc xml:space="preserve">Retrieves the multiplication factor applied to the source
attribute's value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a multiplication factor</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_relation" c:identifier="gtk_constraint_get_relation" glib:get-property="relation">
<attribute name="org.gtk.Method.get_property" value="relation"/>
<doc xml:space="preserve">The order relation between the terms of the constraint.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a relation type</doc>
<type name="ConstraintRelation" c:type="GtkConstraintRelation"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_source" c:identifier="gtk_constraint_get_source" glib:get-property="source">
<attribute name="org.gtk.Method.get_property" value="source"/>
<doc xml:space="preserve">Retrieves the [iface@Gtk.ConstraintTarget] used as the source for the
constraint.
If the source is set to `NULL` at creation, the constraint will use
the widget using the [class@Gtk.ConstraintLayout] as the source.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the source of the constraint</doc>
<type name="ConstraintTarget" c:type="GtkConstraintTarget*"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_source_attribute" c:identifier="gtk_constraint_get_source_attribute" glib:get-property="source-attribute">
<attribute name="org.gtk.Method.get_property" value="source-attribute"/>
<doc xml:space="preserve">Retrieves the attribute of the source to be read by the constraint.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the source's attribute</doc>
<type name="ConstraintAttribute" c:type="GtkConstraintAttribute"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_strength" c:identifier="gtk_constraint_get_strength" glib:get-property="strength">
<attribute name="org.gtk.Method.get_property" value="strength"/>
<doc xml:space="preserve">Retrieves the strength of the constraint.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the strength value</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_target" c:identifier="gtk_constraint_get_target" glib:get-property="target">
<attribute name="org.gtk.Method.get_property" value="target"/>
<doc xml:space="preserve">Retrieves the [iface@Gtk.ConstraintTarget] used as the target for
the constraint.
If the targe is set to `NULL` at creation, the constraint will use
the widget using the [class@Gtk.ConstraintLayout] as the target.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkConstraintTarget`</doc>
<type name="ConstraintTarget" c:type="GtkConstraintTarget*"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_target_attribute" c:identifier="gtk_constraint_get_target_attribute" glib:get-property="target-attribute">
<attribute name="org.gtk.Method.get_property" value="target-attribute"/>
<doc xml:space="preserve">Retrieves the attribute of the target to be set by the constraint.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the target's attribute</doc>
<type name="ConstraintAttribute" c:type="GtkConstraintAttribute"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_attached" c:identifier="gtk_constraint_is_attached">
<doc xml:space="preserve">Checks whether the constraint is attached to a [class@Gtk.ConstraintLayout],
and it is contributing to the layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the constraint is attached</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_constant" c:identifier="gtk_constraint_is_constant">
<doc xml:space="preserve">Checks whether the constraint describes a relation between an attribute
on the [property@Gtk.Constraint:target] and a constant value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the constraint is a constant relation</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_required" c:identifier="gtk_constraint_is_required">
<doc xml:space="preserve">Checks whether the constraint is a required relation for solving the
constraint layout.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the constraint is required</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraint`</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</instance-parameter>
</parameters>
</method>
<property name="constant" writable="1" construct-only="1" transfer-ownership="none" getter="get_constant">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_constant"/>
<doc xml:space="preserve">The constant value to be added to the [property@Gtk.Constraint:source-attribute].</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="multiplier" writable="1" construct-only="1" transfer-ownership="none" getter="get_multiplier">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_multiplier"/>
<doc xml:space="preserve">The multiplication factor to be applied to
the [property@Gtk.Constraint:source-attribute].</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="relation" writable="1" construct-only="1" transfer-ownership="none" getter="get_relation">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_relation"/>
<doc xml:space="preserve">The order relation between the terms of the constraint.</doc>
<type name="ConstraintRelation"/>
</property>
<property name="source" writable="1" construct-only="1" transfer-ownership="none" getter="get_source">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_source"/>
<doc xml:space="preserve">The source of the constraint.
The constraint will set the [property@Gtk.Constraint:target-attribute]
property of the target using the [property@Gtk.Constraint:source-attribute]
property of the source.</doc>
<type name="ConstraintTarget"/>
</property>
<property name="source-attribute" writable="1" construct-only="1" transfer-ownership="none" getter="get_source_attribute">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_source_attribute"/>
<doc xml:space="preserve">The attribute of the [property@Gtk.Constraint:source] read by the
constraint.</doc>
<type name="ConstraintAttribute"/>
</property>
<property name="strength" writable="1" construct-only="1" transfer-ownership="none" getter="get_strength">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_strength"/>
<doc xml:space="preserve">The strength of the constraint.
The strength can be expressed either using one of the symbolic values
of the [enum@Gtk.ConstraintStrength] enumeration, or any positive integer
value.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="target" writable="1" construct-only="1" transfer-ownership="none" getter="get_target">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_target"/>
<doc xml:space="preserve">The target of the constraint.
The constraint will set the [property@Gtk.Constraint:target-attribute]
property of the target using the [property@Gtk.Constraint:source-attribute]
property of the source widget.</doc>
<type name="ConstraintTarget"/>
</property>
<property name="target-attribute" writable="1" construct-only="1" transfer-ownership="none" getter="get_target_attribute">
<attribute name="org.gtk.Property.get" value="gtk_constraint_get_target_attribute"/>
<doc xml:space="preserve">The attribute of the [property@Gtk.Constraint:target] set by the constraint.</doc>
<type name="ConstraintAttribute"/>
</property>
</class>
<enumeration name="ConstraintAttribute" glib:type-name="GtkConstraintAttribute" glib:get-type="gtk_constraint_attribute_get_type" c:type="GtkConstraintAttribute">
<doc xml:space="preserve">The widget attributes that can be used when creating a [class@Constraint].</doc>
<member name="none" value="0" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_NONE" glib:nick="none" glib:name="GTK_CONSTRAINT_ATTRIBUTE_NONE">
<doc xml:space="preserve">No attribute, used for constant
relations</doc>
</member>
<member name="left" value="1" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_LEFT" glib:nick="left" glib:name="GTK_CONSTRAINT_ATTRIBUTE_LEFT">
<doc xml:space="preserve">The left edge of a widget, regardless of
text direction</doc>
</member>
<member name="right" value="2" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_RIGHT" glib:nick="right" glib:name="GTK_CONSTRAINT_ATTRIBUTE_RIGHT">
<doc xml:space="preserve">The right edge of a widget, regardless
of text direction</doc>
</member>
<member name="top" value="3" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_TOP" glib:nick="top" glib:name="GTK_CONSTRAINT_ATTRIBUTE_TOP">
<doc xml:space="preserve">The top edge of a widget</doc>
</member>
<member name="bottom" value="4" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_BOTTOM" glib:nick="bottom" glib:name="GTK_CONSTRAINT_ATTRIBUTE_BOTTOM">
<doc xml:space="preserve">The bottom edge of a widget</doc>
</member>
<member name="start" value="5" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_START" glib:nick="start" glib:name="GTK_CONSTRAINT_ATTRIBUTE_START">
<doc xml:space="preserve">The leading edge of a widget, depending
on text direction; equivalent to %GTK_CONSTRAINT_ATTRIBUTE_LEFT for LTR
languages, and %GTK_CONSTRAINT_ATTRIBUTE_RIGHT for RTL ones</doc>
</member>
<member name="end" value="6" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_END" glib:nick="end" glib:name="GTK_CONSTRAINT_ATTRIBUTE_END">
<doc xml:space="preserve">The trailing edge of a widget, depending
on text direction; equivalent to %GTK_CONSTRAINT_ATTRIBUTE_RIGHT for LTR
languages, and %GTK_CONSTRAINT_ATTRIBUTE_LEFT for RTL ones</doc>
</member>
<member name="width" value="7" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_WIDTH" glib:nick="width" glib:name="GTK_CONSTRAINT_ATTRIBUTE_WIDTH">
<doc xml:space="preserve">The width of a widget</doc>
</member>
<member name="height" value="8" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_HEIGHT" glib:nick="height" glib:name="GTK_CONSTRAINT_ATTRIBUTE_HEIGHT">
<doc xml:space="preserve">The height of a widget</doc>
</member>
<member name="center_x" value="9" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_CENTER_X" glib:nick="center-x" glib:name="GTK_CONSTRAINT_ATTRIBUTE_CENTER_X">
<doc xml:space="preserve">The center of a widget, on the
horizontal axis</doc>
</member>
<member name="center_y" value="10" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y" glib:nick="center-y" glib:name="GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y">
<doc xml:space="preserve">The center of a widget, on the
vertical axis</doc>
</member>
<member name="baseline" value="11" c:identifier="GTK_CONSTRAINT_ATTRIBUTE_BASELINE" glib:nick="baseline" glib:name="GTK_CONSTRAINT_ATTRIBUTE_BASELINE">
<doc xml:space="preserve">The baseline of a widget</doc>
</member>
</enumeration>
<record name="ConstraintClass" c:type="GtkConstraintClass" glib:is-gtype-struct-for="Constraint">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="ConstraintGuide" c:symbol-prefix="constraint_guide" c:type="GtkConstraintGuide" parent="GObject.Object" glib:type-name="GtkConstraintGuide" glib:get-type="gtk_constraint_guide_get_type" glib:type-struct="ConstraintGuideClass">
<doc xml:space="preserve">A `GtkConstraintGuide` is an invisible layout element in a
`GtkConstraintLayout`.
The `GtkConstraintLayout` treats guides like widgets. They
can be used as the source or target of a `GtkConstraint`.
Guides have a minimum, maximum and natural size. Depending
on the constraints that are applied, they can act like a
guideline that widgets can be aligned to, or like *flexible
space*.
Unlike a `GtkWidget`, a `GtkConstraintGuide` will not be drawn.</doc>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_constraint_guide_new">
<doc xml:space="preserve">Creates a new `GtkConstraintGuide` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkConstraintGuide` object.</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</return-value>
</constructor>
<method name="get_max_size" c:identifier="gtk_constraint_guide_get_max_size">
<doc xml:space="preserve">Gets the maximum size of @guide.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the maximum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the maximum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_min_size" c:identifier="gtk_constraint_guide_get_min_size">
<doc xml:space="preserve">Gets the minimum size of @guide.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the minimum width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the minimum height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_constraint_guide_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Retrieves the name set using gtk_constraint_guide_set_name().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the name of the guide</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide`</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_nat_size" c:identifier="gtk_constraint_guide_get_nat_size">
<doc xml:space="preserve">Gets the natural size of @guide.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the natural width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the natural height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_strength" c:identifier="gtk_constraint_guide_get_strength" glib:get-property="strength">
<attribute name="org.gtk.Method.get_property" value="strength"/>
<doc xml:space="preserve">Retrieves the strength set using gtk_constraint_guide_set_strength().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the strength of the constraint on the natural size</doc>
<type name="ConstraintStrength" c:type="GtkConstraintStrength"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide`</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_max_size" c:identifier="gtk_constraint_guide_set_max_size">
<doc xml:space="preserve">Sets the maximum size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new maximum width, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new maximum height, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_min_size" c:identifier="gtk_constraint_guide_set_min_size">
<doc xml:space="preserve">Sets the minimum size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new minimum width, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new minimum height, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_name" c:identifier="gtk_constraint_guide_set_name" glib:set-property="name">
<attribute name="org.gtk.Method.set_property" value="name"/>
<doc xml:space="preserve">Sets a name for the given `GtkConstraintGuide`.
The name is useful for debugging purposes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide`</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a name for the @guide</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_nat_size" c:identifier="gtk_constraint_guide_set_nat_size">
<doc xml:space="preserve">Sets the natural size of @guide.
If @guide is attached to a `GtkConstraintLayout`,
the constraints will be updated to reflect the new size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide` object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new natural width, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new natural height, or -1 to not change it</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_strength" c:identifier="gtk_constraint_guide_set_strength" glib:set-property="strength">
<attribute name="org.gtk.Method.set_property" value="strength"/>
<doc xml:space="preserve">Sets the strength of the constraint on the natural size of the
given `GtkConstraintGuide`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintGuide`</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</instance-parameter>
<parameter name="strength" transfer-ownership="none">
<doc xml:space="preserve">the strength of the constraint</doc>
<type name="ConstraintStrength" c:type="GtkConstraintStrength"/>
</parameter>
</parameters>
</method>
<property name="max-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum height of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="max-width" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum width of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="min-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The minimum height of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="min-width" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The minimum width of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="name" writable="1" transfer-ownership="none" setter="set_name" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_constraint_guide_get_name"/>
<attribute name="org.gtk.Property.set" value="gtk_constraint_guide_set_name"/>
<doc xml:space="preserve">A name that identifies the `GtkConstraintGuide`, for debugging.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="nat-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The preferred, or natural, height of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="nat-width" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The preferred, or natural, width of the guide.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="strength" writable="1" transfer-ownership="none" setter="set_strength" getter="get_strength">
<attribute name="org.gtk.Property.get" value="gtk_constraint_guide_get_strength"/>
<attribute name="org.gtk.Property.set" value="gtk_constraint_guide_set_strength"/>
<doc xml:space="preserve">The `GtkConstraintStrength` to be used for the constraint on
the natural size of the guide.</doc>
<type name="ConstraintStrength"/>
</property>
</class>
<record name="ConstraintGuideClass" c:type="GtkConstraintGuideClass" glib:is-gtype-struct-for="ConstraintGuide">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="ConstraintLayout" c:symbol-prefix="constraint_layout" c:type="GtkConstraintLayout" parent="LayoutManager" glib:type-name="GtkConstraintLayout" glib:get-type="gtk_constraint_layout_get_type" glib:type-struct="ConstraintLayoutClass">
<doc xml:space="preserve">A layout manager using constraints to describe relations between widgets.
`GtkConstraintLayout` is a layout manager that uses relations between
widget attributes, expressed via [class@Gtk.Constraint] instances, to
measure and allocate widgets.
### How do constraints work
Constraints are objects defining the relationship between attributes
of a widget; you can read the description of the [class@Gtk.Constraint]
class to have a more in depth definition.
By taking multiple constraints and applying them to the children of
a widget using `GtkConstraintLayout`, it's possible to describe
complex layout policies; each constraint applied to a child or to the parent
widgets contributes to the full description of the layout, in terms of
parameters for resolving the value of each attribute.
It is important to note that a layout is defined by the totality of
constraints; removing a child, or a constraint, from an existing layout
without changing the remaining constraints may result in an unstable
or unsolvable layout.
Constraints have an implicit "reading order"; you should start describing
each edge of each child, as well as their relationship with the parent
container, from the top left (or top right, in RTL languages), horizontally
first, and then vertically.
A constraint-based layout with too few constraints can become "unstable",
that is: have more than one solution. The behavior of an unstable layout
is undefined.
A constraint-based layout with conflicting constraints may be unsolvable,
and lead to an unstable layout. You can use the [property@Gtk.Constraint:strength]
property of [class@Gtk.Constraint] to "nudge" the layout towards a solution.
### GtkConstraintLayout as GtkBuildable
`GtkConstraintLayout` implements the [iface@Gtk.Buildable] interface and
has a custom "constraints" element which allows describing constraints in
a [class@Gtk.Builder] UI file.
An example of a UI definition fragment specifying a constraint:
```xml
&lt;object class="GtkConstraintLayout"&gt;
&lt;constraints&gt;
&lt;constraint target="button" target-attribute="start"
relation="eq"
source="super" source-attribute="start"
constant="12"
strength="required" /&gt;
&lt;constraint target="button" target-attribute="width"
relation="ge"
constant="250"
strength="strong" /&gt;
&lt;/constraints&gt;
&lt;/object&gt;
```
The definition above will add two constraints to the GtkConstraintLayout:
- a required constraint between the leading edge of "button" and
the leading edge of the widget using the constraint layout, plus
12 pixels
- a strong, constant constraint making the width of "button" greater
than, or equal to 250 pixels
The "target" and "target-attribute" attributes are required.
The "source" and "source-attribute" attributes of the "constraint"
element are optional; if they are not specified, the constraint is
assumed to be a constant.
The "relation" attribute is optional; if not specified, the constraint
is assumed to be an equality.
The "strength" attribute is optional; if not specified, the constraint
is assumed to be required.
The "source" and "target" attributes can be set to "super" to indicate
that the constraint target is the widget using the GtkConstraintLayout.
There can be "constant" and "multiplier" attributes.
Additionally, the "constraints" element can also contain a description
of the `GtkConstraintGuides` used by the layout:
```xml
&lt;constraints&gt;
&lt;guide min-width="100" max-width="500" name="hspace"/&gt;
&lt;guide min-height="64" nat-height="128" name="vspace" strength="strong"/&gt;
&lt;/constraints&gt;
```
The "guide" element has the following optional attributes:
- "min-width", "nat-width", and "max-width", describe the minimum,
natural, and maximum width of the guide, respectively
- "min-height", "nat-height", and "max-height", describe the minimum,
natural, and maximum height of the guide, respectively
- "strength" describes the strength of the constraint on the natural
size of the guide; if not specified, the constraint is assumed to
have a medium strength
- "name" describes a name for the guide, useful when debugging
### Using the Visual Format Language
Complex constraints can be described using a compact syntax called VFL,
or *Visual Format Language*.
The Visual Format Language describes all the constraints on a row or
column, typically starting from the leading edge towards the trailing
one. Each element of the layout is composed by "views", which identify
a [iface@Gtk.ConstraintTarget].
For instance:
```
[button]-[textField]
```
Describes a constraint that binds the trailing edge of "button" to the
leading edge of "textField", leaving a default space between the two.
Using VFL is also possible to specify predicates that describe constraints
on attributes like width and height:
```
// Width must be greater than, or equal to 50
[button(&gt;=50)]
// Width of button1 must be equal to width of button2
[button1(==button2)]
```
The default orientation for a VFL description is horizontal, unless
otherwise specified:
```
// horizontal orientation, default attribute: width
H:[button(&gt;=150)]
// vertical orientation, default attribute: height
V:[button1(==button2)]
```
It's also possible to specify multiple predicates, as well as their
strength:
```
// minimum width of button must be 150
// natural width of button can be 250
[button(&gt;=150@required, ==250@medium)]
```
Finally, it's also possible to use simple arithmetic operators:
```
// width of button1 must be equal to width of button2
// divided by 2 plus 12
[button1(button2 / 2 + 12)]
```</doc>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_constraint_layout_new">
<doc xml:space="preserve">Creates a new `GtkConstraintLayout` layout manager.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkConstraintLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
<method name="add_constraint" c:identifier="gtk_constraint_layout_add_constraint">
<doc xml:space="preserve">Adds a constraint to the layout manager.
The [property@Gtk.Constraint:source] and [property@Gtk.Constraint:target]
properties of `constraint` can be:
- set to `NULL` to indicate that the constraint refers to the
widget using `layout`
- set to the [class@Gtk.Widget] using `layout`
- set to a child of the [class@Gtk.Widget] using `layout`
- set to a [class@Gtk.ConstraintGuide] that is part of `layout`
The @layout acquires the ownership of @constraint after calling
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="constraint" transfer-ownership="full">
<doc xml:space="preserve">a [class@Gtk.Constraint]</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</parameter>
</parameters>
</method>
<method name="add_constraints_from_description" c:identifier="gtk_constraint_layout_add_constraints_from_description" shadowed-by="add_constraints_from_descriptionv" introspectable="0">
<doc xml:space="preserve">Creates a list of constraints from a VFL description.
This function is a convenience wrapper around
[method@Gtk.ConstraintLayout.add_constraints_from_descriptionv], using
variadic arguments to populate the view/target map.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">the list of
[class@Gtk.Constraint]s that were added to the layout</doc>
<type name="GLib.List" c:type="GList*">
<type name="Constraint"/>
</type>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="lines" transfer-ownership="none">
<doc xml:space="preserve">an array of Visual Format Language lines
defining a set of constraints</doc>
<array length="1" zero-terminated="0" c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
<parameter name="n_lines" transfer-ownership="none">
<doc xml:space="preserve">the number of lines</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="hspacing" transfer-ownership="none">
<doc xml:space="preserve">default horizontal spacing value, or -1 for the fallback value</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="vspacing" transfer-ownership="none">
<doc xml:space="preserve">default vertical spacing value, or -1 for the fallback value</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="error" transfer-ownership="none">
<doc xml:space="preserve">return location for a `GError`</doc>
<type name="GLib.Error" c:type="GError**"/>
</parameter>
<parameter name="first_view" transfer-ownership="none">
<doc xml:space="preserve">the name of a view in the VFL description, followed by the
[iface@Gtk.ConstraintTarget] to which it maps</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">a `NULL`-terminated list of view names and [iface@Gtk.ConstraintTarget]s</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="add_constraints_from_descriptionv" c:identifier="gtk_constraint_layout_add_constraints_from_descriptionv" shadows="add_constraints_from_description" throws="1">
<doc xml:space="preserve">Creates a list of constraints from a VFL description.
The Visual Format Language, VFL, is based on Apple's AutoLayout [VFL](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/VisualFormatLanguage.html).
The `views` dictionary is used to match [iface@Gtk.ConstraintTarget]
instances to the symbolic view name inside the VFL.
The VFL grammar is:
```
&lt;visualFormatString&gt; = (&lt;orientation&gt;)?
(&lt;superview&gt;&lt;connection&gt;)?
&lt;view&gt;(&lt;connection&gt;&lt;view&gt;)*
(&lt;connection&gt;&lt;superview&gt;)?
&lt;orientation&gt; = 'H' | 'V'
&lt;superview&gt; = '|'
&lt;connection&gt; = '' | '-' &lt;predicateList&gt; '-' | '-'
&lt;predicateList&gt; = &lt;simplePredicate&gt; | &lt;predicateListWithParens&gt;
&lt;simplePredicate&gt; = &lt;metricName&gt; | &lt;positiveNumber&gt;
&lt;predicateListWithParens&gt; = '(' &lt;predicate&gt; (',' &lt;predicate&gt;)* ')'
&lt;predicate&gt; = (&lt;relation&gt;)? &lt;objectOfPredicate&gt; (&lt;operatorList&gt;)? ('@' &lt;priority&gt;)?
&lt;relation&gt; = '==' | '&lt;=' | '&gt;='
&lt;objectOfPredicate&gt; = &lt;constant&gt; | &lt;viewName&gt; | ('.' &lt;attributeName&gt;)?
&lt;priority&gt; = &lt;positiveNumber&gt; | 'required' | 'strong' | 'medium' | 'weak'
&lt;constant&gt; = &lt;number&gt;
&lt;operatorList&gt; = (&lt;multiplyOperator&gt;)? (&lt;addOperator&gt;)?
&lt;multiplyOperator&gt; = [ '*' | '/' ] &lt;positiveNumber&gt;
&lt;addOperator&gt; = [ '+' | '-' ] &lt;positiveNumber&gt;
&lt;viewName&gt; = [A-Za-z_]([A-Za-z0-9_]*) // A C identifier
&lt;metricName&gt; = [A-Za-z_]([A-Za-z0-9_]*) // A C identifier
&lt;attributeName&gt; = 'top' | 'bottom' | 'left' | 'right' | 'width' | 'height' |
'start' | 'end' | 'centerX' | 'centerY' | 'baseline'
&lt;positiveNumber&gt; // A positive real number parseable by g_ascii_strtod()
&lt;number&gt; // A real number parseable by g_ascii_strtod()
```
**Note**: The VFL grammar used by GTK is slightly different than the one
defined by Apple, as it can use symbolic values for the constraint's
strength instead of numeric values; additionally, GTK allows adding
simple arithmetic operations inside predicates.
Examples of VFL descriptions are:
```
// Default spacing
[button]-[textField]
// Width constraint
[button(&gt;=50)]
// Connection to super view
|-50-[purpleBox]-50-|
// Vertical layout
V:[topField]-10-[bottomField]
// Flush views
[maroonView][blueView]
// Priority
[button(100@strong)]
// Equal widths
[button1(==button2)]
// Multiple predicates
[flexibleButton(&gt;=70,&lt;=100)]
// A complete line of layout
|-[find]-[findNext]-[findField(&gt;=20)]-|
// Operators
[button1(button2 / 3 + 50)]
// Named attributes
[button1(==button2.height)]
```</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">the list of
[class@Gtk.Constraint] instances that were added to the layout</doc>
<type name="GLib.List" c:type="GList*">
<type name="Constraint"/>
</type>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="lines" transfer-ownership="none">
<doc xml:space="preserve">an array of Visual Format Language lines
defining a set of constraints</doc>
<array length="1" zero-terminated="0" c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
<parameter name="n_lines" transfer-ownership="none">
<doc xml:space="preserve">the number of lines</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="hspacing" transfer-ownership="none">
<doc xml:space="preserve">default horizontal spacing value, or -1 for the fallback value</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="vspacing" transfer-ownership="none">
<doc xml:space="preserve">default vertical spacing value, or -1 for the fallback value</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="views" transfer-ownership="none">
<doc xml:space="preserve">a dictionary of `[ name, target ]`
pairs; the `name` keys map to the view names in the VFL lines, while
the `target` values map to children of the widget using a `GtkConstraintLayout`,
or guides</doc>
<type name="GLib.HashTable" c:type="GHashTable*">
<type name="utf8"/>
<type name="ConstraintTarget"/>
</type>
</parameter>
</parameters>
</method>
<method name="add_guide" c:identifier="gtk_constraint_layout_add_guide">
<doc xml:space="preserve">Adds a guide to `layout`.
A guide can be used as the source or target of constraints,
like a widget, but it is not visible.
The `layout` acquires the ownership of `guide` after calling
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="guide" transfer-ownership="full">
<doc xml:space="preserve">a [class@Gtk.ConstraintGuide] object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</parameter>
</parameters>
</method>
<method name="observe_constraints" c:identifier="gtk_constraint_layout_observe_constraints">
<doc xml:space="preserve">Returns a `GListModel` to track the constraints that are
part of the layout.
Calling this function will enable extra internal bookkeeping
to track constraints and emit signals on the returned listmodel.
It may slow down operations a lot.
Applications should try hard to avoid calling this function
because of the slowdowns.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkConstraint"/>
<doc xml:space="preserve">a
`GListModel` tracking the layout's constraints</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="observe_guides" c:identifier="gtk_constraint_layout_observe_guides">
<doc xml:space="preserve">Returns a `GListModel` to track the guides that are
part of the layout.
Calling this function will enable extra internal bookkeeping
to track guides and emit signals on the returned listmodel.
It may slow down operations a lot.
Applications should try hard to avoid calling this function
because of the slowdowns.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkConstraintGuide"/>
<doc xml:space="preserve">a
`GListModel` tracking the layout's guides</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_all_constraints" c:identifier="gtk_constraint_layout_remove_all_constraints">
<doc xml:space="preserve">Removes all constraints from the layout manager.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_constraint" c:identifier="gtk_constraint_layout_remove_constraint">
<doc xml:space="preserve">Removes `constraint` from the layout manager,
so that it no longer influences the layout.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="constraint" transfer-ownership="none">
<doc xml:space="preserve">a [class@Gtk.Constraint]</doc>
<type name="Constraint" c:type="GtkConstraint*"/>
</parameter>
</parameters>
</method>
<method name="remove_guide" c:identifier="gtk_constraint_layout_remove_guide">
<doc xml:space="preserve">Removes `guide` from the layout manager,
so that it no longer influences the layout.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkConstraintLayout`</doc>
<type name="ConstraintLayout" c:type="GtkConstraintLayout*"/>
</instance-parameter>
<parameter name="guide" transfer-ownership="none">
<doc xml:space="preserve">a [class@Gtk.ConstraintGuide] object</doc>
<type name="ConstraintGuide" c:type="GtkConstraintGuide*"/>
</parameter>
</parameters>
</method>
</class>
<class name="ConstraintLayoutChild" c:symbol-prefix="constraint_layout_child" c:type="GtkConstraintLayoutChild" parent="LayoutChild" glib:type-name="GtkConstraintLayoutChild" glib:get-type="gtk_constraint_layout_child_get_type" glib:type-struct="ConstraintLayoutChildClass">
<doc xml:space="preserve">`GtkLayoutChild` subclass for children in a `GtkConstraintLayout`.</doc>
</class>
<record name="ConstraintLayoutChildClass" c:type="GtkConstraintLayoutChildClass" glib:is-gtype-struct-for="ConstraintLayoutChild">
<field name="parent_class">
<type name="LayoutChildClass" c:type="GtkLayoutChildClass"/>
</field>
</record>
<record name="ConstraintLayoutClass" c:type="GtkConstraintLayoutClass" glib:is-gtype-struct-for="ConstraintLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<enumeration name="ConstraintRelation" glib:type-name="GtkConstraintRelation" glib:get-type="gtk_constraint_relation_get_type" c:type="GtkConstraintRelation">
<doc xml:space="preserve">The relation between two terms of a constraint.</doc>
<member name="le" value="-1" c:identifier="GTK_CONSTRAINT_RELATION_LE" glib:nick="le" glib:name="GTK_CONSTRAINT_RELATION_LE">
<doc xml:space="preserve">Less than, or equal</doc>
</member>
<member name="eq" value="0" c:identifier="GTK_CONSTRAINT_RELATION_EQ" glib:nick="eq" glib:name="GTK_CONSTRAINT_RELATION_EQ">
<doc xml:space="preserve">Equal</doc>
</member>
<member name="ge" value="1" c:identifier="GTK_CONSTRAINT_RELATION_GE" glib:nick="ge" glib:name="GTK_CONSTRAINT_RELATION_GE">
<doc xml:space="preserve">Greater than, or equal</doc>
</member>
</enumeration>
<enumeration name="ConstraintStrength" glib:type-name="GtkConstraintStrength" glib:get-type="gtk_constraint_strength_get_type" c:type="GtkConstraintStrength">
<doc xml:space="preserve">The strength of a constraint, expressed as a symbolic constant.
The strength of a [class@Constraint] can be expressed with any positive
integer; the values of this enumeration can be used for readability.</doc>
<member name="required" value="1001001000" c:identifier="GTK_CONSTRAINT_STRENGTH_REQUIRED" glib:nick="required" glib:name="GTK_CONSTRAINT_STRENGTH_REQUIRED">
<doc xml:space="preserve">The constraint is required towards solving the layout</doc>
</member>
<member name="strong" value="1000000000" c:identifier="GTK_CONSTRAINT_STRENGTH_STRONG" glib:nick="strong" glib:name="GTK_CONSTRAINT_STRENGTH_STRONG">
<doc xml:space="preserve">A strong constraint</doc>
</member>
<member name="medium" value="1000" c:identifier="GTK_CONSTRAINT_STRENGTH_MEDIUM" glib:nick="medium" glib:name="GTK_CONSTRAINT_STRENGTH_MEDIUM">
<doc xml:space="preserve">A medium constraint</doc>
</member>
<member name="weak" value="1" c:identifier="GTK_CONSTRAINT_STRENGTH_WEAK" glib:nick="weak" glib:name="GTK_CONSTRAINT_STRENGTH_WEAK">
<doc xml:space="preserve">A weak constraint</doc>
</member>
</enumeration>
<interface name="ConstraintTarget" c:symbol-prefix="constraint_target" c:type="GtkConstraintTarget" glib:type-name="GtkConstraintTarget" glib:get-type="gtk_constraint_target_get_type" glib:type-struct="ConstraintTargetInterface">
<doc xml:space="preserve">The `GtkConstraintTarget` interface is implemented by objects that
can be used as source or target in `GtkConstraint`s.
Besides `GtkWidget`, it is also implemented by `GtkConstraintGuide`.</doc>
</interface>
<record name="ConstraintTargetInterface" c:type="GtkConstraintTargetInterface" disguised="1" glib:is-gtype-struct-for="ConstraintTarget"/>
<enumeration name="ConstraintVflParserError" glib:type-name="GtkConstraintVflParserError" glib:get-type="gtk_constraint_vfl_parser_error_get_type" c:type="GtkConstraintVflParserError" glib:error-domain="gtk-constraint-vfl-parser-error-quark">
<doc xml:space="preserve">Domain for VFL parsing errors.</doc>
<member name="symbol" value="0" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL" glib:nick="symbol" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_SYMBOL">
<doc xml:space="preserve">Invalid or unknown symbol</doc>
</member>
<member name="attribute" value="1" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE" glib:nick="attribute" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_ATTRIBUTE">
<doc xml:space="preserve">Invalid or unknown attribute</doc>
</member>
<member name="view" value="2" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW" glib:nick="view" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_VIEW">
<doc xml:space="preserve">Invalid or unknown view</doc>
</member>
<member name="metric" value="3" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC" glib:nick="metric" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_METRIC">
<doc xml:space="preserve">Invalid or unknown metric</doc>
</member>
<member name="priority" value="4" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY" glib:nick="priority" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_PRIORITY">
<doc xml:space="preserve">Invalid or unknown priority</doc>
</member>
<member name="relation" value="5" c:identifier="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION" glib:nick="relation" glib:name="GTK_CONSTRAINT_VFL_PARSER_ERROR_INVALID_RELATION">
<doc xml:space="preserve">Invalid or unknown relation</doc>
</member>
<function name="quark" c:identifier="gtk_constraint_vfl_parser_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<enumeration name="CornerType" glib:type-name="GtkCornerType" glib:get-type="gtk_corner_type_get_type" c:type="GtkCornerType">
<doc xml:space="preserve">Specifies which corner a child widget should be placed in when packed into
a `GtkScrolledWindow.`
This is effectively the opposite of where the scroll bars are placed.</doc>
<member name="top_left" value="0" c:identifier="GTK_CORNER_TOP_LEFT" glib:nick="top-left" glib:name="GTK_CORNER_TOP_LEFT">
<doc xml:space="preserve">Place the scrollbars on the right and bottom of the
widget (default behaviour).</doc>
</member>
<member name="bottom_left" value="1" c:identifier="GTK_CORNER_BOTTOM_LEFT" glib:nick="bottom-left" glib:name="GTK_CORNER_BOTTOM_LEFT">
<doc xml:space="preserve">Place the scrollbars on the top and right of the
widget.</doc>
</member>
<member name="top_right" value="2" c:identifier="GTK_CORNER_TOP_RIGHT" glib:nick="top-right" glib:name="GTK_CORNER_TOP_RIGHT">
<doc xml:space="preserve">Place the scrollbars on the left and bottom of the
widget.</doc>
</member>
<member name="bottom_right" value="3" c:identifier="GTK_CORNER_BOTTOM_RIGHT" glib:nick="bottom-right" glib:name="GTK_CORNER_BOTTOM_RIGHT">
<doc xml:space="preserve">Place the scrollbars on the top and left of the
widget.</doc>
</member>
</enumeration>
<record name="CssLocation" c:type="GtkCssLocation">
<doc xml:space="preserve">Represents a location in a file or other source of data parsed
by the CSS engine.
The @bytes and @line_bytes offsets are meant to be used to
programmatically match data. The @lines and @line_chars offsets
can be used for printing the location in a file.
Note that the @lines parameter starts from 0 and is increased
whenever a CSS line break is encountered. (CSS defines the C character
sequences "\r\n", "\r", "\n" and "\f" as newlines.)
If your document uses different rules for line breaking, you might want
run into problems here.</doc>
<field name="bytes" writable="1">
<doc xml:space="preserve">number of bytes parsed since the beginning</doc>
<type name="gsize" c:type="gsize"/>
</field>
<field name="chars" writable="1">
<doc xml:space="preserve">number of characters parsed since the beginning</doc>
<type name="gsize" c:type="gsize"/>
</field>
<field name="lines" writable="1">
<doc xml:space="preserve">number of full lines that have been parsed. If you want to
display this as a line number, you need to add 1 to this.</doc>
<type name="gsize" c:type="gsize"/>
</field>
<field name="line_bytes" writable="1">
<doc xml:space="preserve">Number of bytes parsed since the last line break</doc>
<type name="gsize" c:type="gsize"/>
</field>
<field name="line_chars" writable="1">
<doc xml:space="preserve">Number of characters parsed since the last line break</doc>
<type name="gsize" c:type="gsize"/>
</field>
</record>
<enumeration name="CssParserError" c:type="GtkCssParserError" glib:error-domain="gtk-css-parser-error-quark">
<doc xml:space="preserve">Errors that can occur while parsing CSS.
These errors are unexpected and will cause parts of the given CSS
to be ignored.</doc>
<member name="failed" value="0" c:identifier="GTK_CSS_PARSER_ERROR_FAILED">
<doc xml:space="preserve">Unknown failure.</doc>
</member>
<member name="syntax" value="1" c:identifier="GTK_CSS_PARSER_ERROR_SYNTAX">
<doc xml:space="preserve">The given text does not form valid syntax</doc>
</member>
<member name="import" value="2" c:identifier="GTK_CSS_PARSER_ERROR_IMPORT">
<doc xml:space="preserve">Failed to import a resource</doc>
</member>
<member name="name" value="3" c:identifier="GTK_CSS_PARSER_ERROR_NAME">
<doc xml:space="preserve">The given name has not been defined</doc>
</member>
<member name="unknown_value" value="4" c:identifier="GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE">
<doc xml:space="preserve">The given value is not correct</doc>
</member>
</enumeration>
<enumeration name="CssParserWarning" c:type="GtkCssParserWarning">
<doc xml:space="preserve">Warnings that can occur while parsing CSS.
Unlike `GtkCssParserError`s, warnings do not cause the parser to
skip any input, but they indicate issues that should be fixed.</doc>
<member name="deprecated" value="0" c:identifier="GTK_CSS_PARSER_WARNING_DEPRECATED">
<doc xml:space="preserve">The given construct is
deprecated and will be removed in a future version</doc>
</member>
<member name="syntax" value="1" c:identifier="GTK_CSS_PARSER_WARNING_SYNTAX">
<doc xml:space="preserve">A syntax construct was used
that should be avoided</doc>
</member>
<member name="unimplemented" value="2" c:identifier="GTK_CSS_PARSER_WARNING_UNIMPLEMENTED">
<doc xml:space="preserve">A feature is not implemented</doc>
</member>
</enumeration>
<class name="CssProvider" c:symbol-prefix="css_provider" c:type="GtkCssProvider" parent="GObject.Object" glib:type-name="GtkCssProvider" glib:get-type="gtk_css_provider_get_type" glib:type-struct="CssProviderClass">
<doc xml:space="preserve">`GtkCssProvider` is an object implementing the `GtkStyleProvider` interface
for CSS.
It is able to parse CSS-like input in order to style widgets.
An application can make GTK parse a specific CSS style sheet by calling
[method@Gtk.CssProvider.load_from_file] or
[method@Gtk.CssProvider.load_from_resource]
and adding the provider with [method@Gtk.StyleContext.add_provider] or
[func@Gtk.StyleContext.add_provider_for_display].
In addition, certain files will be read when GTK is initialized.
First, the file `$XDG_CONFIG_HOME/gtk-4.0/gtk.css` is loaded if it
exists. Then, GTK loads the first existing file among
`XDG_DATA_HOME/themes/THEME/gtk-VERSION/gtk-VARIANT.css`,
`$HOME/.themes/THEME/gtk-VERSION/gtk-VARIANT.css`,
`$XDG_DATA_DIRS/themes/THEME/gtk-VERSION/gtk-VARIANT.css` and
`DATADIR/share/themes/THEME/gtk-VERSION/gtk-VARIANT.css`,
where `THEME` is the name of the current theme (see the
[property@Gtk.Settings:gtk-theme-name] setting), `VARIANT` is the
variant to load (see the
[property@Gtk.Settings:gtk-application-prefer-dark-theme] setting),
`DATADIR` is the prefix configured when GTK was compiled (unless
overridden by the `GTK_DATA_PREFIX` environment variable), and
`VERSION` is the GTK version number. If no file is found for the
current version, GTK tries older versions all the way back to 4.0.
To track errors while loading CSS, connect to the
[signal@Gtk.CssProvider::parsing-error] signal.</doc>
<implements name="StyleProvider"/>
<constructor name="new" c:identifier="gtk_css_provider_new">
<doc xml:space="preserve">Returns a newly created `GtkCssProvider`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</return-value>
</constructor>
<method name="load_from_data" c:identifier="gtk_css_provider_load_from_data">
<doc xml:space="preserve">Loads @data into @css_provider.
This clears any previously loaded information.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="css_provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
<parameter name="data" transfer-ownership="none">
<doc xml:space="preserve">CSS data loaded in memory</doc>
<array length="1" zero-terminated="0" c:type="const char*">
<type name="guint8"/>
</array>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of @data in bytes, or -1 for NUL terminated strings. If
@length is not -1, the code will assume it is not NUL terminated and will
potentially do a copy.</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
</parameters>
</method>
<method name="load_from_file" c:identifier="gtk_css_provider_load_from_file">
<doc xml:space="preserve">Loads the data contained in @file into @css_provider.
This clears any previously loaded information.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="css_provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">`GFile` pointing to a file to load</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="load_from_path" c:identifier="gtk_css_provider_load_from_path">
<doc xml:space="preserve">Loads the data contained in @path into @css_provider.
This clears any previously loaded information.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="css_provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the path of a filename to load, in the GLib filename encoding</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="load_from_resource" c:identifier="gtk_css_provider_load_from_resource">
<doc xml:space="preserve">Loads the data contained in the resource at @resource_path into
the @css_provider.
This clears any previously loaded information.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="css_provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">a `GResource` resource path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="load_named" c:identifier="gtk_css_provider_load_named">
<doc xml:space="preserve">Loads a theme from the usual theme paths.
The actual process of finding the theme might change between
releases, but it is guaranteed that this function uses the same
mechanism to load the theme that GTK uses for loading its own theme.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssProvider`</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">A theme name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="variant" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">variant to load, for example, "dark", or
%NULL for the default</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_css_provider_to_string">
<doc xml:space="preserve">Converts the @provider into a string representation in CSS
format.
Using [method@Gtk.CssProvider.load_from_data] with the return
value from this function on a new provider created with
[ctor@Gtk.CssProvider.new] will basically create a duplicate
of this @provider.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new string representing the @provider.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">the provider to write to a string</doc>
<type name="CssProvider" c:type="GtkCssProvider*"/>
</instance-parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="parsing-error" when="last">
<doc xml:space="preserve">Signals that a parsing error occurred.
The @path, @line and @position describe the actual location of
the error as accurately as possible.
Parsing errors are never fatal, so the parsing will resume after
the error. Errors may however cause parts of the given data or
even all of it to not be parsed at all. So it is a useful idea
to check that the parsing succeeds by connecting to this signal.
Note that this signal may be emitted at any time as the css provider
may opt to defer parsing parts or all of the input to a later time
than when a loading function was called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">section the error happened in</doc>
<type name="CssSection"/>
</parameter>
<parameter name="error" transfer-ownership="none">
<doc xml:space="preserve">The parsing error</doc>
<type name="GLib.Error"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="CssProviderClass" c:type="GtkCssProviderClass" disguised="1" glib:is-gtype-struct-for="CssProvider"/>
<record name="CssProviderPrivate" c:type="GtkCssProviderPrivate" disguised="1"/>
<record name="CssSection" c:type="GtkCssSection" glib:type-name="GtkCssSection" glib:get-type="gtk_css_section_get_type" c:symbol-prefix="css_section">
<doc xml:space="preserve">Defines a part of a CSS document.
Because sections are nested into one another, you can use
[method@CssSection.get_parent] to get the containing region.</doc>
<constructor name="new" c:identifier="gtk_css_section_new">
<doc xml:space="preserve">Creates a new `GtkCssSection` referring to the section
in the given `file` from the `start` location to the
`end` location.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkCssSection`</doc>
<type name="CssSection" c:type="GtkCssSection*"/>
</return-value>
<parameters>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The file this section refers to</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">The start location</doc>
<type name="CssLocation" c:type="const GtkCssLocation*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">The end location</doc>
<type name="CssLocation" c:type="const GtkCssLocation*"/>
</parameter>
</parameters>
</constructor>
<method name="get_end_location" c:identifier="gtk_css_section_get_end_location">
<doc xml:space="preserve">Returns the location in the CSS document where this section ends.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The end location of
this section</doc>
<type name="CssLocation" c:type="const GtkCssLocation*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">the section</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_css_section_get_file">
<doc xml:space="preserve">Gets the file that @section was parsed from.
If no such file exists, for example because the CSS was loaded via
[method@Gtk.CssProvider.load_from_data], then `NULL` is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GFile` from which the `section`
was parsed</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">the section</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_parent" c:identifier="gtk_css_section_get_parent">
<doc xml:space="preserve">Gets the parent section for the given `section`.
The parent section is the section that contains this `section`. A special
case are sections of type `GTK_CSS_SECTION_DOCUMEN`T. Their parent will
either be `NULL` if they are the original CSS document that was loaded by
[method@Gtk.CssProvider.load_from_file] or a section of type
`GTK_CSS_SECTION_IMPORT` if it was loaded with an `@import` rule from
a different file.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the parent section</doc>
<type name="CssSection" c:type="GtkCssSection*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">the section</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_start_location" c:identifier="gtk_css_section_get_start_location">
<doc xml:space="preserve">Returns the location in the CSS document where this section starts.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The start location of
this section</doc>
<type name="CssLocation" c:type="const GtkCssLocation*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">the section</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="print" c:identifier="gtk_css_section_print">
<doc xml:space="preserve">Prints the `section` into `string` in a human-readable form.
This is a form like `gtk.css:32:1-23` to denote line 32, characters
1 to 23 in the file `gtk.css`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">a section</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">a `GString` to print to</doc>
<type name="GLib.String" c:type="GString*"/>
</parameter>
</parameters>
</method>
<method name="ref" c:identifier="gtk_css_section_ref">
<doc xml:space="preserve">Increments the reference count on `section`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the CSS section itself.</doc>
<type name="CssSection" c:type="GtkCssSection*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssSection`</doc>
<type name="CssSection" c:type="GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_css_section_to_string">
<doc xml:space="preserve">Prints the section into a human-readable text form using
[method@Gtk.CssSection.print].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new string.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCssSection`</doc>
<type name="CssSection" c:type="const GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
<method name="unref" c:identifier="gtk_css_section_unref">
<doc xml:space="preserve">Decrements the reference count on `section`, freeing the
structure if the reference count reaches 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="section" transfer-ownership="full">
<doc xml:space="preserve">a `GtkCssSection`</doc>
<type name="CssSection" c:type="GtkCssSection*"/>
</instance-parameter>
</parameters>
</method>
</record>
<record name="CssStyleChange" c:type="GtkCssStyleChange" disguised="1"/>
<callback name="CustomAllocateFunc" c:type="GtkCustomAllocateFunc">
<doc xml:space="preserve">A function to be used by `GtkCustomLayout` to allocate a widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to allocate</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new width of the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new height of the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">the new baseline of the widget, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
<class name="CustomFilter" c:symbol-prefix="custom_filter" c:type="GtkCustomFilter" parent="Filter" glib:type-name="GtkCustomFilter" glib:get-type="gtk_custom_filter_get_type" glib:type-struct="CustomFilterClass">
<doc xml:space="preserve">`GtkCustomFilter` determines whether to include items with a callback.</doc>
<constructor name="new" c:identifier="gtk_custom_filter_new">
<doc xml:space="preserve">Creates a new filter using the given @match_func to filter
items.
If @match_func is %NULL, the filter matches all items.
If the filter func changes its filtering behavior,
gtk_filter_changed() needs to be called.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkCustomFilter`</doc>
<type name="CustomFilter" c:type="GtkCustomFilter*"/>
</return-value>
<parameters>
<parameter name="match_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to filter items</doc>
<type name="CustomFilterFunc" c:type="GtkCustomFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @match_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</constructor>
<method name="set_filter_func" c:identifier="gtk_custom_filter_set_filter_func">
<doc xml:space="preserve">Sets the function used for filtering items.
If @match_func is %NULL, the filter matches all items.
If the filter func changes its filtering behavior,
gtk_filter_changed() needs to be called.
If a previous function was set, its @user_destroy will be
called now.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCustomFilter`</doc>
<type name="CustomFilter" c:type="GtkCustomFilter*"/>
</instance-parameter>
<parameter name="match_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to filter items</doc>
<type name="CustomFilterFunc" c:type="GtkCustomFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @match_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
</class>
<record name="CustomFilterClass" c:type="GtkCustomFilterClass" glib:is-gtype-struct-for="CustomFilter">
<field name="parent_class">
<type name="FilterClass" c:type="GtkFilterClass"/>
</field>
</record>
<callback name="CustomFilterFunc" c:type="GtkCustomFilterFunc">
<doc xml:space="preserve">User function that is called to determine if the @item should be matched.
If the filter matches the item, this function must return %TRUE. If the
item should be filtered out, %FALSE must be returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to keep the item around</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="item" transfer-ownership="none">
<doc xml:space="preserve">The item to be matched</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="CustomLayout" c:symbol-prefix="custom_layout" c:type="GtkCustomLayout" parent="LayoutManager" glib:type-name="GtkCustomLayout" glib:get-type="gtk_custom_layout_get_type" glib:type-struct="CustomLayoutClass">
<doc xml:space="preserve">`GtkCustomLayout` uses closures for size negotiation.
A `GtkCustomLayout `uses closures matching to the old `GtkWidget`
virtual functions for size negotiation, as a convenience API to
ease the porting towards the corresponding `GtkLayoutManager
virtual functions.</doc>
<constructor name="new" c:identifier="gtk_custom_layout_new">
<doc xml:space="preserve">Creates a new legacy layout manager.
Legacy layout managers map to the old `GtkWidget` size negotiation
virtual functions, and are meant to be used during the transition
from layout containers to layout manager delegates.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkCustomLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
<parameters>
<parameter name="request_mode" transfer-ownership="none" nullable="1" allow-none="1" scope="call">
<doc xml:space="preserve">a function to retrieve
the `GtkSizeRequestMode` of the widget using the layout; the
default request mode is %GTK_SIZE_REQUEST_CONSTANT_SIZE</doc>
<type name="CustomRequestModeFunc" c:type="GtkCustomRequestModeFunc"/>
</parameter>
<parameter name="measure" transfer-ownership="none" scope="call">
<doc xml:space="preserve">a function to measure the widget using the layout manager</doc>
<type name="CustomMeasureFunc" c:type="GtkCustomMeasureFunc"/>
</parameter>
<parameter name="allocate" transfer-ownership="none" scope="call">
<doc xml:space="preserve">a function to allocate the children of the widget using
the layout manager</doc>
<type name="CustomAllocateFunc" c:type="GtkCustomAllocateFunc"/>
</parameter>
</parameters>
</constructor>
</class>
<record name="CustomLayoutClass" c:type="GtkCustomLayoutClass" glib:is-gtype-struct-for="CustomLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<callback name="CustomMeasureFunc" c:type="GtkCustomMeasureFunc">
<doc xml:space="preserve">A function to be used by `GtkCustomLayout` to measure a widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to be measured</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the direction to be measured</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">the size to be measured for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the measured minimum size of the widget</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the measured natural size of the widget</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the measured minimum baseline of the widget</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the measured natural baseline of the widget</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
<callback name="CustomRequestModeFunc" c:type="GtkCustomRequestModeFunc">
<doc xml:space="preserve">Queries a widget for its preferred size request mode.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the size request mode</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to be queried</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
<class name="CustomSorter" c:symbol-prefix="custom_sorter" c:type="GtkCustomSorter" parent="Sorter" glib:type-name="GtkCustomSorter" glib:get-type="gtk_custom_sorter_get_type" glib:type-struct="CustomSorterClass">
<doc xml:space="preserve">`GtkCustomSorter` is a `GtkSorter` implementation that sorts via a callback
function.</doc>
<constructor name="new" c:identifier="gtk_custom_sorter_new">
<doc xml:space="preserve">Creates a new `GtkSorter` that works by calling
@sort_func to compare items.
If @sort_func is %NULL, all items are considered equal.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkCustomSorter`</doc>
<type name="CustomSorter" c:type="GtkCustomSorter*"/>
</return-value>
<parameters>
<parameter name="sort_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the `GCompareDataFunc` to use for sorting</doc>
<type name="GLib.CompareDataFunc" c:type="GCompareDataFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</constructor>
<method name="set_sort_func" c:identifier="gtk_custom_sorter_set_sort_func">
<doc xml:space="preserve">Sets (or unsets) the function used for sorting items.
If @sort_func is %NULL, all items are considered equal.
If the sort func changes its sorting behavior,
gtk_sorter_changed() needs to be called.
If a previous function was set, its @user_destroy will be
called now.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCustomSorter`</doc>
<type name="CustomSorter" c:type="GtkCustomSorter*"/>
</instance-parameter>
<parameter name="sort_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to sort items</doc>
<type name="GLib.CompareDataFunc" c:type="GCompareDataFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @match_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
</class>
<record name="CustomSorterClass" c:type="GtkCustomSorterClass" glib:is-gtype-struct-for="CustomSorter">
<field name="parent_class">
<type name="SorterClass" c:type="GtkSorterClass"/>
</field>
</record>
<function-macro name="DEBUG_CHECK" c:identifier="GTK_DEBUG_CHECK" introspectable="0">
<parameters>
<parameter name="type">
</parameter>
</parameters>
</function-macro>
<function-macro name="DIALOG" c:identifier="GTK_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="DIALOG_CLASS" c:identifier="GTK_DIALOG_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="DIALOG_GET_CLASS" c:identifier="GTK_DIALOG_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAG_SOURCE" c:identifier="GTK_DRAG_SOURCE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAG_SOURCE_CLASS" c:identifier="GTK_DRAG_SOURCE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAG_SOURCE_GET_CLASS" c:identifier="GTK_DRAG_SOURCE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAWING_AREA" c:identifier="GTK_DRAWING_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAWING_AREA_CLASS" c:identifier="GTK_DRAWING_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="DRAWING_AREA_GET_CLASS" c:identifier="GTK_DRAWING_AREA_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_CONTROLLER_MOTION" c:identifier="GTK_DROP_CONTROLLER_MOTION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_CONTROLLER_MOTION_CLASS" c:identifier="GTK_DROP_CONTROLLER_MOTION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_CONTROLLER_MOTION_GET_CLASS" c:identifier="GTK_DROP_CONTROLLER_MOTION_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET" c:identifier="GTK_DROP_TARGET" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET_ASYNC" c:identifier="GTK_DROP_TARGET_ASYNC" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET_ASYNC_CLASS" c:identifier="GTK_DROP_TARGET_ASYNC_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET_ASYNC_GET_CLASS" c:identifier="GTK_DROP_TARGET_ASYNC_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET_CLASS" c:identifier="GTK_DROP_TARGET_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="DROP_TARGET_GET_CLASS" c:identifier="GTK_DROP_TARGET_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<bitfield name="DebugFlags" glib:type-name="GtkDebugFlags" glib:get-type="gtk_debug_flags_get_type" c:type="GtkDebugFlags">
<doc xml:space="preserve">Flags to use with gtk_set_debug_flags().
Settings these flags causes GTK to print out different
types of debugging information. Some of these flags are
only available when GTK has been configured with `-Ddebug=true`.</doc>
<member name="text" value="1" c:identifier="GTK_DEBUG_TEXT" glib:nick="text" glib:name="GTK_DEBUG_TEXT">
<doc xml:space="preserve">Information about GtkTextView</doc>
</member>
<member name="tree" value="2" c:identifier="GTK_DEBUG_TREE" glib:nick="tree" glib:name="GTK_DEBUG_TREE">
<doc xml:space="preserve">Information about GtkTreeView</doc>
</member>
<member name="keybindings" value="4" c:identifier="GTK_DEBUG_KEYBINDINGS" glib:nick="keybindings" glib:name="GTK_DEBUG_KEYBINDINGS">
<doc xml:space="preserve">Information about keyboard shortcuts</doc>
</member>
<member name="modules" value="8" c:identifier="GTK_DEBUG_MODULES" glib:nick="modules" glib:name="GTK_DEBUG_MODULES">
<doc xml:space="preserve">Information about modules and extensions</doc>
</member>
<member name="geometry" value="16" c:identifier="GTK_DEBUG_GEOMETRY" glib:nick="geometry" glib:name="GTK_DEBUG_GEOMETRY">
<doc xml:space="preserve">Information about size allocation</doc>
</member>
<member name="icontheme" value="32" c:identifier="GTK_DEBUG_ICONTHEME" glib:nick="icontheme" glib:name="GTK_DEBUG_ICONTHEME">
<doc xml:space="preserve">Information about icon themes</doc>
</member>
<member name="printing" value="64" c:identifier="GTK_DEBUG_PRINTING" glib:nick="printing" glib:name="GTK_DEBUG_PRINTING">
<doc xml:space="preserve">Information about printing</doc>
</member>
<member name="builder" value="128" c:identifier="GTK_DEBUG_BUILDER" glib:nick="builder" glib:name="GTK_DEBUG_BUILDER">
<doc xml:space="preserve">Trace GtkBuilder operation</doc>
</member>
<member name="size_request" value="256" c:identifier="GTK_DEBUG_SIZE_REQUEST" glib:nick="size-request" glib:name="GTK_DEBUG_SIZE_REQUEST">
<doc xml:space="preserve">Information about size requests</doc>
</member>
<member name="no_css_cache" value="512" c:identifier="GTK_DEBUG_NO_CSS_CACHE" glib:nick="no-css-cache" glib:name="GTK_DEBUG_NO_CSS_CACHE">
<doc xml:space="preserve">Disable the style property cache</doc>
</member>
<member name="interactive" value="1024" c:identifier="GTK_DEBUG_INTERACTIVE" glib:nick="interactive" glib:name="GTK_DEBUG_INTERACTIVE">
<doc xml:space="preserve">Open the GTK inspector</doc>
</member>
<member name="touchscreen" value="2048" c:identifier="GTK_DEBUG_TOUCHSCREEN" glib:nick="touchscreen" glib:name="GTK_DEBUG_TOUCHSCREEN">
<doc xml:space="preserve">Pretend the pointer is a touchscreen</doc>
</member>
<member name="actions" value="4096" c:identifier="GTK_DEBUG_ACTIONS" glib:nick="actions" glib:name="GTK_DEBUG_ACTIONS">
<doc xml:space="preserve">Information about actions and menu models</doc>
</member>
<member name="layout" value="8192" c:identifier="GTK_DEBUG_LAYOUT" glib:nick="layout" glib:name="GTK_DEBUG_LAYOUT">
<doc xml:space="preserve">Information from layout managers</doc>
</member>
<member name="snapshot" value="16384" c:identifier="GTK_DEBUG_SNAPSHOT" glib:nick="snapshot" glib:name="GTK_DEBUG_SNAPSHOT">
<doc xml:space="preserve">Include debug render nodes in the generated snapshots</doc>
</member>
<member name="constraints" value="32768" c:identifier="GTK_DEBUG_CONSTRAINTS" glib:nick="constraints" glib:name="GTK_DEBUG_CONSTRAINTS">
<doc xml:space="preserve">Information from the constraints solver</doc>
</member>
<member name="builder_objects" value="65536" c:identifier="GTK_DEBUG_BUILDER_OBJECTS" glib:nick="builder-objects" glib:name="GTK_DEBUG_BUILDER_OBJECTS">
<doc xml:space="preserve">Log unused GtkBuilder objects</doc>
</member>
<member name="a11y" value="131072" c:identifier="GTK_DEBUG_A11Y" glib:nick="a11y" glib:name="GTK_DEBUG_A11Y">
<doc xml:space="preserve">Information about accessibility state changes</doc>
</member>
<member name="iconfallback" value="262144" c:identifier="GTK_DEBUG_ICONFALLBACK" glib:nick="iconfallback" glib:name="GTK_DEBUG_ICONFALLBACK">
<doc xml:space="preserve">Information about icon fallback. Since: 4.2</doc>
</member>
</bitfield>
<enumeration name="DeleteType" glib:type-name="GtkDeleteType" glib:get-type="gtk_delete_type_get_type" c:type="GtkDeleteType">
<doc xml:space="preserve">Passed to various keybinding signals for deleting text.</doc>
<member name="chars" value="0" c:identifier="GTK_DELETE_CHARS" glib:nick="chars" glib:name="GTK_DELETE_CHARS">
<doc xml:space="preserve">Delete characters.</doc>
</member>
<member name="word_ends" value="1" c:identifier="GTK_DELETE_WORD_ENDS" glib:nick="word-ends" glib:name="GTK_DELETE_WORD_ENDS">
<doc xml:space="preserve">Delete only the portion of the word to the
left/right of cursor if we&#x2019;re in the middle of a word.</doc>
</member>
<member name="words" value="2" c:identifier="GTK_DELETE_WORDS" glib:nick="words" glib:name="GTK_DELETE_WORDS">
<doc xml:space="preserve">Delete words.</doc>
</member>
<member name="display_lines" value="3" c:identifier="GTK_DELETE_DISPLAY_LINES" glib:nick="display-lines" glib:name="GTK_DELETE_DISPLAY_LINES">
<doc xml:space="preserve">Delete display-lines. Display-lines
refers to the visible lines, with respect to the current line
breaks. As opposed to paragraphs, which are defined by line
breaks in the input.</doc>
</member>
<member name="display_line_ends" value="4" c:identifier="GTK_DELETE_DISPLAY_LINE_ENDS" glib:nick="display-line-ends" glib:name="GTK_DELETE_DISPLAY_LINE_ENDS">
<doc xml:space="preserve">Delete only the portion of the
display-line to the left/right of cursor.</doc>
</member>
<member name="paragraph_ends" value="5" c:identifier="GTK_DELETE_PARAGRAPH_ENDS" glib:nick="paragraph-ends" glib:name="GTK_DELETE_PARAGRAPH_ENDS">
<doc xml:space="preserve">Delete to the end of the
paragraph. Like C-k in Emacs (or its reverse).</doc>
</member>
<member name="paragraphs" value="6" c:identifier="GTK_DELETE_PARAGRAPHS" glib:nick="paragraphs" glib:name="GTK_DELETE_PARAGRAPHS">
<doc xml:space="preserve">Delete entire line. Like C-k in pico.</doc>
</member>
<member name="whitespace" value="7" c:identifier="GTK_DELETE_WHITESPACE" glib:nick="whitespace" glib:name="GTK_DELETE_WHITESPACE">
<doc xml:space="preserve">Delete only whitespace. Like M-\ in Emacs.</doc>
</member>
</enumeration>
<class name="Dialog" c:symbol-prefix="dialog" c:type="GtkDialog" parent="Window" glib:type-name="GtkDialog" glib:get-type="gtk_dialog_get_type" glib:type-struct="DialogClass">
<doc xml:space="preserve">Dialogs are a convenient way to prompt the user for a small amount
of input.
![An example GtkDialog](dialog.png)
Typical uses are to display a message, ask a question, or anything else
that does not require extensive effort on the user&#x2019;s part.
The main area of a `GtkDialog` is called the "content area", and is yours
to populate with widgets such a `GtkLabel` or `GtkEntry`, to present
your information, questions, or tasks to the user.
In addition, dialogs allow you to add "action widgets". Most commonly,
action widgets are buttons. Depending on the platform, action widgets may
be presented in the header bar at the top of the window, or at the bottom
of the window. To add action widgets, create your `GtkDialog` using
[ctor@Gtk.Dialog.new_with_buttons], or use
[method@Gtk.Dialog.add_button], [method@Gtk.Dialog.add_buttons],
or [method@Gtk.Dialog.add_action_widget].
`GtkDialogs` uses some heuristics to decide whether to add a close
button to the window decorations. If any of the action buttons use
the response ID %GTK_RESPONSE_CLOSE or %GTK_RESPONSE_CANCEL, the
close button is omitted.
Clicking a button that was added as an action widget will emit the
[signal@Gtk.Dialog::response] signal with a response ID that you specified.
GTK will never assign a meaning to positive response IDs; these are
entirely user-defined. But for convenience, you can use the response
IDs in the [enum@Gtk.ResponseType] enumeration (these all have values
less than zero). If a dialog receives a delete event, the
[signal@Gtk.Dialog::response] signal will be emitted with the
%GTK_RESPONSE_DELETE_EVENT response ID.
Dialogs are created with a call to [ctor@Gtk.Dialog.new] or
[ctor@Gtk.Dialog.new_with_buttons]. The latter is recommended; it allows
you to set the dialog title, some convenient flags, and add buttons.
A &#x201C;modal&#x201D; dialog (that is, one which freezes the rest of the application
from user input), can be created by calling [method@Gtk.Window.set_modal]
on the dialog. When using [ctor@Gtk.Dialog.new_with_buttons], you can also
pass the %GTK_DIALOG_MODAL flag to make a dialog modal.
For the simple dialog in the following example, a [class@Gtk.MessageDialog]
would save some effort. But you&#x2019;d need to create the dialog contents manually
if you had more than a simple message in the dialog.
An example for simple `GtkDialog` usage:
```c
// Function to open a dialog box with a message
void
quick_message (GtkWindow *parent, char *message)
{
GtkWidget *dialog, *label, *content_area;
GtkDialogFlags flags;
// Create the widgets
flags = GTK_DIALOG_DESTROY_WITH_PARENT;
dialog = gtk_dialog_new_with_buttons ("Message",
parent,
flags,
_("_OK"),
GTK_RESPONSE_NONE,
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
label = gtk_label_new (message);
// Ensure that the dialog box is destroyed when the user responds
g_signal_connect_swapped (dialog,
"response",
G_CALLBACK (gtk_window_destroy),
dialog);
// Add the label, and show everything we&#x2019;ve added
gtk_box_append (GTK_BOX (content_area), label);
gtk_widget_show (dialog);
}
```
# GtkDialog as GtkBuildable
The `GtkDialog` implementation of the `GtkBuildable` interface exposes the
@content_area as an internal child with the name &#x201C;content_area&#x201D;.
`GtkDialog` supports a custom `&lt;action-widgets&gt;` element, which can contain
multiple `&lt;action-widget&gt;` elements. The &#x201C;response&#x201D; attribute specifies a
numeric response, and the content of the element is the id of widget
(which should be a child of the dialogs @action_area). To mark a response
as default, set the &#x201C;default&#x201D; attribute of the `&lt;action-widget&gt;` element
to true.
`GtkDialog` supports adding action widgets by specifying &#x201C;action&#x201D; as
the &#x201C;type&#x201D; attribute of a `&lt;child&gt;` element. The widget will be added
either to the action area or the headerbar of the dialog, depending
on the &#x201C;use-header-bar&#x201D; property. The response id has to be associated
with the action widget using the `&lt;action-widgets&gt;` element.
An example of a `GtkDialog` UI definition fragment:
```xml
&lt;object class="GtkDialog" id="dialog1"&gt;
&lt;child type="action"&gt;
&lt;object class="GtkButton" id="button_cancel"/&gt;
&lt;/child&gt;
&lt;child type="action"&gt;
&lt;object class="GtkButton" id="button_ok"&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;action-widgets&gt;
&lt;action-widget response="cancel"&gt;button_cancel&lt;/action-widget&gt;
&lt;action-widget response="ok" default="true"&gt;button_ok&lt;/action-widget&gt;
&lt;/action-widgets&gt;
&lt;/object&gt;
```
# Accessibility
`GtkDialog` uses the %GTK_ACCESSIBLE_ROLE_DIALOG role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_dialog_new">
<doc xml:space="preserve">Creates a new dialog box.
Widgets should not be packed into the `GtkWindow`
directly, but into the @content_area and @action_area,
as described above.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new dialog as a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_buttons" c:identifier="gtk_dialog_new_with_buttons" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkDialog` with the given title and transient parent.
The @flags argument can be used to make the dialog modal, have it
destroyed along with its transient parent, or make it use a headerbar.
Button text/response ID pairs should be listed in pairs, with a %NULL
pointer ending the list. Button text can be arbitrary text. A response
ID can be any positive number, or one of the values in the
[enum@Gtk.ResponseType] enumeration. If the user clicks one of these
buttons, `GtkDialog` will emit the [signal@Gtk.Dialog::response] signal
with the corresponding response ID.
If a `GtkDialog` receives a delete event, it will emit ::response with a
response ID of %GTK_RESPONSE_DELETE_EVENT.
However, destroying a dialog does not emit the ::response signal;
so be careful relying on ::response when using the
%GTK_DIALOG_DESTROY_WITH_PARENT flag.
Here&#x2019;s a simple example:
```c
GtkWindow *main_app_window; // Window the dialog should show up on
GtkWidget *dialog;
GtkDialogFlags flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;
dialog = gtk_dialog_new_with_buttons ("My dialog",
main_app_window,
flags,
_("_OK"),
GTK_RESPONSE_ACCEPT,
_("_Cancel"),
GTK_RESPONSE_REJECT,
NULL);
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">from `GtkDialogFlags`</doc>
<type name="DialogFlags" c:type="GtkDialogFlags"/>
</parameter>
<parameter name="first_button_text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">text to go in first button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">response ID for first button, then additional buttons, ending with %NULL</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<virtual-method name="close">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="response" invoker="response">
<attribute name="org.gtk.Method.signal" value="response"/>
<doc xml:space="preserve">Emits the ::response signal with the given response ID.
Used to indicate that the user has responded to the dialog in some way.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</virtual-method>
<method name="add_action_widget" c:identifier="gtk_dialog_add_action_widget">
<doc xml:space="preserve">Adds an activatable widget to the action area of a `GtkDialog`.
GTK connects a signal handler that will emit the
[signal@Gtk.Dialog::response] signal on the dialog when the widget
is activated. The widget is appended to the end of the dialog&#x2019;s action
area.
If you want to add a non-activatable widget, simply pack it into
the @action_area field of the `GtkDialog` struct.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">an activatable widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID for @child</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="add_button" c:identifier="gtk_dialog_add_button">
<doc xml:space="preserve">Adds a button with the given text.
GTK arranges things so that clicking the button will emit the
[signal@Gtk.Dialog::response] signal with the given @response_id.
The button is appended to the end of the dialog&#x2019;s action area.
The button widget is returned, but usually you don&#x2019;t need it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkButton` widget that was added</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="button_text" transfer-ownership="none">
<doc xml:space="preserve">text of button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID for the button</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="add_buttons" c:identifier="gtk_dialog_add_buttons" introspectable="0">
<doc xml:space="preserve">Adds multiple buttons.
This is the same as calling [method@Gtk.Dialog.add_button]
repeatedly. The variable argument list should be %NULL-terminated
as with [ctor@Gtk.Dialog.new_with_buttons]. Each button must have both
text and response ID.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="first_button_text" transfer-ownership="none">
<doc xml:space="preserve">button text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">response ID for first button, then more text-response_id pairs</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="get_content_area" c:identifier="gtk_dialog_get_content_area">
<doc xml:space="preserve">Returns the content area of @dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the content area `GtkBox`.</doc>
<type name="Box" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_header_bar" c:identifier="gtk_dialog_get_header_bar">
<doc xml:space="preserve">Returns the header bar of @dialog.
Note that the headerbar is only used by the dialog if the
[property@Gtk.Dialog:use-header-bar] property is %TRUE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the header bar</doc>
<type name="HeaderBar" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_response_for_widget" c:identifier="gtk_dialog_get_response_for_widget">
<doc xml:space="preserve">Gets the response id of a widget in the action area
of a dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the response id of @widget, or %GTK_RESPONSE_NONE
if @widget doesn&#x2019;t have a response id set.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a widget in the action area of @dialog</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_widget_for_response" c:identifier="gtk_dialog_get_widget_for_response">
<doc xml:space="preserve">Gets the widget button that uses the given response ID in the action area
of a dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the @widget button that uses the given
@response_id</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">the response ID used by the @dialog widget</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="response" c:identifier="gtk_dialog_response">
<attribute name="org.gtk.Method.signal" value="response"/>
<doc xml:space="preserve">Emits the ::response signal with the given response ID.
Used to indicate that the user has responded to the dialog in some way.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="set_default_response" c:identifier="gtk_dialog_set_default_response">
<doc xml:space="preserve">Sets the default widget for the dialog based on the response ID.
Pressing &#x201C;Enter&#x201D; normally activates the default widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">a response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="set_response_sensitive" c:identifier="gtk_dialog_set_response_sensitive">
<doc xml:space="preserve">A convenient way to sensitize/desensitize dialog buttons.
Calls `gtk_widget_set_sensitive (widget, @setting)`
for each widget in the dialog&#x2019;s action area with the given @response_id.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">a response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE for sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="use-header-bar" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog uses a headerbar for action buttons
instead of the action-area.
For technical reasons, this property is declared as an integer
property, but you should only set it to %TRUE or %FALSE.
## Creating a dialog with headerbar
Builtin `GtkDialog` subclasses such as [class@Gtk.ColorChooserDialog]
set this property according to platform conventions (using the
[property@Gtk.Settings:gtk-dialogs-use-header] setting).
Here is how you can achieve the same:
```c
g_object_get (settings, "gtk-dialogs-use-header", &amp;header, NULL);
dialog = g_object_new (GTK_TYPE_DIALOG, header, TRUE, NULL);
```</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance">
<type name="Window" c:type="GtkWindow"/>
</field>
<glib:signal name="close" when="last" action="1">
<doc xml:space="preserve">Emitted when the user uses a keybinding to close the dialog.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is the Escape key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="response" when="last">
<doc xml:space="preserve">Emitted when an action widget is clicked.
The signal is also emitted when the dialog receives a
delete event, and when [method@Gtk.Dialog.response] is called.
On a delete event, the response ID is %GTK_RESPONSE_DELETE_EVENT.
Otherwise, it depends on which action widget was clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">the response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="DialogClass" c:type="GtkDialogClass" glib:is-gtype-struct-for="Dialog">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WindowClass" c:type="GtkWindowClass"/>
</field>
<field name="response">
<callback name="response">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDialog`</doc>
<type name="Dialog" c:type="GtkDialog*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="close">
<callback name="close">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="dialog" transfer-ownership="none">
<type name="Dialog" c:type="GtkDialog*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<bitfield name="DialogFlags" glib:type-name="GtkDialogFlags" glib:get-type="gtk_dialog_flags_get_type" c:type="GtkDialogFlags">
<doc xml:space="preserve">Flags used to influence dialog construction.</doc>
<member name="modal" value="1" c:identifier="GTK_DIALOG_MODAL" glib:nick="modal" glib:name="GTK_DIALOG_MODAL">
<doc xml:space="preserve">Make the constructed dialog modal</doc>
</member>
<member name="destroy_with_parent" value="2" c:identifier="GTK_DIALOG_DESTROY_WITH_PARENT" glib:nick="destroy-with-parent" glib:name="GTK_DIALOG_DESTROY_WITH_PARENT">
<doc xml:space="preserve">Destroy the dialog when its parent is destroyed</doc>
</member>
<member name="use_header_bar" value="4" c:identifier="GTK_DIALOG_USE_HEADER_BAR" glib:nick="use-header-bar" glib:name="GTK_DIALOG_USE_HEADER_BAR">
<doc xml:space="preserve">Create dialog with actions in header
bar instead of action area</doc>
</member>
</bitfield>
<enumeration name="DirectionType" glib:type-name="GtkDirectionType" glib:get-type="gtk_direction_type_get_type" c:type="GtkDirectionType">
<doc xml:space="preserve">Focus movement types.</doc>
<member name="tab_forward" value="0" c:identifier="GTK_DIR_TAB_FORWARD" glib:nick="tab-forward" glib:name="GTK_DIR_TAB_FORWARD">
<doc xml:space="preserve">Move forward.</doc>
</member>
<member name="tab_backward" value="1" c:identifier="GTK_DIR_TAB_BACKWARD" glib:nick="tab-backward" glib:name="GTK_DIR_TAB_BACKWARD">
<doc xml:space="preserve">Move backward.</doc>
</member>
<member name="up" value="2" c:identifier="GTK_DIR_UP" glib:nick="up" glib:name="GTK_DIR_UP">
<doc xml:space="preserve">Move up.</doc>
</member>
<member name="down" value="3" c:identifier="GTK_DIR_DOWN" glib:nick="down" glib:name="GTK_DIR_DOWN">
<doc xml:space="preserve">Move down.</doc>
</member>
<member name="left" value="4" c:identifier="GTK_DIR_LEFT" glib:nick="left" glib:name="GTK_DIR_LEFT">
<doc xml:space="preserve">Move left.</doc>
</member>
<member name="right" value="5" c:identifier="GTK_DIR_RIGHT" glib:nick="right" glib:name="GTK_DIR_RIGHT">
<doc xml:space="preserve">Move right.</doc>
</member>
</enumeration>
<class name="DirectoryList" c:symbol-prefix="directory_list" c:type="GtkDirectoryList" parent="GObject.Object" glib:type-name="GtkDirectoryList" glib:get-type="gtk_directory_list_get_type" glib:type-struct="DirectoryListClass">
<doc xml:space="preserve">`GtkDirectoryList` is a list model that wraps g_file_enumerate_children_async().
It presents a `GListModel` and fills it asynchronously with the `GFileInfo`s
returned from that function.
Enumeration will start automatically when a the
[property@Gtk.DirectoryList:file] property is set.
While the `GtkDirectoryList` is being filled, the
[property@Gtk.DirectoryList:loading] property will be set to %TRUE. You can
listen to that property if you want to show information like a `GtkSpinner`
or a "Loading..." text.
If loading fails at any point, the [property@Gtk.DirectoryList:error]
property will be set to give more indication about the failure.
The `GFileInfo`s returned from a `GtkDirectoryList` have the "standard::file"
attribute set to the `GFile` they refer to. This way you can get at the file
that is referred to in the same way you would via g_file_enumerator_get_child().
This means you do not need access to the `GtkDirectoryList`, but can access
the `GFile` directly from the `GFileInfo` when operating with a `GtkListView`
or similar.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_directory_list_new">
<doc xml:space="preserve">Creates a new `GtkDirectoryList`.
The `GtkDirectoryList` is querying the given @file
with the given @attributes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</return-value>
<parameters>
<parameter name="attributes" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The attributes to query with</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The file to query</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</constructor>
<method name="get_attributes" c:identifier="gtk_directory_list_get_attributes" glib:get-property="attributes">
<attribute name="org.gtk.Method.get_property" value="attributes"/>
<doc xml:space="preserve">Gets the attributes queried on the children.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The queried attributes</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_error" c:identifier="gtk_directory_list_get_error" glib:get-property="error">
<attribute name="org.gtk.Method.get_property" value="error"/>
<doc xml:space="preserve">Gets the loading error, if any.
If an error occurs during the loading process, the loading process
will finish and this property allows querying the error that happened.
This error will persist until a file is loaded again.
An error being set does not mean that no files were loaded, and all
successfully queried files will remain in the list.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The loading error or %NULL if
loading finished successfully</doc>
<type name="GLib.Error" c:type="const GError*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_directory_list_get_file" glib:get-property="file">
<attribute name="org.gtk.Method.get_property" value="file"/>
<doc xml:space="preserve">Gets the file whose children are currently enumerated.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The file whose children are enumerated</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_io_priority" c:identifier="gtk_directory_list_get_io_priority" glib:get-property="io-priority">
<attribute name="org.gtk.Method.get_property" value="io-priority"/>
<doc xml:space="preserve">Gets the IO priority set via gtk_directory_list_set_io_priority().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The IO priority.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_monitored" c:identifier="gtk_directory_list_get_monitored" glib:get-property="monitored">
<attribute name="org.gtk.Method.get_property" value="monitored"/>
<doc xml:space="preserve">Returns whether the directory list is monitoring
the directory for changes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the directory is monitored</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_loading" c:identifier="gtk_directory_list_is_loading">
<attribute name="org.gtk.Method.get_property" value="loading"/>
<doc xml:space="preserve">Returns %TRUE if the children enumeration is currently in
progress.
Files will be added to @self from time to time while loading is
going on. The order in which are added is undefined and may change
in between runs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self is loading</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_directory_list_set_attributes" glib:set-property="attributes">
<attribute name="org.gtk.Method.set_property" value="attributes"/>
<doc xml:space="preserve">Sets the @attributes to be enumerated and starts the enumeration.
If @attributes is %NULL, no attributes will be queried, but a list
of `GFileInfo`s will still be created.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
<parameter name="attributes" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the attributes to enumerate</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_file" c:identifier="gtk_directory_list_set_file" glib:set-property="file">
<attribute name="org.gtk.Method.set_property" value="file"/>
<doc xml:space="preserve">Sets the @file to be enumerated and starts the enumeration.
If @file is %NULL, the result will be an empty list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GFile` to be enumerated</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_io_priority" c:identifier="gtk_directory_list_set_io_priority" glib:set-property="io-priority">
<attribute name="org.gtk.Method.set_property" value="io-priority"/>
<doc xml:space="preserve">Sets the IO priority to use while loading directories.
Setting the priority while @self is loading will reprioritize the
ongoing load as soon as possible.
The default IO priority is %G_PRIORITY_DEFAULT, which is higher than
the GTK redraw priority. If you are loading a lot of directories in
parallel, lowering it to something like %G_PRIORITY_DEFAULT_IDLE
may increase responsiveness.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
<parameter name="io_priority" transfer-ownership="none">
<doc xml:space="preserve">IO priority to use</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_monitored" c:identifier="gtk_directory_list_set_monitored" glib:set-property="monitored">
<attribute name="org.gtk.Method.set_property" value="monitored"/>
<doc xml:space="preserve">Sets whether the directory list will monitor the directory
for changes.
If monitoring is enabled, the ::items-changed signal will
be emitted when the directory contents change.
When monitoring is turned on after the initial creation
of the directory list, the directory is reloaded to avoid
missing files that appeared between the initial loading
and when monitoring was turned on.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDirectoryList`</doc>
<type name="DirectoryList" c:type="GtkDirectoryList*"/>
</instance-parameter>
<parameter name="monitored" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to monitor the directory for changes</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="attributes" writable="1" transfer-ownership="none" setter="set_attributes" getter="get_attributes">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_get_attributes"/>
<attribute name="org.gtk.Property.set" value="gtk_directory_list_set_attributes"/>
<doc xml:space="preserve">The attributes to query.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="error" transfer-ownership="none" getter="get_error">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_get_error"/>
<doc xml:space="preserve">Error encountered while loading files.</doc>
<type name="GLib.Error"/>
</property>
<property name="file" writable="1" transfer-ownership="none" setter="set_file" getter="get_file">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_get_file"/>
<attribute name="org.gtk.Property.set" value="gtk_directory_list_set_file"/>
<doc xml:space="preserve">File to query.</doc>
<type name="Gio.File"/>
</property>
<property name="io-priority" writable="1" transfer-ownership="none" setter="set_io_priority" getter="get_io_priority">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_get_io_priority"/>
<attribute name="org.gtk.Property.set" value="gtk_directory_list_set_io_priority"/>
<doc xml:space="preserve">Priority used when loading.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="loading" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_is_loading"/>
<doc xml:space="preserve">%TRUE if files are being loaded.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="monitored" writable="1" transfer-ownership="none" setter="set_monitored" getter="get_monitored">
<attribute name="org.gtk.Property.get" value="gtk_directory_list_get_monitored"/>
<attribute name="org.gtk.Property.set" value="gtk_directory_list_set_monitored"/>
<doc xml:space="preserve">%TRUE if the directory is monitored for changed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="DirectoryListClass" c:type="GtkDirectoryListClass" glib:is-gtype-struct-for="DirectoryList">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="DragIcon" c:symbol-prefix="drag_icon" c:type="GtkDragIcon" parent="Widget" glib:type-name="GtkDragIcon" glib:get-type="gtk_drag_icon_get_type" glib:type-struct="DragIconClass">
<doc xml:space="preserve">`GtkDragIcon` is a `GtkRoot` implementation for drag icons.
A drag icon moves with the pointer during a Drag-and-Drop operation
and is destroyed when the drag ends.
To set up a drag icon and associate it with an ongoing drag operation,
use [func@Gtk.DragIcon.get_for_drag] to get the icon for a drag. You can
then use it like any other widget and use [method@Gtk.DragIcon.set_child]
to set whatever widget should be used for the drag icon.
Keep in mind that drag icons do not allow user input.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<function name="create_widget_for_value" c:identifier="gtk_drag_icon_create_widget_for_value">
<doc xml:space="preserve">Creates a widget that can be used as a drag icon for the given
@value.
Supported types include strings, `GdkRGBA` and `GtkTextBuffer`.
If GTK does not know how to create a widget for a given value,
it will return %NULL.
This method is used to set the default drag icon on drag-and-drop
operations started by `GtkDragSource`, so you don't need to set
a drag icon using this function there.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A new `GtkWidget`
for displaying @value as a drag icon.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue`</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</function>
<function name="get_for_drag" c:identifier="gtk_drag_icon_get_for_drag">
<doc xml:space="preserve">Gets the `GtkDragIcon` in use with @drag.
If no drag icon exists yet, a new one will be created
and shown.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkDragIcon`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="drag" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDrag`</doc>
<type name="Gdk.Drag" c:type="GdkDrag*"/>
</parameter>
</parameters>
</function>
<function name="set_from_paintable" c:identifier="gtk_drag_icon_set_from_paintable">
<doc xml:space="preserve">Creates a `GtkDragIcon` that shows @paintable, and associates
it with the drag operation.
The hotspot position on the paintable is aligned with the
hotspot of the cursor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drag" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDrag`</doc>
<type name="Gdk.Drag" c:type="GdkDrag*"/>
</parameter>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPaintable` to display</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
<parameter name="hot_x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate of the hotspot</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="hot_y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate of the hotspot</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<method name="get_child" c:identifier="gtk_drag_icon_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the widget currently used as drag icon.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The drag icon</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragIcon`</doc>
<type name="DragIcon" c:type="GtkDragIcon*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_drag_icon_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the widget to display as the drag icon.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragIcon`</doc>
<type name="DragIcon" c:type="GtkDragIcon*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_drag_icon_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_drag_icon_set_child"/>
<doc xml:space="preserve">The widget to display as drag icon.</doc>
<type name="Widget"/>
</property>
</class>
<record name="DragIconClass" c:type="GtkDragIconClass" glib:is-gtype-struct-for="DragIcon">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<class name="DragSource" c:symbol-prefix="drag_source" c:type="GtkDragSource" parent="GestureSingle" glib:type-name="GtkDragSource" glib:get-type="gtk_drag_source_get_type" glib:type-struct="DragSourceClass">
<doc xml:space="preserve">`GtkDragSource` is an event controller to initiate Drag-And-Drop operations.
`GtkDragSource` can be set up with the necessary
ingredients for a DND operation ahead of time. This includes
the source for the data that is being transferred, in the form
of a [class@Gdk.ContentProvider], the desired action, and the icon to
use during the drag operation. After setting it up, the drag
source must be added to a widget as an event controller, using
[method@Gtk.Widget.add_controller].
```c
static void
my_widget_init (MyWidget *self)
{
GtkDragSource *drag_source = gtk_drag_source_new ();
g_signal_connect (drag_source, "prepare", G_CALLBACK (on_drag_prepare), self);
g_signal_connect (drag_source, "drag-begin", G_CALLBACK (on_drag_begin), self);
gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (drag_source));
}
```
Setting up the content provider and icon ahead of time only makes
sense when the data does not change. More commonly, you will want
to set them up just in time. To do so, `GtkDragSource` has
[signal@Gtk.DragSource::prepare] and [signal@Gtk.DragSource::drag-begin]
signals.
The ::prepare signal is emitted before a drag is started, and
can be used to set the content provider and actions that the
drag should be started with.
```c
static GdkContentProvider *
on_drag_prepare (GtkDragSource *source,
double x,
double y,
MyWidget *self)
{
// This widget supports two types of content: GFile objects
// and GdkPixbuf objects; GTK will handle the serialization
// of these types automatically
GFile *file = my_widget_get_file (self);
GdkPixbuf *pixbuf = my_widget_get_pixbuf (self);
return gdk_content_provider_new_union ((GdkContentProvider *[2]) {
gdk_content_provider_new_typed (G_TYPE_FILE, file),
gdk_content_provider_new_typed (GDK_TYPE_PIXBUF, pixbuf),
}, 2);
}
```
The ::drag-begin signal is emitted after the `GdkDrag` object has
been created, and can be used to set up the drag icon.
```c
static void
on_drag_begin (GtkDragSource *source,
GdkDrag *drag,
MyWidget *self)
{
// Set the widget as the drag icon
GdkPaintable *paintable = gtk_widget_paintable_new (GTK_WIDGET (self));
gtk_drag_source_set_icon (source, paintable, 0, 0);
g_object_unref (paintable);
}
```
During the DND operation, `GtkDragSource` emits signals that
can be used to obtain updates about the status of the operation,
but it is not normally necessary to connect to any signals,
except for one case: when the supported actions include
%GDK_ACTION_MOVE, you need to listen for the
[signal@Gtk.DragSource::drag-end] signal and delete the
data after it has been transferred.</doc>
<constructor name="new" c:identifier="gtk_drag_source_new">
<doc xml:space="preserve">Creates a new `GtkDragSource` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</return-value>
</constructor>
<method name="drag_cancel" c:identifier="gtk_drag_source_drag_cancel">
<doc xml:space="preserve">Cancels a currently ongoing drag operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_actions" c:identifier="gtk_drag_source_get_actions" glib:get-property="actions">
<attribute name="org.gtk.Method.get_property" value="actions"/>
<doc xml:space="preserve">Gets the actions that are currently set on the `GtkDragSource`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the actions set on @source</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_content" c:identifier="gtk_drag_source_get_content" glib:get-property="content">
<attribute name="org.gtk.Method.get_property" value="content"/>
<doc xml:space="preserve">Gets the current content provider of a `GtkDragSource`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GdkContentProvider` of @source</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_drag" c:identifier="gtk_drag_source_get_drag">
<doc xml:space="preserve">Returns the underlying `GdkDrag` object for an ongoing drag.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GdkDrag` of the current
drag operation</doc>
<type name="Gdk.Drag" c:type="GdkDrag*"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_actions" c:identifier="gtk_drag_source_set_actions" glib:set-property="actions">
<attribute name="org.gtk.Method.set_property" value="actions"/>
<doc xml:space="preserve">Sets the actions on the `GtkDragSource`.
During a DND operation, the actions are offered to potential
drop targets. If @actions include %GDK_ACTION_MOVE, you need
to listen to the [signal@Gtk.DragSource::drag-end] signal and
handle @delete_data being %TRUE.
This function can be called before a drag is started,
or in a handler for the [signal@Gtk.DragSource::prepare] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the actions to offer</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="set_content" c:identifier="gtk_drag_source_set_content" glib:set-property="content">
<attribute name="org.gtk.Method.set_property" value="content"/>
<doc xml:space="preserve">Sets a content provider on a `GtkDragSource`.
When the data is requested in the cause of a DND operation,
it will be obtained from the content provider.
This function can be called before a drag is started,
or in a handler for the [signal@Gtk.DragSource::prepare] signal.
You may consider setting the content provider back to
%NULL in a [signal@Gtk.DragSource::drag-end] signal handler.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
<parameter name="content" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkContentProvider`</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</parameter>
</parameters>
</method>
<method name="set_icon" c:identifier="gtk_drag_source_set_icon">
<doc xml:space="preserve">Sets a paintable to use as icon during DND operations.
The hotspot coordinates determine the point on the icon
that gets aligned with the hotspot of the cursor.
If @paintable is %NULL, a default icon is used.
This function can be called before a drag is started, or in
a [signal@Gtk.DragSource::prepare] or
[signal@Gtk.DragSource::drag-begin] signal handler.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDragSource`</doc>
<type name="DragSource" c:type="GtkDragSource*"/>
</instance-parameter>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkPaintable` to use as icon</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
<parameter name="hot_x" transfer-ownership="none">
<doc xml:space="preserve">the hotspot X coordinate on the icon</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="hot_y" transfer-ownership="none">
<doc xml:space="preserve">the hotspot Y coordinate on the icon</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="actions" writable="1" transfer-ownership="none" setter="set_actions" getter="get_actions">
<attribute name="org.gtk.Property.get" value="gtk_drag_source_get_actions"/>
<attribute name="org.gtk.Property.set" value="gtk_drag_source_set_actions"/>
<doc xml:space="preserve">The actions that are supported by drag operations from the source.
Note that you must handle the [signal@Gtk.DragSource::drag-end] signal
if the actions include %GDK_ACTION_MOVE.</doc>
<type name="Gdk.DragAction"/>
</property>
<property name="content" writable="1" transfer-ownership="none" setter="set_content" getter="get_content">
<attribute name="org.gtk.Property.get" value="gtk_drag_source_get_content"/>
<attribute name="org.gtk.Propery.set" value="gtk_drag_source_set_content"/>
<doc xml:space="preserve">The data that is offered by drag operations from this source.</doc>
<type name="Gdk.ContentProvider"/>
</property>
<glib:signal name="drag-begin" when="last">
<doc xml:space="preserve">Emitted on the drag source when a drag is started.
It can be used to e.g. set a custom drag icon with
[method@Gtk.DragSource.set_icon].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drag" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrag` object</doc>
<type name="Gdk.Drag"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-cancel" when="last">
<doc xml:space="preserve">Emitted on the drag source when a drag has failed.
The signal handler may handle a failed drag operation based on
the type of error. It should return %TRUE if the failure has been handled
and the default "drag operation failed" animation should not be shown.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the failed drag operation has been already handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drag" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrag` object</doc>
<type name="Gdk.Drag"/>
</parameter>
<parameter name="reason" transfer-ownership="none">
<doc xml:space="preserve">information on why the drag failed</doc>
<type name="Gdk.DragCancelReason"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-end" when="last">
<doc xml:space="preserve">Emitted on the drag source when a drag is finished.
A typical reason to connect to this signal is to undo
things done in [signal@Gtk.DragSource::prepare] or
[signal@Gtk.DragSource::drag-begin] handlers.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drag" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrag` object</doc>
<type name="Gdk.Drag"/>
</parameter>
<parameter name="delete_data" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the drag was performing %GDK_ACTION_MOVE,
and the data should be deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="prepare" when="last">
<doc xml:space="preserve">Emitted when a drag is about to be initiated.
It returns the `GdkContentProvider` to use for the drag that is about
to start. The default handler for this signal returns the value of
the [property@Gtk.DragSource:content] property, so if you set up that
property ahead of time, you don't need to connect to this signal.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GdkContentProvider`</doc>
<type name="Gdk.ContentProvider"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate of the drag starting point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate fo the drag starting point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="DragSourceClass" c:type="GtkDragSourceClass" disguised="1" glib:is-gtype-struct-for="DragSource"/>
<class name="DrawingArea" c:symbol-prefix="drawing_area" c:type="GtkDrawingArea" parent="Widget" glib:type-name="GtkDrawingArea" glib:get-type="gtk_drawing_area_get_type" glib:type-struct="DrawingAreaClass">
<doc xml:space="preserve">`GtkDrawingArea` is a widget that allows drawing with cairo.
![An example GtkDrawingArea](drawingarea.png)
It&#x2019;s essentially a blank widget; you can draw on it. After
creating a drawing area, the application may want to connect to:
- The [signal@Gtk.Widget::realize] signal to take any necessary actions
when the widget is instantiated on a particular display.
(Create GDK resources in response to this signal.)
- The [signal@Gtk.DrawingArea::resize] signal to take any necessary
actions when the widget changes size.
- Call [method@Gtk.DrawingArea.set_draw_func] to handle redrawing the
contents of the widget.
The following code portion demonstrates using a drawing
area to display a circle in the normal widget foreground
color.
## Simple GtkDrawingArea usage
```c
static void
draw_function (GtkDrawingArea *area,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GdkRGBA color;
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (area));
cairo_arc (cr,
width / 2.0, height / 2.0,
MIN (width, height) / 2.0,
0, 2 * G_PI);
gtk_style_context_get_color (context,
&amp;color);
gdk_cairo_set_source_rgba (cr, &amp;color);
cairo_fill (cr);
}
int
main (int argc, char **argv)
{
gtk_init ();
GtkWidget *area = gtk_drawing_area_new ();
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (area), 100);
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 100);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area),
draw_function,
NULL, NULL);
return 0;
}
```
The draw function is normally called when a drawing area first comes
onscreen, or when it&#x2019;s covered by another window and then uncovered.
You can also force a redraw by adding to the &#x201C;damage region&#x201D; of the
drawing area&#x2019;s window using [method@Gtk.Widget.queue_draw].
This will cause the drawing area to call the draw function again.
The available routines for drawing are documented in the
[Cairo documentation](https://www.cairographics.org/manual/); GDK
offers additional API to integrate with Cairo, like [func@Gdk.cairo_set_source_rgba]
or [func@Gdk.cairo_set_source_pixbuf].
To receive mouse events on a drawing area, you will need to use
event controllers. To receive keyboard events, you will need to set
the &#x201C;can-focus&#x201D; property on the drawing area, and you should probably
draw some user-visible indication that the drawing area is focused.
If you need more complex control over your widget, you should consider
creating your own `GtkWidget` subclass.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_drawing_area_new">
<doc xml:space="preserve">Creates a new drawing area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkDrawingArea`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<virtual-method name="resize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_content_height" c:identifier="gtk_drawing_area_get_content_height" glib:get-property="content-height">
<attribute name="org.gtk.Method.get_property" value="content-height"/>
<doc xml:space="preserve">Retrieves the content height of the `GtkDrawingArea`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The height requested for content of the drawing area</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDrawingArea`</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_content_width" c:identifier="gtk_drawing_area_get_content_width" glib:get-property="content-width">
<attribute name="org.gtk.Method.get_property" value="content-width"/>
<doc xml:space="preserve">Retrieves the content width of the `GtkDrawingArea`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The width requested for content of the drawing area</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDrawingArea`</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_content_height" c:identifier="gtk_drawing_area_set_content_height" glib:set-property="content-height">
<attribute name="org.gtk.Method.set_property" value="content-height"/>
<doc xml:space="preserve">Sets the desired height of the contents of the drawing area.
Note that because widgets may be allocated larger sizes than they
requested, it is possible that the actual height passed to your draw
function is larger than the height set here. You can use
[method@Gtk.Widget.set_valign] to avoid that.
If the height is set to 0 (the default), the drawing area may disappear.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDrawingArea`</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height of contents</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_content_width" c:identifier="gtk_drawing_area_set_content_width" glib:set-property="content-width">
<attribute name="org.gtk.Method.set_property" value="content-width"/>
<doc xml:space="preserve">Sets the desired width of the contents of the drawing area.
Note that because widgets may be allocated larger sizes than they
requested, it is possible that the actual width passed to your draw
function is larger than the width set here. You can use
[method@Gtk.Widget.set_halign] to avoid that.
If the width is set to 0 (the default), the drawing area may disappear.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDrawingArea`</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width of contents</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_draw_func" c:identifier="gtk_drawing_area_set_draw_func">
<doc xml:space="preserve">Setting a draw function is the main thing you want to do when using
a drawing area.
The draw function is called whenever GTK needs to draw the contents
of the drawing area to the screen.
The draw function will be called during the drawing stage of GTK.
In the drawing stage it is not allowed to change properties of any
GTK widgets or call any functions that would cause any properties
to be changed. You should restrict yourself exclusively to drawing
your contents in the draw function.
If what you are drawing does change, call [method@Gtk.Widget.queue_draw]
on the drawing area. This will cause a redraw and will call @draw_func again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDrawingArea`</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</instance-parameter>
<parameter name="draw_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">callback that lets you draw
the drawing area's contents</doc>
<type name="DrawingAreaDrawFunc" c:type="GtkDrawingAreaDrawFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @draw_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<property name="content-height" writable="1" transfer-ownership="none" setter="set_content_height" getter="get_content_height">
<attribute name="org.gtk.Property.get" value="gtk_drawing_area_get_content_height"/>
<attribute name="org.gtk.Property.set" value="gtk_drawing_area_set_content_height"/>
<doc xml:space="preserve">The content height.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="content-width" writable="1" transfer-ownership="none" setter="set_content_width" getter="get_content_width">
<attribute name="org.gtk.Property.get" value="gtk_drawing_area_get_content_width"/>
<attribute name="org.gtk.Property.set" value="gtk_drawing_area_set_content_width"/>
<doc xml:space="preserve">The content width.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="widget">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="resize" when="last">
<doc xml:space="preserve">Emitted once when the widget is realized, and then each time the widget
is changed while realized.
This is useful in order to keep state up to date with the widget size,
like for instance a backing surface.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width of the viewport</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height of the viewport</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="DrawingAreaClass" c:type="GtkDrawingAreaClass" glib:is-gtype-struct-for="DrawingArea">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="resize">
<callback name="resize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<callback name="DrawingAreaDrawFunc" c:type="GtkDrawingAreaDrawFunc">
<doc xml:space="preserve">Whenever @drawing_area needs to redraw, this function will be called.
This function should exclusively redraw the contents of the drawing area
and must not call any widget functions that cause changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drawing_area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkDrawingArea` to redraw</doc>
<type name="DrawingArea" c:type="GtkDrawingArea*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">the context to draw to</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the actual width of the contents. This value will be at least
as wide as GtkDrawingArea:width.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the actual height of the contents. This value will be at least
as wide as GtkDrawingArea:height.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="DropControllerMotion" c:symbol-prefix="drop_controller_motion" c:type="GtkDropControllerMotion" parent="EventController" glib:type-name="GtkDropControllerMotion" glib:get-type="gtk_drop_controller_motion_get_type" glib:type-struct="DropControllerMotionClass">
<doc xml:space="preserve">`GtkDropControllerMotion` is an event controller tracking
the pointer during Drag-and-Drop operations.
It is modeled after [class@Gtk.EventControllerMotion] so if you
have used that, this should feel really familiar.
This controller is not able to accept drops, use [class@Gtk.DropTarget]
for that purpose.</doc>
<constructor name="new" c:identifier="gtk_drop_controller_motion_new">
<doc xml:space="preserve">Creates a new event controller that will handle pointer motion
events during drag and drop.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkDropControllerMotion`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<method name="contains_pointer" c:identifier="gtk_drop_controller_motion_contains_pointer" glib:get-property="contains-pointer">
<attribute name="org.gtk.Method.get_property" value="contains-pointer"/>
<doc xml:space="preserve">Returns if a Drag-and-Drop operation is within the widget
@self or one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a dragging pointer is within @self or one of its children.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropControllerMotion`</doc>
<type name="DropControllerMotion" c:type="GtkDropControllerMotion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_drop" c:identifier="gtk_drop_controller_motion_get_drop" glib:get-property="drop">
<attribute name="org.gtk.Method.get_property" value="drop"/>
<doc xml:space="preserve">Returns the `GdkDrop` of a current Drag-and-Drop operation
over the widget of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The `GdkDrop` currently
happening within @self</doc>
<type name="Gdk.Drop" c:type="GdkDrop*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropControllerMotion`</doc>
<type name="DropControllerMotion" c:type="GtkDropControllerMotion*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_pointer" c:identifier="gtk_drop_controller_motion_is_pointer" glib:get-property="is-pointer">
<attribute name="org.gtk.Method.get_property" value="is-pointer"/>
<doc xml:space="preserve">Returns if a Drag-and-Drop operation is within the widget
@self, not one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a dragging pointer is within @self but
not one of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropControllerMotion`</doc>
<type name="DropControllerMotion" c:type="GtkDropControllerMotion*"/>
</instance-parameter>
</parameters>
</method>
<property name="contains-pointer" transfer-ownership="none" getter="contains_pointer">
<attribute name="org.gtk.Property.get" value="gtk_drop_controller_motion_contains_pointer"/>
<doc xml:space="preserve">Whether the pointer of a Drag-and-Drop operation is in
the controller's widget or a descendant.
See also [property@Gtk.DropControllerMotion:is-pointer].
When handling crossing events, this property is updated
before [signal@Gtk.DropControllerMotion::enter], but after
[signal@Gtk.DropControllerMotion::leave] is emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="drop" transfer-ownership="none" getter="get_drop">
<attribute name="org.gtk.Property.get" value="gtk_drop_controller_motion_get_drop"/>
<doc xml:space="preserve">The ongoing drop operation over the controller's widget or
its descendant.
If no drop operation is going on, this property returns %NULL.
The event controller should not modify the @drop, but it might
want to query its properties.
When handling crossing events, this property is updated
before [signal@Gtk.DropControllerMotion::enter], but after
[signal@Gtk.DropControllerMotion::leave] is emitted.</doc>
<type name="Gdk.Drop"/>
</property>
<property name="is-pointer" transfer-ownership="none" getter="is_pointer">
<attribute name="org.gtk.Property.get" value="gtk_drop_controller_motion_is_pointer"/>
<doc xml:space="preserve">Whether the pointer is in the controllers widget itself,
as opposed to in a descendent widget.
See also [property@Gtk.DropControllerMotion:contains-pointer].
When handling crossing events, this property is updated
before [signal@Gtk.DropControllerMotion::enter], but after
[signal@Gtk.DropControllerMotion::leave] is emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="enter" when="last">
<doc xml:space="preserve">Signals that the pointer has entered the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">coordinates of pointer location</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">coordinates of pointer location</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="leave" when="last">
<doc xml:space="preserve">Signals that the pointer has left the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="motion" when="first">
<doc xml:space="preserve">Emitted when the pointer moves inside the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="DropControllerMotionClass" c:type="GtkDropControllerMotionClass" disguised="1" glib:is-gtype-struct-for="DropControllerMotion"/>
<class name="DropDown" c:symbol-prefix="drop_down" c:type="GtkDropDown" parent="Widget" glib:type-name="GtkDropDown" glib:get-type="gtk_drop_down_get_type" glib:type-struct="DropDownClass">
<doc xml:space="preserve">`GtkDropDown` is a widget that allows the user to choose an item
from a list of options.
![An example GtkDropDown](drop-down.png)
The `GtkDropDown` displays the selected choice.
The options are given to `GtkDropDown` in the form of `GListModel`
and how the individual options are represented is determined by
a [class@Gtk.ListItemFactory]. The default factory displays simple strings.
`GtkDropDown` knows how to obtain strings from the items in a
[class@Gtk.StringList]; for other models, you have to provide an expression
to find the strings via [method@Gtk.DropDown.set_expression].
`GtkDropDown` can optionally allow search in the popup, which is
useful if the list of options is long. To enable the search entry,
use [method@Gtk.DropDown.set_enable_search].
# CSS nodes
`GtkDropDown` has a single CSS node with name dropdown,
with the button and popover nodes as children.
# Accessibility
`GtkDropDown` uses the %GTK_ACCESSIBLE_ROLE_COMBO_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_drop_down_new">
<doc xml:space="preserve">Creates a new `GtkDropDown`.
You may want to call [method@Gtk.DropDown.set_factory]
to set up a way to map its items to widgets.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkDropDown`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the expression to use</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_strings" c:identifier="gtk_drop_down_new_from_strings">
<doc xml:space="preserve">Creates a new `GtkDropDown` that is populated with
the strings.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkDropDown`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="strings" transfer-ownership="none">
<doc xml:space="preserve">The strings to put in the dropdown</doc>
<array c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="get_enable_search" c:identifier="gtk_drop_down_get_enable_search" glib:get-property="enable-search">
<attribute name="org.gtk.Method.set_property" value="enable-search"/>
<doc xml:space="preserve">Returns whether search is enabled.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popup includes a search entry</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expression" c:identifier="gtk_drop_down_get_expression" glib:get-property="expression">
<attribute name="org.gtk.Method.get_property" value="expression"/>
<doc xml:space="preserve">Gets the expression set that is used to obtain strings from items.
See [method@Gtk.DropDown.set_expression].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_factory" c:identifier="gtk_drop_down_get_factory" glib:get-property="factory">
<attribute name="org.gtk.Method.get_property" value="factory"/>
<doc xml:space="preserve">Gets the factory that's currently used to populate list items.
The factory returned by this function is always used for the
item in the button. It is also used for items in the popup
if [property@Gtk.DropDown:list-factory] is not set.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The factory in use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_list_factory" c:identifier="gtk_drop_down_get_list_factory" glib:get-property="list-factory">
<attribute name="org.gtk.Method.get_property" value="list-factory"/>
<doc xml:space="preserve">Gets the factory that's currently used to populate list items in the popup.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The factory in use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_drop_down_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that provides the displayed items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model in use</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected" c:identifier="gtk_drop_down_get_selected" glib:get-property="selected">
<attribute name="org.gtk.Method.get_property" value="selected"/>
<doc xml:space="preserve">Gets the position of the selected item.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the position of the selected item, or %GTK_INVALID_LIST_POSITION
if not item is selected</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_item" c:identifier="gtk_drop_down_get_selected_item" glib:get-property="selected-item">
<attribute name="org.gtk.Method.get_property" value="selected-item"/>
<doc xml:space="preserve">Gets the selected item. If no item is selected, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The selected item</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_arrow" c:identifier="gtk_drop_down_get_show_arrow" glib:get-property="show-arrow" version="4.6">
<attribute name="org.gtk.Method.set_property" value="show-arrow"/>
<doc xml:space="preserve">Returns whether to show an arrow within the widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an arrow will be shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_enable_search" c:identifier="gtk_drop_down_set_enable_search" glib:set-property="enable-search">
<attribute name="org.gtk.Method.set_property" value="enable-search"/>
<doc xml:space="preserve">Sets whether a search entry will be shown in the popup that
allows to search for items in the list.
Note that [property@Gtk.DropDown:expression] must be set for
search to work.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="enable_search" transfer-ownership="none">
<doc xml:space="preserve">whether to enable search</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_expression" c:identifier="gtk_drop_down_set_expression" glib:set-property="expression">
<attribute name="org.gtk.Method.set_property" value="expression"/>
<doc xml:space="preserve">Sets the expression that gets evaluated to obtain strings from items.
This is used for search in the popup. The expression must have
a value type of %G_TYPE_STRING.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="expression" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</method>
<method name="set_factory" c:identifier="gtk_drop_down_set_factory" glib:set-property="factory">
<attribute name="org.gtk.Method.set_property" value="factory"/>
<doc xml:space="preserve">Sets the `GtkListItemFactory` to use for populating list items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="factory" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the factory to use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</method>
<method name="set_list_factory" c:identifier="gtk_drop_down_set_list_factory" glib:set-property="list-factory">
<attribute name="org.gtk.Method.set_property" value="list-factory"/>
<doc xml:space="preserve">Sets the `GtkListItemFactory` to use for populating list items in the popup.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="factory" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the factory to use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_drop_down_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the `GListModel` to use.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<method name="set_selected" c:identifier="gtk_drop_down_set_selected" glib:set-property="selected">
<attribute name="org.gtk.Method.set_property" value="selected"/>
<doc xml:space="preserve">Selects the item at the given position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to select, or %GTK_INVALID_LIST_POSITION</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_show_arrow" c:identifier="gtk_drop_down_set_show_arrow" glib:set-property="show-arrow" version="4.6">
<attribute name="org.gtk.Method.set_property" value="show-arrow"/>
<doc xml:space="preserve">Sets whether an arrow will be displayed within the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropDown`</doc>
<type name="DropDown" c:type="GtkDropDown*"/>
</instance-parameter>
<parameter name="show_arrow" transfer-ownership="none">
<doc xml:space="preserve">whether to show an arrow within the widget</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="enable-search" writable="1" transfer-ownership="none" setter="set_enable_search" getter="get_enable_search">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_enable_search"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_enable_search"/>
<doc xml:space="preserve">Whether to show a search entry in the popup.
Note that search requires [property@Gtk.DropDown:expression]
to be set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="expression" writable="1" transfer-ownership="none" setter="set_expression" getter="get_expression">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_expression"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_expression"/>
<doc xml:space="preserve">An expression to evaluate to obtain strings to match against the search
term.
See [property@Gtk.DropDown:enable-search] for how to enable search.
If [property@Gtk.DropDown:factory] is not set, the expression is also
used to bind strings to labels produced by a default factory.</doc>
<type name="Expression"/>
</property>
<property name="factory" writable="1" transfer-ownership="none" setter="set_factory" getter="get_factory">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_factory"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_factory"/>
<doc xml:space="preserve">Factory for populating list items.</doc>
<type name="ListItemFactory"/>
</property>
<property name="list-factory" writable="1" transfer-ownership="none" setter="set_list_factory" getter="get_list_factory">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_list_factory"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_list_factory"/>
<doc xml:space="preserve">The factory for populating list items in the popup.
If this is not set, [property@Gtk.DropDown:factory] is used.</doc>
<type name="ListItemFactory"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_model"/>
<doc xml:space="preserve">Model for the displayed items.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="selected" writable="1" transfer-ownership="none" setter="set_selected" getter="get_selected">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_selected"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_selected"/>
<doc xml:space="preserve">The position of the selected item.
If no item is selected, the property has the value
%GTK_INVALID_LIST_POSITION.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="selected-item" transfer-ownership="none" getter="get_selected_item">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_selected_item"/>
<doc xml:space="preserve">The selected item.</doc>
<type name="GObject.Object"/>
</property>
<property name="show-arrow" version="4.6" writable="1" transfer-ownership="none" setter="set_show_arrow" getter="get_show_arrow">
<attribute name="org.gtk.Property.get" value="gtk_drop_down_get_show_arrow"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_down_set_show_arrow"/>
<doc xml:space="preserve">Whether to show an arrow within the GtkDropDown widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="first" action="1" version="4.6">
<doc xml:space="preserve">Emitted to when the drop down is activated.
The `::activate` signal on `GtkDropDown` is an action signal and
emitting it causes the drop down to pop up its dropdown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="DropDownClass" c:type="GtkDropDownClass" glib:is-gtype-struct-for="DropDown">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<class name="DropTarget" c:symbol-prefix="drop_target" c:type="GtkDropTarget" parent="EventController" glib:type-name="GtkDropTarget" glib:get-type="gtk_drop_target_get_type" glib:type-struct="DropTargetClass">
<doc xml:space="preserve">`GtkDropTarget` is an event controller to receive Drag-and-Drop operations.
The most basic way to use a `GtkDropTarget` to receive drops on a
widget is to create it via [ctor@Gtk.DropTarget.new], passing in the
`GType` of the data you want to receive and connect to the
[signal@Gtk.DropTarget::drop] signal to receive the data:
```c
static gboolean
on_drop (GtkDropTarget *target,
const GValue *value,
double x,
double y,
gpointer data)
{
MyWidget *self = data;
// Call the appropriate setter depending on the type of data
// that we received
if (G_VALUE_HOLDS (value, G_TYPE_FILE))
my_widget_set_file (self, g_value_get_object (value));
else if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF))
my_widget_set_pixbuf (self, g_value_get_object (value));
else
return FALSE;
return TRUE;
}
static void
my_widget_init (MyWidget *self)
{
GtkDropTarget *target =
gtk_drop_target_new (G_TYPE_INVALID, GDK_ACTION_COPY);
// This widget accepts two types of drop types: GFile objects
// and GdkPixbuf objects
gtk_drop_target_set_gtypes (target, (GTypes [2]) {
G_TYPE_FILE,
GDK_TYPE_PIXBUF,
}, 2);
g_signal_connect (target, "drop", G_CALLBACK (on_drop), self);
gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (target));
}
```
`GtkDropTarget` supports more options, such as:
* rejecting potential drops via the [signal@Gtk.DropTarget::accept] signal
and the [method@Gtk.DropTarget.reject] function to let other drop
targets handle the drop
* tracking an ongoing drag operation before the drop via the
[signal@Gtk.DropTarget::enter], [signal@Gtk.DropTarget::motion] and
[signal@Gtk.DropTarget::leave] signals
* configuring how to receive data by setting the
[property@Gtk.DropTarget:preload] property and listening for its
availability via the [property@Gtk.DropTarget:value] property
However, `GtkDropTarget` is ultimately modeled in a synchronous way
and only supports data transferred via `GType`. If you want full control
over an ongoing drop, the [class@Gtk.DropTargetAsync] object gives you
this ability.
While a pointer is dragged over the drop target's widget and the drop
has not been rejected, that widget will receive the
%GTK_STATE_FLAG_DROP_ACTIVE state, which can be used to style the widget.
If you are not interested in receiving the drop, but just want to update
UI state during a Drag-and-Drop operation (e.g. switching tabs), you can
use [class@Gtk.DropControllerMotion].</doc>
<constructor name="new" c:identifier="gtk_drop_target_new">
<doc xml:space="preserve">Creates a new `GtkDropTarget` object.
If the drop target should support more than 1 type, pass
%G_TYPE_INVALID for @type and then call
[method@Gtk.DropTarget.set_gtypes].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</return-value>
<parameters>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The supported type or %G_TYPE_INVALID</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the supported actions</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</constructor>
<method name="get_actions" c:identifier="gtk_drop_target_get_actions" glib:get-property="actions">
<attribute name="org.gtk.Method.get_property" value="actions"/>
<doc xml:space="preserve">Gets the actions that this drop target supports.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the actions that this drop target supports</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_drop" c:identifier="gtk_drop_target_get_current_drop" glib:get-property="current-drop" version="4.4">
<attribute name="org.gtk.Method.get_property" value="current-drop"/>
<doc xml:space="preserve">Gets the currently handled drop operation.
If no drop operation is going on, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current drop</doc>
<type name="Gdk.Drop" c:type="GdkDrop*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_drop" c:identifier="gtk_drop_target_get_drop" glib:get-property="drop" deprecated="1" deprecated-version="4.4">
<attribute name="org.gtk.Method.get_property" value="drop"/>
<doc xml:space="preserve">Gets the currently handled drop operation.
If no drop operation is going on, %NULL is returned.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.DropTarget.get_current_drop] instead</doc-deprecated>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current drop</doc>
<type name="Gdk.Drop" c:type="GdkDrop*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_formats" c:identifier="gtk_drop_target_get_formats" glib:get-property="formats">
<attribute name="org.gtk.Method.get_property" value="formats"/>
<doc xml:space="preserve">Gets the data formats that this drop target accepts.
If the result is %NULL, all formats are expected to be supported.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the supported data formats</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_gtypes" c:identifier="gtk_drop_target_get_gtypes">
<doc xml:space="preserve">Gets the list of supported `GType`s that can be dropped on the target.
If no types have been set, `NULL` will be returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">
the `G_TYPE_INVALID`-terminated array of types included in
formats</doc>
<array length="0" zero-terminated="0" c:type="const GType*">
<type name="GType" c:type="GType"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
<parameter name="n_types" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the number of `GType`s contained in the
return value</doc>
<type name="gsize" c:type="gsize*"/>
</parameter>
</parameters>
</method>
<method name="get_preload" c:identifier="gtk_drop_target_get_preload" glib:get-property="preload">
<attribute name="org.gtk.Method.get_property" value="preload"/>
<doc xml:space="preserve">Gets whether data should be preloaded on hover.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if drop data should be preloaded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_drop_target_get_value" glib:get-property="value">
<attribute name="org.gtk.Method.get_property" value="value"/>
<doc xml:space="preserve">Gets the current drop data, as a `GValue`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current drop data</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="reject" c:identifier="gtk_drop_target_reject">
<doc xml:space="preserve">Rejects the ongoing drop operation.
If no drop operation is ongoing, i.e when [property@Gtk.DropTarget:current-drop]
is %NULL, this function does nothing.
This function should be used when delaying the decision
on whether to accept a drag or not until after reading
the data.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_actions" c:identifier="gtk_drop_target_set_actions" glib:set-property="actions">
<attribute name="org.gtk.Method.set_property" value="actions"/>
<doc xml:space="preserve">Sets the actions that this drop target supports.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the supported actions</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="set_gtypes" c:identifier="gtk_drop_target_set_gtypes">
<doc xml:space="preserve">Sets the supported `GTypes` for this drop target.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
<parameter name="types" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">all supported `GType`s
that can be dropped on the target</doc>
<array length="1" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
<parameter name="n_types" transfer-ownership="none">
<doc xml:space="preserve">number of @types</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="set_preload" c:identifier="gtk_drop_target_set_preload" glib:set-property="preload">
<attribute name="org.gtk.Method.set_property" value="preload"/>
<doc xml:space="preserve">Sets whether data should be preloaded on hover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTarget`</doc>
<type name="DropTarget" c:type="GtkDropTarget*"/>
</instance-parameter>
<parameter name="preload" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to preload drop data</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="actions" writable="1" transfer-ownership="none" setter="set_actions" getter="get_actions">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_actions"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_target_set_actions"/>
<doc xml:space="preserve">The `GdkDragActions` that this drop target supports.</doc>
<type name="Gdk.DragAction"/>
</property>
<property name="current-drop" version="4.4" transfer-ownership="none" getter="get_current_drop">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_current_drop"/>
<doc xml:space="preserve">The `GdkDrop` that is currently being performed.</doc>
<type name="Gdk.Drop"/>
</property>
<property name="drop" introspectable="0" deprecated="1" deprecated-version="4.4" transfer-ownership="none" getter="get_drop">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_drop"/>
<doc xml:space="preserve">The `GdkDrop` that is currently being performed.</doc>
<doc-deprecated xml:space="preserve">Use [property@Gtk.DropTarget:current-drop] instead</doc-deprecated>
<type name="Gdk.Drop"/>
</property>
<property name="formats" writable="1" construct-only="1" transfer-ownership="none" getter="get_formats">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_formats"/>
<doc xml:space="preserve">The `GdkContentFormats` that determine the supported data formats.</doc>
<type name="Gdk.ContentFormats"/>
</property>
<property name="preload" writable="1" transfer-ownership="none" setter="set_preload" getter="get_preload">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_preload"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_target_set_preload"/>
<doc xml:space="preserve">Whether the drop data should be preloaded when the pointer is only
hovering over the widget but has not been released.
Setting this property allows finer grained reaction to an ongoing
drop at the cost of loading more data.
The default value for this property is %FALSE to avoid downloading
huge amounts of data by accident.
For example, if somebody drags a full document of gigabytes of text
from a text editor across a widget with a preloading drop target,
this data will be downloaded, even if the data is ultimately dropped
elsewhere.
For a lot of data formats, the amount of data is very small (like
%GDK_TYPE_RGBA), so enabling this property does not hurt at all.
And for local-only Drag-and-Drop operations, no data transfer is done,
so enabling it there is free.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="value" transfer-ownership="none" getter="get_value">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_get_value"/>
<doc xml:space="preserve">The value for this drop operation.
This is %NULL if the data has not been loaded yet or no drop
operation is going on.
Data may be available before the [signal@Gtk.DropTarget::drop]
signal gets emitted - for example when the [property@Gtk.DropTarget:preload]
property is set. You can use the ::notify signal to be notified
of available data.</doc>
<type name="GObject.Value"/>
</property>
<glib:signal name="accept" when="last">
<doc xml:space="preserve">Emitted on the drop site when a drop operation is about to begin.
If the drop is not accepted, %FALSE will be returned and the drop target
will ignore the drop. If %TRUE is returned, the drop is accepted for now
but may be rejected later via a call to [method@Gtk.DropTarget.reject]
or ultimately by returning %FALSE from a [signal@Gtk.DropTarget::drop]
handler.
The default handler for this signal decides whether to accept the drop
based on the formats provided by the @drop.
If the decision whether the drop will be accepted or rejected depends
on the data, this function should return %TRUE, the
[property@Gtk.DropTarget:preload] property should be set and the value
should be inspected via the ::notify:value signal, calling
[method@Gtk.DropTarget.reject] if required.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @drop is accepted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drop" when="last">
<doc xml:space="preserve">Emitted on the drop site when the user drops the data onto the widget.
The signal handler must determine whether the pointer position is in
a drop zone or not. If it is not in a drop zone, it returns %FALSE
and no further processing is necessary.
Otherwise, the handler returns %TRUE. In this case, this handler will
accept the drop. The handler is responsible for using the given @value
and performing the drop operation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the drop was accepted at the given pointer position</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the `GValue` being dropped</doc>
<type name="GObject.Value"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="enter" when="last">
<doc xml:space="preserve">Emitted on the drop site when the pointer enters the widget.
It can be used to set up custom highlighting.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Preferred action for this drag operation or 0 if
dropping is not supported at the current @x,@y location.</doc>
<type name="Gdk.DragAction"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="leave" when="last">
<doc xml:space="preserve">Emitted on the drop site when the pointer leaves the widget.
Its main purpose it to undo things done in
[signal@Gtk.DropTarget::enter].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="motion" when="last">
<doc xml:space="preserve">Emitted while the pointer is moving over the drop target.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Preferred action for this drag operation or 0 if
dropping is not supported at the current @x,@y location.</doc>
<type name="Gdk.DragAction"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="DropTargetAsync" c:symbol-prefix="drop_target_async" c:type="GtkDropTargetAsync" parent="EventController" glib:type-name="GtkDropTargetAsync" glib:get-type="gtk_drop_target_async_get_type" glib:type-struct="DropTargetAsyncClass">
<doc xml:space="preserve">`GtkDropTargetAsync` is an event controller to receive Drag-and-Drop
operations, asynchronously.
It is the more complete but also more complex method of handling drop
operations compared to [class@Gtk.DropTarget], and you should only use
it if `GtkDropTarget` doesn't provide all the features you need.
To use a `GtkDropTargetAsync` to receive drops on a widget, you create
a `GtkDropTargetAsync` object, configure which data formats and actions
you support, connect to its signals, and then attach it to the widget
with [method@Gtk.Widget.add_controller].
During a drag operation, the first signal that a `GtkDropTargetAsync`
emits is [signal@Gtk.DropTargetAsync::accept], which is meant to determine
whether the target is a possible drop site for the ongoing drop. The
default handler for the ::accept signal accepts the drop if it finds
a compatible data format and an action that is supported on both sides.
If it is, and the widget becomes a target, you will receive a
[signal@Gtk.DropTargetAsync::drag-enter] signal, followed by
[signal@Gtk.DropTargetAsync::drag-motion] signals as the pointer moves,
optionally a [signal@Gtk.DropTargetAsync::drop] signal when a drop happens,
and finally a [signal@Gtk.DropTargetAsync::drag-leave] signal when the
pointer moves off the widget.
The ::drag-enter and ::drag-motion handler return a `GdkDragAction`
to update the status of the ongoing operation. The ::drop handler
should decide if it ultimately accepts the drop and if it does, it
should initiate the data transfer and finish the operation by calling
[method@Gdk.Drop.finish].
Between the ::drag-enter and ::drag-leave signals the widget is a
current drop target, and will receive the %GTK_STATE_FLAG_DROP_ACTIVE
state, which can be used by themes to style the widget as a drop target.</doc>
<constructor name="new" c:identifier="gtk_drop_target_async_new">
<doc xml:space="preserve">Creates a new `GtkDropTargetAsync` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</return-value>
<parameters>
<parameter name="formats" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the supported data formats</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the supported actions</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</constructor>
<method name="get_actions" c:identifier="gtk_drop_target_async_get_actions" glib:get-property="actions">
<attribute name="org.gtk.Method.get_property" value="actions"/>
<doc xml:space="preserve">Gets the actions that this drop target supports.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the actions that this drop target supports</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_formats" c:identifier="gtk_drop_target_async_get_formats" glib:get-property="formats">
<attribute name="org.gtk.Method.get_property" value="formats"/>
<doc xml:space="preserve">Gets the data formats that this drop target accepts.
If the result is %NULL, all formats are expected to be supported.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the supported data formats</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</instance-parameter>
</parameters>
</method>
<method name="reject_drop" c:identifier="gtk_drop_target_async_reject_drop">
<doc xml:space="preserve">Sets the @drop as not accepted on this drag site.
This function should be used when delaying the decision
on whether to accept a drag or not until after reading
the data.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</instance-parameter>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop` of an ongoing drag operation</doc>
<type name="Gdk.Drop" c:type="GdkDrop*"/>
</parameter>
</parameters>
</method>
<method name="set_actions" c:identifier="gtk_drop_target_async_set_actions" glib:set-property="actions">
<attribute name="org.gtk.Method.set_property" value="actions"/>
<doc xml:space="preserve">Sets the actions that this drop target supports.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</instance-parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the supported actions</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="set_formats" c:identifier="gtk_drop_target_async_set_formats" glib:set-property="formats">
<attribute name="org.gtk.Method.set_property" value="formats"/>
<doc xml:space="preserve">Sets the data formats that this drop target will accept.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkDropTargetAsync`</doc>
<type name="DropTargetAsync" c:type="GtkDropTargetAsync*"/>
</instance-parameter>
<parameter name="formats" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the supported data formats or %NULL for any format</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
</parameters>
</method>
<property name="actions" writable="1" transfer-ownership="none" setter="set_actions" getter="get_actions">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_async_get_actions"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_target_async_set_actions"/>
<doc xml:space="preserve">The `GdkDragActions` that this drop target supports.</doc>
<type name="Gdk.DragAction"/>
</property>
<property name="formats" writable="1" transfer-ownership="none" setter="set_formats" getter="get_formats">
<attribute name="org.gtk.Property.get" value="gtk_drop_target_async_get_formats"/>
<attribute name="org.gtk.Property.set" value="gtk_drop_target_async_set_formats"/>
<doc xml:space="preserve">The `GdkContentFormats` that determines the supported data formats.</doc>
<type name="Gdk.ContentFormats"/>
</property>
<glib:signal name="accept" when="last">
<doc xml:space="preserve">Emitted on the drop site when a drop operation is about to begin.
If the drop is not accepted, %FALSE will be returned and the drop target
will ignore the drop. If %TRUE is returned, the drop is accepted for now
but may be rejected later via a call to [method@Gtk.DropTargetAsync.reject_drop]
or ultimately by returning %FALSE from a [signal@Gtk.DropTargetAsync::drop]
handler.
The default handler for this signal decides whether to accept the drop
based on the formats provided by the @drop.
If the decision whether the drop will be accepted or rejected needs
further processing, such as inspecting the data, this function should
return %TRUE and proceed as is @drop was accepted and if it decides to
reject the drop later, it should call [method@Gtk.DropTargetAsync.reject_drop].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @drop is accepted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-enter" when="last">
<doc xml:space="preserve">Emitted on the drop site when the pointer enters the widget.
It can be used to set up custom highlighting.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Preferred action for this drag operation.</doc>
<type name="Gdk.DragAction"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-leave" when="last">
<doc xml:space="preserve">Emitted on the drop site when the pointer leaves the widget.
Its main purpose it to undo things done in
`GtkDropTargetAsync`::drag-enter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-motion" when="last">
<doc xml:space="preserve">Emitted while the pointer is moving over the drop target.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Preferred action for this drag operation.</doc>
<type name="Gdk.DragAction"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drop" when="last">
<doc xml:space="preserve">Emitted on the drop site when the user drops the data onto the widget.
The signal handler must determine whether the pointer position is in a
drop zone or not. If it is not in a drop zone, it returns %FALSE and no
further processing is necessary.
Otherwise, the handler returns %TRUE. In this case, this handler will
accept the drop. The handler must ensure that [method@Gdk.Drop.finish]
is called to let the source know that the drop is done. The call to
[method@Gdk.Drop.finish] must only be done when all data has been received.
To receive the data, use one of the read functions provided by
[class@Gdk.Drop] such as [method@Gdk.Drop.read_async] or
[method@Gdk.Drop.read_value_async].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the drop is accepted at the given pointer position</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drop" transfer-ownership="none">
<doc xml:space="preserve">the `GdkDrop`</doc>
<type name="Gdk.Drop"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the current pointer position</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="DropTargetAsyncClass" c:type="GtkDropTargetAsyncClass" disguised="1" glib:is-gtype-struct-for="DropTargetAsync"/>
<record name="DropTargetClass" c:type="GtkDropTargetClass" disguised="1" glib:is-gtype-struct-for="DropTarget"/>
<function-macro name="EDITABLE" c:identifier="GTK_EDITABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="EDITABLE_GET_IFACE" c:identifier="GTK_EDITABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="EMOJI_CHOOSER" c:identifier="GTK_EMOJI_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="EMOJI_CHOOSER_CLASS" c:identifier="GTK_EMOJI_CHOOSER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="EMOJI_CHOOSER_GET_CLASS" c:identifier="GTK_EMOJI_CHOOSER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY" c:identifier="GTK_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_BUFFER" c:identifier="GTK_ENTRY_BUFFER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_BUFFER_CLASS" c:identifier="GTK_ENTRY_BUFFER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_BUFFER_GET_CLASS" c:identifier="GTK_ENTRY_BUFFER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_CLASS" c:identifier="GTK_ENTRY_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_COMPLETION" c:identifier="GTK_ENTRY_COMPLETION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ENTRY_GET_CLASS" c:identifier="GTK_ENTRY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER" c:identifier="GTK_EVENT_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_CLASS" c:identifier="GTK_EVENT_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_FOCUS" c:identifier="GTK_EVENT_CONTROLLER_FOCUS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_FOCUS_CLASS" c:identifier="GTK_EVENT_CONTROLLER_FOCUS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_FOCUS_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_FOCUS_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_KEY" c:identifier="GTK_EVENT_CONTROLLER_KEY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_KEY_CLASS" c:identifier="GTK_EVENT_CONTROLLER_KEY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_KEY_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_KEY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_LEGACY" c:identifier="GTK_EVENT_CONTROLLER_LEGACY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_LEGACY_CLASS" c:identifier="GTK_EVENT_CONTROLLER_LEGACY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_LEGACY_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_LEGACY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_MOTION" c:identifier="GTK_EVENT_CONTROLLER_MOTION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_MOTION_CLASS" c:identifier="GTK_EVENT_CONTROLLER_MOTION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_MOTION_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_MOTION_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_SCROLL" c:identifier="GTK_EVENT_CONTROLLER_SCROLL" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_SCROLL_CLASS" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="EVENT_CONTROLLER_SCROLL_GET_CLASS" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="EXPANDER" c:identifier="GTK_EXPANDER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="EXPRESSION" c:identifier="GTK_EXPRESSION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<interface name="Editable" c:symbol-prefix="editable" c:type="GtkEditable" glib:type-name="GtkEditable" glib:get-type="gtk_editable_get_type" glib:type-struct="EditableInterface">
<doc xml:space="preserve">`GtkEditable` is an interface for text editing widgets.
Typical examples of editable widgets are [class@Gtk.Entry] and
[class@Gtk.SpinButton]. It contains functions for generically manipulating
an editable widget, a large number of action signals used for key bindings,
and several signals that an application can connect to modify the behavior
of a widget.
As an example of the latter usage, by connecting the following handler to
[signal@Gtk.Editable::insert-text], an application can convert all entry
into a widget into uppercase.
## Forcing entry to uppercase.
```c
#include &lt;ctype.h&gt;
void
insert_text_handler (GtkEditable *editable,
const char *text,
int length,
int *position,
gpointer data)
{
char *result = g_utf8_strup (text, length);
g_signal_handlers_block_by_func (editable,
(gpointer) insert_text_handler, data);
gtk_editable_insert_text (editable, result, length, position);
g_signal_handlers_unblock_by_func (editable,
(gpointer) insert_text_handler, data);
g_signal_stop_emission_by_name (editable, "insert_text");
g_free (result);
}
```
## Implementing GtkEditable
The most likely scenario for implementing `GtkEditable` on your own widget
is that you will embed a `GtkText` inside a complex widget, and want to
delegate the editable functionality to that text widget. `GtkEditable`
provides some utility functions to make this easy.
In your class_init function, call [func@Gtk.Editable.install_properties],
passing the first available property ID:
```c
static void
my_class_init (MyClass *class)
{
...
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
gtk_editable_install_properties (object_clas, NUM_PROPERTIES);
...
}
```
In your interface_init function for the `GtkEditable` interface, provide
an implementation for the get_delegate vfunc that returns your text widget:
```c
GtkEditable *
get_editable_delegate (GtkEditable *editable)
{
return GTK_EDITABLE (MY_WIDGET (editable)-&gt;text_widget);
}
static void
my_editable_init (GtkEditableInterface *iface)
{
iface-&gt;get_delegate = get_editable_delegate;
}
```
You don't need to provide any other vfuncs. The default implementations
work by forwarding to the delegate that the GtkEditableInterface.get_delegate()
vfunc returns.
In your instance_init function, create your text widget, and then call
[method@Gtk.Editable.init_delegate]:
```c
static void
my_widget_init (MyWidget *self)
{
...
self-&gt;text_widget = gtk_text_new ();
gtk_editable_init_delegate (GTK_EDITABLE (self));
...
}
```
In your dispose function, call [method@Gtk.Editable.finish_delegate] before
destroying your text widget:
```c
static void
my_widget_dispose (GObject *object)
{
...
gtk_editable_finish_delegate (GTK_EDITABLE (self));
g_clear_pointer (&amp;self-&gt;text_widget, gtk_widget_unparent);
...
}
```
Finally, use [func@Gtk.Editable.delegate_set_property] in your `set_property`
function (and similar for `get_property`), to set the editable properties:
```c
...
if (gtk_editable_delegate_set_property (object, prop_id, value, pspec))
return;
switch (prop_id)
...
```
It is important to note that if you create a `GtkEditable` that uses
a delegate, the low level [signal@Gtk.Editable::insert-text] and
[signal@Gtk.Editable::delete-text] signals will be propagated from the
"wrapper" editable to the delegate, but they will not be propagated from
the delegate to the "wrapper" editable, as they would cause an infinite
recursion. If you wish to connect to the [signal@Gtk.Editable::insert-text]
and [signal@Gtk.Editable::delete-text] signals, you will need to connect
to them on the delegate obtained via [method@Gtk.Editable.get_delegate].</doc>
<prerequisite name="Widget"/>
<function name="delegate_get_property" c:identifier="gtk_editable_delegate_get_property">
<doc xml:space="preserve">Gets a property of the `GtkEditable` delegate for @object.
This is helper function that should be called in the `get_property`
function of your `GtkEditable` implementation, before handling your
own properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the property was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="prop_id" transfer-ownership="none">
<doc xml:space="preserve">a property ID</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</function>
<function name="delegate_set_property" c:identifier="gtk_editable_delegate_set_property">
<doc xml:space="preserve">Sets a property on the `GtkEditable` delegate for @object.
This is a helper function that should be called in the `set_property`
function of your `GtkEditable` implementation, before handling your
own properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the property was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="prop_id" transfer-ownership="none">
<doc xml:space="preserve">a property ID</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to set</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</function>
<function name="install_properties" c:identifier="gtk_editable_install_properties">
<doc xml:space="preserve">Overrides the `GtkEditable` properties for @class.
This is a helper function that should be called in class_init,
after installing your own properties.
Note that your class must have "text", "cursor-position",
"selection-bound", "editable", "width-chars", "max-width-chars",
"xalign" and "enable-undo" properties for this function to work.
To handle the properties in your set_property and get_property
functions, you can either use [func@Gtk.Editable.delegate_set_property]
and [func@Gtk.Editable.delegate_get_property] (if you are using
a delegate), or remember the @first_prop offset and add it to the
values in the [enum@Gtk.EditableProperties] enumeration to get the
property IDs for these properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of properties that were installed</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="object_class" transfer-ownership="none">
<doc xml:space="preserve">a `GObjectClass`</doc>
<type name="GObject.ObjectClass" c:type="GObjectClass*"/>
</parameter>
<parameter name="first_prop" transfer-ownership="none">
<doc xml:space="preserve">property ID to use for the first property</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</function>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="delete_text" invoker="delete_text">
<doc xml:space="preserve">Deletes a sequence of characters.
The characters that are deleted are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is
negative, then the characters deleted are those from @start_pos to
the end of the text.
Note that the positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="do_delete_text" invoker="delete_text">
<doc xml:space="preserve">Deletes a sequence of characters.
The characters that are deleted are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is
negative, then the characters deleted are those from @start_pos to
the end of the text.
Note that the positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="do_insert_text" invoker="insert_text">
<doc xml:space="preserve">Inserts @length bytes of @text into the contents of the
widget, at position @position.
Note that the position is in characters, not in bytes.
The function updates @position to point after the newly
inserted text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to append</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location of the position text will be inserted at</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_delegate" invoker="get_delegate">
<doc xml:space="preserve">Gets the `GtkEditable` that @editable is delegating its
implementation to.
Typically, the delegate is a [class@Gtk.Text] widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the delegate `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_selection_bounds" invoker="get_selection_bounds">
<doc xml:space="preserve">Retrieves the selection bound of the editable.
@start_pos will be filled with the start of the selection and
@end_pos with end. If no text was selected both will be identical
and %FALSE will be returned.
Note that positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a non-empty selection, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the starting position</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="end_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the end position</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_text" invoker="get_text">
<attribute name="org.gtk.Method.get_property" value="text"/>
<doc xml:space="preserve">Retrieves the contents of @editable.
The returned string is owned by GTK and must not be modified or freed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a pointer to the contents of the editable</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_text" invoker="insert_text">
<doc xml:space="preserve">Inserts @length bytes of @text into the contents of the
widget, at position @position.
Note that the position is in characters, not in bytes.
The function updates @position to point after the newly
inserted text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to append</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location of the position text will be inserted at</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_selection_bounds" invoker="select_region">
<doc xml:space="preserve">Selects a region of text.
The characters that are selected are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is
negative, then the characters selected are those characters from
@start_pos to the end of the text.
Note that positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start of region</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end of region</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<method name="delete_selection" c:identifier="gtk_editable_delete_selection">
<doc xml:space="preserve">Deletes the currently selected text of the editable.
This call doesn&#x2019;t do anything if there is no selected text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="delete_text" c:identifier="gtk_editable_delete_text">
<doc xml:space="preserve">Deletes a sequence of characters.
The characters that are deleted are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is
negative, then the characters deleted are those from @start_pos to
the end of the text.
Note that the positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="finish_delegate" c:identifier="gtk_editable_finish_delegate">
<doc xml:space="preserve">Undoes the setup done by [method@Gtk.Editable.init_delegate].
This is a helper function that should be called from dispose,
before removing the delegate object.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_alignment" c:identifier="gtk_editable_get_alignment">
<attribute name="org.gtk.Method.get_property" value="xalign"/>
<doc xml:space="preserve">Gets the alignment of the editable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the alignment</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_chars" c:identifier="gtk_editable_get_chars">
<doc xml:space="preserve">Retrieves a sequence of characters.
The characters that are retrieved are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is negative,
then the characters retrieved are those characters from @start_pos to
the end of the text.
Note that positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a pointer to the contents of the widget as a
string. This string is allocated by the `GtkEditable` implementation
and should be freed by the caller.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start of text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end of text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_delegate" c:identifier="gtk_editable_get_delegate">
<doc xml:space="preserve">Gets the `GtkEditable` that @editable is delegating its
implementation to.
Typically, the delegate is a [class@Gtk.Text] widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the delegate `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_editable" c:identifier="gtk_editable_get_editable" glib:get-property="editable">
<attribute name="org.gtk.Method.get_property" value="editable"/>
<doc xml:space="preserve">Retrieves whether @editable is editable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @editable is editable.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_enable_undo" c:identifier="gtk_editable_get_enable_undo" glib:get-property="enable-undo">
<attribute name="org.gtk.Method.get_property" value="enable-undo"/>
<doc xml:space="preserve">Gets if undo/redo actions are enabled for @editable</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if undo is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_width_chars" c:identifier="gtk_editable_get_max_width_chars" glib:get-property="max-width-chars">
<attribute name="org.gtk.Method.get_property" value="max-width-chars"/>
<doc xml:space="preserve">Retrieves the desired maximum width of @editable, in characters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum width of the entry, in characters</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_editable_get_position">
<attribute name="org.gtk.Method.get_property" value="cursor-position"/>
<doc xml:space="preserve">Retrieves the current position of the cursor relative
to the start of the content of the editable.
Note that this position is in characters, not in bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the cursor position</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_bounds" c:identifier="gtk_editable_get_selection_bounds">
<doc xml:space="preserve">Retrieves the selection bound of the editable.
@start_pos will be filled with the start of the selection and
@end_pos with end. If no text was selected both will be identical
and %FALSE will be returned.
Note that positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a non-empty selection, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the starting position</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="end_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the end position</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_editable_get_text" glib:get-property="text">
<attribute name="org.gtk.Method.get_property" value="text"/>
<doc xml:space="preserve">Retrieves the contents of @editable.
The returned string is owned by GTK and must not be modified or freed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a pointer to the contents of the editable</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width_chars" c:identifier="gtk_editable_get_width_chars" glib:get-property="width-chars">
<attribute name="org.gtk.Method.get_property" value="width-chars"/>
<doc xml:space="preserve">Gets the number of characters of space reserved
for the contents of the editable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of chars to request space for, or negative if unset</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="init_delegate" c:identifier="gtk_editable_init_delegate">
<doc xml:space="preserve">Sets up a delegate for `GtkEditable`.
This is assuming that the get_delegate vfunc in the `GtkEditable`
interface has been set up for the @editable's type.
This is a helper function that should be called in instance init,
after creating the delegate object.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_text" c:identifier="gtk_editable_insert_text">
<doc xml:space="preserve">Inserts @length bytes of @text into the contents of the
widget, at position @position.
Note that the position is in characters, not in bytes.
The function updates @position to point after the newly
inserted text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to append</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location of the position text will be inserted at</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="select_region" c:identifier="gtk_editable_select_region">
<doc xml:space="preserve">Selects a region of text.
The characters that are selected are those characters at positions
from @start_pos up to, but not including @end_pos. If @end_pos is
negative, then the characters selected are those characters from
@start_pos to the end of the text.
Note that positions are specified in characters, not bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start of region</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end of region</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_alignment" c:identifier="gtk_editable_set_alignment">
<attribute name="org.gtk.Method.set_property" value="xalign"/>
<doc xml:space="preserve">Sets the alignment for the contents of the editable.
This controls the horizontal positioning of the contents when
the displayed text is shorter than the width of the editable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">The horizontal alignment, from 0 (left) to 1 (right).
Reversed for RTL layouts</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_editable" c:identifier="gtk_editable_set_editable" glib:set-property="editable">
<attribute name="org.gtk.Method.set_property" value="editable"/>
<doc xml:space="preserve">Determines if the user can edit the text in the editable widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="is_editable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the user is allowed to edit the text
in the widget</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_enable_undo" c:identifier="gtk_editable_set_enable_undo" glib:set-property="enable-undo">
<attribute name="org.gtk.Method.set_property" value="enable-undo"/>
<doc xml:space="preserve">If enabled, changes to @editable will be saved for undo/redo
actions.
This results in an additional copy of text changes and are not
stored in secure memory. As such, undo is forcefully disabled
when [property@Gtk.Text:visibility] is set to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="enable_undo" transfer-ownership="none">
<doc xml:space="preserve">if undo/redo should be enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_max_width_chars" c:identifier="gtk_editable_set_max_width_chars" glib:set-property="max-width-chars">
<attribute name="org.gtk.Method.set_property" value="max-width-chars"/>
<doc xml:space="preserve">Sets the desired maximum width in characters of @editable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the new desired maximum width, in characters</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_position" c:identifier="gtk_editable_set_position">
<attribute name="org.gtk.Method.set_property" value="cursor-position"/>
<doc xml:space="preserve">Sets the cursor position in the editable to the given value.
The cursor is displayed before the character with the given (base 0)
index in the contents of the editable. The value must be less than
or equal to the number of characters in the editable. A value of -1
indicates that the position should be set after the last character
of the editable. Note that @position is in characters, not in bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the cursor</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_editable_set_text" glib:set-property="text">
<attribute name="org.gtk.Method.set_property" value="text"/>
<doc xml:space="preserve">Sets the text in the editable to the given value.
This is replacing the current contents.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_width_chars" c:identifier="gtk_editable_set_width_chars" glib:set-property="width-chars">
<attribute name="org.gtk.Method.set_property" value="width-chars"/>
<doc xml:space="preserve">Changes the size request of the editable to be about the
right size for @n_chars characters.
Note that it changes the size request, the size can still
be affected by how you pack the widget into containers.
If @n_chars is -1, the size reverts to the default size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</instance-parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">width in chars</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="cursor-position" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_position"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_position"/>
<doc xml:space="preserve">The current position of the insertion cursor in chars.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="editable" writable="1" transfer-ownership="none" setter="set_editable" getter="get_editable">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_editable"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_editable"/>
<doc xml:space="preserve">Whether the entry contents can be edited.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="enable-undo" writable="1" transfer-ownership="none" setter="set_enable_undo" getter="get_enable_undo">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_enable_undo"/>
<attribute name="org.gtk.Property.setg" value="gtk_editable_set_enable_undo"/>
<doc xml:space="preserve">If undo/redo should be enabled for the editable.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-width-chars" writable="1" transfer-ownership="none" setter="set_max_width_chars" getter="get_max_width_chars">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_max_width_chars"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_max_width_chars"/>
<doc xml:space="preserve">The desired maximum width of the entry, in characters.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="selection-bound" transfer-ownership="none">
<doc xml:space="preserve">The position of the opposite end of the selection from the cursor in chars.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="text" writable="1" transfer-ownership="none" setter="set_text" getter="get_text">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_text"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_text"/>
<doc xml:space="preserve">The contents of the entry.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="width-chars" writable="1" transfer-ownership="none" setter="set_width_chars" getter="get_width_chars">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_width_chars"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_width_chars"/>
<doc xml:space="preserve">Number of characters to leave space for in the entry.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="xalign" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_editable_get_alignment"/>
<attribute name="org.gtk.Property.set" value="gtk_editable_set_alignment"/>
<doc xml:space="preserve">The horizontal alignment, from 0 (left) to 1 (right).
Reversed for RTL layouts.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted at the end of a single user-visible operation on the
contents.
E.g., a paste operation that replaces the contents of the
selection will cause only one signal emission (even though it
is implemented by first deleting the selection, then inserting
the new content, and may cause multiple ::notify::text signals
to be emitted).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="delete-text" when="last">
<doc xml:space="preserve">Emitted when text is deleted from the widget by the user.
The default handler for this signal will normally be responsible for
deleting the text, so by connecting to this signal and then stopping
the signal with g_signal_stop_emission(), it is possible to modify the
range of deleted text, or prevent it from being deleted entirely.
The @start_pos and @end_pos parameters are interpreted as for
[method@Gtk.Editable.delete_text].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">the starting position</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">the end position</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-text" when="last">
<doc xml:space="preserve">Emitted when text is inserted into the widget by the user.
The default handler for this signal will normally be responsible
for inserting the text, so by connecting to this signal and then
stopping the signal with g_signal_stop_emission(), it is possible
to modify the inserted text, or prevent it from being inserted entirely.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the new text to insert</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the new text, in bytes,
or -1 if new_text is nul-terminated</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the position, in characters,
at which to insert the new text. this is an in-out
parameter. After the signal emission is finished, it
should point after the newly inserted text.</doc>
<type name="gint" c:type="gpointer"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<record name="EditableInterface" c:type="GtkEditableInterface" glib:is-gtype-struct-for="Editable">
<field name="base_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="insert_text">
<callback name="insert_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to append</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location of the position text will be inserted at</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="delete_text">
<callback name="delete_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_text">
<callback name="get_text">
<return-value transfer-ownership="none">
<doc xml:space="preserve">a pointer to the contents of the editable</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="do_insert_text">
<callback name="do_insert_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to append</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="position" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location of the position text will be inserted at</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="do_delete_text">
<callback name="do_delete_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start position</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_selection_bounds">
<callback name="get_selection_bounds">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a non-empty selection, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="start_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the starting position</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="end_pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the end position</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_selection_bounds">
<callback name="set_selection_bounds">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
<parameter name="start_pos" transfer-ownership="none">
<doc xml:space="preserve">start of region</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_pos" transfer-ownership="none">
<doc xml:space="preserve">end of region</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_delegate">
<callback name="get_delegate">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the delegate `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</return-value>
<parameters>
<parameter name="editable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="EditableLabel" c:symbol-prefix="editable_label" c:type="GtkEditableLabel" parent="Widget" glib:type-name="GtkEditableLabel" glib:get-type="gtk_editable_label_get_type" glib:type-struct="EditableLabelClass">
<doc xml:space="preserve">A `GtkEditableLabel` is a label that allows users to
edit the text by switching to an &#x201C;edit mode&#x201D;.
![An example GtkEditableLabel](editable-label.png)
`GtkEditableLabel` does not have API of its own, but it
implements the [iface@Gtk.Editable] interface.
The default bindings for activating the edit mode is
to click or press the Enter key. The default bindings
for leaving the edit mode are the Enter key (to save
the results) or the Escape key (to cancel the editing).
# CSS nodes
```
editablelabel[.editing]
&#x2570;&#x2500;&#x2500; stack
&#x251C;&#x2500;&#x2500; label
&#x2570;&#x2500;&#x2500; text
```
`GtkEditableLabel` has a main node with the name editablelabel.
When the entry is in editing mode, it gets the .editing style
class.
For all the subnodes added to the text node in various situations,
see [class@Gtk.Text].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<constructor name="new" c:identifier="gtk_editable_label_new">
<doc xml:space="preserve">Creates a new `GtkEditableLabel` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkEditableLabel`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">the text for the label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_editing" c:identifier="gtk_editable_label_get_editing" glib:get-property="editing">
<attribute name="org.gtk.Method.get_property" value="editing"/>
<doc xml:space="preserve">Returns whether the label is currently in &#x201C;editing mode&#x201D;.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self is currently in editing mode</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditableLabel`</doc>
<type name="EditableLabel" c:type="GtkEditableLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="start_editing" c:identifier="gtk_editable_label_start_editing">
<doc xml:space="preserve">Switches the label into &#x201C;editing mode&#x201D;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditableLabel`</doc>
<type name="EditableLabel" c:type="GtkEditableLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="stop_editing" c:identifier="gtk_editable_label_stop_editing">
<doc xml:space="preserve">Switches the label out of &#x201C;editing mode&#x201D;.
If @commit is %TRUE, the resulting text is kept as the
[property@Gtk.Editable:text] property value, otherwise the
resulting text is discarded and the label will keep its
previous [property@Gtk.Editable:text] property value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditableLabel`</doc>
<type name="EditableLabel" c:type="GtkEditableLabel*"/>
</instance-parameter>
<parameter name="commit" transfer-ownership="none">
<doc xml:space="preserve">whether to set the edited text on the label</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="editing" transfer-ownership="none" getter="get_editing">
<attribute name="org.gtk.Property.get" value="gtk_editable_label_get_editing"/>
<doc xml:space="preserve">This property is %TRUE while the widget is in edit mode.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="EditableLabelClass" c:type="GtkEditableLabelClass" glib:is-gtype-struct-for="EditableLabel">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<enumeration name="EditableProperties" glib:type-name="GtkEditableProperties" glib:get-type="gtk_editable_properties_get_type" c:type="GtkEditableProperties">
<doc xml:space="preserve">The identifiers for [iface@Gtk.Editable] properties.
See [func@Gtk.Editable.install_properties] for details on how to
implement the `GtkEditable` interface.</doc>
<member name="prop_text" value="0" c:identifier="GTK_EDITABLE_PROP_TEXT" glib:nick="prop-text" glib:name="GTK_EDITABLE_PROP_TEXT">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:text]</doc>
</member>
<member name="prop_cursor_position" value="1" c:identifier="GTK_EDITABLE_PROP_CURSOR_POSITION" glib:nick="prop-cursor-position" glib:name="GTK_EDITABLE_PROP_CURSOR_POSITION">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:cursor-position]</doc>
</member>
<member name="prop_selection_bound" value="2" c:identifier="GTK_EDITABLE_PROP_SELECTION_BOUND" glib:nick="prop-selection-bound" glib:name="GTK_EDITABLE_PROP_SELECTION_BOUND">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:selection-bound]</doc>
</member>
<member name="prop_editable" value="3" c:identifier="GTK_EDITABLE_PROP_EDITABLE" glib:nick="prop-editable" glib:name="GTK_EDITABLE_PROP_EDITABLE">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:editable]</doc>
</member>
<member name="prop_width_chars" value="4" c:identifier="GTK_EDITABLE_PROP_WIDTH_CHARS" glib:nick="prop-width-chars" glib:name="GTK_EDITABLE_PROP_WIDTH_CHARS">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:width-chars]</doc>
</member>
<member name="prop_max_width_chars" value="5" c:identifier="GTK_EDITABLE_PROP_MAX_WIDTH_CHARS" glib:nick="prop-max-width-chars" glib:name="GTK_EDITABLE_PROP_MAX_WIDTH_CHARS">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:max-width-chars]</doc>
</member>
<member name="prop_xalign" value="6" c:identifier="GTK_EDITABLE_PROP_XALIGN" glib:nick="prop-xalign" glib:name="GTK_EDITABLE_PROP_XALIGN">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:xalign]</doc>
</member>
<member name="prop_enable_undo" value="7" c:identifier="GTK_EDITABLE_PROP_ENABLE_UNDO" glib:nick="prop-enable-undo" glib:name="GTK_EDITABLE_PROP_ENABLE_UNDO">
<doc xml:space="preserve">the property id for [property@Gtk.Editable:enable-undo]</doc>
</member>
<member name="num_properties" value="8" c:identifier="GTK_EDITABLE_NUM_PROPERTIES" glib:nick="num-properties" glib:name="GTK_EDITABLE_NUM_PROPERTIES">
<doc xml:space="preserve">the number of properties</doc>
</member>
</enumeration>
<class name="EmojiChooser" c:symbol-prefix="emoji_chooser" c:type="GtkEmojiChooser" parent="Popover" glib:type-name="GtkEmojiChooser" glib:get-type="gtk_emoji_chooser_get_type" glib:type-struct="EmojiChooserClass">
<doc xml:space="preserve">The `GtkEmojiChooser` is used by text widgets such as `GtkEntry` or
`GtkTextView` to let users insert Emoji characters.
![An example GtkEmojiChooser](emojichooser.png)
`GtkEmojiChooser` emits the [signal@Gtk.EmojiChooser::emoji-picked]
signal when an Emoji is selected.
# CSS nodes
```
popover
&#x251C;&#x2500;&#x2500; box.emoji-searchbar
&#x2502; &#x2570;&#x2500;&#x2500; entry.search
&#x2570;&#x2500;&#x2500; box.emoji-toolbar
&#x251C;&#x2500;&#x2500; button.image-button.emoji-section
&#x251C;&#x2500;&#x2500; ...
&#x2570;&#x2500;&#x2500; button.image-button.emoji-section
```
Every `GtkEmojiChooser` consists of a main node called popover.
The contents of the popover are largely implementation defined
and supposed to inherit general styles.
The top searchbar used to search emoji and gets the .emoji-searchbar
style class itself.
The bottom toolbar used to switch between different emoji categories
consists of buttons with the .emoji-section style class and gets the
.emoji-toolbar style class itself.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_emoji_chooser_new">
<doc xml:space="preserve">Creates a new `GtkEmojiChooser`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkEmojiChooser`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<glib:signal name="emoji-picked" when="last">
<doc xml:space="preserve">Emitted when the user selects an Emoji.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the Unicode sequence for the picked Emoji, in UTF-8</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="EmojiChooserClass" c:type="GtkEmojiChooserClass" disguised="1" glib:is-gtype-struct-for="EmojiChooser"/>
<class name="Entry" c:symbol-prefix="entry" c:type="GtkEntry" parent="Widget" glib:type-name="GtkEntry" glib:get-type="gtk_entry_get_type" glib:type-struct="EntryClass">
<doc xml:space="preserve">`GtkEntry` is a single line text entry widget.
![An example GtkEntry](entry.png)
A fairly large set of key bindings are supported by default. If the
entered text is longer than the allocation of the widget, the widget
will scroll so that the cursor position is visible.
When using an entry for passwords and other sensitive information, it
can be put into &#x201C;password mode&#x201D; using [method@Gtk.Entry.set_visibility].
In this mode, entered text is displayed using a &#x201C;invisible&#x201D; character.
By default, GTK picks the best invisible character that is available
in the current font, but it can be changed with
[method@Gtk.Entry.set_invisible_char].
`GtkEntry` has the ability to display progress or activity
information behind the text. To make an entry display such information,
use [method@Gtk.Entry.set_progress_fraction] or
[method@Gtk.Entry.set_progress_pulse_step].
Additionally, `GtkEntry` can show icons at either side of the entry.
These icons can be activatable by clicking, can be set up as drag source
and can have tooltips. To add an icon, use
[method@Gtk.Entry.set_icon_from_gicon] or one of the various other functions
that set an icon from an icon name or a paintable. To trigger an action when
the user clicks an icon, connect to the [signal@Gtk.Entry::icon-press] signal.
To allow DND operations from an icon, use
[method@Gtk.Entry.set_icon_drag_source]. To set a tooltip on an icon, use
[method@Gtk.Entry.set_icon_tooltip_text] or the corresponding function
for markup.
Note that functionality or information that is only available by clicking
on an icon in an entry may not be accessible at all to users which are not
able to use a mouse or other pointing device. It is therefore recommended
that any such functionality should also be available by other means, e.g.
via the context menu of the entry.
# CSS nodes
```
entry[.flat][.warning][.error]
&#x251C;&#x2500;&#x2500; text[.readonly]
&#x251C;&#x2500;&#x2500; image.left
&#x251C;&#x2500;&#x2500; image.right
&#x2570;&#x2500;&#x2500; [progress[.pulse]]
```
`GtkEntry` has a main node with the name entry. Depending on the properties
of the entry, the style classes .read-only and .flat may appear. The style
classes .warning and .error may also be used with entries.
When the entry shows icons, it adds subnodes with the name image and the
style class .left or .right, depending on where the icon appears.
When the entry shows progress, it adds a subnode with the name progress.
The node has the style class .pulse when the shown progress is pulsing.
For all the subnodes added to the text node in various situations,
see [class@Gtk.Text].
# GtkEntry as GtkBuildable
The `GtkEntry` implementation of the `GtkBuildable` interface supports a
custom &lt;attributes&gt; element, which supports any number of &lt;attribute&gt;
elements. The &lt;attribute&gt; element has attributes named &#x201C;name&#x201C;, &#x201C;value&#x201C;,
&#x201C;start&#x201C; and &#x201C;end&#x201C; and allows you to specify `PangoAttribute` values for
this label.
An example of a UI definition fragment specifying Pango attributes:
```xml
&lt;object class="GtkEntry"&gt;
&lt;attributes&gt;
&lt;attribute name="weight" value="PANGO_WEIGHT_BOLD"/&gt;
&lt;attribute name="background" value="red" start="5" end="10"/&gt;
&lt;/attributes&gt;
&lt;/object&gt;
```
The start and end attributes specify the range of characters to which the
Pango attribute applies. If start and end are not specified, the attribute
is applied to the whole text. Note that specifying ranges does not make much
sense with translatable attributes. Use markup embedded in the translatable
content instead.
# Accessibility
`GtkEntry` uses the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellEditable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<constructor name="new" c:identifier="gtk_entry_new">
<doc xml:space="preserve">Creates a new entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkEntry`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_buffer" c:identifier="gtk_entry_new_with_buffer">
<doc xml:space="preserve">Creates a new entry with the specified text buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkEntry`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">The buffer to use for the new `GtkEntry`.</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_activates_default" c:identifier="gtk_entry_get_activates_default" glib:get-property="activates-default">
<attribute name="org.gtk.Method.get_property" value="activates-default"/>
<doc xml:space="preserve">Retrieves the value set by gtk_entry_set_activates_default().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the entry will activate the default widget</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_alignment" c:identifier="gtk_entry_get_alignment">
<doc xml:space="preserve">Gets the value set by gtk_entry_set_alignment().
See also: [property@Gtk.Editable:xalign]</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the alignment</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_attributes" c:identifier="gtk_entry_get_attributes" glib:get-property="attributes">
<attribute name="org.gtk.Method.get_property" value="attributes"/>
<doc xml:space="preserve">Gets the attribute list of the `GtkEntry`.
See [method@Gtk.Entry.set_attributes].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the attribute list</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_buffer" c:identifier="gtk_entry_get_buffer" glib:get-property="buffer">
<attribute name="org.gtk.Method.get_property" value="buffer"/>
<doc xml:space="preserve">Get the `GtkEntryBuffer` object which holds the text for
this widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntryBuffer` object.</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_completion" c:identifier="gtk_entry_get_completion" glib:get-property="completion">
<attribute name="org.gtk.Method.get_property" value="completion"/>
<doc xml:space="preserve">Returns the auxiliary completion object currently
in use by @entry.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The auxiliary
completion object currently in use by @entry</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_icon_drag_source" c:identifier="gtk_entry_get_current_icon_drag_source">
<doc xml:space="preserve">Returns the index of the icon which is the source of the
current DND operation, or -1.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">index of the icon which is the source of the
current DND operation, or -1.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_extra_menu" c:identifier="gtk_entry_get_extra_menu" glib:get-property="extra-menu">
<attribute name="org.gtk.Method.get_property" value="extra-menu"/>
<doc xml:space="preserve">Gets the menu model set with gtk_entry_set_extra_menu().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu model</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_frame" c:identifier="gtk_entry_get_has_frame" glib:get-property="has-frame">
<attribute name="org.gtk.Method.get_property" value="has-frame"/>
<doc xml:space="preserve">Gets the value set by gtk_entry_set_has_frame().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the entry has a beveled frame</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_activatable" c:identifier="gtk_entry_get_icon_activatable">
<doc xml:space="preserve">Returns whether the icon is activatable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the icon is activatable.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_area" c:identifier="gtk_entry_get_icon_area">
<doc xml:space="preserve">Gets the area where entry&#x2019;s icon at @icon_pos is drawn.
This function is useful when drawing something to the
entry in a draw callback.
If the entry is not realized or has no icon at the given
position, @icon_area is filled with zeros. Otherwise,
@icon_area will be filled with the icon's allocation,
relative to @entry's allocation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="icon_area" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">Return location for the icon&#x2019;s area</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_icon_at_pos" c:identifier="gtk_entry_get_icon_at_pos">
<doc xml:space="preserve">Finds the icon at the given position and return its index.
The position&#x2019;s coordinates are relative to the @entry&#x2019;s
top left corner. If @x, @y doesn&#x2019;t lie inside an icon,
-1 is returned. This function is intended for use in a
[signal@Gtk.Widget::query-tooltip] signal handler.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the icon at the given position, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the position to find, relative to @entry</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the position to find, relative to @entry</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_icon_gicon" c:identifier="gtk_entry_get_icon_gicon">
<doc xml:space="preserve">Retrieves the `GIcon` used for the icon.
%NULL will be returned if there is no icon or if the icon was
set by some other method (e.g., by `GdkPaintable` or icon name).</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `GIcon`</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_entry_get_icon_name">
<doc xml:space="preserve">Retrieves the icon name used for the icon.
%NULL is returned if there is no icon or if the icon was set
by some other method (e.g., by `GdkPaintable` or gicon).</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">An icon name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_paintable" c:identifier="gtk_entry_get_icon_paintable">
<doc xml:space="preserve">Retrieves the `GdkPaintable` used for the icon.
If no `GdkPaintable` was used for the icon, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `GdkPaintable`
if no icon is set for this position or the icon set is not
a `GdkPaintable`.</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_sensitive" c:identifier="gtk_entry_get_icon_sensitive">
<doc xml:space="preserve">Returns whether the icon appears sensitive or insensitive.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the icon is sensitive.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_storage_type" c:identifier="gtk_entry_get_icon_storage_type">
<doc xml:space="preserve">Gets the type of representation being used by the icon
to store image data.
If the icon has no image data, the return value will
be %GTK_IMAGE_EMPTY.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">image representation being used</doc>
<type name="ImageType" c:type="GtkImageType"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_tooltip_markup" c:identifier="gtk_entry_get_icon_tooltip_markup">
<doc xml:space="preserve">Gets the contents of the tooltip on the icon at the specified
position in @entry.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the tooltip text</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">the icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_icon_tooltip_text" c:identifier="gtk_entry_get_icon_tooltip_text">
<doc xml:space="preserve">Gets the contents of the tooltip on the icon at the specified
position in @entry.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the tooltip text</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">the icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
</parameters>
</method>
<method name="get_input_hints" c:identifier="gtk_entry_get_input_hints" glib:get-property="input-hints">
<attribute name="org.gtk.Method.get_property" value="input-hints"/>
<doc xml:space="preserve">Gets the input hints of this `GtkEntry`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the input hints</doc>
<type name="InputHints" c:type="GtkInputHints"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_purpose" c:identifier="gtk_entry_get_input_purpose" glib:get-property="input-purpose">
<attribute name="org.gtk.Method.get_property" value="input-purpose"/>
<doc xml:space="preserve">Gets the input purpose of the `GtkEntry`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the input purpose</doc>
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_invisible_char" c:identifier="gtk_entry_get_invisible_char" glib:get-property="invisible-char">
<attribute name="org.gtk.Method.get_property" value="invisible-char"/>
<doc xml:space="preserve">Retrieves the character displayed in place of the actual text
in &#x201C;password mode&#x201D;.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current invisible char, or 0, if the entry does not
show invisible text at all.</doc>
<type name="gunichar" c:type="gunichar"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_length" c:identifier="gtk_entry_get_max_length" glib:get-property="max-length">
<attribute name="org.gtk.Method.get_property" value="max-length"/>
<doc xml:space="preserve">Retrieves the maximum allowed length of the text in @entry.
See [method@Gtk.Entry.set_max_length].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum allowed number of characters
in `GtkEntry`, or 0 if there is no maximum.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_overwrite_mode" c:identifier="gtk_entry_get_overwrite_mode" glib:get-property="overwrite-mode">
<attribute name="org.gtk.Method.get_property" value="overwrite-mode"/>
<doc xml:space="preserve">Gets whether the `GtkEntry` is in overwrite mode.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the text is overwritten when typing.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_placeholder_text" c:identifier="gtk_entry_get_placeholder_text" glib:get-property="placeholder-text">
<attribute name="org.gtk.Method.get_property" value="placeholder-text"/>
<doc xml:space="preserve">Retrieves the text that will be displayed when @entry
is empty and unfocused</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a pointer to the
placeholder text as a string. This string points to
internally allocated storage in the widget and must
not be freed, modified or stored. If no placeholder
text has been set, %NULL will be returned.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_progress_fraction" c:identifier="gtk_entry_get_progress_fraction" glib:get-property="progress-fraction">
<attribute name="org.gtk.Method.get_property" value="progress-fraction"/>
<doc xml:space="preserve">Returns the current fraction of the task that&#x2019;s been completed.
See [method@Gtk.Entry.set_progress_fraction].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a fraction from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_progress_pulse_step" c:identifier="gtk_entry_get_progress_pulse_step" glib:get-property="progress-pulse-step">
<attribute name="org.gtk.Method.get_property" value="progress-pulse-step"/>
<doc xml:space="preserve">Retrieves the pulse step set with
gtk_entry_set_progress_pulse_step().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a fraction from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tabs" c:identifier="gtk_entry_get_tabs" glib:get-property="tabs">
<attribute name="org.gtk.Method.get_property" value="tabs"/>
<doc xml:space="preserve">Gets the tabstops of the `GtkEntry.
See [method@Gtk.Entry.set_tabs].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the tabstops</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text_length" c:identifier="gtk_entry_get_text_length" glib:get-property="text-length">
<attribute name="org.gtk.Method.get_property" value="text-length"/>
<doc xml:space="preserve">Retrieves the current length of the text in @entry.
This is equivalent to getting @entry's `GtkEntryBuffer`
and calling [method@Gtk.EntryBuffer.get_length] on it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current number of characters
in `GtkEntry`, or 0 if there are none.</doc>
<type name="guint16" c:type="guint16"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visibility" c:identifier="gtk_entry_get_visibility" glib:get-property="visibility">
<attribute name="org.gtk.Method.get_property" value="visibility"/>
<doc xml:space="preserve">Retrieves whether the text in @entry is visible.
See [method@Gtk.Entry.set_visibility].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the text is currently visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="grab_focus_without_selecting" c:identifier="gtk_entry_grab_focus_without_selecting">
<doc xml:space="preserve">Causes @entry to have keyboard focus.
It behaves like [method@Gtk.Widget.grab_focus], except that it doesn't
select the contents of the entry. You only want to call this on some
special entries which the user usually doesn't want to replace all text
in, such as search-as-you-type entries.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is now inside @self</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="progress_pulse" c:identifier="gtk_entry_progress_pulse">
<doc xml:space="preserve">Indicates that some progress is made, but you don&#x2019;t
know how much.
Causes the entry&#x2019;s progress indicator to enter &#x201C;activity
mode&#x201D;, where a block bounces back and forth. Each call to
gtk_entry_progress_pulse() causes the block to move by a
little bit (the amount of movement per pulse is determined
by [method@Gtk.Entry.set_progress_pulse_step]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="reset_im_context" c:identifier="gtk_entry_reset_im_context">
<doc xml:space="preserve">Reset the input method context of the entry if needed.
This can be necessary in the case where modifying the buffer
would confuse on-going input method behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_activates_default" c:identifier="gtk_entry_set_activates_default" glib:set-property="activates-default">
<attribute name="org.gtk.Method.set_property" value="activates-default"/>
<doc xml:space="preserve">Sets whether pressing Enter in the @entry will activate the default
widget for the window containing the entry.
This usually means that the dialog containing the entry will be closed,
since the default widget is usually one of the dialog buttons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to activate window&#x2019;s default widget on Enter keypress</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_alignment" c:identifier="gtk_entry_set_alignment">
<doc xml:space="preserve">Sets the alignment for the contents of the entry.
This controls the horizontal positioning of the contents when
the displayed text is shorter than the width of the entry.
See also: [property@Gtk.Editable:xalign]</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">The horizontal alignment, from 0 (left) to 1 (right).
Reversed for RTL layouts</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_entry_set_attributes" glib:set-property="attributes">
<attribute name="org.gtk.Method.set_property" value="attributes"/>
<doc xml:space="preserve">Sets a `PangoAttrList`.
The attributes in the list are applied to the entry text.
Since the attributes will be applies to text that changes
as the user types, it makes most sense to use attributes
with unlimited extent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="attrs" transfer-ownership="none">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</parameter>
</parameters>
</method>
<method name="set_buffer" c:identifier="gtk_entry_set_buffer" glib:set-property="buffer">
<attribute name="org.gtk.Method.set_property" value="buffer"/>
<doc xml:space="preserve">Set the `GtkEntryBuffer` object which holds the text for
this widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
</parameters>
</method>
<method name="set_completion" c:identifier="gtk_entry_set_completion" glib:set-property="completion">
<attribute name="org.gtk.Method.set_property" value="completion"/>
<doc xml:space="preserve">Sets @completion to be the auxiliary completion object
to use with @entry.
All further configuration of the completion mechanism is
done on @completion using the `GtkEntryCompletion` API.
Completion is disabled if @completion is set to %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="completion" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</parameter>
</parameters>
</method>
<method name="set_extra_menu" c:identifier="gtk_entry_set_extra_menu" glib:set-property="extra-menu">
<attribute name="org.gtk.Method.set_property" value="extra-menu"/>
<doc xml:space="preserve">Sets a menu model to add when constructing
the context menu for @entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_has_frame" c:identifier="gtk_entry_set_has_frame" glib:set-property="has-frame">
<attribute name="org.gtk.Method.set_property" value="has-frame"/>
<doc xml:space="preserve">Sets whether the entry has a beveled frame around it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_activatable" c:identifier="gtk_entry_set_icon_activatable">
<doc xml:space="preserve">Sets whether the icon is activatable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="activatable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the icon should be activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_drag_source" c:identifier="gtk_entry_set_icon_drag_source">
<doc xml:space="preserve">Sets up the icon at the given position as drag source.
This makes it so that GTK will start a drag
operation when the user clicks and drags the icon.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GdkContentProvider`</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">a bitmask of the allowed drag actions</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="set_icon_from_gicon" c:identifier="gtk_entry_set_icon_from_gicon">
<doc xml:space="preserve">Sets the icon shown in the entry at the specified position
from the current icon theme.
If the icon isn&#x2019;t known, a &#x201C;broken image&#x201D; icon will be
displayed instead.
If @icon is %NULL, no icon will be shown in the
specified position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">The position at which to set the icon</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="icon" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The icon to set</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_from_icon_name" c:identifier="gtk_entry_set_icon_from_icon_name">
<doc xml:space="preserve">Sets the icon shown in the entry at the specified position
from the current icon theme.
If the icon name isn&#x2019;t known, a &#x201C;broken image&#x201D; icon will be
displayed instead.
If @icon_name is %NULL, no icon will be shown in the
specified position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">The position at which to set the icon</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">An icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_from_paintable" c:identifier="gtk_entry_set_icon_from_paintable">
<doc xml:space="preserve">Sets the icon shown in the specified position using a `GdkPaintable`.
If @paintable is %NULL, no icon will be shown in the specified position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_sensitive" c:identifier="gtk_entry_set_icon_sensitive">
<doc xml:space="preserve">Sets the sensitivity for the specified icon.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">Icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="sensitive" transfer-ownership="none">
<doc xml:space="preserve">Specifies whether the icon should appear
sensitive or insensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_tooltip_markup" c:identifier="gtk_entry_set_icon_tooltip_markup">
<doc xml:space="preserve">Sets @tooltip as the contents of the tooltip for the icon at
the specified position.
@tooltip is assumed to be marked up with Pango Markup.
Use %NULL for @tooltip to remove an existing tooltip.
See also [method@Gtk.Widget.set_tooltip_markup] and
[method@Gtk.Entry.set_icon_tooltip_text].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">the icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="tooltip" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the contents of the tooltip for the icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_tooltip_text" c:identifier="gtk_entry_set_icon_tooltip_text">
<doc xml:space="preserve">Sets @tooltip as the contents of the tooltip for the icon
at the specified position.
Use %NULL for @tooltip to remove an existing tooltip.
See also [method@Gtk.Widget.set_tooltip_text] and
[method@Gtk.Entry.set_icon_tooltip_markup].
If you unset the widget tooltip via
[method@Gtk.Widget.set_tooltip_text] or
[method@Gtk.Widget.set_tooltip_markup], this sets
[property@Gtk.Widget:has-tooltip] to %FALSE, which suppresses
icon tooltips too. You can resolve this by then calling
[method@Gtk.Widget.set_has_tooltip] to set
[property@Gtk.Widget:has-tooltip] back to %TRUE, or
setting at least one non-empty tooltip on any icon
achieves the same result.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">the icon position</doc>
<type name="EntryIconPosition" c:type="GtkEntryIconPosition"/>
</parameter>
<parameter name="tooltip" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the contents of the tooltip for the icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_input_hints" c:identifier="gtk_entry_set_input_hints" glib:set-property="input-hints">
<attribute name="org.gtk.Method.set_property" value="input-hints"/>
<doc xml:space="preserve">Set additional hints which allow input methods to
fine-tune their behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="hints" transfer-ownership="none">
<doc xml:space="preserve">the hints</doc>
<type name="InputHints" c:type="GtkInputHints"/>
</parameter>
</parameters>
</method>
<method name="set_input_purpose" c:identifier="gtk_entry_set_input_purpose" glib:set-property="input-purpose">
<attribute name="org.gtk.Method.set_property" value="input-purpose"/>
<doc xml:space="preserve">Sets the input purpose which can be used by input methods
to adjust their behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="purpose" transfer-ownership="none">
<doc xml:space="preserve">the purpose</doc>
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</parameter>
</parameters>
</method>
<method name="set_invisible_char" c:identifier="gtk_entry_set_invisible_char" glib:set-property="invisible-char">
<attribute name="org.gtk.Method.sets_property" value="invisible-char"/>
<doc xml:space="preserve">Sets the character to use in place of the actual text
in &#x201C;password mode&#x201D;.
See [method@Gtk.Entry.set_visibility] for how to enable
&#x201C;password mode&#x201D;.
By default, GTK picks the best invisible char available in
the current font. If you set the invisible char to 0, then
the user will get no feedback at all; there will be no text
on the screen as they type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="ch" transfer-ownership="none">
<doc xml:space="preserve">a Unicode character</doc>
<type name="gunichar" c:type="gunichar"/>
</parameter>
</parameters>
</method>
<method name="set_max_length" c:identifier="gtk_entry_set_max_length" glib:set-property="max-length">
<attribute name="org.gtk.Method.set_property" value="max-length"/>
<doc xml:space="preserve">Sets the maximum allowed length of the contents of the widget.
If the current contents are longer than the given length, then
they will be truncated to fit. The length is is in characters.
This is equivalent to getting @entry's `GtkEntryBuffer` and
calling [method@Gtk.EntryBuffer.set_max_length] on it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">the maximum length of the entry, or 0 for no maximum.
(other than the maximum length of entries.) The value passed in will
be clamped to the range 0-65536.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_overwrite_mode" c:identifier="gtk_entry_set_overwrite_mode" glib:set-property="overwrite-mode">
<attribute name="org.gtk.Method.set_property" value="overwrite-mode"/>
<doc xml:space="preserve">Sets whether the text is overwritten when typing in the `GtkEntry`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="overwrite" transfer-ownership="none">
<doc xml:space="preserve">new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_placeholder_text" c:identifier="gtk_entry_set_placeholder_text" glib:set-property="placeholder-text">
<attribute name="org.gtk.Method.set_property" value="placeholder-text"/>
<doc xml:space="preserve">Sets text to be displayed in @entry when it is empty.
This can be used to give a visual hint of the expected
contents of the `GtkEntry`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string to be displayed when @entry is empty and unfocused</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_progress_fraction" c:identifier="gtk_entry_set_progress_fraction" glib:set-property="progress-fraction">
<attribute name="org.gtk.Method.set_property" value="progress-fraction"/>
<doc xml:space="preserve">Causes the entry&#x2019;s progress indicator to &#x201C;fill in&#x201D; the given
fraction of the bar.
The fraction should be between 0.0 and 1.0, inclusive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="fraction" transfer-ownership="none">
<doc xml:space="preserve">fraction of the task that&#x2019;s been completed</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_progress_pulse_step" c:identifier="gtk_entry_set_progress_pulse_step" glib:set-property="progress-pulse-step">
<attribute name="org.gtk.Method.set_property" value="progress-pulse-step"/>
<doc xml:space="preserve">Sets the fraction of total entry width to move the progress
bouncing block for each pulse.
Use [method@Gtk.Entry.progress_pulse] to pulse
the progress.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="fraction" transfer-ownership="none">
<doc xml:space="preserve">fraction between 0.0 and 1.0</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_tabs" c:identifier="gtk_entry_set_tabs" glib:set-property="tabs">
<attribute name="org.gtk.Method.set_property" value="tabs"/>
<doc xml:space="preserve">Sets a `PangoTabArray`.
The tabstops in the array are applied to the entry text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="tabs" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoTabArray`</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</parameter>
</parameters>
</method>
<method name="set_visibility" c:identifier="gtk_entry_set_visibility" glib:set-property="visibility">
<attribute name="org.gtk.Method.set_property" value="visibility"/>
<doc xml:space="preserve">Sets whether the contents of the entry are visible or not.
When visibility is set to %FALSE, characters are displayed
as the invisible char, and will also appear that way when
the text in the entry widget is copied elsewhere.
By default, GTK picks the best invisible character available
in the current font, but it can be changed with
[method@Gtk.Entry.set_invisible_char].
Note that you probably want to set [property@Gtk.Entry:input-purpose]
to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN to
inform input methods about the purpose of this entry,
in addition to setting visibility to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the contents of the entry are displayed as plaintext</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="unset_invisible_char" c:identifier="gtk_entry_unset_invisible_char">
<doc xml:space="preserve">Unsets the invisible char, so that the default invisible char
is used again. See [method@Gtk.Entry.set_invisible_char].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntry`</doc>
<type name="Entry" c:type="GtkEntry*"/>
</instance-parameter>
</parameters>
</method>
<property name="activates-default" writable="1" transfer-ownership="none" setter="set_activates_default" getter="get_activates_default">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_activates_default"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_activates_default"/>
<doc xml:space="preserve">Whether to activate the default widget when Enter is pressed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="attributes" writable="1" transfer-ownership="none" setter="set_attributes" getter="get_attributes">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_attributes"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_attributes"/>
<doc xml:space="preserve">A list of Pango attributes to apply to the text of the entry.
This is mainly useful to change the size or weight of the text.
The `PangoAttribute`'s @start_index and @end_index must refer to the
[class@Gtk.EntryBuffer] text, i.e. without the preedit string.</doc>
<type name="Pango.AttrList"/>
</property>
<property name="buffer" writable="1" construct="1" transfer-ownership="none" setter="set_buffer" getter="get_buffer">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_buffer"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_buffer"/>
<doc xml:space="preserve">The buffer object which actually stores the text.</doc>
<type name="EntryBuffer"/>
</property>
<property name="completion" writable="1" transfer-ownership="none" setter="set_completion" getter="get_completion">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_completion"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_completion"/>
<doc xml:space="preserve">The auxiliary completion object to use with the entry.</doc>
<type name="EntryCompletion"/>
</property>
<property name="enable-emoji-completion" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to suggest Emoji replacements for :-delimited names
like `:heart:`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="extra-menu" writable="1" transfer-ownership="none" setter="set_extra_menu" getter="get_extra_menu">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_extra_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_extra_menu"/>
<doc xml:space="preserve">A menu model whose contents will be appended to the context menu.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="has-frame" writable="1" transfer-ownership="none" setter="set_has_frame" getter="get_has_frame">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_has_frame"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_has_frame"/>
<doc xml:space="preserve">Whehter the entry should draw a frame.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="im-module" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Which IM (input method) module should be used for this entry.
See [class@Gtk.IMContext].
Setting this to a non-%NULL value overrides the system-wide IM
module setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module]
property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="input-hints" writable="1" transfer-ownership="none" setter="set_input_hints" getter="get_input_hints">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_input_hints"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_input_hints"/>
<doc xml:space="preserve">Additional hints that allow input methods to fine-tune their behavior.
Also see [property@Gtk.Entry:input-purpose]</doc>
<type name="InputHints"/>
</property>
<property name="input-purpose" writable="1" transfer-ownership="none" setter="set_input_purpose" getter="get_input_purpose">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_input_purpose"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_input_purpose"/>
<doc xml:space="preserve">The purpose of this text field.
This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.
Note that setting the purpose to %GTK_INPUT_PURPOSE_PASSWORD or
%GTK_INPUT_PURPOSE_PIN is independent from setting
[property@Gtk.Entry:visibility].</doc>
<type name="InputPurpose"/>
</property>
<property name="invisible-char" writable="1" transfer-ownership="none" setter="set_invisible_char" getter="get_invisible_char">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_invisible_char"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_invisible_char"/>
<doc xml:space="preserve">The character to use when masking entry contents (&#x201C;password mode&#x201D;).</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="invisible-char-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the invisible char has been set for the `GtkEntry`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-length" writable="1" transfer-ownership="none" setter="set_max_length" getter="get_max_length">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_max_length"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_max_length"/>
<doc xml:space="preserve">Maximum number of characters for this entry.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="overwrite-mode" writable="1" transfer-ownership="none" setter="set_overwrite_mode" getter="get_overwrite_mode">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_overwrite_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_overwrite_mode"/>
<doc xml:space="preserve">If text is overwritten when typing in the `GtkEntry`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="placeholder-text" writable="1" transfer-ownership="none" setter="set_placeholder_text" getter="get_placeholder_text">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_placeholder_text"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_placeholder_text"/>
<doc xml:space="preserve">The text that will be displayed in the `GtkEntry` when it is empty
and unfocused.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="primary-icon-activatable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the primary icon is activatable.
GTK emits the [signal@Gtk.Entry::icon-press] and
[signal@Gtk.Entry::icon-release] signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely
informational purposes.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="primary-icon-gicon" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `GIcon` to use for the primary icon for the entry.</doc>
<type name="Gio.Icon"/>
</property>
<property name="primary-icon-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The icon name to use for the primary icon for the entry.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="primary-icon-paintable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A `GdkPaintable` to use as the primary icon for the entry.</doc>
<type name="Gdk.Paintable"/>
</property>
<property name="primary-icon-sensitive" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the primary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
[signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release]
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger
when clicked is currently not available.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="primary-icon-storage-type" transfer-ownership="none">
<doc xml:space="preserve">The representation which is used for the primary icon of the entry.</doc>
<type name="ImageType"/>
</property>
<property name="primary-icon-tooltip-markup" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The contents of the tooltip on the primary icon, with markup.
Also see [method@Gtk.Entry.set_icon_tooltip_markup].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="primary-icon-tooltip-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The contents of the tooltip on the primary icon.
Also see [method@Gtk.Entry.set_icon_tooltip_text].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="progress-fraction" writable="1" transfer-ownership="none" setter="set_progress_fraction" getter="get_progress_fraction">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_progress_fraction"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_progress_fraction"/>
<doc xml:space="preserve">The current fraction of the task that's been completed.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="progress-pulse-step" writable="1" transfer-ownership="none" setter="set_progress_pulse_step" getter="get_progress_pulse_step">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_progress_pulse_step"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_progress_pulse_step"/>
<doc xml:space="preserve">The fraction of total entry width to move the progress
bouncing block for each pulse.
See [method@Gtk.Entry.progress_pulse].</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="scroll-offset" transfer-ownership="none">
<doc xml:space="preserve">Number of pixels of the entry scrolled off the screen to the left.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="secondary-icon-activatable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the secondary icon is activatable.
GTK emits the [signal@Gtk.Entry::icon-press] and
[signal@Gtk.Entry::icon-release] signals only on sensitive,
activatable icons.
Sensitive, but non-activatable icons can be used for purely
informational purposes.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="secondary-icon-gicon" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The `GIcon` to use for the secondary icon for the entry.</doc>
<type name="Gio.Icon"/>
</property>
<property name="secondary-icon-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The icon name to use for the secondary icon for the entry.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="secondary-icon-paintable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A `GdkPaintable` to use as the secondary icon for the entry.</doc>
<type name="Gdk.Paintable"/>
</property>
<property name="secondary-icon-sensitive" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the secondary icon is sensitive.
An insensitive icon appears grayed out. GTK does not emit the
[signal@Gtk.Entry::icon-press[ and [signal@Gtk.Entry::icon-release]
signals and does not allow DND from insensitive icons.
An icon should be set insensitive if the action that would trigger
when clicked is currently not available.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="secondary-icon-storage-type" transfer-ownership="none">
<doc xml:space="preserve">The representation which is used for the secondary icon of the entry.</doc>
<type name="ImageType"/>
</property>
<property name="secondary-icon-tooltip-markup" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The contents of the tooltip on the secondary icon, with markup.
Also see [method@Gtk.Entry.set_icon_tooltip_markup].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="secondary-icon-tooltip-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The contents of the tooltip on the secondary icon.
Also see [method@Gtk.Entry.set_icon_tooltip_text].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="show-emoji-icon" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tabs" writable="1" transfer-ownership="none" setter="set_tabs" getter="get_tabs">
<type name="Pango.TabArray"/>
</property>
<property name="text-length" transfer-ownership="none" getter="get_text_length">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_text_length"/>
<doc xml:space="preserve">The length of the text in the `GtkEntry`.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="truncate-multiline" writable="1" transfer-ownership="none">
<doc xml:space="preserve">When %TRUE, pasted multi-line text is truncated to the first line.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visibility" writable="1" transfer-ownership="none" setter="set_visibility" getter="get_visibility">
<attribute name="org.gtk.Property.get" value="gtk_entry_get_visibility"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_set_visibility"/>
<doc xml:space="preserve">Whether the entry should show the &#x201C;invisible char&#x201D; instead of the
actual text (&#x201C;password mode&#x201D;).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="last" action="1">
<doc xml:space="preserve">Emitted when the entry is activated.
The keybindings for this signal are all forms of the Enter key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="icon-press" when="last">
<doc xml:space="preserve">Emitted when an activatable icon is clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">The position of the clicked icon</doc>
<type name="EntryIconPosition"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="icon-release" when="last">
<doc xml:space="preserve">Emitted on the button release from a mouse click
over an activatable icon.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="icon_pos" transfer-ownership="none">
<doc xml:space="preserve">The position of the clicked icon</doc>
<type name="EntryIconPosition"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="EntryBuffer" c:symbol-prefix="entry_buffer" c:type="GtkEntryBuffer" parent="GObject.Object" glib:type-name="GtkEntryBuffer" glib:get-type="gtk_entry_buffer_get_type" glib:type-struct="EntryBufferClass">
<doc xml:space="preserve">A `GtkEntryBuffer` hold the text displayed in a `GtkText` widget.
A single `GtkEntryBuffer` object can be shared by multiple widgets
which will then share the same text content, but not the cursor
position, visibility attributes, icon etc.
`GtkEntryBuffer` may be derived from. Such a derived class might allow
text to be stored in an alternate location, such as non-pageable memory,
useful in the case of important passwords. Or a derived class could
integrate with an application&#x2019;s concept of undo/redo.</doc>
<constructor name="new" c:identifier="gtk_entry_buffer_new">
<doc xml:space="preserve">Create a new `GtkEntryBuffer` object.
Optionally, specify initial text to set in the buffer.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkEntryBuffer` object.</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</return-value>
<parameters>
<parameter name="initial_chars" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">initial buffer text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_initial_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters in @initial_chars, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="delete_text" invoker="delete_text">
<doc xml:space="preserve">Deletes a sequence of characters from the buffer.
@n_chars characters are deleted starting at @position.
If @n_chars is negative, then all characters until the
end of the text are deleted.
If @position or @n_chars are out of bounds, then they
are coerced to sane values.
Note that the positions are specified in characters,
not bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters deleted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which to delete text</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="deleted_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_length" invoker="get_length">
<attribute name="org.gtk.Method.get_property" value="length"/>
<doc xml:space="preserve">Retrieves the length in characters of the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters in the buffer.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_text">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="n_bytes" transfer-ownership="none">
<type name="gsize" c:type="gsize*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_text" invoker="insert_text">
<doc xml:space="preserve">Inserts @n_chars characters of @chars into the contents of the
buffer, at position @position.
If @n_chars is negative, then characters from chars will be inserted
until a null-terminator is found. If @position or @n_chars are out of
bounds, or the maximum buffer text length is exceeded, then they are
coerced to sane values.
Note that the position and length are in characters, not in bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters actually inserted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position at which to insert text.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">the text to insert into the buffer.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in characters, or -1</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="inserted_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<method name="delete_text" c:identifier="gtk_entry_buffer_delete_text">
<doc xml:space="preserve">Deletes a sequence of characters from the buffer.
@n_chars characters are deleted starting at @position.
If @n_chars is negative, then all characters until the
end of the text are deleted.
If @position or @n_chars are out of bounds, then they
are coerced to sane values.
Note that the positions are specified in characters,
not bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters deleted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which to delete text</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="emit_deleted_text" c:identifier="gtk_entry_buffer_emit_deleted_text">
<doc xml:space="preserve">Used when subclassing `GtkEntryBuffer`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which text was deleted</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters deleted</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="emit_inserted_text" c:identifier="gtk_entry_buffer_emit_inserted_text">
<doc xml:space="preserve">Used when subclassing `GtkEntryBuffer`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which text was inserted</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">text that was inserted</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters inserted</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_bytes" c:identifier="gtk_entry_buffer_get_bytes">
<doc xml:space="preserve">Retrieves the length in bytes of the buffer.
See [method@Gtk.EntryBuffer.get_length].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The byte length of the buffer.</doc>
<type name="gsize" c:type="gsize"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_length" c:identifier="gtk_entry_buffer_get_length" glib:get-property="length">
<attribute name="org.gtk.Method.get_property" value="length"/>
<doc xml:space="preserve">Retrieves the length in characters of the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters in the buffer.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_length" c:identifier="gtk_entry_buffer_get_max_length" glib:get-property="max-length">
<attribute name="org.gtk.Method.get_property" value="max-length"/>
<doc xml:space="preserve">Retrieves the maximum allowed length of the text in @buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum allowed number of characters
in `GtkEntryBuffer`, or 0 if there is no maximum.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_entry_buffer_get_text" glib:get-property="text">
<attribute name="org.gtk.Method.get_property" value="text"/>
<doc xml:space="preserve">Retrieves the contents of the buffer.
The memory pointer returned by this call will not change
unless this object emits a signal, or is finalized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a pointer to the contents of the widget as a
string. This string points to internally allocated storage
in the buffer and must not be freed, modified or stored.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_text" c:identifier="gtk_entry_buffer_insert_text">
<doc xml:space="preserve">Inserts @n_chars characters of @chars into the contents of the
buffer, at position @position.
If @n_chars is negative, then characters from chars will be inserted
until a null-terminator is found. If @position or @n_chars are out of
bounds, or the maximum buffer text length is exceeded, then they are
coerced to sane values.
Note that the position and length are in characters, not in bytes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters actually inserted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position at which to insert text.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">the text to insert into the buffer.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in characters, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_max_length" c:identifier="gtk_entry_buffer_set_max_length" glib:set-property="max-length">
<attribute name="org.gtk.Method.set_property" value="max-length"/>
<doc xml:space="preserve">Sets the maximum allowed length of the contents of the buffer.
If the current contents are longer than the given length, then
they will be truncated to fit.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="max_length" transfer-ownership="none">
<doc xml:space="preserve">the maximum length of the entry buffer, or 0 for no maximum.
(other than the maximum length of entries.) The value passed in will
be clamped to the range 0-65536.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_entry_buffer_set_text" glib:set-property="text">
<attribute name="org.gtk.Method.set_property" value="text"/>
<doc xml:space="preserve">Sets the text in the buffer.
This is roughly equivalent to calling
[method@Gtk.EntryBuffer.delete_text] and
[method@Gtk.EntryBuffer.insert_text].
Note that @n_chars is in characters, not in bytes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</instance-parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">the new text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the number of characters in @text, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="length" transfer-ownership="none" getter="get_length">
<attribute name="org.gtk.Property.get" value="gtk_entry_buffer_get_length"/>
<doc xml:space="preserve">The length (in characters) of the text in buffer.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="max-length" writable="1" transfer-ownership="none" setter="set_max_length" getter="get_max_length">
<attribute name="org.gtk.Property.get" value="gtk_entry_buffer_get_max_length"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_buffer_set_max_length"/>
<doc xml:space="preserve">The maximum length (in characters) of the text in the buffer.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="text" writable="1" transfer-ownership="none" setter="set_text" getter="get_text">
<attribute name="org.gtk.Property.get" value="gtk_entry_buffer_get_text"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_buffer_set_text"/>
<doc xml:space="preserve">The contents of the buffer.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="deleted-text" when="last">
<doc xml:space="preserve">The text is altered in the default handler for this signal.
If you want access to the text after the text has been modified,
use %G_CONNECT_AFTER.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position the text was deleted at.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">The number of characters that were deleted.</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="inserted-text" when="first">
<doc xml:space="preserve">This signal is emitted after text is inserted into the buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position the text was inserted at.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">The text that was inserted.</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">The number of characters that were inserted.</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="EntryBufferClass" c:type="GtkEntryBufferClass" glib:is-gtype-struct-for="EntryBuffer">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="inserted_text">
<callback name="inserted_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="deleted_text">
<callback name="deleted_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_text">
<callback name="get_text">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
<parameter name="n_bytes" transfer-ownership="none">
<type name="gsize" c:type="gsize*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_length">
<callback name="get_length">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters in the buffer.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="insert_text">
<callback name="insert_text">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters actually inserted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position at which to insert text.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="chars" transfer-ownership="none">
<doc xml:space="preserve">the text to insert into the buffer.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the length of the text in characters, or -1</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="delete_text">
<callback name="delete_text">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of characters deleted.</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position at which to delete text</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved6" introspectable="0">
<callback name="_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved7" introspectable="0">
<callback name="_gtk_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved8" introspectable="0">
<callback name="_gtk_reserved8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="EntryClass" c:type="GtkEntryClass" glib:is-gtype-struct-for="Entry">
<doc xml:space="preserve">Class structure for `GtkEntry`. All virtual functions have a default
implementation. Derived classes may set the virtual function pointers for the
signal handlers to %NULL, but must keep @get_text_area_size and
@get_frame_size non-%NULL; either use the default implementation, or provide
a custom one.</doc>
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="entry" transfer-ownership="none">
<type name="Entry" c:type="GtkEntry*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="EntryCompletion" c:symbol-prefix="entry_completion" c:type="GtkEntryCompletion" parent="GObject.Object" glib:type-name="GtkEntryCompletion" glib:get-type="gtk_entry_completion_get_type">
<doc xml:space="preserve">`GtkEntryCompletion` is an auxiliary object to provide completion functionality
for `GtkEntry`.
It implements the [iface@Gtk.CellLayout] interface, to allow the user
to add extra cells to the `GtkTreeView` with completion matches.
&#x201C;Completion functionality&#x201D; means that when the user modifies the text
in the entry, `GtkEntryCompletion` checks which rows in the model match
the current content of the entry, and displays a list of matches.
By default, the matching is done by comparing the entry text
case-insensitively against the text column of the model (see
[method@Gtk.EntryCompletion.set_text_column]), but this can be overridden
with a custom match function (see [method@Gtk.EntryCompletion.set_match_func]).
When the user selects a completion, the content of the entry is
updated. By default, the content of the entry is replaced by the
text column of the model, but this can be overridden by connecting
to the [signal@Gtk.EntryCompletion::match-selected] signal and updating the
entry in the signal handler. Note that you should return %TRUE from
the signal handler to suppress the default behaviour.
To add completion functionality to an entry, use
[method@Gtk.Entry.set_completion].
`GtkEntryCompletion` uses a [class@Gtk.TreeModelFilter] model to
represent the subset of the entire model that is currently matching.
While the `GtkEntryCompletion` signals
[signal@Gtk.EntryCompletion::match-selected] and
[signal@Gtk.EntryCompletion::cursor-on-match] take the original model
and an iter pointing to that model as arguments, other callbacks and
signals (such as `GtkCellLayoutDataFunc` or
[signal@Gtk.CellArea::apply-attributes)]
will generally take the filter model as argument. As long as you are
only calling [method@Gtk.TreeModel.get], this will make no difference to
you. If for some reason, you need the original model, use
[method@Gtk.TreeModelFilter.get_model]. Don&#x2019;t forget to use
[method@Gtk.TreeModelFilter.convert_iter_to_child_iter] to obtain a
matching iter.</doc>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<constructor name="new" c:identifier="gtk_entry_completion_new">
<doc xml:space="preserve">Creates a new `GtkEntryCompletion` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkEntryCompletion` object</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</return-value>
</constructor>
<constructor name="new_with_area" c:identifier="gtk_entry_completion_new_with_area">
<doc xml:space="preserve">Creates a new `GtkEntryCompletion` object using the
specified @area.
The `GtkCellArea` is used to layout cells in the underlying
`GtkTreeViewColumn` for the drop-down menu.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkEntryCompletion` object</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea` used to layout cells</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</constructor>
<method name="complete" c:identifier="gtk_entry_completion_complete">
<doc xml:space="preserve">Requests a completion operation, or in other words a refiltering of the
current list with completions, using the current key.
The completion list view will be updated accordingly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="compute_prefix" c:identifier="gtk_entry_completion_compute_prefix">
<doc xml:space="preserve">Computes the common prefix that is shared by all rows in @completion
that start with @key.
If no row matches @key, %NULL will be returned.
Note that a text column must have been set for this function to work,
see [method@Gtk.EntryCompletion.set_text_column] for details.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The common prefix all rows
starting with @key</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">the entry completion</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">The text to complete for</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_completion_prefix" c:identifier="gtk_entry_completion_get_completion_prefix">
<doc xml:space="preserve">Get the original text entered by the user that triggered
the completion or %NULL if there&#x2019;s no completion ongoing.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the prefix for the current completion</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_entry" c:identifier="gtk_entry_completion_get_entry">
<doc xml:space="preserve">Gets the entry @completion has been attached to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The entry @completion has been attached to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_inline_completion" c:identifier="gtk_entry_completion_get_inline_completion" glib:get-property="inline-completion">
<attribute name="org.gtk.Method.get_property" value="inline-completion"/>
<doc xml:space="preserve">Returns whether the common prefix of the possible completions should
be automatically inserted in the entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if inline completion is turned on</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_inline_selection" c:identifier="gtk_entry_completion_get_inline_selection" glib:get-property="inline-selection">
<attribute name="org.gtk.Method.get_property" value="inline-selection"/>
<doc xml:space="preserve">Returns %TRUE if inline-selection mode is turned on.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if inline-selection mode is on</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_minimum_key_length" c:identifier="gtk_entry_completion_get_minimum_key_length" glib:get-property="minimum-key-length">
<doc xml:space="preserve">Returns the minimum key length as set for @completion.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The currently used minimum key length</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_entry_completion_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Returns the model the `GtkEntryCompletion` is using as data source.
Returns %NULL if the model is unset.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popup_completion" c:identifier="gtk_entry_completion_get_popup_completion" glib:get-property="popup-completion">
<attribute name="org.gtk.Method.get_property" value="popup-completion"/>
<doc xml:space="preserve">Returns whether the completions should be presented in a popup window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if popup completion is turned on</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popup_set_width" c:identifier="gtk_entry_completion_get_popup_set_width" glib:get-property="popup-set-width">
<attribute name="org.gtk.Method.get_property" value="popup-set-width"/>
<doc xml:space="preserve">Returns whether the completion popup window will be resized to the
width of the entry.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popup window will be resized to the width of
the entry</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popup_single_match" c:identifier="gtk_entry_completion_get_popup_single_match" glib:get-property="popup-single-match">
<attribute name="org.gtk.Method.get_property" value="popup-single-match"/>
<doc xml:space="preserve">Returns whether the completion popup window will appear even if there is
only a single match.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popup window will appear regardless of the
number of matches</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text_column" c:identifier="gtk_entry_completion_get_text_column" glib:get-property="text-column">
<attribute name="org.gtk.Method.get_property" value="text-column"/>
<doc xml:space="preserve">Returns the column in the model of @completion to get strings from.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the column containing the strings</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_prefix" c:identifier="gtk_entry_completion_insert_prefix">
<doc xml:space="preserve">Requests a prefix insertion.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_inline_completion" c:identifier="gtk_entry_completion_set_inline_completion" glib:set-property="inline-completion">
<attribute name="org.gtk.Method.set_property" value="inline-completion"/>
<doc xml:space="preserve">Sets whether the common prefix of the possible completions should
be automatically inserted in the entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="inline_completion" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to do inline completion</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_inline_selection" c:identifier="gtk_entry_completion_set_inline_selection" glib:set-property="inline-selection">
<attribute name="org.gtk.Method.set_property" value="inline-selection"/>
<doc xml:space="preserve">Sets whether it is possible to cycle through the possible completions
inside the entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="inline_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to do inline selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_match_func" c:identifier="gtk_entry_completion_set_match_func">
<doc xml:space="preserve">Sets the match function for @completion to be @func.
The match function is used to determine if a row should or
should not be in the completion list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the `GtkEntryCompletion`MatchFunc to use</doc>
<type name="EntryCompletionMatchFunc" c:type="GtkEntryCompletionMatchFunc"/>
</parameter>
<parameter name="func_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="func_notify" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @func_data.</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_minimum_key_length" c:identifier="gtk_entry_completion_set_minimum_key_length" glib:set-property="minimum-key-length">
<doc xml:space="preserve">Requires the length of the search key for @completion to be at least
@length.
This is useful for long lists, where completing using a small
key takes a lot of time and will come up with meaningless results anyway
(ie, a too large dataset).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the minimum length of the key in order to start completing</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_entry_completion_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model for a `GtkEntryCompletion`.
If @completion already has a model set, it will remove it
before setting the new model. If model is %NULL, then it
will unset the model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</method>
<method name="set_popup_completion" c:identifier="gtk_entry_completion_set_popup_completion" glib:set-property="popup-completion">
<attribute name="org.gtk.Method.set_property" value="popup-completion"/>
<doc xml:space="preserve">Sets whether the completions should be presented in a popup window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="popup_completion" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to do popup completion</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_popup_set_width" c:identifier="gtk_entry_completion_set_popup_set_width" glib:set-property="popup-set-width">
<attribute name="org.gtk.Method.set_property" value="popup-set-width"/>
<doc xml:space="preserve">Sets whether the completion popup window will be resized to be the same
width as the entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="popup_set_width" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the width of the popup the same as the entry</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_popup_single_match" c:identifier="gtk_entry_completion_set_popup_single_match" glib:set-property="popup-single-match">
<attribute name="org.gtk.Method.set_property" value="popup-single-match"/>
<doc xml:space="preserve">Sets whether the completion popup window will appear even if there is
only a single match.
You may want to set this to %FALSE if you
are using [property@Gtk.EntryCompletion:inline-completion].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="popup_single_match" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popup should appear even for a single match</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_text_column" c:identifier="gtk_entry_completion_set_text_column" glib:set-property="text-column">
<attribute name="org.gtk.Method.set_property" value="text-column"/>
<doc xml:space="preserve">Convenience function for setting up the most used case of this code: a
completion list with just strings.
This function will set up @completion
to have a list displaying all (and just) strings in the completion list,
and to get those strings from @column in the model of @completion.
This functions creates and adds a `GtkCellRendererText` for the selected
column. If you need to set the text column, but don't want the cell
renderer, use g_object_set() to set the
[property@Gtk.EntryCompletion:text-column] property directly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column in the model of @completion to get strings from</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="cell-area" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellArea` used to layout cell renderers in the treeview column.
If no area is specified when creating the entry completion with
[ctor@Gtk.EntryCompletion.new_with_area], a horizontally oriented
[class@Gtk.CellAreaBox] will be used.</doc>
<type name="CellArea"/>
</property>
<property name="inline-completion" writable="1" transfer-ownership="none" setter="set_inline_completion" getter="get_inline_completion">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_inline_completion"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_inline_completion"/>
<doc xml:space="preserve">Determines whether the common prefix of the possible completions
should be inserted automatically in the entry.
Note that this requires text-column to be set, even if you are
using a custom match function.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="inline-selection" writable="1" transfer-ownership="none" setter="set_inline_selection" getter="get_inline_selection">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_inline_selection"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_inline_selection"/>
<doc xml:space="preserve">Determines whether the possible completions on the popup
will appear in the entry as you navigate through them.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="minimum-key-length" writable="1" transfer-ownership="none" setter="set_minimum_key_length" getter="get_minimum_key_length">
<type name="gint" c:type="gint"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<type name="TreeModel"/>
</property>
<property name="popup-completion" writable="1" transfer-ownership="none" setter="set_popup_completion" getter="get_popup_completion">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_popup_completion"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_popup_completion"/>
<doc xml:space="preserve">Determines whether the possible completions should be
shown in a popup window.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="popup-set-width" writable="1" transfer-ownership="none" setter="set_popup_set_width" getter="get_popup_set_width">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_popup_set_width"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_popup_set_width"/>
<doc xml:space="preserve">Determines whether the completions popup window will be
resized to the width of the entry.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="popup-single-match" writable="1" transfer-ownership="none" setter="set_popup_single_match" getter="get_popup_single_match">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_popup_single_match"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_popup_single_match"/>
<doc xml:space="preserve">Determines whether the completions popup window will shown
for a single possible completion.
You probably want to set this to %FALSE if you are using
[property@Gtk.EntryCompletion:inline-completion].</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="text-column" writable="1" transfer-ownership="none" setter="set_text_column" getter="get_text_column">
<attribute name="org.gtk.Property.get" value="gtk_entry_completion_get_text_column"/>
<attribute name="org.gtk.Property.set" value="gtk_entry_completion_set_text_column"/>
<doc xml:space="preserve">The column of the model containing the strings.
Note that the strings must be UTF-8.</doc>
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="cursor-on-match" when="last">
<doc xml:space="preserve">Emitted when a match from the cursor is on a match of the list.
The default behaviour is to replace the contents
of the entry with the contents of the text column in the row
pointed to by @iter.
Note that @model is the model that was passed to
[method@Gtk.EntryCompletion.set_model].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` containing the matches</doc>
<type name="TreeModel"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` positioned at the selected match</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-prefix" when="last">
<doc xml:space="preserve">Emitted when the inline autocompletion is triggered.
The default behaviour is to make the entry display the
whole prefix and select the newly inserted part.
Applications may connect to this signal in order to insert only a
smaller part of the @prefix into the entry - e.g. the entry used in
the `GtkFileChooser` inserts only the part of the prefix up to the
next '/'.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="prefix" transfer-ownership="none">
<doc xml:space="preserve">the common prefix of all possible completions</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="match-selected" when="last">
<doc xml:space="preserve">Emitted when a match from the list is selected.
The default behaviour is to replace the contents of the
entry with the contents of the text column in the row
pointed to by @iter.
Note that @model is the model that was passed to
[method@Gtk.EntryCompletion.set_model].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` containing the matches</doc>
<type name="TreeModel"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` positioned at the selected match</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="no-matches" when="last">
<doc xml:space="preserve">Emitted when the filter model has zero
number of rows in completion_complete method.
In other words when `GtkEntryCompletion` is out of suggestions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="EntryCompletionMatchFunc" c:type="GtkEntryCompletionMatchFunc">
<doc xml:space="preserve">A function which decides whether the row indicated by @iter matches
a given @key, and should be displayed as a possible completion for @key.
Note that @key is normalized and case-folded (see g_utf8_normalize()
and g_utf8_casefold()). If this is not appropriate, match functions
have access to the unmodified key via
`gtk_editable_get_text (GTK_EDITABLE (gtk_entry_completion_get_entry ()))`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter should be displayed as a possible completion
for @key</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="completion" transfer-ownership="none">
<doc xml:space="preserve">the `GtkEntryCompletion`</doc>
<type name="EntryCompletion" c:type="GtkEntryCompletion*"/>
</parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">the string to match, normalized and case-folded</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` indicating the row to match</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">user data given to gtk_entry_completion_set_match_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="EntryIconPosition" glib:type-name="GtkEntryIconPosition" glib:get-type="gtk_entry_icon_position_get_type" c:type="GtkEntryIconPosition">
<doc xml:space="preserve">Specifies the side of the entry at which an icon is placed.</doc>
<member name="primary" value="0" c:identifier="GTK_ENTRY_ICON_PRIMARY" glib:nick="primary" glib:name="GTK_ENTRY_ICON_PRIMARY">
<doc xml:space="preserve">At the beginning of the entry (depending on the text direction).</doc>
</member>
<member name="secondary" value="1" c:identifier="GTK_ENTRY_ICON_SECONDARY" glib:nick="secondary" glib:name="GTK_ENTRY_ICON_SECONDARY">
<doc xml:space="preserve">At the end of the entry (depending on the text direction).</doc>
</member>
</enumeration>
<class name="EventController" c:symbol-prefix="event_controller" c:type="GtkEventController" parent="GObject.Object" abstract="1" glib:type-name="GtkEventController" glib:get-type="gtk_event_controller_get_type" glib:type-struct="EventControllerClass">
<doc xml:space="preserve">`GtkEventController` is the base class for event controllers.
These are ancillary objects associated to widgets, which react
to `GdkEvents`, and possibly trigger actions as a consequence.
Event controllers are added to a widget with
[method@Gtk.Widget.add_controller]. It is rarely necessary to
explicitly remove a controller with [method@Gtk.Widget.remove_controller].
See the chapter on [input handling](input-handling.html) for
an overview of the basic concepts, such as the capture and bubble
phases of even propagation.</doc>
<method name="get_current_event" c:identifier="gtk_event_controller_get_current_event">
<doc xml:space="preserve">Returns the event that is currently being handled by the controller.
At other times, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the event that is currently
handled by @controller</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_event_device" c:identifier="gtk_event_controller_get_current_event_device">
<doc xml:space="preserve">Returns the device of the event that is currently being
handled by the controller.
At other times, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">device of the event is
currently handled by @controller</doc>
<type name="Gdk.Device" c:type="GdkDevice*"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_event_state" c:identifier="gtk_event_controller_get_current_event_state">
<doc xml:space="preserve">Returns the modifier state of the event that is currently being
handled by the controller.
At other times, 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">modifier state of the event is currently handled by @controller</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_event_time" c:identifier="gtk_event_controller_get_current_event_time">
<doc xml:space="preserve">Returns the timestamp of the event that is currently being
handled by the controller.
At other times, 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">timestamp of the event is currently handled by @controller</doc>
<type name="guint32" c:type="guint32"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_event_controller_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Gets the name of @controller.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The controller name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_propagation_limit" c:identifier="gtk_event_controller_get_propagation_limit" glib:get-property="propagation-limit">
<attribute name="org.gtk.Method.get_property" value="propagation-limit"/>
<doc xml:space="preserve">Gets the propagation limit of the event controller.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the propagation limit</doc>
<type name="PropagationLimit" c:type="GtkPropagationLimit"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_propagation_phase" c:identifier="gtk_event_controller_get_propagation_phase" glib:get-property="propagation-phase">
<attribute name="org.gtk.Method.get_property" value="propagation-phase"/>
<doc xml:space="preserve">Gets the propagation phase at which @controller handles events.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the propagation phase</doc>
<type name="PropagationPhase" c:type="GtkPropagationPhase"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widget" c:identifier="gtk_event_controller_get_widget" glib:get-property="widget">
<attribute name="org.gtk.Method.get_property" value="widget"/>
<doc xml:space="preserve">Returns the `GtkWidget` this controller relates to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="reset" c:identifier="gtk_event_controller_reset">
<doc xml:space="preserve">Resets the @controller to a clean state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_name" c:identifier="gtk_event_controller_set_name" glib:set-property="name">
<attribute name="org.gtk.Method.set_property" value="name"/>
<doc xml:space="preserve">Sets a name on the controller that can be used for debugging.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a name for @controller</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_propagation_limit" c:identifier="gtk_event_controller_set_propagation_limit" glib:set-property="propagation-limit">
<attribute name="org.gtk.Method.set_property" value="propagation-limit"/>
<doc xml:space="preserve">Sets the event propagation limit on the event controller.
If the limit is set to %GTK_LIMIT_SAME_NATIVE, the controller
won't handle events that are targeted at widgets on a different
surface, such as popovers.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
<parameter name="limit" transfer-ownership="none">
<doc xml:space="preserve">the propagation limit</doc>
<type name="PropagationLimit" c:type="GtkPropagationLimit"/>
</parameter>
</parameters>
</method>
<method name="set_propagation_phase" c:identifier="gtk_event_controller_set_propagation_phase" glib:set-property="propagation-phase">
<attribute name="org.gtk.Method.set_property" value="propagation-phase"/>
<doc xml:space="preserve">Sets the propagation phase at which a controller handles events.
If @phase is %GTK_PHASE_NONE, no automatic event handling will be
performed, but other additional gesture maintenance will.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</instance-parameter>
<parameter name="phase" transfer-ownership="none">
<doc xml:space="preserve">a propagation phase</doc>
<type name="PropagationPhase" c:type="GtkPropagationPhase"/>
</parameter>
</parameters>
</method>
<property name="name" writable="1" transfer-ownership="none" setter="set_name" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_get_name"/>
<attribute name="org.gtk.Property.set" value="gtk_event_controller_set_name"/>
<doc xml:space="preserve">The name for this controller, typically used for debugging purposes.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="propagation-limit" writable="1" transfer-ownership="none" setter="set_propagation_limit" getter="get_propagation_limit">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_get_propagation_limit"/>
<attribute name="org.gtk.Property.set" value="gtk_event_controller_set_propagation_limit"/>
<doc xml:space="preserve">The limit for which events this controller will handle.</doc>
<type name="PropagationLimit"/>
</property>
<property name="propagation-phase" writable="1" transfer-ownership="none" setter="set_propagation_phase" getter="get_propagation_phase">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_get_propagation_phase"/>
<attribute name="org.gtk.Property.set" value="gtk_event_controller_set_propagation_phase"/>
<doc xml:space="preserve">The propagation phase at which this controller will handle events.</doc>
<type name="PropagationPhase"/>
</property>
<property name="widget" transfer-ownership="none" getter="get_widget">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_get_widget"/>
<doc xml:space="preserve">The widget receiving the `GdkEvents` that the controller will handle.</doc>
<type name="Widget"/>
</property>
</class>
<record name="EventControllerClass" c:type="GtkEventControllerClass" disguised="1" glib:is-gtype-struct-for="EventController"/>
<class name="EventControllerFocus" c:symbol-prefix="event_controller_focus" c:type="GtkEventControllerFocus" parent="EventController" glib:type-name="GtkEventControllerFocus" glib:get-type="gtk_event_controller_focus_get_type" glib:type-struct="EventControllerFocusClass">
<doc xml:space="preserve">`GtkEventControllerFocus` is an event controller to keep track of
keyboard focus.
The event controller offers [signal@Gtk.EventControllerFocus::enter]
and [signal@Gtk.EventControllerFocus::leave] signals, as well as
[property@Gtk.EventControllerFocus:is-focus] and
[property@Gtk.EventControllerFocus:contains-focus] properties
which are updated to reflect focus changes inside the widget hierarchy
that is rooted at the controllers widget.</doc>
<constructor name="new" c:identifier="gtk_event_controller_focus_new">
<doc xml:space="preserve">Creates a new event controller that will handle focus events.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkEventControllerFocus`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<method name="contains_focus" c:identifier="gtk_event_controller_focus_contains_focus" glib:get-property="contains-focus">
<attribute name="org.gtk.Method.get_property" value="contains-focus"/>
<doc xml:space="preserve">Returns %TRUE if focus is within @self or one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is within @self or one of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerFocus`</doc>
<type name="EventControllerFocus" c:type="GtkEventControllerFocus*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_focus" c:identifier="gtk_event_controller_focus_is_focus" glib:get-property="is-focus">
<attribute name="org.gtk.Method.get_property" value="is-focus"/>
<doc xml:space="preserve">Returns %TRUE if focus is within @self, but not one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is within @self, but not one of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerFocus`</doc>
<type name="EventControllerFocus" c:type="GtkEventControllerFocus*"/>
</instance-parameter>
</parameters>
</method>
<property name="contains-focus" transfer-ownership="none" getter="contains_focus">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_focus_contains_focus"/>
<doc xml:space="preserve">%TRUE if focus is contained in the controllers widget.
See [property@Gtk.EventControllerFocus:is-focus] for whether
the focus is in the widget itself or inside a descendent.
When handling focus events, this property is updated
before [signal@Gtk.EventControllerFocus::enter] or
[signal@Gtk.EventControllerFocus::leave] are emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="is-focus" transfer-ownership="none" getter="is_focus">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_focus_is_focus"/>
<doc xml:space="preserve">%TRUE if focus is in the controllers widget itself,
as opposed to in a descendent widget.
See also [property@Gtk.EventControllerFocus:contains-focus].
When handling focus events, this property is updated
before [signal@Gtk.EventControllerFocus::enter] or
[signal@Gtk.EventControllerFocus::leave] are emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="enter" when="last">
<doc xml:space="preserve">Emitted whenever the focus enters into the widget or one
of its descendents.
Note that this means you may not get an ::enter signal
even though the widget becomes the focus location, in
certain cases (such as when the focus moves from a descendent
of the widget to the widget itself). If you are interested
in these cases, you can monitor the
[property@Gtk.EventControllerFocus:is-focus]
property for changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="leave" when="last">
<doc xml:space="preserve">Emitted whenever the focus leaves the widget hierarchy
that is rooted at the widget that the controller is attached to.
Note that this means you may not get a ::leave signal
even though the focus moves away from the widget, in
certain cases (such as when the focus moves from the widget
to a descendent). If you are interested in these cases, you
can monitor the [property@Gtk.EventControllerFocus:is-focus]
property for changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="EventControllerFocusClass" c:type="GtkEventControllerFocusClass" disguised="1" glib:is-gtype-struct-for="EventControllerFocus"/>
<class name="EventControllerKey" c:symbol-prefix="event_controller_key" c:type="GtkEventControllerKey" parent="EventController" glib:type-name="GtkEventControllerKey" glib:get-type="gtk_event_controller_key_get_type" glib:type-struct="EventControllerKeyClass">
<doc xml:space="preserve">`GtkEventControllerKey` is an event controller that provides access
to key events.</doc>
<constructor name="new" c:identifier="gtk_event_controller_key_new">
<doc xml:space="preserve">Creates a new event controller that will handle key events.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkEventControllerKey`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<method name="forward" c:identifier="gtk_event_controller_key_forward">
<doc xml:space="preserve">Forwards the current event of this @controller to a @widget.
This function can only be used in handlers for the
[signal@Gtk.EventControllerKey::key-pressed],
[signal@Gtk.EventControllerKey::key-released]
or [signal@Gtk.EventControllerKey::modifiers] signals.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the @widget handled the event</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerKey`</doc>
<type name="EventControllerKey" c:type="GtkEventControllerKey*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_group" c:identifier="gtk_event_controller_key_get_group">
<doc xml:space="preserve">Gets the key group of the current event of this @controller.
See [method@Gdk.KeyEvent.get_layout].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the key group</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerKey`</doc>
<type name="EventControllerKey" c:type="GtkEventControllerKey*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_im_context" c:identifier="gtk_event_controller_key_get_im_context">
<doc xml:space="preserve">Gets the input method context of the key @controller.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerKey`</doc>
<type name="EventControllerKey" c:type="GtkEventControllerKey*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_im_context" c:identifier="gtk_event_controller_key_set_im_context">
<doc xml:space="preserve">Sets the input method context of the key @controller.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerKey`</doc>
<type name="EventControllerKey" c:type="GtkEventControllerKey*"/>
</instance-parameter>
<parameter name="im_context" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</method>
<glib:signal name="im-update" when="last">
<doc xml:space="preserve">Emitted whenever the input method context filters away
a keypress and prevents the @controller receiving it.
See [method@Gtk.EventControllerKey.set_im_context] and
[method@Gtk.IMContext.filter_keypress].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="key-pressed" when="last">
<doc xml:space="preserve">Emitted whenever a key is pressed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the key press was handled, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">the pressed key.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="keycode" transfer-ownership="none">
<doc xml:space="preserve">the raw code of the pressed key.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the bitmask, representing the state of modifier keys and pointer buttons. See `GdkModifierType`.</doc>
<type name="Gdk.ModifierType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="key-released" when="last">
<doc xml:space="preserve">Emitted whenever a key is released.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">the released key.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="keycode" transfer-ownership="none">
<doc xml:space="preserve">the raw code of the released key.</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the bitmask, representing the state of modifier keys and pointer buttons. See `GdkModifierType`.</doc>
<type name="Gdk.ModifierType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="modifiers" when="last">
<doc xml:space="preserve">Emitted whenever the state of modifier keys and pointer buttons change.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">the released key.</doc>
<type name="Gdk.ModifierType"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="EventControllerKeyClass" c:type="GtkEventControllerKeyClass" disguised="1" glib:is-gtype-struct-for="EventControllerKey"/>
<class name="EventControllerLegacy" c:symbol-prefix="event_controller_legacy" c:type="GtkEventControllerLegacy" parent="EventController" glib:type-name="GtkEventControllerLegacy" glib:get-type="gtk_event_controller_legacy_get_type" glib:type-struct="EventControllerLegacyClass">
<doc xml:space="preserve">`GtkEventControllerLegacy` is an event controller that provides raw
access to the event stream.
It should only be used as a last resort if none of the other event
controllers or gestures do the job.</doc>
<constructor name="new" c:identifier="gtk_event_controller_legacy_new">
<doc xml:space="preserve">Creates a new legacy event controller.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created event controller.</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<glib:signal name="event" when="last">
<doc xml:space="preserve">Emitted for each GDK event delivered to @controller.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the event
and the emission of this signal. %FALSE to propagate the event further.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the `GdkEvent` which triggered this signal</doc>
<type name="Gdk.Event"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="EventControllerLegacyClass" c:type="GtkEventControllerLegacyClass" disguised="1" glib:is-gtype-struct-for="EventControllerLegacy"/>
<class name="EventControllerMotion" c:symbol-prefix="event_controller_motion" c:type="GtkEventControllerMotion" parent="EventController" glib:type-name="GtkEventControllerMotion" glib:get-type="gtk_event_controller_motion_get_type" glib:type-struct="EventControllerMotionClass">
<doc xml:space="preserve">`GtkEventControllerMotion` is an event controller tracking the pointer
position.
The event controller offers [signal@Gtk.EventControllerMotion::enter]
and [signal@Gtk.EventControllerMotion::leave] signals, as well as
[property@Gtk.EventControllerMotion:is-pointer] and
[property@Gtk.EventControllerMotion:contains-pointer] properties
which are updated to reflect changes in the pointer position as it
moves over the widget.</doc>
<constructor name="new" c:identifier="gtk_event_controller_motion_new">
<doc xml:space="preserve">Creates a new event controller that will handle motion events.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkEventControllerMotion`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<method name="contains_pointer" c:identifier="gtk_event_controller_motion_contains_pointer" glib:get-property="contains-pointer">
<attribute name="org.gtk.Method.get_property" value="contains-pointer"/>
<doc xml:space="preserve">Returns if a pointer is within @self or one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a pointer is within @self or one of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerMotion`</doc>
<type name="EventControllerMotion" c:type="GtkEventControllerMotion*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_pointer" c:identifier="gtk_event_controller_motion_is_pointer" glib:get-property="is-pointer">
<attribute name="org.gtk.Method.get_property" value="is-pointer"/>
<doc xml:space="preserve">Returns if a pointer is within @self, but not one of its children.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a pointer is within @self but not one of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerMotion`</doc>
<type name="EventControllerMotion" c:type="GtkEventControllerMotion*"/>
</instance-parameter>
</parameters>
</method>
<property name="contains-pointer" transfer-ownership="none" getter="contains_pointer">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_motion_contains_pointer"/>
<doc xml:space="preserve">Whether the pointer is in the controllers widget or a descendant.
See also [property@Gtk.EventControllerMotion:is-pointer].
When handling crossing events, this property is updated
before [signal@Gtk.EventControllerMotion::enter], but after
[signal@Gtk.EventControllerMotion::leave] is emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="is-pointer" transfer-ownership="none" getter="is_pointer">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_motion_is_pointer"/>
<doc xml:space="preserve">Whether the pointer is in the controllers widget itself,
as opposed to in a descendent widget.
See also [property@Gtk.EventControllerMotion:contains-pointer].
When handling crossing events, this property is updated
before [signal@Gtk.EventControllerMotion::enter], but after
[signal@Gtk.EventControllerMotion::leave] is emitted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="enter" when="last">
<doc xml:space="preserve">Signals that the pointer has entered the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">coordinates of pointer location</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">coordinates of pointer location</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="leave" when="last">
<doc xml:space="preserve">Signals that the pointer has left the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="motion" when="first">
<doc xml:space="preserve">Emitted when the pointer moves inside the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="EventControllerMotionClass" c:type="GtkEventControllerMotionClass" disguised="1" glib:is-gtype-struct-for="EventControllerMotion"/>
<class name="EventControllerScroll" c:symbol-prefix="event_controller_scroll" c:type="GtkEventControllerScroll" parent="EventController" glib:type-name="GtkEventControllerScroll" glib:get-type="gtk_event_controller_scroll_get_type" glib:type-struct="EventControllerScrollClass">
<doc xml:space="preserve">`GtkEventControllerScroll` is an event controller that handles scroll
events.
It is capable of handling both discrete and continuous scroll
events from mice or touchpads, abstracting them both with the
[signal@Gtk.EventControllerScroll::scroll] signal. Deltas in
the discrete case are multiples of 1.
In the case of continuous scroll events, `GtkEventControllerScroll`
encloses all [signal@Gtk.EventControllerScroll::scroll] emissions
between two [signal@Gtk.EventControllerScroll::scroll-begin] and
[signal@Gtk.EventControllerScroll::scroll-end] signals.
The behavior of the event controller can be modified by the flags
given at creation time, or modified at a later point through
[method@Gtk.EventControllerScroll.set_flags] (e.g. because the scrolling
conditions of the widget changed).
The controller can be set up to emit motion for either/both vertical
and horizontal scroll events through %GTK_EVENT_CONTROLLER_SCROLL_VERTICAL,
%GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL and %GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES.
If any axis is disabled, the respective [signal@Gtk.EventControllerScroll::scroll]
delta will be 0. Vertical scroll events will be translated to horizontal
motion for the devices incapable of horizontal scrolling.
The event controller can also be forced to emit discrete events on all
devices through %GTK_EVENT_CONTROLLER_SCROLL_DISCRETE. This can be used
to implement discrete actions triggered through scroll events (e.g.
switching across combobox options).
The %GTK_EVENT_CONTROLLER_SCROLL_KINETIC flag toggles the emission of the
[signal@Gtk.EventControllerScroll::decelerate] signal, emitted at the end
of scrolling with two X/Y velocity arguments that are consistent with the
motion that was received.</doc>
<constructor name="new" c:identifier="gtk_event_controller_scroll_new">
<doc xml:space="preserve">Creates a new event controller that will handle scroll events.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkEventControllerScroll`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
<parameters>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags affecting the controller behavior</doc>
<type name="EventControllerScrollFlags" c:type="GtkEventControllerScrollFlags"/>
</parameter>
</parameters>
</constructor>
<method name="get_flags" c:identifier="gtk_event_controller_scroll_get_flags" glib:get-property="flags">
<attribute name="org.gtk.Method.get_property" value="flags"/>
<doc xml:space="preserve">Gets the flags conditioning the scroll controller behavior.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the controller flags.</doc>
<type name="EventControllerScrollFlags" c:type="GtkEventControllerScrollFlags"/>
</return-value>
<parameters>
<instance-parameter name="scroll" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerScroll`</doc>
<type name="EventControllerScroll" c:type="GtkEventControllerScroll*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_flags" c:identifier="gtk_event_controller_scroll_set_flags" glib:set-property="flags">
<attribute name="org.gtk.Method.set_property" value="flags"/>
<doc xml:space="preserve">Sets the flags conditioning scroll controller behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scroll" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventControllerScroll`</doc>
<type name="EventControllerScroll" c:type="GtkEventControllerScroll*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags affecting the controller behavior</doc>
<type name="EventControllerScrollFlags" c:type="GtkEventControllerScrollFlags"/>
</parameter>
</parameters>
</method>
<property name="flags" writable="1" transfer-ownership="none" setter="set_flags" getter="get_flags">
<attribute name="org.gtk.Property.get" value="gtk_event_controller_scroll_get_flags"/>
<attribute name="org.gtk.Property.set" value="gtk_event_controller_scroll_set_flags"/>
<doc xml:space="preserve">The flags affecting event controller behavior.</doc>
<type name="EventControllerScrollFlags"/>
</property>
<glib:signal name="decelerate" when="first">
<doc xml:space="preserve">Emitted after scroll is finished if the
%GTK_EVENT_CONTROLLER_SCROLL_KINETIC flag is set.
@vel_x and @vel_y express the initial velocity that was
imprinted by the scroll events. @vel_x and @vel_y are expressed in
pixels/ms.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="vel_x" transfer-ownership="none">
<doc xml:space="preserve">X velocity</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="vel_y" transfer-ownership="none">
<doc xml:space="preserve">Y velocity</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="scroll" when="last">
<doc xml:space="preserve">Signals that the widget should scroll by the
amount specified by @dx and @dy.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the scroll event was handled,
%FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="dx" transfer-ownership="none">
<doc xml:space="preserve">X delta</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="dy" transfer-ownership="none">
<doc xml:space="preserve">Y delta</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="scroll-begin" when="first">
<doc xml:space="preserve">Signals that a new scrolling operation has begun.
It will only be emitted on devices capable of it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="scroll-end" when="first">
<doc xml:space="preserve">Signals that a scrolling operation has finished.
It will only be emitted on devices capable of it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="EventControllerScrollClass" c:type="GtkEventControllerScrollClass" disguised="1" glib:is-gtype-struct-for="EventControllerScroll"/>
<bitfield name="EventControllerScrollFlags" glib:type-name="GtkEventControllerScrollFlags" glib:get-type="gtk_event_controller_scroll_flags_get_type" c:type="GtkEventControllerScrollFlags">
<doc xml:space="preserve">Describes the behavior of a `GtkEventControllerScroll`.</doc>
<member name="none" value="0" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_NONE" glib:nick="none" glib:name="GTK_EVENT_CONTROLLER_SCROLL_NONE">
<doc xml:space="preserve">Don't emit scroll.</doc>
</member>
<member name="vertical" value="1" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_VERTICAL" glib:nick="vertical" glib:name="GTK_EVENT_CONTROLLER_SCROLL_VERTICAL">
<doc xml:space="preserve">Emit scroll with vertical deltas.</doc>
</member>
<member name="horizontal" value="2" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL" glib:nick="horizontal" glib:name="GTK_EVENT_CONTROLLER_SCROLL_HORIZONTAL">
<doc xml:space="preserve">Emit scroll with horizontal deltas.</doc>
</member>
<member name="discrete" value="4" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_DISCRETE" glib:nick="discrete" glib:name="GTK_EVENT_CONTROLLER_SCROLL_DISCRETE">
<doc xml:space="preserve">Only emit deltas that are multiples of 1.</doc>
</member>
<member name="kinetic" value="8" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_KINETIC" glib:nick="kinetic" glib:name="GTK_EVENT_CONTROLLER_SCROLL_KINETIC">
<doc xml:space="preserve">Emit ::decelerate after continuous scroll finishes.</doc>
</member>
<member name="both_axes" value="3" c:identifier="GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES" glib:nick="both-axes" glib:name="GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES">
<doc xml:space="preserve">Emit scroll on both axes.</doc>
</member>
</bitfield>
<enumeration name="EventSequenceState" glib:type-name="GtkEventSequenceState" glib:get-type="gtk_event_sequence_state_get_type" c:type="GtkEventSequenceState">
<doc xml:space="preserve">Describes the state of a [struct@Gdk.EventSequence] in a [class@Gesture].</doc>
<member name="none" value="0" c:identifier="GTK_EVENT_SEQUENCE_NONE" glib:nick="none" glib:name="GTK_EVENT_SEQUENCE_NONE">
<doc xml:space="preserve">The sequence is handled, but not grabbed.</doc>
</member>
<member name="claimed" value="1" c:identifier="GTK_EVENT_SEQUENCE_CLAIMED" glib:nick="claimed" glib:name="GTK_EVENT_SEQUENCE_CLAIMED">
<doc xml:space="preserve">The sequence is handled and grabbed.</doc>
</member>
<member name="denied" value="2" c:identifier="GTK_EVENT_SEQUENCE_DENIED" glib:nick="denied" glib:name="GTK_EVENT_SEQUENCE_DENIED">
<doc xml:space="preserve">The sequence is denied.</doc>
</member>
</enumeration>
<class name="EveryFilter" c:symbol-prefix="every_filter" c:type="GtkEveryFilter" parent="MultiFilter" glib:type-name="GtkEveryFilter" glib:get-type="gtk_every_filter_get_type" glib:type-struct="EveryFilterClass">
<doc xml:space="preserve">`GtkEveryFilter` matches an item when each of its filters matches.
To add filters to a `GtkEveryFilter`, use [method@Gtk.MultiFilter.append].</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_every_filter_new">
<doc xml:space="preserve">Creates a new empty "every" filter.
Use [method@Gtk.MultiFilter.append] to add filters to it.
This filter matches an item if each of the filters added to it
matches the item. In particular, this means that if no filter
has been added to it, the filter matches every item.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkEveryFilter`</doc>
<type name="EveryFilter" c:type="GtkEveryFilter*"/>
</return-value>
</constructor>
</class>
<record name="EveryFilterClass" c:type="GtkEveryFilterClass" disguised="1" glib:is-gtype-struct-for="EveryFilter"/>
<class name="Expander" c:symbol-prefix="expander" c:type="GtkExpander" parent="Widget" glib:type-name="GtkExpander" glib:get-type="gtk_expander_get_type">
<doc xml:space="preserve">`GtkExpander` allows the user to reveal its child by clicking
on an expander triangle.
![An example GtkExpander](expander.png)
This is similar to the triangles used in a `GtkTreeView`.
Normally you use an expander as you would use a frame; you create
the child widget and use [method@Gtk.Expander.set_child] to add it
to the expander. When the expander is toggled, it will take care of
showing and hiding the child automatically.
# Special Usage
There are situations in which you may prefer to show and hide the
expanded widget yourself, such as when you want to actually create
the widget at expansion time. In this case, create a `GtkExpander`
but do not add a child to it. The expander widget has an
[property@Gtk.Expander:expanded[ property which can be used to
monitor its expansion state. You should watch this property with
a signal connection as follows:
```c
static void
expander_callback (GObject *object,
GParamSpec *param_spec,
gpointer user_data)
{
GtkExpander *expander;
expander = GTK_EXPANDER (object);
if (gtk_expander_get_expanded (expander))
{
// Show or create widgets
}
else
{
// Hide or destroy widgets
}
}
static void
create_expander (void)
{
GtkWidget *expander = gtk_expander_new_with_mnemonic ("_More Options");
g_signal_connect (expander, "notify::expanded",
G_CALLBACK (expander_callback), NULL);
// ...
}
```
# GtkExpander as GtkBuildable
The `GtkExpander` implementation of the `GtkBuildable` interface supports
placing a child in the label position by specifying &#x201C;label&#x201D; as the
&#x201C;type&#x201D; attribute of a &lt;child&gt; element. A normal content child can be
specified without specifying a &lt;child&gt; type attribute.
An example of a UI definition fragment with GtkExpander:
```xml
&lt;object class="GtkExpander"&gt;
&lt;child type="label"&gt;
&lt;object class="GtkLabel" id="expander-label"/&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkEntry" id="expander-content"/&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# CSS nodes
```
expander
&#x2570;&#x2500;&#x2500; box
&#x251C;&#x2500;&#x2500; title
&#x2502; &#x251C;&#x2500;&#x2500; arrow
&#x2502; &#x2570;&#x2500;&#x2500; &lt;label widget&gt;
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
`GtkExpander` has three CSS nodes, the main node with the name expander,
a subnode with name title and node below it with name arrow. The arrow of an
expander that is showing its child gets the :checked pseudoclass added to it.
# Accessibility
`GtkExpander` uses the %GTK_ACCESSIBLE_ROLE_BUTTON role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_expander_new">
<doc xml:space="preserve">Creates a new expander using @label as the text of the label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkExpander` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text of the label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_mnemonic" c:identifier="gtk_expander_new_with_mnemonic">
<doc xml:space="preserve">Creates a new expander using @label as the text of the label.
If characters in @label are preceded by an underscore, they are
underlined. If you need a literal underscore character in a label,
use &#x201C;__&#x201D; (two underscores). The first underlined character represents
a keyboard accelerator called a mnemonic.
Pressing Alt and that key activates the button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkExpander` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text of the label with an underscore
in front of the mnemonic character</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_child" c:identifier="gtk_expander_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @expander.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @expander</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expanded" c:identifier="gtk_expander_get_expanded" glib:get-property="expanded">
<attribute name="org.gtk.Method.get_property" value="expanded"/>
<doc xml:space="preserve">Queries a `GtkExpander` and returns its current state.
Returns %TRUE if the child widget is revealed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current state of the expander</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_expander_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Fetches the text from a label widget.
This is including any embedded underlines indicating mnemonics and
Pango markup, as set by [method@Gtk.Expander.set_label]. If the label
text has not been set the return value will be %NULL. This will be the
case if you create an empty button with gtk_button_new() to use as a
container.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The text of the label widget. This string is owned
by the widget and must not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label_widget" c:identifier="gtk_expander_get_label_widget" glib:get-property="label-widget">
<attribute name="org.gtk.Method.get_property" value="label-widget"/>
<doc xml:space="preserve">Retrieves the label widget for the frame.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the label widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resize_toplevel" c:identifier="gtk_expander_get_resize_toplevel" glib:get-property="resize-toplevel">
<attribute name="org.gtk.Method.get_property" value="resize-toplevel"/>
<doc xml:space="preserve">Returns whether the expander will resize the toplevel widget
containing the expander upon resizing and collpasing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the &#x201C;resize toplevel&#x201D; setting.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_markup" c:identifier="gtk_expander_get_use_markup" glib:get-property="use-markup">
<attribute name="org.gtk.Method.get_property" value="use-markup"/>
<doc xml:space="preserve">Returns whether the label&#x2019;s text is interpreted as Pango markup.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the label&#x2019;s text will be parsed for markup</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_expander_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">Returns whether an underline in the text indicates a mnemonic.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an embedded underline in the expander
label indicates the mnemonic accelerator keys</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_expander_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @expander.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_expanded" c:identifier="gtk_expander_set_expanded" glib:set-property="expanded">
<attribute name="org.gtk.Method.set_property" value="expanded"/>
<doc xml:space="preserve">Sets the state of the expander.
Set to %TRUE, if you want the child widget to be revealed,
and %FALSE if you want the child widget to be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="expanded" transfer-ownership="none">
<doc xml:space="preserve">whether the child widget is revealed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_expander_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Sets the text of the label of the expander to @label.
This will also clear any previously set labels.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_label_widget" c:identifier="gtk_expander_set_label_widget" glib:set-property="label-widget">
<attribute name="org.gtk.Method.set_property" value="label-widget"/>
<doc xml:space="preserve">Set the label widget for the expander.
This is the widget that will appear embedded alongside
the expander arrow.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="label_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new label widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_resize_toplevel" c:identifier="gtk_expander_set_resize_toplevel" glib:set-property="resize-toplevel">
<attribute name="org.gtk.Method.set_property" value="resize-toplevel"/>
<doc xml:space="preserve">Sets whether the expander will resize the toplevel widget
containing the expander upon resizing and collpasing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="resize_toplevel" transfer-ownership="none">
<doc xml:space="preserve">whether to resize the toplevel</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_use_markup" c:identifier="gtk_expander_set_use_markup" glib:set-property="use-markup">
<attribute name="org.gtk.Method.set_property" value="use-markup"/>
<doc xml:space="preserve">Sets whether the text of the label contains Pango markup.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="use_markup" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the label&#x2019;s text should be parsed for markup</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_expander_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">If true, an underline in the text indicates a mnemonic.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="expander" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpander`</doc>
<type name="Expander" c:type="GtkExpander*"/>
</instance-parameter>
<parameter name="use_underline" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if underlines in the text indicate mnemonics</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="expanded" writable="1" construct="1" transfer-ownership="none" setter="set_expanded" getter="get_expanded">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_expanded"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_expanded"/>
<doc xml:space="preserve">Whether the expander has been opened to reveal the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="label" writable="1" construct="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_label"/>
<doc xml:space="preserve">The text of the expanders label.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="label-widget" writable="1" transfer-ownership="none" setter="set_label_widget" getter="get_label_widget">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_label_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_label_widget"/>
<doc xml:space="preserve">A widget to display instead of the usual expander label.</doc>
<type name="Widget"/>
</property>
<property name="resize-toplevel" writable="1" transfer-ownership="none" setter="set_resize_toplevel" getter="get_resize_toplevel">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_resize_toplevel"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_resize_toplevel"/>
<doc xml:space="preserve">When this property is %TRUE, the expander will resize the toplevel
widget containing the expander upon expanding and collapsing.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-markup" writable="1" construct="1" transfer-ownership="none" setter="set_use_markup" getter="get_use_markup">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_use_markup"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_use_markup"/>
<doc xml:space="preserve">Whether the text in the label is Pango markup.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-underline" writable="1" construct="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_expander_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_expander_set_use_underline"/>
<doc xml:space="preserve">Whether an underline in the text indicates a mnemonic.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="last" action="1">
<doc xml:space="preserve">Activates the `GtkExpander`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="Expression" c:symbol-prefix="expression" c:type="GtkExpression" abstract="1" glib:type-name="GtkExpression" glib:get-type="gtk_expression_get_type" glib:fundamental="1" glib:ref-func="gtk_expression_ref" glib:unref-func="gtk_expression_unref" glib:set-value-func="gtk_value_set_expression" glib:get-value-func="gtk_value_get_expression">
<doc xml:space="preserve">`GtkExpression` provides a way to describe references to values.
An important aspect of expressions is that the value can be obtained
from a source that is several steps away. For example, an expression
may describe &#x2018;the value of property A of `object1`, which is itself the
value of a property of `object2`&#x2019;. And `object1` may not even exist yet
at the time that the expression is created. This is contrast to `GObject`
property bindings, which can only create direct connections between
the properties of two objects that must both exist for the duration
of the binding.
An expression needs to be "evaluated" to obtain the value that it currently
refers to. An evaluation always happens in the context of a current object
called `this` (it mirrors the behavior of object-oriented languages),
which may or may not influence the result of the evaluation. Use
[method@Gtk.Expression.evaluate] for evaluating an expression.
Various methods for defining expressions exist, from simple constants via
[ctor@Gtk.ConstantExpression.new] to looking up properties in a `GObject`
(even recursively) via [ctor@Gtk.PropertyExpression.new] or providing
custom functions to transform and combine expressions via
[ctor@Gtk.ClosureExpression.new].
Here is an example of a complex expression:
```c
color_expr = gtk_property_expression_new (GTK_TYPE_LIST_ITEM,
NULL, "item");
expression = gtk_property_expression_new (GTK_TYPE_COLOR,
color_expr, "name");
```
when evaluated with `this` being a `GtkListItem`, it will obtain the
"item" property from the `GtkListItem`, and then obtain the "name" property
from the resulting object (which is assumed to be of type `GTK_TYPE_COLOR`).
A more concise way to describe this would be
```
this-&gt;item-&gt;name
```
The most likely place where you will encounter expressions is in the context
of list models and list widgets using them. For example, `GtkDropDown` is
evaluating a `GtkExpression` to obtain strings from the items in its model
that it can then use to match against the contents of its search entry.
`GtkStringFilter` is using a `GtkExpression` for similar reasons.
By default, expressions are not paying attention to changes and evaluation is
just a snapshot of the current state at a given time. To get informed about
changes, an expression needs to be "watched" via a [struct@Gtk.ExpressionWatch],
which will cause a callback to be called whenever the value of the expression may
have changed; [method@Gtk.Expression.watch] starts watching an expression, and
[method@Gtk.ExpressionWatch.unwatch] stops.
Watches can be created for automatically updating the property of an object,
similar to GObject's `GBinding` mechanism, by using [method@Gtk.Expression.bind].
## GtkExpression in GObject properties
In order to use a `GtkExpression` as a `GObject` property, you must use the
[id@gtk_param_spec_expression] when creating a `GParamSpec` to install in the
`GObject` class being defined; for instance:
```c
obj_props[PROP_EXPRESSION] =
gtk_param_spec_expression ("expression",
"Expression",
"The expression used by the widget",
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
G_PARAM_EXPLICIT_NOTIFY);
```
When implementing the `GObjectClass.set_property` and `GObjectClass.get_property`
virtual functions, you must use [id@gtk_value_get_expression], to retrieve the
stored `GtkExpression` from the `GValue` container, and [id@gtk_value_set_expression],
to store the `GtkExpression` into the `GValue`; for instance:
```c
// in set_property()...
case PROP_EXPRESSION:
foo_widget_set_expression (foo, gtk_value_get_expression (value));
break;
// in get_property()...
case PROP_EXPRESSION:
gtk_value_set_expression (value, foo-&gt;expression);
break;
```
## GtkExpression in .ui files
`GtkBuilder` has support for creating expressions. The syntax here can be used where
a `GtkExpression` object is needed like in a `&lt;property&gt;` tag for an expression
property, or in a `&lt;binding name="property"&gt;` tag to bind a property to an expression.
To create an property expression, use the `&lt;lookup&gt;` element. It can have a `type`
attribute to specify the object type, and a `name` attribute to specify the property
to look up. The content of `&lt;lookup&gt;` can either be an element specfiying the expression
to use the object, or a string that specifies the name of the object to use.
Example:
```xml
&lt;lookup name='search'&gt;string_filter&lt;/lookup&gt;
```
To create a constant expression, use the `&lt;constant&gt;` element. If the type attribute
is specified, the element content is interpreted as a value of that type. Otherwise,
it is assumed to be an object. For instance:
```xml
&lt;constant&gt;string_filter&lt;/constant&gt;
&lt;constant type='gchararray'&gt;Hello, world&lt;/constant&gt;
```
To create a closure expression, use the `&lt;closure&gt;` element. The `type` and `function`
attributes specify what function to use for the closure, the content of the element
contains the expressions for the parameters. For instance:
```xml
&lt;closure type='gchararray' function='combine_args_somehow'&gt;
&lt;constant type='gchararray'&gt;File size:&lt;/constant&gt;
&lt;lookup type='GFile' name='size'&gt;myfile&lt;/lookup&gt;
&lt;/closure&gt;
```</doc>
<method name="bind" c:identifier="gtk_expression_bind">
<doc xml:space="preserve">Bind `target`'s property named `property` to `self`.
The value that `self` evaluates to is set via `g_object_set()` on
`target`. This is repeated whenever `self` changes to ensure that
the object's property stays synchronized with `self`.
If `self`'s evaluation fails, `target`'s `property` is not updated.
You can ensure that this doesn't happen by using a fallback
expression.
Note that this function takes ownership of `self`. If you want
to keep it around, you should [method@Gtk.Expression.ref] it beforehand.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpressionWatch`</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="full">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">the target object to bind to</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="property" transfer-ownership="none">
<doc xml:space="preserve">name of the property on `target` to bind to</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="this_" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the this argument for
the evaluation of `self`</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="evaluate" c:identifier="gtk_expression_evaluate">
<doc xml:space="preserve">Evaluates the given expression and on success stores the result
in @value.
The `GType` of `value` will be the type given by
[method@Gtk.Expression.get_value_type].
It is possible that expressions cannot be evaluated - for example
when the expression references objects that have been destroyed or
set to `NULL`. In that case `value` will remain empty and `FALSE`
will be returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the expression could be evaluated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
<parameter name="this_" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the this argument for the evaluation</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">an empty `GValue`</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="get_value_type" c:identifier="gtk_expression_get_value_type">
<doc xml:space="preserve">Gets the `GType` that this expression evaluates to.
This type is constant and will not change over the lifetime
of this expression.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The type returned from [method@Gtk.Expression.evaluate]</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_static" c:identifier="gtk_expression_is_static">
<doc xml:space="preserve">Checks if the expression is static.
A static expression will never change its result when
[method@Gtk.Expression.evaluate] is called on it with the same arguments.
That means a call to [method@Gtk.Expression.watch] is not necessary because
it will never trigger a notify.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the expression is static</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
<method name="ref" c:identifier="gtk_expression_ref">
<doc xml:space="preserve">Acquires a reference on the given `GtkExpression`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the `GtkExpression` with an additional reference</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
<method name="unref" c:identifier="gtk_expression_unref">
<doc xml:space="preserve">Releases a reference on the given `GtkExpression`.
If the reference was the last, the resources associated to the `self` are
freed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="full">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
<method name="watch" c:identifier="gtk_expression_watch">
<doc xml:space="preserve">Watch the given `expression` for changes.
The @notify function will be called whenever the evaluation of `self`
may have changed.
GTK cannot guarantee that the evaluation did indeed change when the @notify
gets invoked, but it guarantees the opposite: When it did in fact change,
the @notify will be invoked.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The newly installed watch. Note that the only
reference held to the watch will be released when the watch is unwatched
which can happen automatically, and not just via
[method@Gtk.ExpressionWatch.unwatch]. You should call [method@Gtk.ExpressionWatch.ref]
if you want to keep the watch around.</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</instance-parameter>
<parameter name="this_" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `this` argument to
watch</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">callback to invoke when the expression changes</doc>
<type name="ExpressionNotify" c:type="GtkExpressionNotify"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to the `notify` callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for `user_data`</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
</class>
<callback name="ExpressionNotify" c:type="GtkExpressionNotify">
<doc xml:space="preserve">Callback called by gtk_expression_watch() when the
expression value changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="0">
<doc xml:space="preserve">data passed to gtk_expression_watch()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="ExpressionWatch" c:type="GtkExpressionWatch" glib:type-name="GtkExpressionWatch" glib:get-type="gtk_expression_watch_get_type" c:symbol-prefix="expression_watch">
<doc xml:space="preserve">An opaque structure representing a watched `GtkExpression`.
The contents of `GtkExpressionWatch` should only be accessed through the
provided API.</doc>
<method name="evaluate" c:identifier="gtk_expression_watch_evaluate">
<doc xml:space="preserve">Evaluates the watched expression and on success stores the result
in `value`.
This is equivalent to calling [method@Gtk.Expression.evaluate] with the
expression and this pointer originally used to create `watch`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if the expression could be evaluated and `value` was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="watch" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpressionWatch`</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">an empty `GValue` to be set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="ref" c:identifier="gtk_expression_watch_ref">
<doc xml:space="preserve">Acquires a reference on the given `GtkExpressionWatch`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the `GtkExpressionWatch` with an additional reference</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</return-value>
<parameters>
<instance-parameter name="watch" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpressionWatch`</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</instance-parameter>
</parameters>
</method>
<method name="unref" c:identifier="gtk_expression_watch_unref">
<doc xml:space="preserve">Releases a reference on the given `GtkExpressionWatch`.
If the reference was the last, the resources associated to `self` are
freed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="watch" transfer-ownership="full">
<doc xml:space="preserve">a `GtkExpressionWatch`</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</instance-parameter>
</parameters>
</method>
<method name="unwatch" c:identifier="gtk_expression_watch_unwatch">
<doc xml:space="preserve">Stops watching an expression.
See [method@Gtk.Expression.watch] for how the watch
was established.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="watch" transfer-ownership="none">
<doc xml:space="preserve">watch to release</doc>
<type name="ExpressionWatch" c:type="GtkExpressionWatch*"/>
</instance-parameter>
</parameters>
</method>
</record>
<function-macro name="FILE_CHOOSER" c:identifier="GTK_FILE_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FILE_CHOOSER_DIALOG" c:identifier="GTK_FILE_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FILE_CHOOSER_WIDGET" c:identifier="GTK_FILE_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FILE_FILTER" c:identifier="GTK_FILE_FILTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FIXED" c:identifier="GTK_FIXED" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FIXED_CLASS" c:identifier="GTK_FIXED_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="FIXED_GET_CLASS" c:identifier="GTK_FIXED_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FLOW_BOX" c:identifier="GTK_FLOW_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FLOW_BOX_CHILD" c:identifier="GTK_FLOW_BOX_CHILD" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FLOW_BOX_CHILD_CLASS" c:identifier="GTK_FLOW_BOX_CHILD_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="FLOW_BOX_CHILD_GET_CLASS" c:identifier="GTK_FLOW_BOX_CHILD_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FONT_BUTTON" c:identifier="GTK_FONT_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FONT_CHOOSER" c:identifier="GTK_FONT_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FONT_CHOOSER_DIALOG" c:identifier="GTK_FONT_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FONT_CHOOSER_GET_IFACE" c:identifier="GTK_FONT_CHOOSER_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="FONT_CHOOSER_WIDGET" c:identifier="GTK_FONT_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FRAME" c:identifier="GTK_FRAME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="FRAME_CLASS" c:identifier="GTK_FRAME_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="FRAME_GET_CLASS" c:identifier="GTK_FRAME_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<interface name="FileChooser" c:symbol-prefix="file_chooser" c:type="GtkFileChooser" glib:type-name="GtkFileChooser" glib:get-type="gtk_file_chooser_get_type">
<doc xml:space="preserve">`GtkFileChooser` is an interface that can be implemented by file
selection widgets.
In GTK, the main objects that implement this interface are
[class@Gtk.FileChooserWidget] and [class@Gtk.FileChooserDialog].
You do not need to write an object that implements the `GtkFileChooser`
interface unless you are trying to adapt an existing file selector to
expose a standard programming interface.
`GtkFileChooser` allows for shortcuts to various places in the filesystem.
In the default implementation these are displayed in the left pane. It
may be a bit confusing at first that these shortcuts come from various
sources and in various flavours, so lets explain the terminology here:
- Bookmarks: are created by the user, by dragging folders from the
right pane to the left pane, or by using the &#x201C;Add&#x201D;. Bookmarks
can be renamed and deleted by the user.
- Shortcuts: can be provided by the application. For example, a Paint
program may want to add a shortcut for a Clipart folder. Shortcuts
cannot be modified by the user.
- Volumes: are provided by the underlying filesystem abstraction. They are
the &#x201C;roots&#x201D; of the filesystem.
# File Names and Encodings
When the user is finished selecting files in a `GtkFileChooser`, your
program can get the selected filenames as `GFile`s.
# Adding options
You can add extra widgets to a file chooser to provide options
that are not present in the default design, by using
[method@Gtk.FileChooser.add_choice]. Each choice has an identifier and
a user visible label; additionally, each choice can have multiple
options. If a choice has no option, it will be rendered as a
check button with the given label; if a choice has options, it will
be rendered as a combo box.</doc>
<method name="add_choice" c:identifier="gtk_file_chooser_add_choice">
<doc xml:space="preserve">Adds a 'choice' to the file chooser.
This is typically implemented as a combobox or, for boolean choices,
as a checkbutton. You can select a value using
[method@Gtk.FileChooser.set_choice] before the dialog is shown,
and you can obtain the user-selected value in the
[signal@Gtk.Dialog::response] signal handler using
[method@Gtk.FileChooser.get_choice].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">id for the added choice</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">user-visible label for the added choice</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="options" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">ids for the options of the choice, or %NULL for a boolean choice</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
<parameter name="option_labels" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user-visible labels for the options, must be the same length as @options</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="add_filter" c:identifier="gtk_file_chooser_add_filter">
<doc xml:space="preserve">Adds @filter to the list of filters that the user can select between.
When a filter is selected, only files that are passed by that
filter are displayed.
Note that the @chooser takes ownership of the filter if it is floating,
so you have to ref and sink it if you want to keep a reference.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</parameter>
</parameters>
</method>
<method name="add_shortcut_folder" c:identifier="gtk_file_chooser_add_shortcut_folder" throws="1">
<doc xml:space="preserve">Adds a folder to be displayed with the shortcut folders
in a file chooser.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the folder could be added successfully,
%FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="folder" transfer-ownership="none">
<doc xml:space="preserve">a `GFile` for the folder to add</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="get_action" c:identifier="gtk_file_chooser_get_action" glib:get-property="action">
<attribute name="org.gtk.Method.get_property" value="action"/>
<doc xml:space="preserve">Gets the type of operation that the file chooser is performing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the action that the file selector is performing</doc>
<type name="FileChooserAction" c:type="GtkFileChooserAction"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_choice" c:identifier="gtk_file_chooser_get_choice">
<doc xml:space="preserve">Gets the currently selected option in the 'choice' with the given ID.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the ID of the currently selected option</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the ID of the choice to get</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_create_folders" c:identifier="gtk_file_chooser_get_create_folders" glib:get-property="create-folders">
<attribute name="org.gtk.Method.get_property" value="create-folders"/>
<doc xml:space="preserve">Gets whether file chooser will offer to create new folders.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the Create Folder button should be displayed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_folder" c:identifier="gtk_file_chooser_get_current_folder">
<doc xml:space="preserve">Gets the current folder of @chooser as `GFile`.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the `GFile` for the current folder.</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_name" c:identifier="gtk_file_chooser_get_current_name">
<doc xml:space="preserve">Gets the current name in the file selector, as entered by the user.
This is meant to be used in save dialogs, to get the currently typed
filename when the file itself does not exist yet.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The raw text from the file chooser&#x2019;s &#x201C;Name&#x201D; entry. Free with
g_free(). Note that this string is not a full pathname or URI; it is
whatever the contents of the entry are. Note also that this string is
in UTF-8 encoding, which is not necessarily the system&#x2019;s encoding for
filenames.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_file_chooser_get_file">
<doc xml:space="preserve">Gets the `GFile` for the currently selected file in
the file selector.
If multiple files are selected, one of the files will be
returned at random.
If the file chooser is in folder mode, this function returns
the selected folder.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a selected `GFile`. You own the
returned file; use g_object_unref() to release it.</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_files" c:identifier="gtk_file_chooser_get_files">
<doc xml:space="preserve">Lists all the selected files and subfolders in the current folder
of @chooser as `GFile`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a list model containing a `GFile` for each
selected file and subfolder in the current folder. Free the returned
list with g_object_unref().</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_filter" c:identifier="gtk_file_chooser_get_filter" glib:get-property="filter">
<attribute name="org.gtk.Method.get_property" value="filter"/>
<doc xml:space="preserve">Gets the current filter.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current filter</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_filters" c:identifier="gtk_file_chooser_get_filters" glib:get-property="filters">
<attribute name="org.gtk.Method.get_property" value="filters"/>
<doc xml:space="preserve">Gets the current set of user-selectable filters, as a list model.
See [method@Gtk.FileChooser.add_filter] and
[method@Gtk.FileChooser.remove_filter] for changing individual filters.
You should not modify the returned list model. Future changes to
@chooser may or may not affect the returned model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GListModel` containing the current set
of user-selectable filters.</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_select_multiple" c:identifier="gtk_file_chooser_get_select_multiple" glib:get-property="select-multiple">
<attribute name="org.gtk.Method.get_property" value="select-multiple"/>
<doc xml:space="preserve">Gets whether multiple files can be selected in the file
chooser.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if multiple files can be selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_shortcut_folders" c:identifier="gtk_file_chooser_get_shortcut_folders" glib:get-property="shortcut-folders">
<attribute name="org.gtk.Method.get_property" value="shortcut-folders"/>
<doc xml:space="preserve">Queries the list of shortcut folders in the file chooser.
You should not modify the returned list model. Future changes to
@chooser may or may not affect the returned model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A list model of `GFile`s</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_choice" c:identifier="gtk_file_chooser_remove_choice">
<doc xml:space="preserve">Removes a 'choice' that has been added with gtk_file_chooser_add_choice().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the ID of the choice to remove</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove_filter" c:identifier="gtk_file_chooser_remove_filter">
<doc xml:space="preserve">Removes @filter from the list of filters that the user can select between.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</parameter>
</parameters>
</method>
<method name="remove_shortcut_folder" c:identifier="gtk_file_chooser_remove_shortcut_folder" throws="1">
<doc xml:space="preserve">Removes a folder from the shortcut folders in a file chooser.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the folder could be removed successfully,
%FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="folder" transfer-ownership="none">
<doc xml:space="preserve">a `GFile` for the folder to remove</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_action" c:identifier="gtk_file_chooser_set_action" glib:set-property="action">
<attribute name="org.gtk.Method.set_property" value="action"/>
<doc xml:space="preserve">Sets the type of operation that the chooser is performing.
The user interface is adapted to suit the selected action.
For example, an option to create a new folder might be shown
if the action is %GTK_FILE_CHOOSER_ACTION_SAVE but not if the
action is %GTK_FILE_CHOOSER_ACTION_OPEN.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="action" transfer-ownership="none">
<doc xml:space="preserve">the action that the file selector is performing</doc>
<type name="FileChooserAction" c:type="GtkFileChooserAction"/>
</parameter>
</parameters>
</method>
<method name="set_choice" c:identifier="gtk_file_chooser_set_choice">
<doc xml:space="preserve">Selects an option in a 'choice' that has been added with
gtk_file_chooser_add_choice().
For a boolean choice, the possible options are "true" and "false".</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the ID of the choice to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="option" transfer-ownership="none">
<doc xml:space="preserve">the ID of the option to select</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_create_folders" c:identifier="gtk_file_chooser_set_create_folders" glib:set-property="create-folders">
<attribute name="org.gtk.Method.set_property" value="create-folders"/>
<doc xml:space="preserve">Sets whether file chooser will offer to create new folders.
This is only relevant if the action is not set to be
%GTK_FILE_CHOOSER_ACTION_OPEN.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="create_folders" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the Create Folder button should be displayed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_current_folder" c:identifier="gtk_file_chooser_set_current_folder" throws="1">
<doc xml:space="preserve">Sets the current folder for @chooser from a `GFile`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the folder could be changed successfully, %FALSE
otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GFile` for the new folder</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_current_name" c:identifier="gtk_file_chooser_set_current_name">
<doc xml:space="preserve">Sets the current name in the file selector, as if entered
by the user.
Note that the name passed in here is a UTF-8 string rather
than a filename. This function is meant for such uses as a
suggested name in a &#x201C;Save As...&#x201D; dialog. You can pass
&#x201C;Untitled.doc&#x201D; or a similarly suitable suggestion for the @name.
If you want to preselect a particular existing file, you should
use [method@Gtk.FileChooser.set_file] instead.
Please see the documentation for those functions for an example
of using [method@Gtk.FileChooser.set_current_name] as well.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the filename to use, as a UTF-8 string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_file" c:identifier="gtk_file_chooser_set_file" throws="1">
<doc xml:space="preserve">Sets @file as the current filename for the file chooser.
This includes changing to the file&#x2019;s parent folder and actually selecting
the file in list. If the @chooser is in %GTK_FILE_CHOOSER_ACTION_SAVE mode,
the file&#x2019;s base name will also appear in the dialog&#x2019;s file name entry.
If the file name isn&#x2019;t in the current folder of @chooser, then the current
folder of @chooser will be changed to the folder containing @file.
Note that the file must exist, or nothing will be done except
for the directory change.
If you are implementing a save dialog, you should use this function if
you already have a file name to which the user may save; for example,
when the user opens an existing file and then does &#x201C;Save As&#x2026;&#x201D;. If you
don&#x2019;t have a file name already &#x2014; for example, if the user just created
a new file and is saving it for the first time, do not call this function.
Instead, use something similar to this:
```c
static void
prepare_file_chooser (GtkFileChooser *chooser,
GFile *existing_file)
{
gboolean document_is_new = (existing_file == NULL);
if (document_is_new)
{
GFile *default_file_for_saving = g_file_new_for_path ("./out.txt");
// the user just created a new document
gtk_file_chooser_set_current_folder (chooser, default_file_for_saving, NULL);
gtk_file_chooser_set_current_name (chooser, "Untitled document");
g_object_unref (default_file_for_saving);
}
else
{
// the user edited an existing document
gtk_file_chooser_set_file (chooser, existing_file, NULL);
}
}
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Not useful</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">the `GFile` to set as current</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_filter" c:identifier="gtk_file_chooser_set_filter" glib:set-property="filter">
<attribute name="org.gtk.Method.set_property" value="filter"/>
<doc xml:space="preserve">Sets the current filter.
Only the files that pass the filter will be displayed.
If the user-selectable list of filters is non-empty, then
the filter should be one of the filters in that list.
Setting the current filter when the list of filters is
empty is useful if you want to restrict the displayed
set of files without letting the user change it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</parameter>
</parameters>
</method>
<method name="set_select_multiple" c:identifier="gtk_file_chooser_set_select_multiple" glib:set-property="select-multiple">
<attribute name="org.gtk.Method.set_property" value="select-multiple"/>
<doc xml:space="preserve">Sets whether multiple files can be selected in the file chooser.
This is only relevant if the action is set to be
%GTK_FILE_CHOOSER_ACTION_OPEN or
%GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooser`</doc>
<type name="FileChooser" c:type="GtkFileChooser*"/>
</instance-parameter>
<parameter name="select_multiple" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if multiple files can be selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="action" writable="1" transfer-ownership="none" setter="set_action" getter="get_action">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_action"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_set_action"/>
<doc xml:space="preserve">The type of operation that the file chooser is performing.</doc>
<type name="FileChooserAction"/>
</property>
<property name="create-folders" writable="1" transfer-ownership="none" setter="set_create_folders" getter="get_create_folders">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_create_folders"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_set_create_folders"/>
<doc xml:space="preserve">Whether a file chooser not in %GTK_FILE_CHOOSER_ACTION_OPEN mode
will offer the user to create new folders.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="filter" writable="1" transfer-ownership="none" setter="set_filter" getter="get_filter">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_filter"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_set_filter"/>
<doc xml:space="preserve">The current filter for selecting files that are displayed.</doc>
<type name="FileFilter"/>
</property>
<property name="filters" transfer-ownership="none" getter="get_filters">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_filters"/>
<doc xml:space="preserve">A `GListModel` containing the filters that have been
added with gtk_file_chooser_add_filter().
The returned object should not be modified. It may
or may not be updated for later changes.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="select-multiple" writable="1" transfer-ownership="none" setter="set_select_multiple" getter="get_select_multiple">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_select_multiple"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_set_select_multiple"/>
<doc xml:space="preserve">Whether to allow multiple files to be selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="shortcut-folders" transfer-ownership="none" getter="get_shortcut_folders">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_get_shortcut_folders"/>
<doc xml:space="preserve">A `GListModel` containing the shortcut folders that have been
added with gtk_file_chooser_add_shortcut_folder().
The returned object should not be modified. It may
or may not be updated for later changes.</doc>
<type name="Gio.ListModel"/>
</property>
</interface>
<enumeration name="FileChooserAction" glib:type-name="GtkFileChooserAction" glib:get-type="gtk_file_chooser_action_get_type" c:type="GtkFileChooserAction">
<doc xml:space="preserve">Describes whether a `GtkFileChooser` is being used to open existing files
or to save to a possibly new file.</doc>
<member name="open" value="0" c:identifier="GTK_FILE_CHOOSER_ACTION_OPEN" glib:nick="open" glib:name="GTK_FILE_CHOOSER_ACTION_OPEN">
<doc xml:space="preserve">Indicates open mode. The file chooser
will only let the user pick an existing file.</doc>
</member>
<member name="save" value="1" c:identifier="GTK_FILE_CHOOSER_ACTION_SAVE" glib:nick="save" glib:name="GTK_FILE_CHOOSER_ACTION_SAVE">
<doc xml:space="preserve">Indicates save mode. The file chooser
will let the user pick an existing file, or type in a new
filename.</doc>
</member>
<member name="select_folder" value="2" c:identifier="GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER" glib:nick="select-folder" glib:name="GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER">
<doc xml:space="preserve">Indicates an Open mode for
selecting folders. The file chooser will let the user pick an
existing folder.</doc>
</member>
</enumeration>
<class name="FileChooserDialog" c:symbol-prefix="file_chooser_dialog" c:type="GtkFileChooserDialog" parent="Dialog" glib:type-name="GtkFileChooserDialog" glib:get-type="gtk_file_chooser_dialog_get_type">
<doc xml:space="preserve">`GtkFileChooserDialog` is a dialog suitable for use with
&#x201C;File Open&#x201D; or &#x201C;File Save&#x201D; commands.
![An example GtkFileChooserDialog](filechooser.png)
This widget works by putting a [class@Gtk.FileChooserWidget]
inside a [class@Gtk.Dialog]. It exposes the [iface@Gtk.FileChooser]
interface, so you can use all of the [iface@Gtk.FileChooser] functions
on the file chooser dialog as well as those for [class@Gtk.Dialog].
Note that `GtkFileChooserDialog` does not have any methods of its
own. Instead, you should use the functions that work on a
[iface@Gtk.FileChooser].
If you want to integrate well with the platform you should use the
[class@Gtk.FileChooserNative] API, which will use a platform-specific
dialog if available and fall back to `GtkFileChooserDialog`
otherwise.
## Typical usage
In the simplest of cases, you can the following code to use
`GtkFileChooserDialog` to select a file for opening:
```c
static void
on_open_response (GtkDialog *dialog,
int response)
{
if (response == GTK_RESPONSE_ACCEPT)
{
GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
g_autoptr(GFile) file = gtk_file_chooser_get_file (chooser);
open_file (file);
}
gtk_window_destroy (GTK_WINDOW (dialog));
}
// ...
GtkWidget *dialog;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
dialog = gtk_file_chooser_dialog_new ("Open File",
parent_window,
action,
_("_Cancel"),
GTK_RESPONSE_CANCEL,
_("_Open"),
GTK_RESPONSE_ACCEPT,
NULL);
gtk_widget_show (dialog);
g_signal_connect (dialog, "response",
G_CALLBACK (on_open_response),
NULL);
```
To use a dialog for saving, you can use this:
```c
static void
on_save_response (GtkDialog *dialog,
int response)
{
if (response == GTK_RESPONSE_ACCEPT)
{
GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog);
g_autoptr(GFile) file = gtk_file_chooser_get_file (chooser);
save_to_file (file);
}
gtk_window_destroy (GTK_WINDOW (dialog));
}
// ...
GtkWidget *dialog;
GtkFileChooser *chooser;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
dialog = gtk_file_chooser_dialog_new ("Save File",
parent_window,
action,
_("_Cancel"),
GTK_RESPONSE_CANCEL,
_("_Save"),
GTK_RESPONSE_ACCEPT,
NULL);
chooser = GTK_FILE_CHOOSER (dialog);
if (user_edited_a_new_document)
gtk_file_chooser_set_current_name (chooser, _("Untitled document"));
else
gtk_file_chooser_set_file (chooser, existing_filename);
gtk_widget_show (dialog);
g_signal_connect (dialog, "response",
G_CALLBACK (on_save_response),
NULL);
```
## Setting up a file chooser dialog
There are various cases in which you may need to use a `GtkFileChooserDialog`:
- To select a file for opening, use %GTK_FILE_CHOOSER_ACTION_OPEN.
- To save a file for the first time, use %GTK_FILE_CHOOSER_ACTION_SAVE,
and suggest a name such as &#x201C;Untitled&#x201D; with
[method@Gtk.FileChooser.set_current_name].
- To save a file under a different name, use %GTK_FILE_CHOOSER_ACTION_SAVE,
and set the existing file with [method@Gtk.FileChooser.set_file].
- To choose a folder instead of a filem use %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
In general, you should only cause the file chooser to show a specific
folder when it is appropriate to use [method@Gtk.FileChooser.set_file],
i.e. when you are doing a &#x201C;Save As&#x201D; command and you already have a file
saved somewhere.
## Response Codes
`GtkFileChooserDialog` inherits from [class@Gtk.Dialog], so buttons that
go in its action area have response codes such as %GTK_RESPONSE_ACCEPT and
%GTK_RESPONSE_CANCEL. For example, you could call
[ctor@Gtk.FileChooserDialog.new] as follows:
```c
GtkWidget *dialog;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
dialog = gtk_file_chooser_dialog_new ("Open File",
parent_window,
action,
_("_Cancel"),
GTK_RESPONSE_CANCEL,
_("_Open"),
GTK_RESPONSE_ACCEPT,
NULL);
```
This will create buttons for &#x201C;Cancel&#x201D; and &#x201C;Open&#x201D; that use predefined
response identifiers from [enum@Gtk.ResponseType]. For most dialog
boxes you can use your own custom response codes rather than the
ones in [enum@Gtk.ResponseType], but `GtkFileChooserDialog` assumes that
its &#x201C;accept&#x201D;-type action, e.g. an &#x201C;Open&#x201D; or &#x201C;Save&#x201D; button,
will have one of the following response codes:
- %GTK_RESPONSE_ACCEPT
- %GTK_RESPONSE_OK
- %GTK_RESPONSE_YES
- %GTK_RESPONSE_APPLY
This is because `GtkFileChooserDialog` must intercept responses and switch
to folders if appropriate, rather than letting the dialog terminate &#x2014; the
implementation uses these known response codes to know which responses can
be blocked if appropriate.
To summarize, make sure you use a predefined response code
when you use `GtkFileChooserDialog` to ensure proper operation.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="FileChooser"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_file_chooser_dialog_new" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkFileChooserDialog`.
This function is analogous to [ctor@Gtk.Dialog.new_with_buttons].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFileChooserDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="action" transfer-ownership="none">
<doc xml:space="preserve">Open or save mode for the dialog</doc>
<type name="FileChooserAction" c:type="GtkFileChooserAction"/>
</parameter>
<parameter name="first_button_text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">text to go in the first button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">response ID for the first button, then additional (button, id) pairs, ending with %NULL</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
</class>
<enumeration name="FileChooserError" glib:type-name="GtkFileChooserError" glib:get-type="gtk_file_chooser_error_get_type" c:type="GtkFileChooserError" glib:error-domain="gtk-file-chooser-error-quark">
<doc xml:space="preserve">These identify the various errors that can occur while calling
`GtkFileChooser` functions.</doc>
<member name="nonexistent" value="0" c:identifier="GTK_FILE_CHOOSER_ERROR_NONEXISTENT" glib:nick="nonexistent" glib:name="GTK_FILE_CHOOSER_ERROR_NONEXISTENT">
<doc xml:space="preserve">Indicates that a file does not exist.</doc>
</member>
<member name="bad_filename" value="1" c:identifier="GTK_FILE_CHOOSER_ERROR_BAD_FILENAME" glib:nick="bad-filename" glib:name="GTK_FILE_CHOOSER_ERROR_BAD_FILENAME">
<doc xml:space="preserve">Indicates a malformed filename.</doc>
</member>
<member name="already_exists" value="2" c:identifier="GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS" glib:nick="already-exists" glib:name="GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS">
<doc xml:space="preserve">Indicates a duplicate path (e.g. when
adding a bookmark).</doc>
</member>
<member name="incomplete_hostname" value="3" c:identifier="GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME" glib:nick="incomplete-hostname" glib:name="GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME">
<doc xml:space="preserve">Indicates an incomplete hostname
(e.g. "http://foo" without a slash after that).</doc>
</member>
<function name="quark" c:identifier="gtk_file_chooser_error_quark">
<doc xml:space="preserve">Registers an error quark for `GtkFileChooser` errors.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The error quark used for `GtkFileChooser` errors.</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<class name="FileChooserNative" c:symbol-prefix="file_chooser_native" c:type="GtkFileChooserNative" parent="NativeDialog" glib:type-name="GtkFileChooserNative" glib:get-type="gtk_file_chooser_native_get_type" glib:type-struct="FileChooserNativeClass">
<doc xml:space="preserve">`GtkFileChooserNative` is an abstraction of a dialog suitable
for use with &#x201C;File Open&#x201D; or &#x201C;File Save as&#x201D; commands.
By default, this just uses a `GtkFileChooserDialog` to implement
the actual dialog. However, on some platforms, such as Windows and
macOS, the native platform file chooser is used instead. When the
application is running in a sandboxed environment without direct
filesystem access (such as Flatpak), `GtkFileChooserNative` may call
the proper APIs (portals) to let the user choose a file and make it
available to the application.
While the API of `GtkFileChooserNative` closely mirrors `GtkFileChooserDialog`,
the main difference is that there is no access to any `GtkWindow` or `GtkWidget`
for the dialog. This is required, as there may not be one in the case of a
platform native dialog.
Showing, hiding and running the dialog is handled by the
[class@Gtk.NativeDialog] functions.
Note that unlike `GtkFileChooserDialog`, `GtkFileChooserNative` objects
are not toplevel widgets, and GTK does not keep them alive. It is your
responsibility to keep a reference until you are done with the
object.
## Typical usage
In the simplest of cases, you can the following code to use
`GtkFileChooserNative` to select a file for opening:
```c
static void
on_response (GtkNativeDialog *native,
int response)
{
if (response == GTK_RESPONSE_ACCEPT)
{
GtkFileChooser *chooser = GTK_FILE_CHOOSER (native);
GFile *file = gtk_file_chooser_get_file (chooser);
open_file (file);
g_object_unref (file);
}
g_object_unref (native);
}
// ...
GtkFileChooserNative *native;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN;
native = gtk_file_chooser_native_new ("Open File",
parent_window,
action,
"_Open",
"_Cancel");
g_signal_connect (native, "response", G_CALLBACK (on_response), NULL);
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
```
To use a `GtkFileChooserNative` for saving, you can use this:
```c
static void
on_response (GtkNativeDialog *native,
int response)
{
if (response == GTK_RESPONSE_ACCEPT)
{
GtkFileChooser *chooser = GTK_FILE_CHOOSER (native);
GFile *file = gtk_file_chooser_get_file (chooser);
save_to_file (file);
g_object_unref (file);
}
g_object_unref (native);
}
// ...
GtkFileChooserNative *native;
GtkFileChooser *chooser;
GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_SAVE;
native = gtk_file_chooser_native_new ("Save File",
parent_window,
action,
"_Save",
"_Cancel");
chooser = GTK_FILE_CHOOSER (native);
if (user_edited_a_new_document)
gtk_file_chooser_set_current_name (chooser, _("Untitled document"));
else
gtk_file_chooser_set_file (chooser, existing_file, NULL);
g_signal_connect (native, "response", G_CALLBACK (on_response), NULL);
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
```
For more information on how to best set up a file dialog,
see the [class@Gtk.FileChooserDialog] documentation.
## Response Codes
`GtkFileChooserNative` inherits from [class@Gtk.NativeDialog],
which means it will return %GTK_RESPONSE_ACCEPT if the user accepted,
and %GTK_RESPONSE_CANCEL if he pressed cancel. It can also return
%GTK_RESPONSE_DELETE_EVENT if the window was unexpectedly closed.
## Differences from `GtkFileChooserDialog`
There are a few things in the [iface@Gtk.FileChooser] interface that
are not possible to use with `GtkFileChooserNative`, as such use would
prohibit the use of a native dialog.
No operations that change the dialog work while the dialog is visible.
Set all the properties that are required before showing the dialog.
## Win32 details
On windows the `IFileDialog` implementation (added in Windows Vista) is
used. It supports many of the features that `GtkFileChooser` has, but
there are some things it does not handle:
* Any [class@Gtk.FileFilter] added using a mimetype
If any of these features are used the regular `GtkFileChooserDialog`
will be used in place of the native one.
## Portal details
When the `org.freedesktop.portal.FileChooser` portal is available on
the session bus, it is used to bring up an out-of-process file chooser.
Depending on the kind of session the application is running in, this may
or may not be a GTK file chooser.
## macOS details
On macOS the `NSSavePanel` and `NSOpenPanel` classes are used to provide
native file chooser dialogs. Some features provided by `GtkFileChooser`
are not supported:
* Shortcut folders.</doc>
<implements name="FileChooser"/>
<constructor name="new" c:identifier="gtk_file_chooser_native_new">
<doc xml:space="preserve">Creates a new `GtkFileChooserNative`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkFileChooserNative`</doc>
<type name="FileChooserNative" c:type="GtkFileChooserNative*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the native</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the native</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="action" transfer-ownership="none">
<doc xml:space="preserve">Open or save mode for the dialog</doc>
<type name="FileChooserAction" c:type="GtkFileChooserAction"/>
</parameter>
<parameter name="accept_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">text to go in the accept button, or %NULL for the default</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="cancel_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">text to go in the cancel button, or %NULL for the default</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_accept_label" c:identifier="gtk_file_chooser_native_get_accept_label" glib:get-property="accept-label">
<attribute name="org.gtk.Method.get_property" value="accept-label"/>
<doc xml:space="preserve">Retrieves the custom label text for the accept button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The custom label</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooserNative`</doc>
<type name="FileChooserNative" c:type="GtkFileChooserNative*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cancel_label" c:identifier="gtk_file_chooser_native_get_cancel_label" glib:get-property="cancel-label">
<attribute name="org.gtk.Method.get_property" value="cancel-label"/>
<doc xml:space="preserve">Retrieves the custom label text for the cancel button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The custom label</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooserNative`</doc>
<type name="FileChooserNative" c:type="GtkFileChooserNative*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_accept_label" c:identifier="gtk_file_chooser_native_set_accept_label" glib:set-property="accept-label">
<attribute name="org.gtk.Method.set_property" value="accept-label"/>
<doc xml:space="preserve">Sets the custom label text for the accept button.
If characters in @label are preceded by an underscore, they are
underlined. If you need a literal underscore character in a label,
use &#x201C;__&#x201D; (two underscores). The first underlined character represents
a keyboard accelerator called a mnemonic.
Pressing Alt and that key should activate the button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooserNative`</doc>
<type name="FileChooserNative" c:type="GtkFileChooserNative*"/>
</instance-parameter>
<parameter name="accept_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">custom label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_cancel_label" c:identifier="gtk_file_chooser_native_set_cancel_label" glib:set-property="cancel-label">
<attribute name="org.gtk.Method.set_property" value="cancel-label"/>
<doc xml:space="preserve">Sets the custom label text for the cancel button.
If characters in @label are preceded by an underscore, they are
underlined. If you need a literal underscore character in a label,
use &#x201C;__&#x201D; (two underscores). The first underlined character represents
a keyboard accelerator called a mnemonic.
Pressing Alt and that key should activate the button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileChooserNative`</doc>
<type name="FileChooserNative" c:type="GtkFileChooserNative*"/>
</instance-parameter>
<parameter name="cancel_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">custom label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="accept-label" writable="1" transfer-ownership="none" setter="set_accept_label" getter="get_accept_label">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_native_get_accept_label"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_native_set_accept_label"/>
<doc xml:space="preserve">The text used for the label on the accept button in the dialog, or
%NULL to use the default text.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="cancel-label" writable="1" transfer-ownership="none" setter="set_cancel_label" getter="get_cancel_label">
<attribute name="org.gtk.Property.get" value="gtk_file_chooser_native_get_cancel_label"/>
<attribute name="org.gtk.Property.set" value="gtk_file_chooser_native_set_cancel_label"/>
<doc xml:space="preserve">The text used for the label on the cancel button in the dialog, or
%NULL to use the default text.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="FileChooserNativeClass" c:type="GtkFileChooserNativeClass" glib:is-gtype-struct-for="FileChooserNative">
<field name="parent_class">
<type name="NativeDialogClass" c:type="GtkNativeDialogClass"/>
</field>
</record>
<class name="FileChooserWidget" c:symbol-prefix="file_chooser_widget" c:type="GtkFileChooserWidget" parent="Widget" glib:type-name="GtkFileChooserWidget" glib:get-type="gtk_file_chooser_widget_get_type">
<doc xml:space="preserve">`GtkFileChooserWidget` is a widget for choosing files.
It exposes the [iface@Gtk.FileChooser] interface, and you should
use the methods of this interface to interact with the
widget.
# CSS nodes
`GtkFileChooserWidget` has a single CSS node with name filechooser.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="FileChooser"/>
<constructor name="new" c:identifier="gtk_file_chooser_widget_new">
<doc xml:space="preserve">Creates a new `GtkFileChooserWidget`.
This is a file chooser widget that can be embedded in custom
windows, and it is the same widget that is used by
`GtkFileChooserDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFileChooserWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="action" transfer-ownership="none">
<doc xml:space="preserve">Open or save mode for the widget</doc>
<type name="FileChooserAction" c:type="GtkFileChooserAction"/>
</parameter>
</parameters>
</constructor>
<property name="search-mode" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="subtitle" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="desktop-folder" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show the user's Desktop
folder in the file list.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;D&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="down-folder" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser go to a child of the
current folder in the file hierarchy. The subfolder that will
be used is displayed in the path bar widget of the file chooser.
For example, if the path bar is showing "/foo/bar/baz", with bar
currently displayed, then this will cause the file chooser to
switch to the "baz" subfolder.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;Down&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="home-folder" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show the user's home
folder in the file list.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;Home&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="location-popup" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show a "Location" prompt which
the user can use to manually type the name of the file he wishes to select.
The default bindings for this signal are &lt;kbd&gt;Control&lt;/kbd&gt;-&lt;kbd&gt;L&lt;/kbd&gt;
with a @path string of "" (the empty string). It is also bound to
&lt;kbd&gt;/&lt;/kbd&gt; with a @path string of "`/`" (a slash): this lets you
type `/` and immediately type a path name. On Unix systems, this is
bound to &lt;kbd&gt;~&lt;/kbd&gt; (tilde) with a @path string of "~" itself for
access to home directories.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a string that gets put in the text entry for the file name</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="location-popup-on-paste" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show a "Location" prompt
when the user pastes into a `GtkFileChooserWidget`.
The default binding for this signal is &lt;kbd&gt;Control&lt;/kbd&gt;-&lt;kbd&gt;V&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="location-toggle-popup" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to toggle the visibility of a "Location" prompt
which the user can use to manually type the name of the file
he wishes to select.
The default binding for this signal is &lt;kbd&gt;Control&lt;/kbd&gt;-&lt;kbd&gt;L&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="places-shortcut" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to move the focus to the places sidebar.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;P&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="quick-bookmark" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser switch to the bookmark
specified in the @bookmark_index parameter. For example, if
you have three bookmarks, you can pass 0, 1, 2 to this signal
to switch to each of them, respectively.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;1&lt;/kbd&gt;,
&lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;2&lt;/kbd&gt;, etc. until &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;0&lt;/kbd&gt;.
Note that in the default binding, that &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;1&lt;/kbd&gt; is
actually defined to switch to the bookmark at index 0, and so on
successively.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="bookmark_index" transfer-ownership="none">
<doc xml:space="preserve">the number of the bookmark to switch to</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="recent-shortcut" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show the Recent location.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;R&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="search-shortcut" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser show the search entry.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;S&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="show-hidden" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser display hidden files.
The default binding for this signal is &lt;kbd&gt;Control&lt;/kbd&gt;-&lt;kbd&gt;H&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="up-folder" when="first" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
This is used to make the file chooser go to the parent
of the current folder in the file hierarchy.
The default binding for this signal is &lt;kbd&gt;Alt&lt;/kbd&gt;-&lt;kbd&gt;Up&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="FileFilter" c:symbol-prefix="file_filter" c:type="GtkFileFilter" parent="Filter" glib:type-name="GtkFileFilter" glib:get-type="gtk_file_filter_get_type">
<doc xml:space="preserve">`GtkFileFilter` filters files by name or mime type.
`GtkFileFilter` can be used to restrict the files being shown in a
`GtkFileChooser`. Files can be filtered based on their name (with
[method@Gtk.FileFilter.add_pattern] or [method@Gtk.FileFilter.add_suffix])
or on their mime type (with [method@Gtk.FileFilter.add_mime_type]).
Filtering by mime types handles aliasing and subclassing of mime
types; e.g. a filter for text/plain also matches a file with mime
type application/rtf, since application/rtf is a subclass of
text/plain. Note that `GtkFileFilter` allows wildcards for the
subtype of a mime type, so you can e.g. filter for image/\*.
Normally, file filters are used by adding them to a `GtkFileChooser`
(see [method@Gtk.FileChooser.add_filter]), but it is also possible to
manually use a file filter on any [class@Gtk.FilterListModel] containing
`GFileInfo` objects.
# GtkFileFilter as GtkBuildable
The `GtkFileFilter` implementation of the `GtkBuildable` interface
supports adding rules using the `&lt;mime-types&gt;` and `&lt;patterns&gt;` and
`&lt;suffixes&gt;` elements and listing the rules within. Specifying a
`&lt;mime-type&gt;` or `&lt;pattern&gt;` or `&lt;suffix&gt;` has the same effect as
as calling
[method@Gtk.FileFilter.add_mime_type] or
[method@Gtk.FileFilter.add_pattern] or
[method@Gtk.FileFilter.add_suffix].
An example of a UI definition fragment specifying `GtkFileFilter`
rules:
```xml
&lt;object class="GtkFileFilter"&gt;
&lt;property name="name" translatable="yes"&gt;Text and Images&lt;/property&gt;
&lt;mime-types&gt;
&lt;mime-type&gt;text/plain&lt;/mime-type&gt;
&lt;mime-type&gt;image/ *&lt;/mime-type&gt;
&lt;/mime-types&gt;
&lt;patterns&gt;
&lt;pattern&gt;*.txt&lt;/pattern&gt;
&lt;/patterns&gt;
&lt;suffixes&gt;
&lt;suffix&gt;png&lt;/suffix&gt;
&lt;/suffixes&gt;
&lt;/object&gt;
```</doc>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_file_filter_new">
<doc xml:space="preserve">Creates a new `GtkFileFilter` with no rules added to it.
Such a filter doesn&#x2019;t accept any files, so is not
particularly useful until you add rules with
[method@Gtk.FileFilter.add_mime_type],
[method@Gtk.FileFilter.add_pattern],
[method@Gtk.FileFilter.add_suffix] or
[method@Gtk.FileFilter.add_pixbuf_formats].
To create a filter that accepts any file, use:
```c
GtkFileFilter *filter = gtk_file_filter_new ();
gtk_file_filter_add_pattern (filter, "*");
```</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</return-value>
</constructor>
<constructor name="new_from_gvariant" c:identifier="gtk_file_filter_new_from_gvariant">
<doc xml:space="preserve">Deserialize a file filter from a `GVariant`.
The variant must be in the format produced by
[method@Gtk.FileFilter.to_gvariant].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkFileFilter` object</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</return-value>
<parameters>
<parameter name="variant" transfer-ownership="none">
<doc xml:space="preserve">an `a{sv}` `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</constructor>
<method name="add_mime_type" c:identifier="gtk_file_filter_add_mime_type">
<doc xml:space="preserve">Adds a rule allowing a given mime type to @filter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
<parameter name="mime_type" transfer-ownership="none">
<doc xml:space="preserve">name of a MIME type</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_pattern" c:identifier="gtk_file_filter_add_pattern">
<doc xml:space="preserve">Adds a rule allowing a shell style glob to a filter.
Note that it depends on the platform whether pattern
matching ignores case or not. On Windows, it does, on
other platforms, it doesn't.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
<parameter name="pattern" transfer-ownership="none">
<doc xml:space="preserve">a shell style glob</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_pixbuf_formats" c:identifier="gtk_file_filter_add_pixbuf_formats">
<doc xml:space="preserve">Adds a rule allowing image files in the formats supported
by GdkPixbuf.
This is equivalent to calling [method@Gtk.FileFilter.add_mime_type]
for all the supported mime types.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="add_suffix" c:identifier="gtk_file_filter_add_suffix" version="4.4">
<doc xml:space="preserve">Adds a suffix match rule to a filter.
This is similar to adding a match for the pattern
"*.@suffix".
In contrast to pattern matches, suffix matches
are *always* case-insensitive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
<parameter name="suffix" transfer-ownership="none">
<doc xml:space="preserve">filename suffix to match</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_attributes" c:identifier="gtk_file_filter_get_attributes">
<doc xml:space="preserve">Gets the attributes that need to be filled in for the `GFileInfo`
passed to this filter.
This function will not typically be used by applications;
it is intended principally for use in the implementation
of `GtkFileChooser`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the attributes</doc>
<array c:type="const char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_file_filter_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Gets the human-readable name for the filter.
See [method@Gtk.FileFilter.set_name].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The human-readable name of the filter</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_name" c:identifier="gtk_file_filter_set_name" glib:set-property="name">
<attribute name="org.gtk.Method.set_property" value="name"/>
<doc xml:space="preserve">Sets a human-readable name of the filter.
This is the string that will be displayed in the file chooser
if there is a selectable list of filters.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the human-readable-name for the filter, or %NULL
to remove any existing name.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="to_gvariant" c:identifier="gtk_file_filter_to_gvariant">
<doc xml:space="preserve">Serialize a file filter to an `a{sv}` variant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new, floating, `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFileFilter`</doc>
<type name="FileFilter" c:type="GtkFileFilter*"/>
</instance-parameter>
</parameters>
</method>
<property name="name" writable="1" transfer-ownership="none" setter="set_name" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_file_filter_get_name"/>
<attribute name="org.gtk.Property.set" value="gtk_file_filter_set_name"/>
<doc xml:space="preserve">The human-readable name of the filter.
This is the string that will be displayed in the file chooser
user interface if there is a selectable list of filters.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="Filter" c:symbol-prefix="filter" c:type="GtkFilter" parent="GObject.Object" glib:type-name="GtkFilter" glib:get-type="gtk_filter_get_type" glib:type-struct="FilterClass">
<doc xml:space="preserve">A `GtkFilter` object describes the filtering to be performed by a
`GtkFilterListModel`.
The model will use the filter to determine if it should include items
or not by calling [method@Gtk.Filter.match] for each item and only
keeping the ones that the function returns %TRUE for.
Filters may change what items they match through their lifetime. In that
case, they will emit the [signal@Gtk.Filter::changed] signal to notify
that previous filter results are no longer valid and that items should
be checked again via [method@Gtk.Filter.match].
GTK provides various pre-made filter implementations for common filtering
operations. These filters often include properties that can be linked to
various widgets to easily allow searches.
However, in particular for large lists or complex search methods, it is
also possible to subclass `GtkFilter` and provide one's own filter.</doc>
<virtual-method name="get_strictness" invoker="get_strictness">
<doc xml:space="preserve">Gets the known strictness of @filters.
If the strictness is not known, %GTK_FILTER_MATCH_SOME is returned.
This value may change after emission of the [signal@Gtk.Filter::changed]
signal.
This function is meant purely for optimization purposes, filters can
choose to omit implementing it, but `GtkFilterListModel` uses it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the strictness of @self</doc>
<type name="FilterMatch" c:type="GtkFilterMatch"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="match" invoker="match">
<doc xml:space="preserve">Checks if the given @item is matched by the filter or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the filter matches the item and a filter model should
keep it, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</instance-parameter>
<parameter name="item" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The item to check</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<method name="changed" c:identifier="gtk_filter_changed">
<doc xml:space="preserve">Notifies all users of the filter that it has changed.
This emits the [signal@Gtk.Filter::changed] signal. Users
of the filter should then check items again via
[method@Gtk.Filter.match].
Depending on the @change parameter, not all items need to
be changed, but only some. Refer to the [enum@Gtk.FilterChange]
documentation for details.
This function is intended for implementors of `GtkFilter`
subclasses and should not be called from other functions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</instance-parameter>
<parameter name="change" transfer-ownership="none">
<doc xml:space="preserve">How the filter changed</doc>
<type name="FilterChange" c:type="GtkFilterChange"/>
</parameter>
</parameters>
</method>
<method name="get_strictness" c:identifier="gtk_filter_get_strictness">
<doc xml:space="preserve">Gets the known strictness of @filters.
If the strictness is not known, %GTK_FILTER_MATCH_SOME is returned.
This value may change after emission of the [signal@Gtk.Filter::changed]
signal.
This function is meant purely for optimization purposes, filters can
choose to omit implementing it, but `GtkFilterListModel` uses it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the strictness of @self</doc>
<type name="FilterMatch" c:type="GtkFilterMatch"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="match" c:identifier="gtk_filter_match">
<doc xml:space="preserve">Checks if the given @item is matched by the filter or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the filter matches the item and a filter model should
keep it, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</instance-parameter>
<parameter name="item" transfer-ownership="none">
<doc xml:space="preserve">The item to check</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted whenever the filter changed.
Users of the filter should then check items again via
[method@Gtk.Filter.match].
`GtkFilterListModel` handles this signal automatically.
Depending on the @change parameter, not all items need
to be checked, but only some. Refer to the [enum@Gtk.FilterChange]
documentation for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="change" transfer-ownership="none">
<doc xml:space="preserve">how the filter changed</doc>
<type name="FilterChange"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="FilterChange" glib:type-name="GtkFilterChange" glib:get-type="gtk_filter_change_get_type" c:type="GtkFilterChange">
<doc xml:space="preserve">Describes changes in a filter in more detail and allows objects
using the filter to optimize refiltering items.
If you are writing an implementation and are not sure which
value to pass, %GTK_FILTER_CHANGE_DIFFERENT is always a correct
choice.</doc>
<member name="different" value="0" c:identifier="GTK_FILTER_CHANGE_DIFFERENT" glib:nick="different" glib:name="GTK_FILTER_CHANGE_DIFFERENT">
<doc xml:space="preserve">The filter change cannot be
described with any of the other enumeration values.</doc>
</member>
<member name="less_strict" value="1" c:identifier="GTK_FILTER_CHANGE_LESS_STRICT" glib:nick="less-strict" glib:name="GTK_FILTER_CHANGE_LESS_STRICT">
<doc xml:space="preserve">The filter is less strict than
it was before: All items that it used to return %TRUE for
still return %TRUE, others now may, too.</doc>
</member>
<member name="more_strict" value="2" c:identifier="GTK_FILTER_CHANGE_MORE_STRICT" glib:nick="more-strict" glib:name="GTK_FILTER_CHANGE_MORE_STRICT">
<doc xml:space="preserve">The filter is more strict than
it was before: All items that it used to return %FALSE for
still return %FALSE, others now may, too.</doc>
</member>
</enumeration>
<record name="FilterClass" c:type="GtkFilterClass" glib:is-gtype-struct-for="Filter">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="match">
<callback name="match">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the filter matches the item and a filter model should
keep it, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</parameter>
<parameter name="item" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The item to check</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_strictness">
<callback name="get_strictness">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the strictness of @self</doc>
<type name="FilterMatch" c:type="GtkFilterMatch"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilter`</doc>
<type name="Filter" c:type="GtkFilter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved6" introspectable="0">
<callback name="_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved7" introspectable="0">
<callback name="_gtk_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved8" introspectable="0">
<callback name="_gtk_reserved8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<class name="FilterListModel" c:symbol-prefix="filter_list_model" c:type="GtkFilterListModel" parent="GObject.Object" glib:type-name="GtkFilterListModel" glib:get-type="gtk_filter_list_model_get_type" glib:type-struct="FilterListModelClass">
<doc xml:space="preserve">`GtkFilterListModel` is a list model that filters the elements of
the underlying model according to a `GtkFilter`.
It hides some elements from the other model according to
criteria given by a `GtkFilter`.
The model can be set up to do incremental searching, so that
filtering long lists doesn't block the UI. See
[method@Gtk.FilterListModel.set_incremental] for details.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_filter_list_model_new">
<doc xml:space="preserve">Creates a new `GtkFilterListModel` that will filter @model using the given
@filter.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to sort</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="filter" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">filter</doc>
<type name="Filter" c:type="GtkFilter*"/>
</parameter>
</parameters>
</constructor>
<method name="get_filter" c:identifier="gtk_filter_list_model_get_filter" glib:get-property="filter">
<attribute name="org.gtk.Method.get_property" value="filter"/>
<doc xml:space="preserve">Gets the `GtkFilter` currently set on @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The filter currently in use</doc>
<type name="Filter" c:type="GtkFilter*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_incremental" c:identifier="gtk_filter_list_model_get_incremental" glib:get-property="incremental">
<attribute name="org.gtk.Method.get_property" value="incremental"/>
<doc xml:space="preserve">Returns whether incremental filtering is enabled.
See [method@Gtk.FilterListModel.set_incremental].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if incremental filtering is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_filter_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model currently filtered or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model that gets filtered</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pending" c:identifier="gtk_filter_list_model_get_pending" glib:get-property="pending">
<attribute name="org.gtk.Method.get_property" value="pending"/>
<doc xml:space="preserve">Returns the number of items that have not been filtered yet.
You can use this value to check if @self is busy filtering by
comparing the return value to 0 or you can compute the percentage
of the filter remaining by dividing the return value by the total
number of items in the underlying model:
```c
pending = gtk_filter_list_model_get_pending (self);
model = gtk_filter_list_model_get_model (self);
percentage = pending / (double) g_list_model_get_n_items (model);
```
If no filter operation is ongoing - in particular when
[property@Gtk.FilterListModel:incremental] is %FALSE - this
function returns 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of items not yet filtered</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_filter" c:identifier="gtk_filter_list_model_set_filter" glib:set-property="filter">
<attribute name="org.gtk.Method.set_property" value="filter"/>
<doc xml:space="preserve">Sets the filter used to filter items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">filter to use</doc>
<type name="Filter" c:type="GtkFilter*"/>
</parameter>
</parameters>
</method>
<method name="set_incremental" c:identifier="gtk_filter_list_model_set_incremental" glib:set-property="incremental">
<attribute name="org.gtk.Method.set_property" value="incremental"/>
<doc xml:space="preserve">Sets the filter model to do an incremental sort.
When incremental filtering is enabled, the `GtkFilterListModel` will not
run filters immediately, but will instead queue an idle handler that
incrementally filters the items and adds them to the list. This of course
means that items are not instantly added to the list, but only appear
incrementally.
When your filter blocks the UI while filtering, you might consider
turning this on. Depending on your model and filters, this may become
interesting around 10,000 to 100,000 items.
By default, incremental filtering is disabled.
See [method@Gtk.FilterListModel.get_pending] for progress information
about an ongoing incremental filtering operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
<parameter name="incremental" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable incremental filtering</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_filter_list_model_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to be filtered.
Note that GTK makes no effort to ensure that @model conforms to
the item type of @self. It assumes that the caller knows what they
are doing and have set up an appropriate filter to ensure that item
types match.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFilterListModel`</doc>
<type name="FilterListModel" c:type="GtkFilterListModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to be filtered</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<property name="filter" writable="1" transfer-ownership="none" setter="set_filter" getter="get_filter">
<attribute name="org.gtk.Property.get" value="gtk_filter_list_model_get_filter"/>
<attribute name="org.gtk.Property.set" value="gtk_filter_list_model_set_filter"/>
<doc xml:space="preserve">The filter for this model.</doc>
<type name="Filter"/>
</property>
<property name="incremental" writable="1" transfer-ownership="none" setter="set_incremental" getter="get_incremental">
<attribute name="org.gtk.Property.get" value="gtk_filter_list_model_get_incremental"/>
<attribute name="org.gtk.Property.set" value="gtk_filter_list_model_set_incremental"/>
<doc xml:space="preserve">If the model should filter items incrementally.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_filter_list_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_filter_list_model_set_model"/>
<doc xml:space="preserve">The model being filtered.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="pending" transfer-ownership="none" getter="get_pending">
<attribute name="org.gtk.Property.get" value="gtk_filter_list_model_get_pending"/>
<doc xml:space="preserve">Number of items not yet filtered.</doc>
<type name="guint" c:type="guint"/>
</property>
</class>
<record name="FilterListModelClass" c:type="GtkFilterListModelClass" glib:is-gtype-struct-for="FilterListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<enumeration name="FilterMatch" glib:type-name="GtkFilterMatch" glib:get-type="gtk_filter_match_get_type" c:type="GtkFilterMatch">
<doc xml:space="preserve">Describes the known strictness of a filter.
Note that for filters where the strictness is not known,
%GTK_FILTER_MATCH_SOME is always an acceptable value,
even if a filter does match all or no items.</doc>
<member name="some" value="0" c:identifier="GTK_FILTER_MATCH_SOME" glib:nick="some" glib:name="GTK_FILTER_MATCH_SOME">
<doc xml:space="preserve">The filter matches some items,
gtk_filter_match() may return %TRUE or %FALSE</doc>
</member>
<member name="none" value="1" c:identifier="GTK_FILTER_MATCH_NONE" glib:nick="none" glib:name="GTK_FILTER_MATCH_NONE">
<doc xml:space="preserve">The filter does not match any item,
gtk_filter_match() will always return %FALSE.</doc>
</member>
<member name="all" value="2" c:identifier="GTK_FILTER_MATCH_ALL" glib:nick="all" glib:name="GTK_FILTER_MATCH_ALL">
<doc xml:space="preserve">The filter matches all items,
gtk_filter_match() will alays return %TRUE.</doc>
</member>
</enumeration>
<class name="Fixed" c:symbol-prefix="fixed" c:type="GtkFixed" parent="Widget" glib:type-name="GtkFixed" glib:get-type="gtk_fixed_get_type" glib:type-struct="FixedClass">
<doc xml:space="preserve">`GtkFixed` places its child widgets at fixed positions and with fixed sizes.
`GtkFixed` performs no automatic layout management.
For most applications, you should not use this container! It keeps
you from having to learn about the other GTK containers, but it
results in broken applications. With `GtkFixed`, the following
things will result in truncated text, overlapping widgets, and
other display bugs:
- Themes, which may change widget sizes.
- Fonts other than the one you used to write the app will of course
change the size of widgets containing text; keep in mind that
users may use a larger font because of difficulty reading the
default, or they may be using a different OS that provides different fonts.
- Translation of text into other languages changes its size. Also,
display of non-English text will use a different font in many
cases.
In addition, `GtkFixed` does not pay attention to text direction and
thus may produce unwanted results if your app is run under right-to-left
languages such as Hebrew or Arabic. That is: normally GTK will order
containers appropriately for the text direction, e.g. to put labels to
the right of the thing they label when using an RTL language, but it can&#x2019;t
do that with `GtkFixed`. So if you need to reorder widgets depending on
the text direction, you would need to manually detect it and adjust child
positions accordingly.
Finally, fixed positioning makes it kind of annoying to add/remove
UI elements, since you have to reposition all the other elements. This
is a long-term maintenance problem for your application.
If you know none of these things are an issue for your application,
and prefer the simplicity of `GtkFixed`, by all means use the
widget. But you should be aware of the tradeoffs.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_fixed_new">
<doc xml:space="preserve">Creates a new `GtkFixed`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFixed`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_child_position" c:identifier="gtk_fixed_get_child_position">
<doc xml:space="preserve">Retrieves the translation transformation of the
given child `GtkWidget` in the `GtkFixed`.
See also: [method@Gtk.Fixed.get_child_transform].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a child of @fixed</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the horizontal position of the @widget</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">the vertical position of the @widget</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_child_transform" c:identifier="gtk_fixed_get_child_transform">
<doc xml:space="preserve">Retrieves the transformation for @widget set using
gtk_fixed_set_child_transform().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GskTransform`</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`, child of @fixed</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="move" c:identifier="gtk_fixed_move">
<doc xml:space="preserve">Sets a translation transformation to the given @x and @y
coordinates to the child @widget of the `GtkFixed`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the horizontal position to move the widget to</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the vertical position to move the widget to</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="put" c:identifier="gtk_fixed_put">
<doc xml:space="preserve">Adds a widget to a `GtkFixed` at the given position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the horizontal position to place the widget at</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the vertical position to place the widget at</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_fixed_remove">
<doc xml:space="preserve">Removes a child from @fixed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the child widget to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_child_transform" c:identifier="gtk_fixed_set_child_transform">
<doc xml:space="preserve">Sets the transformation for @widget.
This is a convenience function that retrieves the
[class@Gtk.FixedLayoutChild] instance associated to
@widget and calls [method@Gtk.FixedLayoutChild.set_transform].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fixed" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixed`</doc>
<type name="Fixed" c:type="GtkFixed*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`, child of @fixed</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="transform" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the transformation assigned to @widget
to reset @widget's transform</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
</class>
<record name="FixedClass" c:type="GtkFixedClass" glib:is-gtype-struct-for="Fixed">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="FixedLayout" c:symbol-prefix="fixed_layout" c:type="GtkFixedLayout" parent="LayoutManager" glib:type-name="GtkFixedLayout" glib:get-type="gtk_fixed_layout_get_type" glib:type-struct="FixedLayoutClass">
<doc xml:space="preserve">`GtkFixedLayout` is a layout manager which can place child widgets
at fixed positions.
Most applications should never use this layout manager; fixed positioning
and sizing requires constant recalculations on where children need to be
positioned and sized. Other layout managers perform this kind of work
internally so that application developers don't need to do it. Specifically,
widgets positioned in a fixed layout manager will need to take into account:
- Themes, which may change widget sizes.
- Fonts other than the one you used to write the app will of course
change the size of widgets containing text; keep in mind that
users may use a larger font because of difficulty reading the
default, or they may be using a different OS that provides different
fonts.
- Translation of text into other languages changes its size. Also,
display of non-English text will use a different font in many
cases.
In addition, `GtkFixedLayout` does not pay attention to text direction and
thus may produce unwanted results if your app is run under right-to-left
languages such as Hebrew or Arabic. That is: normally GTK will order
containers appropriately depending on the text direction, e.g. to put labels
to the right of the thing they label when using an RTL language;
`GtkFixedLayout` won't be able to do that for you.
Finally, fixed positioning makes it kind of annoying to add/remove UI
elements, since you have to reposition all the other elements. This is a
long-term maintenance problem for your application.</doc>
<constructor name="new" c:identifier="gtk_fixed_layout_new">
<doc xml:space="preserve">Creates a new `GtkFixedLayout`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkFixedLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
</class>
<class name="FixedLayoutChild" c:symbol-prefix="fixed_layout_child" c:type="GtkFixedLayoutChild" parent="LayoutChild" glib:type-name="GtkFixedLayoutChild" glib:get-type="gtk_fixed_layout_child_get_type" glib:type-struct="FixedLayoutChildClass">
<doc xml:space="preserve">`GtkLayoutChild` subclass for children in a `GtkFixedLayout`.</doc>
<method name="get_transform" c:identifier="gtk_fixed_layout_child_get_transform" glib:get-property="transform">
<doc xml:space="preserve">Retrieves the transformation of the child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GskTransform`</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixedLayoutChild`</doc>
<type name="FixedLayoutChild" c:type="GtkFixedLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_transform" c:identifier="gtk_fixed_layout_child_set_transform" glib:set-property="transform">
<attribute name="org.gtk.Method.set_property" value="transform"/>
<doc xml:space="preserve">Sets the transformation of the child of a `GtkFixedLayout`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFixedLayoutChild`</doc>
<type name="FixedLayoutChild" c:type="GtkFixedLayoutChild*"/>
</instance-parameter>
<parameter name="transform" transfer-ownership="none">
<doc xml:space="preserve">a `GskTransform`</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</parameter>
</parameters>
</method>
<property name="transform" writable="1" transfer-ownership="none" setter="set_transform" getter="get_transform">
<attribute name="org.gtk.Property.get" value="gtk_fixed_layout_child_get_transform"/>
<attribute name="org.gtk.Property.set" value="gtk_fixed_layout_child_set_transform"/>
<doc xml:space="preserve">The transform of the child.</doc>
<type name="Gsk.Transform"/>
</property>
</class>
<record name="FixedLayoutChildClass" c:type="GtkFixedLayoutChildClass" glib:is-gtype-struct-for="FixedLayoutChild">
<field name="parent_class">
<type name="LayoutChildClass" c:type="GtkLayoutChildClass"/>
</field>
</record>
<record name="FixedLayoutClass" c:type="GtkFixedLayoutClass" glib:is-gtype-struct-for="FixedLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<class name="FlattenListModel" c:symbol-prefix="flatten_list_model" c:type="GtkFlattenListModel" parent="GObject.Object" glib:type-name="GtkFlattenListModel" glib:get-type="gtk_flatten_list_model_get_type" glib:type-struct="FlattenListModelClass">
<doc xml:space="preserve">`GtkFlattenListModel` is a list model that concatenates other list models.
`GtkFlattenListModel` takes a list model containing list models,
and flattens it into a single model.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_flatten_list_model_new">
<doc xml:space="preserve">Creates a new `GtkFlattenListModel` that flattens @list.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkFlattenListModel`</doc>
<type name="FlattenListModel" c:type="GtkFlattenListModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to be flattened</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_flatten_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model set via gtk_flatten_list_model_set_model().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model flattened by @self</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlattenListModel`</doc>
<type name="FlattenListModel" c:type="GtkFlattenListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model_for_item" c:identifier="gtk_flatten_list_model_get_model_for_item">
<doc xml:space="preserve">Returns the model containing the item at the given position.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the model containing the item at @position</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlattenListModel`</doc>
<type name="FlattenListModel" c:type="GtkFlattenListModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">a position</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_flatten_list_model_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets a new model to be flattened.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlattenListModel`</doc>
<type name="FlattenListModel" c:type="GtkFlattenListModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new model</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_flatten_list_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_flatten_list_model_set_model"/>
<doc xml:space="preserve">The model being flattened.</doc>
<type name="Gio.ListModel"/>
</property>
</class>
<record name="FlattenListModelClass" c:type="GtkFlattenListModelClass" glib:is-gtype-struct-for="FlattenListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="FlowBox" c:symbol-prefix="flow_box" c:type="GtkFlowBox" parent="Widget" glib:type-name="GtkFlowBox" glib:get-type="gtk_flow_box_get_type">
<doc xml:space="preserve">A `GtkFlowBox` puts child widgets in reflowing grid.
For instance, with the horizontal orientation, the widgets will be
arranged from left to right, starting a new row under the previous
row when necessary. Reducing the width in this case will require more
rows, so a larger height will be requested.
Likewise, with the vertical orientation, the widgets will be arranged
from top to bottom, starting a new column to the right when necessary.
Reducing the height will require more columns, so a larger width will
be requested.
The size request of a `GtkFlowBox` alone may not be what you expect;
if you need to be able to shrink it along both axes and dynamically
reflow its children, you may have to wrap it in a `GtkScrolledWindow`
to enable that.
The children of a `GtkFlowBox` can be dynamically sorted and filtered.
Although a `GtkFlowBox` must have only `GtkFlowBoxChild` children, you
can add any kind of widget to it via [method@Gtk.FlowBox.insert], and a
`GtkFlowBoxChild` widget will automatically be inserted between the box
and the widget.
Also see [class@Gtk.ListBox].
# CSS nodes
```
flowbox
&#x251C;&#x2500;&#x2500; flowboxchild
&#x2502; &#x2570;&#x2500;&#x2500; &lt;child&gt;
&#x251C;&#x2500;&#x2500; flowboxchild
&#x2502; &#x2570;&#x2500;&#x2500; &lt;child&gt;
&#x250A;
&#x2570;&#x2500;&#x2500; [rubberband]
```
`GtkFlowBox` uses a single CSS node with name flowbox. `GtkFlowBoxChild`
uses a single CSS node with name flowboxchild. For rubberband selection,
a subnode with name rubberband is used.
# Accessibility
`GtkFlowBox` uses the %GTK_ACCESSIBLE_ROLE_GRID role, and `GtkFlowBoxChild`
uses the %GTK_ACCESSIBLE_ROLE_GRID_CELL role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_flow_box_new">
<doc xml:space="preserve">Creates a `GtkFlowBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFlowBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="append" c:identifier="gtk_flow_box_append" version="4.6">
<doc xml:space="preserve">Adds @child to the end of @self.
If a sort function is set, the widget will
actually be inserted at the calculated position.
See also: [method@Gtk.FlowBox.insert].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="bind_model" c:identifier="gtk_flow_box_bind_model">
<doc xml:space="preserve">Binds @model to @box.
If @box was already bound to a model, that previous binding is
destroyed.
The contents of @box are cleared and then filled with widgets that
represent items from @model. @box is updated whenever @model changes.
If @model is %NULL, @box is left empty.
It is undefined to add or remove widgets directly (for example, with
[method@Gtk.FlowBox.insert]) while @box is bound to a model.
Note that using a model is incompatible with the filtering and sorting
functionality in `GtkFlowBox`. When using a model, filtering and sorting
should be implemented by the model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GListModel` to be bound to @box</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="create_widget_func" transfer-ownership="none" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">a function that creates widgets for items</doc>
<type name="FlowBoxCreateWidgetFunc" c:type="GtkFlowBoxCreateWidgetFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @create_widget_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_data_free_func" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function for freeing @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="get_activate_on_single_click" c:identifier="gtk_flow_box_get_activate_on_single_click" glib:get-property="activate-on-single-click">
<attribute name="org.gtk.Method.get_property" value="activate-on-single-click"/>
<doc xml:space="preserve">Returns whether children activate on single clicks.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if children are activated on single click,
%FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_at_index" c:identifier="gtk_flow_box_get_child_at_index">
<doc xml:space="preserve">Gets the nth child in the @box.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget, which will
always be a `GtkFlowBoxChild` or %NULL in case no child widget
with the given index exists.</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="idx" transfer-ownership="none">
<doc xml:space="preserve">the position of the child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_child_at_pos" c:identifier="gtk_flow_box_get_child_at_pos">
<doc xml:space="preserve">Gets the child in the (@x, @y) position.
Both @x and @y are assumed to be relative to the origin of @box.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget, which will
always be a `GtkFlowBoxChild` or %NULL in case no child widget
exists for the given x and y coordinates.</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the child</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_column_spacing" c:identifier="gtk_flow_box_get_column_spacing" glib:get-property="column-spacing">
<attribute name="org.gtk.Method.get_property" value="column-spacing"/>
<doc xml:space="preserve">Gets the horizontal spacing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal spacing</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_homogeneous" c:identifier="gtk_flow_box_get_homogeneous" glib:get-property="homogeneous">
<attribute name="org.gtk.Method.get_property" value="homogeneous"/>
<doc xml:space="preserve">Returns whether the box is homogeneous.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the box is homogeneous.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_children_per_line" c:identifier="gtk_flow_box_get_max_children_per_line" glib:get-property="max-children-per-line">
<attribute name="org.gtk.Method.get_property" value="max-children-per-line"/>
<doc xml:space="preserve">Gets the maximum number of children per line.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum number of children per line</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_children_per_line" c:identifier="gtk_flow_box_get_min_children_per_line" glib:get-property="min-children-per-line">
<attribute name="org.gtk.Method.get_property" value="min-children-per-line"/>
<doc xml:space="preserve">Gets the minimum number of children per line.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minimum number of children per line</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_spacing" c:identifier="gtk_flow_box_get_row_spacing" glib:get-property="row-spacing">
<attribute name="org.gtk.Method.get_property" value="row-spacing"/>
<doc xml:space="preserve">Gets the vertical spacing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical spacing</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_children" c:identifier="gtk_flow_box_get_selected_children">
<doc xml:space="preserve">Creates a list of all selected children.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">
A `GList` containing the `GtkWidget` for each selected child.
Free with g_list_free() when done.</doc>
<type name="GLib.List" c:type="GList*">
<type name="FlowBoxChild"/>
</type>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_mode" c:identifier="gtk_flow_box_get_selection_mode" glib:get-property="selection-mode">
<attribute name="org.gtk.Method.get_property" value="selection-mode"/>
<doc xml:space="preserve">Gets the selection mode of @box.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkSelectionMode`</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_flow_box_insert">
<doc xml:space="preserve">Inserts the @widget into @box at @position.
If a sort function is set, the widget will actually be inserted
at the calculated position.
If @position is -1, or larger than the total number of children
in the @box, then the @widget will be appended to the end.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to insert @child in</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="invalidate_filter" c:identifier="gtk_flow_box_invalidate_filter">
<doc xml:space="preserve">Updates the filtering for all children.
Call this function when the result of the filter
function on the @box is changed due ot an external
factor. For instance, this would be used if the
filter function just looked for a specific search
term, and the entry with the string has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="invalidate_sort" c:identifier="gtk_flow_box_invalidate_sort">
<doc xml:space="preserve">Updates the sorting for all children.
Call this when the result of the sort function on
@box is changed due to an external factor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_flow_box_prepend" version="4.6">
<doc xml:space="preserve">Adds @child to the start of @self.
If a sort function is set, the widget will
actually be inserted at the calculated position.
See also: [method@Gtk.FlowBox.insert].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_flow_box_remove">
<doc xml:space="preserve">Removes a child from @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the child widget to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="select_all" c:identifier="gtk_flow_box_select_all">
<doc xml:space="preserve">Select all children of @box, if the selection
mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_child" c:identifier="gtk_flow_box_select_child">
<doc xml:space="preserve">Selects a single child of @box, if the selection
mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @box</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
</parameters>
</method>
<method name="selected_foreach" c:identifier="gtk_flow_box_selected_foreach">
<doc xml:space="preserve">Calls a function for each selected child.
Note that the selection cannot be modified from within
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">the function to call for each selected child</doc>
<type name="FlowBoxForeachFunc" c:type="GtkFlowBoxForeachFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to the function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="set_activate_on_single_click" c:identifier="gtk_flow_box_set_activate_on_single_click" glib:set-property="activate-on-single-click">
<attribute name="org.gtk.Method.set_property" value="activate-on-single-click"/>
<doc xml:space="preserve">If @single is %TRUE, children will be activated when you click
on them, otherwise you need to double-click.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="single" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to emit child-activated on a single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_column_spacing" c:identifier="gtk_flow_box_set_column_spacing" glib:set-property="column-spacing">
<attribute name="org.gtk.Method.set_property" value="column-spacing"/>
<doc xml:space="preserve">Sets the horizontal space to add between children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the spacing to use</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_filter_func" c:identifier="gtk_flow_box_set_filter_func">
<doc xml:space="preserve">By setting a filter function on the @box one can decide dynamically
which of the children to show.
For instance, to implement a search function that only shows the
children matching the search terms.
The @filter_func will be called for each child after the call, and
it will continue to be called each time a child changes (via
[method@Gtk.FlowBoxChild.changed]) or when
[method@Gtk.FlowBox.invalidate_filter] is called.
Note that using a filter function is incompatible with using a model
(see [method@Gtk.FlowBox.bind_model]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="filter_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">callback that
lets you filter which children to show</doc>
<type name="FlowBoxFilterFunc" c:type="GtkFlowBoxFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @filter_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_hadjustment" c:identifier="gtk_flow_box_set_hadjustment">
<doc xml:space="preserve">Hooks up an adjustment to focus handling in @box.
The adjustment is also used for autoscrolling during
rubberband selection. See [method@Gtk.ScrolledWindow.get_hadjustment]
for a typical way of obtaining the adjustment, and
[method@Gtk.FlowBox.set_vadjustment] for setting the vertical
adjustment.
The adjustments have to be in pixel units and in the same
coordinate system as the allocation for immediate children
of the box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">an adjustment which should be adjusted
when the focus is moved among the descendents of @container</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_homogeneous" c:identifier="gtk_flow_box_set_homogeneous" glib:set-property="homogeneous">
<attribute name="org.gtk.Method.set_property" value="homogeneous"/>
<doc xml:space="preserve">Sets whether or not all children of @box are given
equal space in the box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to create equal allotments,
%FALSE for variable allotments</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_max_children_per_line" c:identifier="gtk_flow_box_set_max_children_per_line" glib:set-property="max-children-per-line">
<attribute name="org.gtk.Method.set_property" value="max-children-per-line"/>
<doc xml:space="preserve">Sets the maximum number of children to request and
allocate space for in @box&#x2019;s orientation.
Setting the maximum number of children per line
limits the overall natural size request to be no more
than @n_children children long in the given orientation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="n_children" transfer-ownership="none">
<doc xml:space="preserve">the maximum number of children per line</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_min_children_per_line" c:identifier="gtk_flow_box_set_min_children_per_line" glib:set-property="min-children-per-line">
<attribute name="org.gtk.Method.set_property" value="min-children-per-line"/>
<doc xml:space="preserve">Sets the minimum number of children to line up
in @box&#x2019;s orientation before flowing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="n_children" transfer-ownership="none">
<doc xml:space="preserve">the minimum number of children per line</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_row_spacing" c:identifier="gtk_flow_box_set_row_spacing" glib:set-property="row-spacing">
<attribute name="org.gtk.Method.set_property" value="row-spacing"/>
<doc xml:space="preserve">Sets the vertical space to add between children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the spacing to use</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_selection_mode" c:identifier="gtk_flow_box_set_selection_mode" glib:set-property="selection-mode">
<attribute name="org.gtk.Method.set_property" value="selection-mode"/>
<doc xml:space="preserve">Sets how selection works in @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">the new selection mode</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</parameter>
</parameters>
</method>
<method name="set_sort_func" c:identifier="gtk_flow_box_set_sort_func">
<doc xml:space="preserve">By setting a sort function on the @box, one can dynamically
reorder the children of the box, based on the contents of
the children.
The @sort_func will be called for each child after the call,
and will continue to be called each time a child changes (via
[method@Gtk.FlowBoxChild.changed]) and when
[method@Gtk.FlowBox.invalidate_sort] is called.
Note that using a sort function is incompatible with using a model
(see [method@Gtk.FlowBox.bind_model]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="sort_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the sort function</doc>
<type name="FlowBoxSortFunc" c:type="GtkFlowBoxSortFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_vadjustment" c:identifier="gtk_flow_box_set_vadjustment">
<doc xml:space="preserve">Hooks up an adjustment to focus handling in @box.
The adjustment is also used for autoscrolling during
rubberband selection. See [method@Gtk.ScrolledWindow.get_vadjustment]
for a typical way of obtaining the adjustment, and
[method@Gtk.FlowBox.set_hadjustment] for setting the horizontal
adjustment.
The adjustments have to be in pixel units and in the same
coordinate system as the allocation for immediate children
of the box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">an adjustment which should be adjusted
when the focus is moved among the descendents of @container</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="unselect_all" c:identifier="gtk_flow_box_unselect_all">
<doc xml:space="preserve">Unselect all children of @box, if the selection
mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="unselect_child" c:identifier="gtk_flow_box_unselect_child">
<doc xml:space="preserve">Unselects a single child of @box, if the selection
mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @box</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
</parameters>
</method>
<property name="accept-unpaired-release" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="activate-on-single-click" writable="1" transfer-ownership="none" setter="set_activate_on_single_click" getter="get_activate_on_single_click">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_activate_on_single_click"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_activate_on_single_click"/>
<doc xml:space="preserve">Determines whether children can be activated with a single
click, or require a double-click.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="column-spacing" writable="1" transfer-ownership="none" setter="set_column_spacing" getter="get_column_spacing">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_column_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_column_spacing"/>
<doc xml:space="preserve">The amount of horizontal space between two children.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="homogeneous" writable="1" transfer-ownership="none" setter="set_homogeneous" getter="get_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_homogeneous"/>
<doc xml:space="preserve">Determines whether all children should be allocated the
same size.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-children-per-line" writable="1" transfer-ownership="none" setter="set_max_children_per_line" getter="get_max_children_per_line">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_max_children_per_line"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_max_children_per_line"/>
<doc xml:space="preserve">The maximum amount of children to request space for consecutively
in the given orientation.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="min-children-per-line" writable="1" transfer-ownership="none" setter="set_min_children_per_line" getter="get_min_children_per_line">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_min_children_per_line"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_min_children_per_line"/>
<doc xml:space="preserve">The minimum number of children to allocate consecutively
in the given orientation.
Setting the minimum children per line ensures
that a reasonably small height will be requested
for the overall minimum width of the box.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="row-spacing" writable="1" transfer-ownership="none" setter="set_row_spacing" getter="get_row_spacing">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_row_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_row_spacing"/>
<doc xml:space="preserve">The amount of vertical space between two children.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="selection-mode" writable="1" transfer-ownership="none" setter="set_selection_mode" getter="get_selection_mode">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_get_selection_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_set_selection_mode"/>
<doc xml:space="preserve">The selection mode used by the flow box.</doc>
<type name="SelectionMode"/>
</property>
<glib:signal name="activate-cursor-child" when="last" action="1">
<doc xml:space="preserve">Emitted when the user activates the @box.
This is a [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="child-activated" when="last">
<doc xml:space="preserve">Emitted when a child has been activated by the user.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child that is activated</doc>
<type name="FlowBoxChild"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a cursor movement.
This is a [keybinding signal](class.SignalAction.html).
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants,
the variant with the Shift modifier extends the selection,
the variant without the Shift modifier does not.
There are too many key combinations to list them all here.
- &lt;kbd&gt;&#x2190;&lt;/kbd&gt;, &lt;kbd&gt;&#x2192;&lt;/kbd&gt;, &lt;kbd&gt;&#x2191;&lt;/kbd&gt;, &lt;kbd&gt;&#x2193;&lt;/kbd&gt;
move by individual children
- &lt;kbd&gt;Home&lt;/kbd&gt;, &lt;kbd&gt;End&lt;/kbd&gt; move to the ends of the box
- &lt;kbd&gt;PgUp&lt;/kbd&gt;, &lt;kbd&gt;PgDn&lt;/kbd&gt; move vertically by pages</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the event.
%FALSE to propagate the event further.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity fo the move, as a `GtkMovementStep`</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<doc xml:space="preserve">whether to extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="modify" transfer-ownership="none">
<doc xml:space="preserve">whether to modify the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-all" when="last" action="1">
<doc xml:space="preserve">Emitted to select all children of the box,
if the selection mode permits it.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal is &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="selected-children-changed" when="first">
<doc xml:space="preserve">Emitted when the set of selected children changes.
Use [method@Gtk.FlowBox.selected_foreach] or
[method@Gtk.FlowBox.get_selected_children] to obtain the
selected children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggle-cursor-child" when="last" action="1">
<doc xml:space="preserve">Emitted to toggle the selection of the child that has the focus.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Space&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="unselect-all" when="last" action="1">
<doc xml:space="preserve">Emitted to unselect all children of the box,
if the selection mode permits it.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal is &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="FlowBoxChild" c:symbol-prefix="flow_box_child" c:type="GtkFlowBoxChild" parent="Widget" glib:type-name="GtkFlowBoxChild" glib:get-type="gtk_flow_box_child_get_type" glib:type-struct="FlowBoxChildClass">
<doc xml:space="preserve">`GtkFlowBoxChild` is the kind of widget that can be added to a `GtkFlowBox`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_flow_box_child_new">
<doc xml:space="preserve">Creates a new `GtkFlowBoxChild`.
This should only be used as a child of a `GtkFlowBox`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFlowBoxChild`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="changed" c:identifier="gtk_flow_box_child_changed">
<doc xml:space="preserve">Marks @child as changed, causing any state that depends on this
to be updated.
This affects sorting and filtering.
Note that calls to this method must be in sync with the data
used for the sorting and filtering functions. For instance, if
the list is mirroring some external data set, and *two* children
changed in the external data set when you call
gtk_flow_box_child_changed() on the first child, the sort function
must only read the new data for the first of the two changed
children, otherwise the resorting of the children will be wrong.
This generally means that if you don&#x2019;t fully control the data
model, you have to duplicate the data that affects the sorting
and filtering functions into the widgets themselves.
Another alternative is to call [method@Gtk.FlowBox.invalidate_sort]
on any model change, but that is more expensive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_flow_box_child_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_index" c:identifier="gtk_flow_box_child_get_index">
<doc xml:space="preserve">Gets the current index of the @child in its `GtkFlowBox` container.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the @child, or -1 if the @child is not
in a flow box</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_selected" c:identifier="gtk_flow_box_child_is_selected">
<doc xml:space="preserve">Returns whether the @child is currently selected in its
`GtkFlowBox` container.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @child is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_flow_box_child_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_flow_box_child_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_flow_box_child_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="first" action="1">
<doc xml:space="preserve">Emitted when the user activates a child widget in a `GtkFlowBox`.
This can be happen either by clicking or double-clicking,
or via a keybinding.
This is a [keybinding signal](class.SignalAction.html),
but it can be used by applications for their own purposes.
The default bindings are &lt;kbd&gt;Space&lt;/kbd&gt; and &lt;kbd&gt;Enter&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="FlowBoxChildClass" c:type="GtkFlowBoxChildClass" glib:is-gtype-struct-for="FlowBoxChild">
<field name="parent_class" readable="0" private="1">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<callback name="FlowBoxCreateWidgetFunc" c:type="GtkFlowBoxCreateWidgetFunc">
<doc xml:space="preserve">Called for flow boxes that are bound to a `GListModel`.
This function is called for each item that gets added to the model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkWidget` that represents @item</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="item" transfer-ownership="none">
<doc xml:space="preserve">the item from the model for which to create a widget for</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data from gtk_flow_box_bind_model()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="FlowBoxFilterFunc" c:type="GtkFlowBoxFilterFunc">
<doc xml:space="preserve">A function that will be called whenever a child changes
or is added.
It lets you control if the child should be visible or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row should be visible, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild` that may be filtered</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="FlowBoxForeachFunc" c:type="GtkFlowBoxForeachFunc">
<doc xml:space="preserve">A function used by gtk_flow_box_selected_foreach().
It will be called on every selected child of the @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBox`</doc>
<type name="FlowBox" c:type="GtkFlowBox*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFlowBoxChild`</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="FlowBoxSortFunc" c:type="GtkFlowBoxSortFunc">
<doc xml:space="preserve">A function to compare two children to determine which
should come first.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">&lt; 0 if @child1 should be before @child2, 0 if
the are equal, and &gt; 0 otherwise</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="child1" transfer-ownership="none">
<doc xml:space="preserve">the first child</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
<parameter name="child2" transfer-ownership="none">
<doc xml:space="preserve">the second child</doc>
<type name="FlowBoxChild" c:type="GtkFlowBoxChild*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="FontButton" c:symbol-prefix="font_button" c:type="GtkFontButton" parent="Widget" glib:type-name="GtkFontButton" glib:get-type="gtk_font_button_get_type">
<doc xml:space="preserve">The `GtkFontButton` allows to open a font chooser dialog to change
the font.
![An example GtkFontButton](font-button.png)
It is suitable widget for selecting a font in a preference dialog.
# CSS nodes
```
fontbutton
&#x2570;&#x2500;&#x2500; button.font
&#x2570;&#x2500;&#x2500; [content]
```
`GtkFontButton` has a single CSS node with name fontbutton which
contains a button node with the .font style class.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="FontChooser"/>
<constructor name="new" c:identifier="gtk_font_button_new">
<doc xml:space="preserve">Creates a new font picker widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new font picker widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_font" c:identifier="gtk_font_button_new_with_font">
<doc xml:space="preserve">Creates a new font picker widget showing the given font.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new font picker widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="fontname" transfer-ownership="none">
<doc xml:space="preserve">Name of font to display in font chooser dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_modal" c:identifier="gtk_font_button_get_modal" glib:get-property="modal">
<attribute name="org.gtk.Method.get_property" value="modal"/>
<doc xml:space="preserve">Gets whether the dialog is modal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_font_button_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Retrieves the title of the font chooser dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">an internal copy of the title string
which must not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_font" c:identifier="gtk_font_button_get_use_font" glib:get-property="use-font">
<attribute name="org.gtk.Method.get_property" value="use-font"/>
<doc xml:space="preserve">Returns whether the selected font is used in the label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the selected font is used in the label.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_size" c:identifier="gtk_font_button_get_use_size" glib:get-property="use-size">
<attribute name="org.gtk.Method.get_property" value="use-size"/>
<doc xml:space="preserve">Returns whether the selected size is used in the label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the selected size is used in the label.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_modal" c:identifier="gtk_font_button_set_modal" glib:set-property="modal">
<attribute name="org.gtk.Method.set_property" value="modal"/>
<doc xml:space="preserve">Sets whether the dialog should be modal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
<parameter name="modal" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the dialog modal</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_font_button_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the title for the font chooser dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">a string containing the font chooser dialog title</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_use_font" c:identifier="gtk_font_button_set_use_font" glib:set-property="use-font">
<attribute name="org.gtk.Method.set_property" value="use-font"/>
<doc xml:space="preserve">If @use_font is %TRUE, the font name will be written
using the selected font.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
<parameter name="use_font" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, font name will be written using font chosen.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_use_size" c:identifier="gtk_font_button_set_use_size" glib:set-property="use-size">
<attribute name="org.gtk.Method.set_property" value="use-size"/>
<doc xml:space="preserve">If @use_size is %TRUE, the font name will be written using
the selected size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="font_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontButton`</doc>
<type name="FontButton" c:type="GtkFontButton*"/>
</instance-parameter>
<parameter name="use_size" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, font name will be written using the
selected size.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="modal" writable="1" transfer-ownership="none" setter="set_modal" getter="get_modal">
<attribute name="org.gtk.Property.get" value="gtk_font_button_get_modal"/>
<attribute name="org.gtk.Property.set" value="gtk_font_button_set_modal"/>
<doc xml:space="preserve">Whether the font chooser dialog should be modal.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_font_button_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_font_button_set_title"/>
<doc xml:space="preserve">The title of the font chooser dialog.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="use-font" writable="1" transfer-ownership="none" setter="set_use_font" getter="get_use_font">
<attribute name="org.gtk.Property.get" value="gtk_font_button_get_use_font"/>
<attribute name="org.gtk.Property.set" value="gtk_font_button_set_use_font"/>
<doc xml:space="preserve">Whether the buttons label will be drawn in the selected font.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-size" writable="1" transfer-ownership="none" setter="set_use_size" getter="get_use_size">
<attribute name="org.gtk.Property.get" value="gtk_font_button_get_use_size"/>
<attribute name="org.gtk.Property.set" value="gtk_font_button_set_use_size"/>
<doc xml:space="preserve">Whether the buttons label will use the selected font size.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="first" action="1" version="4.4">
<doc xml:space="preserve">Emitted to when the font button is activated.
The `::activate` signal on `GtkFontButton` is an action signal and
emitting it causes the button to present its dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="font-set" when="first">
<doc xml:space="preserve">Emitted when the user selects a font.
When handling this signal, use [method@Gtk.FontChooser.get_font]
to find out which font was just selected.
Note that this signal is only emitted when the user changes the font.
If you need to react to programmatic font changes as well, use
the notify::font signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<interface name="FontChooser" c:symbol-prefix="font_chooser" c:type="GtkFontChooser" glib:type-name="GtkFontChooser" glib:get-type="gtk_font_chooser_get_type" glib:type-struct="FontChooserIface">
<doc xml:space="preserve">`GtkFontChooser` is an interface that can be implemented by widgets
for choosing fonts.
In GTK, the main objects that implement this interface are
[class@Gtk.FontChooserWidget], [class@Gtk.FontChooserDialog] and
[class@Gtk.FontButton].</doc>
<virtual-method name="font_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="chooser" transfer-ownership="none">
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="fontname" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_font_face" invoker="get_font_face">
<doc xml:space="preserve">Gets the `PangoFontFace` representing the selected font group
details (i.e. family, slant, weight, width, etc).
If the selected font is not installed, returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFace` representing the
selected font group details</doc>
<type name="Pango.FontFace" c:type="PangoFontFace*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_font_family" invoker="get_font_family">
<doc xml:space="preserve">Gets the `PangoFontFamily` representing the selected font family.
Font families are a collection of font faces.
If the selected font is not installed, returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFamily` representing the
selected font family</doc>
<type name="Pango.FontFamily" c:type="PangoFontFamily*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_font_map" invoker="get_font_map">
<doc xml:space="preserve">Gets the custom font map of this font chooser widget,
or %NULL if it does not have one.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_font_size" invoker="get_font_size">
<doc xml:space="preserve">The selected font size.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A n integer representing the selected font size,
or -1 if no font size is selected.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_filter_func" invoker="set_filter_func">
<doc xml:space="preserve">Adds a filter function that decides which fonts to display
in the font chooser.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">a `GtkFontFilterFunc`</doc>
<type name="FontFilterFunc" c:type="GtkFontFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">data to pass to @filter</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function to call to free @data when it is no longer needed</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_font_map" invoker="set_font_map">
<doc xml:space="preserve">Sets a custom font map to use for this font chooser widget.
A custom font map can be used to present application-specific
fonts instead of or in addition to the normal system fonts.
```c
FcConfig *config;
PangoFontMap *fontmap;
config = FcInitLoadConfigAndFonts ();
FcConfigAppFontAddFile (config, my_app_font_file);
fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (fontmap), config);
gtk_font_chooser_set_font_map (font_chooser, fontmap);
```
Note that other GTK widgets will only be able to use the
application-specific font if it is present in the font map they use:
```c
context = gtk_widget_get_pango_context (label);
pango_context_set_font_map (context, fontmap);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="fontmap" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_font" c:identifier="gtk_font_chooser_get_font" glib:get-property="font">
<attribute name="org.gtk.Method.get_property" value="font"/>
<doc xml:space="preserve">Gets the currently-selected font name.
Note that this can be a different string than what you set with
[method@Gtk.FontChooser.set_font], as the font chooser widget may
normalize font names and thus return a string with a different
structure. For example, &#x201C;Helvetica Italic Bold 12&#x201D; could be
normalized to &#x201C;Helvetica Bold Italic 12&#x201D;.
Use [method@Pango.FontDescription.equal] if you want to compare two
font descriptions.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A string with the name
of the current font</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_desc" c:identifier="gtk_font_chooser_get_font_desc" glib:get-property="font-desc">
<attribute name="org.gtk.Method.get_property" value="font-desc"/>
<doc xml:space="preserve">Gets the currently-selected font.
Note that this can be a different string than what you set with
[method@Gtk.FontChooser.set_font], as the font chooser widget may
normalize font names and thus return a string with a different
structure. For example, &#x201C;Helvetica Italic Bold 12&#x201D; could be
normalized to &#x201C;Helvetica Bold Italic 12&#x201D;.
Use [method@Pango.FontDescription.equal] if you want to compare two
font descriptions.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A `PangoFontDescription` for the
current font</doc>
<type name="Pango.FontDescription" c:type="PangoFontDescription*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_face" c:identifier="gtk_font_chooser_get_font_face">
<doc xml:space="preserve">Gets the `PangoFontFace` representing the selected font group
details (i.e. family, slant, weight, width, etc).
If the selected font is not installed, returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFace` representing the
selected font group details</doc>
<type name="Pango.FontFace" c:type="PangoFontFace*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_family" c:identifier="gtk_font_chooser_get_font_family">
<doc xml:space="preserve">Gets the `PangoFontFamily` representing the selected font family.
Font families are a collection of font faces.
If the selected font is not installed, returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFamily` representing the
selected font family</doc>
<type name="Pango.FontFamily" c:type="PangoFontFamily*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_features" c:identifier="gtk_font_chooser_get_font_features" glib:get-property="font-features">
<attribute name="org.gtk.Method.get_property" value="font-features"/>
<doc xml:space="preserve">Gets the currently-selected font features.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the currently selected font features</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_map" c:identifier="gtk_font_chooser_get_font_map">
<doc xml:space="preserve">Gets the custom font map of this font chooser widget,
or %NULL if it does not have one.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_size" c:identifier="gtk_font_chooser_get_font_size">
<doc xml:space="preserve">The selected font size.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A n integer representing the selected font size,
or -1 if no font size is selected.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_language" c:identifier="gtk_font_chooser_get_language" glib:get-property="language">
<attribute name="org.gtk.Method.get_property" value="language"/>
<doc xml:space="preserve">Gets the language that is used for font features.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the currently selected language</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_level" c:identifier="gtk_font_chooser_get_level" glib:get-property="level">
<attribute name="org.gtk.Method.get_property" value="level"/>
<doc xml:space="preserve">Returns the current level of granularity for selecting fonts.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current granularity level</doc>
<type name="FontChooserLevel" c:type="GtkFontChooserLevel"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_preview_text" c:identifier="gtk_font_chooser_get_preview_text" glib:get-property="preview-text">
<attribute name="org.gtk.Method.get_property" value="preview-text"/>
<doc xml:space="preserve">Gets the text displayed in the preview area.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the text displayed in the preview area</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_preview_entry" c:identifier="gtk_font_chooser_get_show_preview_entry" glib:get-property="show-preview-entry">
<attribute name="org.gtk.Method.get_property" value="show-preview-entry"/>
<doc xml:space="preserve">Returns whether the preview entry is shown or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the preview entry is shown or %FALSE if it is hidden.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_filter_func" c:identifier="gtk_font_chooser_set_filter_func">
<doc xml:space="preserve">Adds a filter function that decides which fonts to display
in the font chooser.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">a `GtkFontFilterFunc`</doc>
<type name="FontFilterFunc" c:type="GtkFontFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">data to pass to @filter</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function to call to free @data when it is no longer needed</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_font" c:identifier="gtk_font_chooser_set_font" glib:set-property="font">
<attribute name="org.gtk.Method.set_property" value="font"/>
<doc xml:space="preserve">Sets the currently-selected font.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="fontname" transfer-ownership="none">
<doc xml:space="preserve">a font name like &#x201C;Helvetica 12&#x201D; or &#x201C;Times Bold 18&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_font_desc" c:identifier="gtk_font_chooser_set_font_desc" glib:set-property="font-desc">
<attribute name="org.gtk.Method.set_property" value="font-desc"/>
<doc xml:space="preserve">Sets the currently-selected font from @font_desc.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="font_desc" transfer-ownership="none">
<doc xml:space="preserve">a `PangoFontDescription`</doc>
<type name="Pango.FontDescription" c:type="const PangoFontDescription*"/>
</parameter>
</parameters>
</method>
<method name="set_font_map" c:identifier="gtk_font_chooser_set_font_map">
<doc xml:space="preserve">Sets a custom font map to use for this font chooser widget.
A custom font map can be used to present application-specific
fonts instead of or in addition to the normal system fonts.
```c
FcConfig *config;
PangoFontMap *fontmap;
config = FcInitLoadConfigAndFonts ();
FcConfigAppFontAddFile (config, my_app_font_file);
fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (fontmap), config);
gtk_font_chooser_set_font_map (font_chooser, fontmap);
```
Note that other GTK widgets will only be able to use the
application-specific font if it is present in the font map they use:
```c
context = gtk_widget_get_pango_context (label);
pango_context_set_font_map (context, fontmap);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="fontmap" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</parameter>
</parameters>
</method>
<method name="set_language" c:identifier="gtk_font_chooser_set_language" glib:set-property="language">
<attribute name="org.gtk.Method.set_property" value="language"/>
<doc xml:space="preserve">Sets the language to use for font features.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="language" transfer-ownership="none">
<doc xml:space="preserve">a language</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_level" c:identifier="gtk_font_chooser_set_level" glib:set-property="level">
<attribute name="org.gtk.Method.set_property" value="level"/>
<doc xml:space="preserve">Sets the desired level of granularity for selecting fonts.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="level" transfer-ownership="none">
<doc xml:space="preserve">the desired level of granularity</doc>
<type name="FontChooserLevel" c:type="GtkFontChooserLevel"/>
</parameter>
</parameters>
</method>
<method name="set_preview_text" c:identifier="gtk_font_chooser_set_preview_text" glib:set-property="preview-text">
<attribute name="org.gtk.Method.set_property" value="preview-text"/>
<doc xml:space="preserve">Sets the text displayed in the preview area.
The @text is used to show how the selected font looks.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the text to display in the preview area</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_show_preview_entry" c:identifier="gtk_font_chooser_set_show_preview_entry" glib:set-property="show-preview-entry">
<attribute name="org.gtk.Method.set_property" value="show-preview-entry"/>
<doc xml:space="preserve">Shows or hides the editable preview entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</instance-parameter>
<parameter name="show_preview_entry" transfer-ownership="none">
<doc xml:space="preserve">whether to show the editable preview entry or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="font" writable="1" transfer-ownership="none" setter="set_font" getter="get_font">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_font"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_font"/>
<doc xml:space="preserve">The font description as a string, e.g. "Sans Italic 12".</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="font-desc" writable="1" transfer-ownership="none" setter="set_font_desc" getter="get_font_desc">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_font_desc"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_font_desc"/>
<doc xml:space="preserve">The font description as a `PangoFontDescription`.</doc>
<type name="Pango.FontDescription"/>
</property>
<property name="font-features" transfer-ownership="none" getter="get_font_features">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_font_features"/>
<doc xml:space="preserve">The selected font features.
The format of the string is compatible with
CSS and with Pango attributes.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="language" writable="1" transfer-ownership="none" setter="set_language" getter="get_language">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_language"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_language"/>
<doc xml:space="preserve">The language for which the font features were selected.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="level" writable="1" transfer-ownership="none" setter="set_level" getter="get_level">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_level"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_level"/>
<doc xml:space="preserve">The level of granularity to offer for selecting fonts.</doc>
<type name="FontChooserLevel"/>
</property>
<property name="preview-text" writable="1" transfer-ownership="none" setter="set_preview_text" getter="get_preview_text">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_preview_text"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_preview_text"/>
<doc xml:space="preserve">The string with which to preview the font.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="show-preview-entry" writable="1" transfer-ownership="none" setter="set_show_preview_entry" getter="get_show_preview_entry">
<attribute name="org.gtk.Property.get" value="gtk_font_chooser_get_show_preview_entry"/>
<attribute name="org.gtk.Property.set" value="gtk_font_chooser_set_show_preview_entry"/>
<doc xml:space="preserve">Whether to show an entry to change the preview text.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="font-activated" when="first">
<doc xml:space="preserve">Emitted when a font is activated.
This usually happens when the user double clicks an item,
or an item is selected and the user presses one of the keys
Space, Shift+Space, Return or Enter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="fontname" transfer-ownership="none">
<doc xml:space="preserve">the font name</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<class name="FontChooserDialog" c:symbol-prefix="font_chooser_dialog" c:type="GtkFontChooserDialog" parent="Dialog" glib:type-name="GtkFontChooserDialog" glib:get-type="gtk_font_chooser_dialog_get_type">
<doc xml:space="preserve">The `GtkFontChooserDialog` widget is a dialog for selecting a font.
![An example GtkFontChooserDialog](fontchooser.png)
`GtkFontChooserDialog` implements the [iface@Gtk.FontChooser] interface
and does not provide much API of its own.
To create a `GtkFontChooserDialog`, use [ctor@Gtk.FontChooserDialog.new].
# GtkFontChooserDialog as GtkBuildable
The `GtkFontChooserDialog` implementation of the `GtkBuildable`
interface exposes the buttons with the names &#x201C;select_button&#x201D;
and &#x201C;cancel_button&#x201D;.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="FontChooser"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_font_chooser_dialog_new">
<doc xml:space="preserve">Creates a new `GtkFontChooserDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFontChooserDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</constructor>
</class>
<record name="FontChooserIface" c:type="GtkFontChooserIface" glib:is-gtype-struct-for="FontChooser">
<field name="base_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="get_font_family">
<callback name="get_font_family">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFamily` representing the
selected font family</doc>
<type name="Pango.FontFamily" c:type="PangoFontFamily*"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_font_face">
<callback name="get_font_face">
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontFace` representing the
selected font group details</doc>
<type name="Pango.FontFace" c:type="PangoFontFace*"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_font_size">
<callback name="get_font_size">
<return-value transfer-ownership="none">
<doc xml:space="preserve">A n integer representing the selected font size,
or -1 if no font size is selected.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_filter_func">
<callback name="set_filter_func">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
<parameter name="filter" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">a `GtkFontFilterFunc`</doc>
<type name="FontFilterFunc" c:type="GtkFontFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">data to pass to @filter</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function to call to free @data when it is no longer needed</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</callback>
</field>
<field name="font_activated">
<callback name="font_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="chooser" transfer-ownership="none">
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
<parameter name="fontname" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_font_map">
<callback name="set_font_map">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
<parameter name="fontmap" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_font_map">
<callback name="get_font_map">
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</return-value>
<parameters>
<parameter name="fontchooser" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFontChooser`</doc>
<type name="FontChooser" c:type="GtkFontChooser*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="10">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<bitfield name="FontChooserLevel" glib:type-name="GtkFontChooserLevel" glib:get-type="gtk_font_chooser_level_get_type" c:type="GtkFontChooserLevel">
<doc xml:space="preserve">Specifies the granularity of font selection
that is desired in a `GtkFontChooser`.
This enumeration may be extended in the future; applications should
ignore unknown values.</doc>
<member name="family" value="0" c:identifier="GTK_FONT_CHOOSER_LEVEL_FAMILY" glib:nick="family" glib:name="GTK_FONT_CHOOSER_LEVEL_FAMILY">
<doc xml:space="preserve">Allow selecting a font family</doc>
</member>
<member name="style" value="1" c:identifier="GTK_FONT_CHOOSER_LEVEL_STYLE" glib:nick="style" glib:name="GTK_FONT_CHOOSER_LEVEL_STYLE">
<doc xml:space="preserve">Allow selecting a specific font face</doc>
</member>
<member name="size" value="2" c:identifier="GTK_FONT_CHOOSER_LEVEL_SIZE" glib:nick="size" glib:name="GTK_FONT_CHOOSER_LEVEL_SIZE">
<doc xml:space="preserve">Allow selecting a specific font size</doc>
</member>
<member name="variations" value="4" c:identifier="GTK_FONT_CHOOSER_LEVEL_VARIATIONS" glib:nick="variations" glib:name="GTK_FONT_CHOOSER_LEVEL_VARIATIONS">
<doc xml:space="preserve">Allow changing OpenType font variation axes</doc>
</member>
<member name="features" value="8" c:identifier="GTK_FONT_CHOOSER_LEVEL_FEATURES" glib:nick="features" glib:name="GTK_FONT_CHOOSER_LEVEL_FEATURES">
<doc xml:space="preserve">Allow selecting specific OpenType font features</doc>
</member>
</bitfield>
<class name="FontChooserWidget" c:symbol-prefix="font_chooser_widget" c:type="GtkFontChooserWidget" parent="Widget" glib:type-name="GtkFontChooserWidget" glib:get-type="gtk_font_chooser_widget_get_type">
<doc xml:space="preserve">The `GtkFontChooserWidget` widget lets the user select a font.
It is used in the `GtkFontChooserDialog` widget to provide a
dialog for selecting fonts.
To set the font which is initially selected, use
[method@Gtk.FontChooser.set_font] or [method@Gtk.FontChooser.set_font_desc].
To get the selected font use [method@Gtk.FontChooser.get_font] or
[method@Gtk.FontChooser.get_font_desc].
To change the text which is shown in the preview area, use
[method@Gtk.FontChooser.set_preview_text].
# CSS nodes
`GtkFontChooserWidget` has a single CSS node with name fontchooser.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="FontChooser"/>
<constructor name="new" c:identifier="gtk_font_chooser_widget_new">
<doc xml:space="preserve">Creates a new `GtkFontChooserWidget`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFontChooserWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<property name="tweak-action" transfer-ownership="none">
<doc xml:space="preserve">A toggle action that can be used to switch to the tweak page
of the font chooser widget, which lets the user tweak the
OpenType features and variation axes of the selected font.
The action will be enabled or disabled depending on whether
the selected font has any features or axes.</doc>
<type name="Gio.Action"/>
</property>
</class>
<callback name="FontFilterFunc" c:type="GtkFontFilterFunc">
<doc xml:space="preserve">The type of function that is used for deciding what fonts get
shown in a `GtkFontChooser`.
See [method@Gtk.FontChooser.set_filter_func].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the font should be displayed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="family" transfer-ownership="none">
<doc xml:space="preserve">a `PangoFontFamily`</doc>
<type name="Pango.FontFamily" c:type="const PangoFontFamily*"/>
</parameter>
<parameter name="face" transfer-ownership="none">
<doc xml:space="preserve">a `PangoFontFace` belonging to @family</doc>
<type name="Pango.FontFace" c:type="const PangoFontFace*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data passed to gtk_font_chooser_set_filter_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="Frame" c:symbol-prefix="frame" c:type="GtkFrame" parent="Widget" glib:type-name="GtkFrame" glib:get-type="gtk_frame_get_type" glib:type-struct="FrameClass">
<doc xml:space="preserve">`GtkFrame` is a widget that surrounds its child with a decorative
frame and an optional label.
![An example GtkFrame](frame.png)
If present, the label is drawn inside the top edge of the frame.
The horizontal position of the label can be controlled with
[method@Gtk.Frame.set_label_align].
`GtkFrame` clips its child. You can use this to add rounded corners
to widgets, but be aware that it also cuts off shadows.
# GtkFrame as GtkBuildable
The `GtkFrame` implementation of the `GtkBuildable` interface supports
placing a child in the label position by specifying &#x201C;label&#x201D; as the
&#x201C;type&#x201D; attribute of a &lt;child&gt; element. A normal content child can
be specified without specifying a &lt;child&gt; type attribute.
An example of a UI definition fragment with GtkFrame:
```xml
&lt;object class="GtkFrame"&gt;
&lt;child type="label"&gt;
&lt;object class="GtkLabel" id="frame_label"/&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkEntry" id="frame_content"/&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# CSS nodes
```
frame
&#x251C;&#x2500;&#x2500; &lt;label widget&gt;
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
`GtkFrame` has a main CSS node with name &#x201C;frame&#x201D;, which is used to draw the
visible border. You can set the appearance of the border using CSS properties
like &#x201C;border-style&#x201D; on this node.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_frame_new">
<doc xml:space="preserve">Creates a new `GtkFrame`, with optional label @label.
If @label is %NULL, the label is omitted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkFrame` widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text to use as the label of the frame</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="compute_child_allocation">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
<parameter name="allocation" transfer-ownership="none">
<type name="Allocation" c:type="GtkAllocation*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_child" c:identifier="gtk_frame_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @frame.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @frame</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_frame_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Returns the frame labels text.
If the frame's label widget is not a `GtkLabel`, %NULL
is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text in the label, or %NULL if there
was no label widget or the label widget was not a `GtkLabel`.
This string is owned by GTK and must not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label_align" c:identifier="gtk_frame_get_label_align">
<attribute name="org.gtk.Method.get_property" value="label-xalign"/>
<doc xml:space="preserve">Retrieves the X alignment of the frame&#x2019;s label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the frames X alignment</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label_widget" c:identifier="gtk_frame_get_label_widget" glib:get-property="label-widget">
<attribute name="org.gtk.Method.get_property" value="label-widget"/>
<doc xml:space="preserve">Retrieves the label widget for the frame.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the label widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_frame_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @frame.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_frame_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Creates a new `GtkLabel` with the @label and sets it as the frame's
label widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text to use as the label of the frame</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_label_align" c:identifier="gtk_frame_set_label_align">
<attribute name="org.gtk.Method.set_property" value="label-xalign"/>
<doc xml:space="preserve">Sets the X alignment of the frame widget&#x2019;s label.
The default value for a newly created frame is 0.0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">The position of the label along the top edge
of the widget. A value of 0.0 represents left alignment;
1.0 represents right alignment.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_label_widget" c:identifier="gtk_frame_set_label_widget" glib:set-property="label-widget">
<attribute name="org.gtk.Method.get_property" value="label-widget"/>
<doc xml:space="preserve">Sets the label widget for the frame.
This is the widget that will appear embedded in the top edge
of the frame as a title.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="frame" transfer-ownership="none">
<doc xml:space="preserve">a `GtkFrame`</doc>
<type name="Frame" c:type="GtkFrame*"/>
</instance-parameter>
<parameter name="label_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new label widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_frame_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_frame_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="label" writable="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_frame_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_frame_set_label"/>
<doc xml:space="preserve">Text of the frame's label.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="label-widget" writable="1" transfer-ownership="none" setter="set_label_widget" getter="get_label_widget">
<attribute name="org.gtk.Property.get" value="gtk_frame_get_label_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_frame_set_label_widget"/>
<doc xml:space="preserve">Widget to display in place of the usual frame label.</doc>
<type name="Widget"/>
</property>
<property name="label-xalign" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_frame_get_label_align"/>
<attribute name="org.gtk.Property.set" value="gtk_frame_set_label_align"/>
<doc xml:space="preserve">The horizontal alignment of the label.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
</class>
<record name="FrameClass" c:type="GtkFrameClass" glib:is-gtype-struct-for="Frame">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="compute_child_allocation">
<callback name="compute_child_allocation">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="frame" transfer-ownership="none">
<type name="Frame" c:type="GtkFrame*"/>
</parameter>
<parameter name="allocation" transfer-ownership="none">
<type name="Allocation" c:type="GtkAllocation*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<function-macro name="GESTURE" c:identifier="GTK_GESTURE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_CLASS" c:identifier="GTK_GESTURE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_CLICK" c:identifier="GTK_GESTURE_CLICK" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_CLICK_CLASS" c:identifier="GTK_GESTURE_CLICK_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_CLICK_GET_CLASS" c:identifier="GTK_GESTURE_CLICK_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_DRAG" c:identifier="GTK_GESTURE_DRAG" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_DRAG_CLASS" c:identifier="GTK_GESTURE_DRAG_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_DRAG_GET_CLASS" c:identifier="GTK_GESTURE_DRAG_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_GET_CLASS" c:identifier="GTK_GESTURE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_LONG_PRESS" c:identifier="GTK_GESTURE_LONG_PRESS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_LONG_PRESS_CLASS" c:identifier="GTK_GESTURE_LONG_PRESS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_LONG_PRESS_GET_CLASS" c:identifier="GTK_GESTURE_LONG_PRESS_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_PAN" c:identifier="GTK_GESTURE_PAN" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_PAN_CLASS" c:identifier="GTK_GESTURE_PAN_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_PAN_GET_CLASS" c:identifier="GTK_GESTURE_PAN_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ROTATE" c:identifier="GTK_GESTURE_ROTATE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ROTATE_CLASS" c:identifier="GTK_GESTURE_ROTATE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ROTATE_GET_CLASS" c:identifier="GTK_GESTURE_ROTATE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SINGLE" c:identifier="GTK_GESTURE_SINGLE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SINGLE_CLASS" c:identifier="GTK_GESTURE_SINGLE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SINGLE_GET_CLASS" c:identifier="GTK_GESTURE_SINGLE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_STYLUS" c:identifier="GTK_GESTURE_STYLUS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_STYLUS_CLASS" c:identifier="GTK_GESTURE_STYLUS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_STYLUS_GET_CLASS" c:identifier="GTK_GESTURE_STYLUS_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SWIPE" c:identifier="GTK_GESTURE_SWIPE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SWIPE_CLASS" c:identifier="GTK_GESTURE_SWIPE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_SWIPE_GET_CLASS" c:identifier="GTK_GESTURE_SWIPE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ZOOM" c:identifier="GTK_GESTURE_ZOOM" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ZOOM_CLASS" c:identifier="GTK_GESTURE_ZOOM_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GESTURE_ZOOM_GET_CLASS" c:identifier="GTK_GESTURE_ZOOM_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<class name="GLArea" c:symbol-prefix="gl_area" c:type="GtkGLArea" parent="Widget" glib:type-name="GtkGLArea" glib:get-type="gtk_gl_area_get_type" glib:type-struct="GLAreaClass">
<doc xml:space="preserve">`GtkGLArea` is a widget that allows drawing with OpenGL.
![An example GtkGLArea](glarea.png)
`GtkGLArea` sets up its own [class@Gdk.GLContext], and creates a custom
GL framebuffer that the widget will do GL rendering onto. It also ensures
that this framebuffer is the default GL rendering target when rendering.
In order to draw, you have to connect to the [signal@Gtk.GLArea::render]
signal, or subclass `GtkGLArea` and override the GtkGLAreaClass.render
virtual function.
The `GtkGLArea` widget ensures that the `GdkGLContext` is associated with
the widget's drawing area, and it is kept updated when the size and
position of the drawing area changes.
## Drawing with GtkGLArea
The simplest way to draw using OpenGL commands in a `GtkGLArea` is to
create a widget instance and connect to the [signal@Gtk.GLArea::render] signal:
The `render()` function will be called when the `GtkGLArea` is ready
for you to draw its content:
```c
static gboolean
render (GtkGLArea *area, GdkGLContext *context)
{
// inside this function it's safe to use GL; the given
// GdkGLContext has been made current to the drawable
// surface used by the `GtkGLArea` and the viewport has
// already been set to be the size of the allocation
// we can start by clearing the buffer
glClearColor (0, 0, 0, 0);
glClear (GL_COLOR_BUFFER_BIT);
// draw your object
// draw_an_object ();
// we completed our drawing; the draw commands will be
// flushed at the end of the signal emission chain, and
// the buffers will be drawn on the window
return TRUE;
}
void setup_glarea (void)
{
// create a GtkGLArea instance
GtkWidget *gl_area = gtk_gl_area_new ();
// connect to the "render" signal
g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
}
```
If you need to initialize OpenGL state, e.g. buffer objects or
shaders, you should use the [signal@Gtk.Widget::realize] signal;
you can use the [signal@Gtk.Widget::unrealize] signal to clean up.
Since the `GdkGLContext` creation and initialization may fail, you
will need to check for errors, using [method@Gtk.GLArea.get_error].
An example of how to safely initialize the GL state is:
```c
static void
on_realize (GtkGLarea *area)
{
// We need to make the context current if we want to
// call GL API
gtk_gl_area_make_current (area);
// If there were errors during the initialization or
// when trying to make the context current, this
// function will return a GError for you to catch
if (gtk_gl_area_get_error (area) != NULL)
return;
// You can also use gtk_gl_area_set_error() in order
// to show eventual initialization errors on the
// GtkGLArea widget itself
GError *internal_error = NULL;
init_buffer_objects (&amp;error);
if (error != NULL)
{
gtk_gl_area_set_error (area, error);
g_error_free (error);
return;
}
init_shaders (&amp;error);
if (error != NULL)
{
gtk_gl_area_set_error (area, error);
g_error_free (error);
return;
}
}
```
If you need to change the options for creating the `GdkGLContext`
you should use the [signal@Gtk.GLArea::create-context] signal.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_gl_area_new">
<doc xml:space="preserve">Creates a new `GtkGLArea` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkGLArea`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<virtual-method name="create_context" introspectable="0">
<return-value>
<type name="Gdk.GLContext" c:type="GdkGLContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="render">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="Gdk.GLContext" c:type="GdkGLContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="resize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<method name="attach_buffers" c:identifier="gtk_gl_area_attach_buffers">
<doc xml:space="preserve">Binds buffers to the framebuffer.
Ensures that the @area framebuffer object is made the current draw
and read target, and that all the required buffers for the @area
are created and bound to the framebuffer.
This function is automatically called before emitting the
[signal@Gtk.GLArea::render] signal, and doesn't normally need to be
called by application code.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_auto_render" c:identifier="gtk_gl_area_get_auto_render" glib:get-property="auto-render">
<attribute name="org.gtk.Method.get_property" value="auto-render"/>
<doc xml:space="preserve">Returns whether the area is in auto render mode or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @area is auto rendering, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_context" c:identifier="gtk_gl_area_get_context" glib:get-property="context">
<doc xml:space="preserve">Retrieves the `GdkGLContext` used by @area.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GdkGLContext`</doc>
<type name="Gdk.GLContext" c:type="GdkGLContext*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_error" c:identifier="gtk_gl_area_get_error">
<doc xml:space="preserve">Gets the current error set on the @area.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GError`</doc>
<type name="GLib.Error" c:type="GError*"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_depth_buffer" c:identifier="gtk_gl_area_get_has_depth_buffer" glib:get-property="has-depth-buffer">
<attribute name="org.gtk.Method.get_property" value="has-depth-buffer"/>
<doc xml:space="preserve">Returns whether the area has a depth buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @area has a depth buffer, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_stencil_buffer" c:identifier="gtk_gl_area_get_has_stencil_buffer" glib:get-property="has-stencil-buffer">
<attribute name="org.gtk.Method.get_property" value="has-stencil-buffer"/>
<doc xml:space="preserve">Returns whether the area has a stencil buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @area has a stencil buffer, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_required_version" c:identifier="gtk_gl_area_get_required_version">
<doc xml:space="preserve">Retrieves the required version of OpenGL.
See [method@Gtk.GLArea.set_required_version].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="major" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the required major version</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minor" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the required minor version</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_use_es" c:identifier="gtk_gl_area_get_use_es" glib:get-property="use-es">
<attribute name="org.gtk.Method.get_property" value="use-es"/>
<doc xml:space="preserve">Returns whether the `GtkGLArea` should use OpenGL ES.
See [method@Gtk.GLArea.set_use_es].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the `GtkGLArea` should create an OpenGL ES context
and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="make_current" c:identifier="gtk_gl_area_make_current">
<doc xml:space="preserve">Ensures that the `GdkGLContext` used by @area is associated with
the `GtkGLArea`.
This function is automatically called before emitting the
[signal@Gtk.GLArea::render] signal, and doesn't normally need
to be called by application code.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="queue_render" c:identifier="gtk_gl_area_queue_render">
<doc xml:space="preserve">Marks the currently rendered data (if any) as invalid, and queues
a redraw of the widget.
This ensures that the [signal@Gtk.GLArea::render] signal
is emitted during the draw.
This is only needed when [method@Gtk.GLArea.set_auto_render] has
been called with a %FALSE value. The default behaviour is to
emit [signal@Gtk.GLArea::render] on each draw.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_auto_render" c:identifier="gtk_gl_area_set_auto_render" glib:set-property="auto-render">
<attribute name="org.gtk.Method.set_property" value="auto-render"/>
<doc xml:space="preserve">Sets whether the `GtkGLArea` is in auto render mode.
If @auto_render is %TRUE the [signal@Gtk.GLArea::render] signal will
be emitted every time the widget draws. This is the default and is
useful if drawing the widget is faster.
If @auto_render is %FALSE the data from previous rendering is kept
around and will be used for drawing the widget the next time,
unless the window is resized. In order to force a rendering
[method@Gtk.GLArea.queue_render] must be called. This mode is
useful when the scene changes seldom, but takes a long time to redraw.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="auto_render" transfer-ownership="none">
<doc xml:space="preserve">a boolean</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_error" c:identifier="gtk_gl_area_set_error">
<doc xml:space="preserve">Sets an error on the area which will be shown instead of the
GL rendering.
This is useful in the [signal@Gtk.GLArea::create-context]
signal if GL context creation fails.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="error" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a new `GError`, or %NULL to unset the error</doc>
<type name="GLib.Error" c:type="const GError*"/>
</parameter>
</parameters>
</method>
<method name="set_has_depth_buffer" c:identifier="gtk_gl_area_set_has_depth_buffer" glib:set-property="has-depth-buffer">
<attribute name="org.gtk.Method.set_property" value="has-depth-buffer"/>
<doc xml:space="preserve">Sets whether the `GtkGLArea` should use a depth buffer.
If @has_depth_buffer is %TRUE the widget will allocate and
enable a depth buffer for the target framebuffer. Otherwise
there will be none.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="has_depth_buffer" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to add a depth buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_has_stencil_buffer" c:identifier="gtk_gl_area_set_has_stencil_buffer" glib:set-property="has-stencil-buffer">
<attribute name="org.gtk.Method.set_property" value="has-stencil-buffer"/>
<doc xml:space="preserve">Sets whether the `GtkGLArea` should use a stencil buffer.
If @has_stencil_buffer is %TRUE the widget will allocate and
enable a stencil buffer for the target framebuffer. Otherwise
there will be none.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="has_stencil_buffer" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to add a stencil buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_required_version" c:identifier="gtk_gl_area_set_required_version">
<doc xml:space="preserve">Sets the required version of OpenGL to be used when creating
the context for the widget.
This function must be called before the area has been realized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="major" transfer-ownership="none">
<doc xml:space="preserve">the major version</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minor" transfer-ownership="none">
<doc xml:space="preserve">the minor version</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_use_es" c:identifier="gtk_gl_area_set_use_es" glib:set-property="use-es">
<attribute name="org.gtk.Method.set_property" value="use-es"/>
<doc xml:space="preserve">Sets whether the @area should create an OpenGL or an OpenGL ES context.
You should check the capabilities of the `GdkGLContext` before drawing
with either API.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGLArea`</doc>
<type name="GLArea" c:type="GtkGLArea*"/>
</instance-parameter>
<parameter name="use_es" transfer-ownership="none">
<doc xml:space="preserve">whether to use OpenGL or OpenGL ES</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="auto-render" writable="1" transfer-ownership="none" setter="set_auto_render" getter="get_auto_render">
<attribute name="org.gtk.Property.get" value="gtk_gl_area_get_auto_render"/>
<attribute name="org.gtk.Property.set" value="gtk_gl_area_set_auto_render"/>
<doc xml:space="preserve">If set to %TRUE the ::render signal will be emitted every time
the widget draws.
This is the default and is useful if drawing the widget is faster.
If set to %FALSE the data from previous rendering is kept around and will
be used for drawing the widget the next time, unless the window is resized.
In order to force a rendering [method@Gtk.GLArea.queue_render] must be called.
This mode is useful when the scene changes seldom, but takes a long time
to redraw.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="context" transfer-ownership="none" getter="get_context">
<doc xml:space="preserve">The `GdkGLContext` used by the `GtkGLArea` widget.
The `GtkGLArea` widget is responsible for creating the `GdkGLContext`
instance. If you need to render with other kinds of buffers (stencil,
depth, etc), use render buffers.</doc>
<type name="Gdk.GLContext"/>
</property>
<property name="has-depth-buffer" writable="1" transfer-ownership="none" setter="set_has_depth_buffer" getter="get_has_depth_buffer">
<attribute name="org.gtk.Property.get" value="gtk_gl_area_get_has_depth_buffer"/>
<attribute name="org.gtk.Property.set" value="gtk_gl_area_set_has_depth_buffer"/>
<doc xml:space="preserve">If set to %TRUE the widget will allocate and enable a depth buffer for the
target framebuffer.
Setting this property will enable GL's depth testing as a side effect. If
you don't need depth testing, you should call `glDisable(GL_DEPTH_TEST)`
in your `GtkGLArea::render` handler.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-stencil-buffer" writable="1" transfer-ownership="none" setter="set_has_stencil_buffer" getter="get_has_stencil_buffer">
<attribute name="org.gtk.Property.get" value="gtk_gl_area_get_has_stencil_buffer"/>
<attribute name="org.gtk.Property.set" value="gtk_gl_area_set_has_stencil_buffer"/>
<doc xml:space="preserve">If set to %TRUE the widget will allocate and enable a stencil buffer for the
target framebuffer.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-es" writable="1" transfer-ownership="none" setter="set_use_es" getter="get_use_es">
<attribute name="org.gtk.Property.get" value="gtk_gl_area_get_use_es"/>
<attribute name="org.gtk.Property.set" value="gtk_gl_area_set_use_es"/>
<doc xml:space="preserve">If set to %TRUE the widget will try to create a `GdkGLContext` using
OpenGL ES instead of OpenGL.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="create-context" when="last">
<doc xml:space="preserve">Emitted when the widget is being realized.
This allows you to override how the GL context is created.
This is useful when you want to reuse an existing GL context,
or if you want to try creating different kinds of GL options.
If context creation fails then the signal handler can use
[method@Gtk.GLArea.set_error] to register a more detailed error
of how the construction failed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GdkGLContext`;
the `GtkGLArea` widget will take ownership of the returned value.</doc>
<type name="Gdk.GLContext"/>
</return-value>
</glib:signal>
<glib:signal name="render" when="last">
<doc xml:space="preserve">Emitted every time the contents of the `GtkGLArea` should be redrawn.
The @context is bound to the @area prior to emitting this function,
and the buffers are painted to the window once the emission terminates.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the event.
%FALSE to propagate the event further.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GdkGLContext` used by @area</doc>
<type name="Gdk.GLContext"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="resize" when="last">
<doc xml:space="preserve">Emitted once when the widget is realized, and then each time the widget
is changed while realized.
This is useful in order to keep GL state up to date with the widget size,
like for instance camera properties which may depend on the width/height
ratio.
The GL context for the area is guaranteed to be current when this signal
is emitted.
The default handler sets up the GL viewport.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width of the viewport</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height of the viewport</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GLAreaClass" c:type="GtkGLAreaClass" glib:is-gtype-struct-for="GLArea">
<doc xml:space="preserve">The `GtkGLAreaClass` structure contains only private data.</doc>
<field name="parent_class" readable="0" private="1">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="render">
<callback name="render">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="Gdk.GLContext" c:type="GdkGLContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="resize">
<callback name="resize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="create_context" introspectable="0">
<callback name="create_context" introspectable="0">
<return-value>
<type name="Gdk.GLContext" c:type="GdkGLContext*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<type name="GLArea" c:type="GtkGLArea*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<function-macro name="GL_AREA" c:identifier="GTK_GL_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="GL_AREA_CLASS" c:identifier="GTK_GL_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="GL_AREA_GET_CLASS" c:identifier="GTK_GL_AREA_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID" c:identifier="GTK_GRID" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID_CLASS" c:identifier="GTK_GRID_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID_GET_CLASS" c:identifier="GTK_GRID_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID_VIEW" c:identifier="GTK_GRID_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID_VIEW_CLASS" c:identifier="GTK_GRID_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="GRID_VIEW_GET_CLASS" c:identifier="GTK_GRID_VIEW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<class name="Gesture" c:symbol-prefix="gesture" c:type="GtkGesture" parent="EventController" abstract="1" glib:type-name="GtkGesture" glib:get-type="gtk_gesture_get_type" glib:type-struct="GestureClass">
<doc xml:space="preserve">`GtkGesture` is the base class for gesture recognition.
Although `GtkGesture` is quite generalized to serve as a base for
multi-touch gestures, it is suitable to implement single-touch and
pointer-based gestures (using the special %NULL `GdkEventSequence`
value for these).
The number of touches that a `GtkGesture` need to be recognized is
controlled by the [property@Gtk.Gesture:n-points] property, if a
gesture is keeping track of less or more than that number of sequences,
it won't check whether the gesture is recognized.
As soon as the gesture has the expected number of touches, it will check
regularly if it is recognized, the criteria to consider a gesture as
"recognized" is left to `GtkGesture` subclasses.
A recognized gesture will then emit the following signals:
- [signal@Gtk.Gesture::begin] when the gesture is recognized.
- [signal@Gtk.Gesture::update], whenever an input event is processed.
- [signal@Gtk.Gesture::end] when the gesture is no longer recognized.
## Event propagation
In order to receive events, a gesture needs to set a propagation phase
through [method@Gtk.EventController.set_propagation_phase].
In the capture phase, events are propagated from the toplevel down
to the target widget, and gestures that are attached to containers
above the widget get a chance to interact with the event before it
reaches the target.
In the bubble phase, events are propagated up from the target widget
to the toplevel, and gestures that are attached to containers above
the widget get a chance to interact with events that have not been
handled yet.
## States of a sequence
Whenever input interaction happens, a single event may trigger a cascade
of `GtkGesture`s, both across the parents of the widget receiving the
event and in parallel within an individual widget. It is a responsibility
of the widgets using those gestures to set the state of touch sequences
accordingly in order to enable cooperation of gestures around the
`GdkEventSequence`s triggering those.
Within a widget, gestures can be grouped through [method@Gtk.Gesture.group].
Grouped gestures synchronize the state of sequences, so calling
[method@Gtk.Gesture.set_sequence_state] on one will effectively propagate
the state throughout the group.
By default, all sequences start out in the %GTK_EVENT_SEQUENCE_NONE state,
sequences in this state trigger the gesture event handler, but event
propagation will continue unstopped by gestures.
If a sequence enters into the %GTK_EVENT_SEQUENCE_DENIED state, the gesture
group will effectively ignore the sequence, letting events go unstopped
through the gesture, but the "slot" will still remain occupied while
the touch is active.
If a sequence enters in the %GTK_EVENT_SEQUENCE_CLAIMED state, the gesture
group will grab all interaction on the sequence, by:
- Setting the same sequence to %GTK_EVENT_SEQUENCE_DENIED on every other
gesture group within the widget, and every gesture on parent widgets
in the propagation chain.
- Emitting [signal@Gtk.Gesture::cancel] on every gesture in widgets
underneath in the propagation chain.
- Stopping event propagation after the gesture group handles the event.
Note: if a sequence is set early to %GTK_EVENT_SEQUENCE_CLAIMED on
%GDK_TOUCH_BEGIN/%GDK_BUTTON_PRESS (so those events are captured before
reaching the event widget, this implies %GTK_PHASE_CAPTURE), one similar
event will be emulated if the sequence changes to %GTK_EVENT_SEQUENCE_DENIED.
This way event coherence is preserved before event propagation is unstopped
again.
Sequence states can't be changed freely.
See [method@Gtk.Gesture.set_sequence_state] to know about the possible
lifetimes of a `GdkEventSequence`.
## Touchpad gestures
On the platforms that support it, `GtkGesture` will handle transparently
touchpad gesture events. The only precautions users of `GtkGesture` should
do to enable this support are:
- If the gesture has %GTK_PHASE_NONE, ensuring events of type
%GDK_TOUCHPAD_SWIPE and %GDK_TOUCHPAD_PINCH are handled by the `GtkGesture`</doc>
<method name="get_bounding_box" c:identifier="gtk_gesture_get_bounding_box">
<doc xml:space="preserve">If there are touch sequences being currently handled by @gesture,
returns %TRUE and fills in @rect with the bounding box containing
all active touches.
Otherwise, %FALSE will be returned.
Note: This function will yield unexpected results on touchpad
gestures. Since there is no correlation between physical and
pixel distances, these will look as if constrained in an
infinitely small area, @rect width and height will thus be 0
regardless of the number of touchpoints.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there are active touches, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">bounding box containing all active touches.</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_bounding_box_center" c:identifier="gtk_gesture_get_bounding_box_center">
<doc xml:space="preserve">If there are touch sequences being currently handled by @gesture,
returns %TRUE and fills in @x and @y with the center of the bounding
box containing all active touches.
Otherwise, %FALSE will be returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if no active touches are present, %TRUE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">X coordinate for the bounding box center</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Y coordinate for the bounding box center</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_device" c:identifier="gtk_gesture_get_device">
<doc xml:space="preserve">Returns the logical `GdkDevice` that is currently operating
on @gesture.
This returns %NULL if the gesture is not being interacted.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GdkDevice`</doc>
<type name="Gdk.Device" c:type="GdkDevice*"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_group" c:identifier="gtk_gesture_get_group">
<doc xml:space="preserve">Returns all gestures in the group of @gesture</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">The list
of `GtkGesture`s, free with g_list_free()</doc>
<type name="GLib.List" c:type="GList*">
<type name="Gesture"/>
</type>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_last_event" c:identifier="gtk_gesture_get_last_event">
<doc xml:space="preserve">Returns the last event that was processed for @sequence.
Note that the returned pointer is only valid as long as the
@sequence is still interpreted by the @gesture. If in doubt,
you should make a copy of the event.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The last event from @sequence</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEventSequence`</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</parameter>
</parameters>
</method>
<method name="get_last_updated_sequence" c:identifier="gtk_gesture_get_last_updated_sequence">
<doc xml:space="preserve">Returns the `GdkEventSequence` that was last updated on @gesture.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The last updated sequence</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_point" c:identifier="gtk_gesture_get_point">
<doc xml:space="preserve">If @sequence is currently being interpreted by @gesture,
returns %TRUE and fills in @x and @y with the last coordinates
stored for that event sequence.
The coordinates are always relative to the widget allocation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @sequence is currently interpreted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEventSequence`, or %NULL for pointer events</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for X axis of the sequence coordinates</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for Y axis of the sequence coordinates</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_sequence_state" c:identifier="gtk_gesture_get_sequence_state">
<doc xml:space="preserve">Returns the @sequence state, as seen by @gesture.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The sequence state in @gesture</doc>
<type name="EventSequenceState" c:type="GtkEventSequenceState"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="sequence" transfer-ownership="none">
<doc xml:space="preserve">a `GdkEventSequence`</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</parameter>
</parameters>
</method>
<method name="get_sequences" c:identifier="gtk_gesture_get_sequences">
<doc xml:space="preserve">Returns the list of `GdkEventSequences` currently being interpreted
by @gesture.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">A list
of `GdkEventSequence`, the list elements are owned by GTK and must
not be freed or modified, the list itself must be deleted
through g_list_free()</doc>
<type name="GLib.List" c:type="GList*">
<type name="Gdk.EventSequence"/>
</type>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="group" c:identifier="gtk_gesture_group">
<doc xml:space="preserve">Adds @gesture to the same group than @group_gesture.
Gestures are by default isolated in their own groups.
Both gestures must have been added to the same widget before
they can be grouped.
When gestures are grouped, the state of `GdkEventSequences`
is kept in sync for all of those, so calling
[method@Gtk.Gesture.set_sequence_state], on one will transfer
the same value to the others.
Groups also perform an "implicit grabbing" of sequences, if a
`GdkEventSequence` state is set to %GTK_EVENT_SEQUENCE_CLAIMED
on one group, every other gesture group attached to the same
`GtkWidget` will switch the state for that sequence to
%GTK_EVENT_SEQUENCE_DENIED.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="group_gesture" transfer-ownership="none">
<doc xml:space="preserve">`GtkGesture` to group @gesture with</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</parameter>
</parameters>
</method>
<method name="handles_sequence" c:identifier="gtk_gesture_handles_sequence">
<doc xml:space="preserve">Returns %TRUE if @gesture is currently handling events
corresponding to @sequence.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @gesture is handling @sequence, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkEventSequence`</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</parameter>
</parameters>
</method>
<method name="is_active" c:identifier="gtk_gesture_is_active">
<doc xml:space="preserve">Returns %TRUE if the gesture is currently active.
A gesture is active while there are touch sequences
interacting with it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if gesture is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_grouped_with" c:identifier="gtk_gesture_is_grouped_with">
<doc xml:space="preserve">Returns %TRUE if both gestures pertain to the same group.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the gestures are grouped</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">another `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</parameter>
</parameters>
</method>
<method name="is_recognized" c:identifier="gtk_gesture_is_recognized">
<doc xml:space="preserve">Returns %TRUE if the gesture is currently recognized.
A gesture is recognized if there are as many interacting
touch sequences as required by @gesture.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if gesture is recognized</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_sequence_state" c:identifier="gtk_gesture_set_sequence_state">
<doc xml:space="preserve">Sets the state of @sequence in @gesture.
Sequences start in state %GTK_EVENT_SEQUENCE_NONE, and whenever
they change state, they can never go back to that state. Likewise,
sequences in state %GTK_EVENT_SEQUENCE_DENIED cannot turn back to
a not denied state. With these rules, the lifetime of an event
sequence is constrained to the next four:
* None
* None &#x2192; Denied
* None &#x2192; Claimed
* None &#x2192; Claimed &#x2192; Denied
Note: Due to event handling ordering, it may be unsafe to set the
state on another gesture within a [signal@Gtk.Gesture::begin] signal
handler, as the callback might be executed before the other gesture
knows about the sequence. A safe way to perform this could be:
```c
static void
first_gesture_begin_cb (GtkGesture *first_gesture,
GdkEventSequence *sequence,
gpointer user_data)
{
gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
}
static void
second_gesture_begin_cb (GtkGesture *second_gesture,
GdkEventSequence *sequence,
gpointer user_data)
{
if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
}
```
If both gestures are in the same group, just set the state on
the gesture emitting the event, the sequence will be already
be initialized to the group's global state when the second
gesture processes the event.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @sequence is handled by @gesture,
and the state is changed successfully</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="sequence" transfer-ownership="none">
<doc xml:space="preserve">a `GdkEventSequence`</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the sequence state</doc>
<type name="EventSequenceState" c:type="GtkEventSequenceState"/>
</parameter>
</parameters>
</method>
<method name="set_state" c:identifier="gtk_gesture_set_state">
<doc xml:space="preserve">Sets the state of all sequences that @gesture is currently
interacting with.
See [method@Gtk.Gesture.set_sequence_state] for more details
on sequence states.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the state of at least one sequence
was changed successfully</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the sequence state</doc>
<type name="EventSequenceState" c:type="GtkEventSequenceState"/>
</parameter>
</parameters>
</method>
<method name="ungroup" c:identifier="gtk_gesture_ungroup">
<doc xml:space="preserve">Separates @gesture into an isolated group.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</instance-parameter>
</parameters>
</method>
<property name="n-points" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The number of touch points that trigger
recognition on this gesture.</doc>
<type name="guint" c:type="guint"/>
</property>
<glib:signal name="begin" when="last">
<doc xml:space="preserve">Emitted when the gesture is recognized.
This means the number of touch sequences matches
[property@Gtk.Gesture:n-points].
Note: These conditions may also happen when an extra touch
(eg. a third touch on a 2-touches gesture) is lifted, in that
situation @sequence won't pertain to the current set of active
touches, so don't rely on this being true.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkEventSequence` that made the gesture
to be recognized</doc>
<type name="Gdk.EventSequence"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="cancel" when="last">
<doc xml:space="preserve">Emitted whenever a sequence is cancelled.
This usually happens on active touches when
[method@Gtk.EventController.reset] is called on @gesture
(manually, due to grabs...), or the individual @sequence
was claimed by parent widgets' controllers (see
[method@Gtk.Gesture.set_sequence_state]).
@gesture must forget everything about @sequence as in
response to this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkEventSequence` that was cancelled</doc>
<type name="Gdk.EventSequence"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="end" when="last">
<doc xml:space="preserve">Emitted when @gesture either stopped recognizing the event
sequences as something to be handled, or the number of touch
sequences became higher or lower than [property@Gtk.Gesture:n-points].
Note: @sequence might not pertain to the group of sequences that
were previously triggering recognition on @gesture (ie. a just
pressed touch sequence that exceeds [property@Gtk.Gesture:n-points]).
This situation may be detected by checking through
[method@Gtk.Gesture.handles_sequence].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkEventSequence` that made gesture
recognition to finish</doc>
<type name="Gdk.EventSequence"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="sequence-state-changed" when="last">
<doc xml:space="preserve">Emitted whenever a sequence state changes.
See [method@Gtk.Gesture.set_sequence_state] to know
more about the expectable sequence lifetimes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkEventSequence` that was cancelled</doc>
<type name="Gdk.EventSequence"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new sequence state</doc>
<type name="EventSequenceState"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="update" when="last">
<doc xml:space="preserve">Emitted whenever an event is handled while the gesture is recognized.
@sequence is guaranteed to pertain to the set of active touches.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sequence" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkEventSequence` that was updated</doc>
<type name="Gdk.EventSequence"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureClass" c:type="GtkGestureClass" disguised="1" glib:is-gtype-struct-for="Gesture"/>
<class name="GestureClick" c:symbol-prefix="gesture_click" c:type="GtkGestureClick" parent="GestureSingle" glib:type-name="GtkGestureClick" glib:get-type="gtk_gesture_click_get_type" glib:type-struct="GestureClickClass">
<doc xml:space="preserve">`GtkGestureClick` is a `GtkGesture` implementation for clicks.
It is able to recognize multiple clicks on a nearby zone, which
can be listened for through the [signal@Gtk.GestureClick::pressed]
signal. Whenever time or distance between clicks exceed the GTK
defaults, [signal@Gtk.GestureClick::stopped] is emitted, and the
click counter is reset.</doc>
<constructor name="new" c:identifier="gtk_gesture_click_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes
single and multiple presses.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureClick`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<glib:signal name="pressed" when="last">
<doc xml:space="preserve">Emitted whenever a button or touch press happens.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="n_press" transfer-ownership="none">
<doc xml:space="preserve">how many touch/button presses happened with this one</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The X coordinate, in widget allocation coordinates</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The Y coordinate, in widget allocation coordinates</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="released" when="last">
<doc xml:space="preserve">Emitted when a button or touch is released.
@n_press will report the number of press that is paired to
this event, note that [signal@Gtk.GestureClick::stopped] may
have been emitted between the press and its release, @n_press
will only start over at the next press.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="n_press" transfer-ownership="none">
<doc xml:space="preserve">number of press that is paired with this release</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The X coordinate, in widget allocation coordinates</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The Y coordinate, in widget allocation coordinates</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="stopped" when="last">
<doc xml:space="preserve">Emitted whenever any time/distance threshold has been exceeded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="unpaired-release" when="last">
<doc xml:space="preserve">Emitted whenever the gesture receives a release
event that had no previous corresponding press.
Due to implicit grabs, this can only happen on situations
where input is grabbed elsewhere mid-press or the pressed
widget voluntarily relinquishes its implicit grab.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate of the event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate of the event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">Button being released</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="sequence" transfer-ownership="none">
<doc xml:space="preserve">Sequence being released</doc>
<type name="Gdk.EventSequence"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureClickClass" c:type="GtkGestureClickClass" disguised="1" glib:is-gtype-struct-for="GestureClick"/>
<class name="GestureDrag" c:symbol-prefix="gesture_drag" c:type="GtkGestureDrag" parent="GestureSingle" glib:type-name="GtkGestureDrag" glib:get-type="gtk_gesture_drag_get_type" glib:type-struct="GestureDragClass">
<doc xml:space="preserve">`GtkGestureDrag` is a `GtkGesture` implementation for drags.
The drag operation itself can be tracked throughout the
[signal@Gtk.GestureDrag::drag-begin],
[signal@Gtk.GestureDrag::drag-update] and
[signal@Gtk.GestureDrag::drag-end] signals, and the relevant
coordinates can be extracted through
[method@Gtk.GestureDrag.get_offset] and
[method@Gtk.GestureDrag.get_start_point].</doc>
<constructor name="new" c:identifier="gtk_gesture_drag_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes drags.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureDrag`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_offset" c:identifier="gtk_gesture_drag_get_offset">
<doc xml:space="preserve">Gets the offset from the start point.
If the @gesture is active, this function returns %TRUE and
fills in @x and @y with the coordinates of the current point,
as an offset to the starting drag point.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the gesture is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="GestureDrag" c:type="GtkGestureDrag*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">X offset for the current point</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">Y offset for the current point</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_start_point" c:identifier="gtk_gesture_drag_get_start_point">
<doc xml:space="preserve">Gets the point where the drag started.
If the @gesture is active, this function returns %TRUE
and fills in @x and @y with the drag start coordinates,
in surface-relative coordinates.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the gesture is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGesture`</doc>
<type name="GestureDrag" c:type="GtkGestureDrag*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">X coordinate for the drag start point</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">Y coordinate for the drag start point</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<glib:signal name="drag-begin" when="last">
<doc xml:space="preserve">Emitted whenever dragging starts.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="start_x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate, relative to the widget allocation</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="start_y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate, relative to the widget allocation</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-end" when="last">
<doc xml:space="preserve">Emitted whenever the dragging is finished.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="offset_x" transfer-ownership="none">
<doc xml:space="preserve">X offset, relative to the start point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="offset_y" transfer-ownership="none">
<doc xml:space="preserve">Y offset, relative to the start point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="drag-update" when="last">
<doc xml:space="preserve">Emitted whenever the dragging point moves.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="offset_x" transfer-ownership="none">
<doc xml:space="preserve">X offset, relative to the start point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="offset_y" transfer-ownership="none">
<doc xml:space="preserve">Y offset, relative to the start point</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureDragClass" c:type="GtkGestureDragClass" disguised="1" glib:is-gtype-struct-for="GestureDrag"/>
<class name="GestureLongPress" c:symbol-prefix="gesture_long_press" c:type="GtkGestureLongPress" parent="GestureSingle" glib:type-name="GtkGestureLongPress" glib:get-type="gtk_gesture_long_press_get_type" glib:type-struct="GestureLongPressClass">
<doc xml:space="preserve">`GtkGestureLongPress` is a `GtkGesture` for long presses.
This gesture is also known as &#x201C;Press and Hold&#x201D;.
When the timeout is exceeded, the gesture is triggering the
[signal@Gtk.GestureLongPress::pressed] signal.
If the touchpoint is lifted before the timeout passes, or if
it drifts too far of the initial press point, the
[signal@Gtk.GestureLongPress::cancelled] signal will be emitted.
How long the timeout is before the ::pressed signal gets emitted is
determined by the [property@Gtk.Settings:gtk-long-press-time] setting.
It can be modified by the [property@Gtk.GestureLongPress:delay-factor]
property.</doc>
<constructor name="new" c:identifier="gtk_gesture_long_press_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes long presses.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureLongPress`.</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_delay_factor" c:identifier="gtk_gesture_long_press_get_delay_factor" glib:get-property="delay-factor">
<attribute name="org.gtk.Method.get_property" value="delay-factor"/>
<doc xml:space="preserve">Returns the delay factor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the delay factor</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">A `GtkGestureLongPress`</doc>
<type name="GestureLongPress" c:type="GtkGestureLongPress*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_delay_factor" c:identifier="gtk_gesture_long_press_set_delay_factor" glib:set-property="delay-factor">
<attribute name="org.gtk.Method.set_property" value="delay-factor"/>
<doc xml:space="preserve">Applies the given delay factor.
The default long press time will be multiplied by this value.
Valid values are in the range [0.5..2.0].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">A `GtkGestureLongPress`</doc>
<type name="GestureLongPress" c:type="GtkGestureLongPress*"/>
</instance-parameter>
<parameter name="delay_factor" transfer-ownership="none">
<doc xml:space="preserve">The delay factor to apply</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<property name="delay-factor" writable="1" transfer-ownership="none" setter="set_delay_factor" getter="get_delay_factor">
<attribute name="org.gtk.Property.get" value="gtk_gesture_long_press_get_delay_factor"/>
<attribute name="org.gtk.Property.set" value="gtk_gesture_long_press_set_delay_factor"/>
<doc xml:space="preserve">Factor by which to modify the default timeout.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<glib:signal name="cancelled" when="last">
<doc xml:space="preserve">Emitted whenever a press moved too far, or was released
before [signal@Gtk.GestureLongPress::pressed] happened.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="pressed" when="last">
<doc xml:space="preserve">Emitted whenever a press goes unmoved/unreleased longer than
what the GTK defaults tell.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate where the press happened, relative to the widget allocation</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate where the press happened, relative to the widget allocation</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureLongPressClass" c:type="GtkGestureLongPressClass" disguised="1" glib:is-gtype-struct-for="GestureLongPress"/>
<class name="GesturePan" c:symbol-prefix="gesture_pan" c:type="GtkGesturePan" parent="GestureDrag" glib:type-name="GtkGesturePan" glib:get-type="gtk_gesture_pan_get_type" glib:type-struct="GesturePanClass">
<doc xml:space="preserve">`GtkGesturePan` is a `GtkGesture` for pan gestures.
These are drags that are locked to happen along one axis. The axis
that a `GtkGesturePan` handles is defined at construct time, and
can be changed through [method@Gtk.GesturePan.set_orientation].
When the gesture starts to be recognized, `GtkGesturePan` will
attempt to determine as early as possible whether the sequence
is moving in the expected direction, and denying the sequence if
this does not happen.
Once a panning gesture along the expected axis is recognized,
the [signal@Gtk.GesturePan::pan] signal will be emitted as input
events are received, containing the offset in the given axis.</doc>
<constructor name="new" c:identifier="gtk_gesture_pan_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes pan gestures.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGesturePan`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">expected orientation</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</constructor>
<method name="get_orientation" c:identifier="gtk_gesture_pan_get_orientation" glib:get-property="orientation">
<attribute name="org.gtk.Method.get_property" value="orientation"/>
<doc xml:space="preserve">Returns the orientation of the pan gestures that this @gesture expects.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the expected orientation for pan gestures</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">A `GtkGesturePan`</doc>
<type name="GesturePan" c:type="GtkGesturePan*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_orientation" c:identifier="gtk_gesture_pan_set_orientation" glib:set-property="orientation">
<attribute name="org.gtk.Method.set_property" value="orientation"/>
<doc xml:space="preserve">Sets the orientation to be expected on pan gestures.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">A `GtkGesturePan`</doc>
<type name="GesturePan" c:type="GtkGesturePan*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">expected orientation</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<property name="orientation" writable="1" transfer-ownership="none" setter="set_orientation" getter="get_orientation">
<attribute name="org.gtk.Property.get" value="gtk_gesture_pan_get_orientation"/>
<attribute name="org.gtk.Property.set" value="gtk_gesture_pan_set_orientation"/>
<doc xml:space="preserve">The expected orientation of pan gestures.</doc>
<type name="Orientation"/>
</property>
<glib:signal name="pan" when="last">
<doc xml:space="preserve">Emitted once a panning gesture along the expected axis is detected.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">current direction of the pan gesture</doc>
<type name="PanDirection"/>
</parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">Offset along the gesture orientation</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GesturePanClass" c:type="GtkGesturePanClass" disguised="1" glib:is-gtype-struct-for="GesturePan"/>
<class name="GestureRotate" c:symbol-prefix="gesture_rotate" c:type="GtkGestureRotate" parent="Gesture" glib:type-name="GtkGestureRotate" glib:get-type="gtk_gesture_rotate_get_type" glib:type-struct="GestureRotateClass">
<doc xml:space="preserve">`GtkGestureRotate` is a `GtkGesture` for 2-finger rotations.
Whenever the angle between both handled sequences changes, the
[signal@Gtk.GestureRotate::angle-changed] signal is emitted.</doc>
<constructor name="new" c:identifier="gtk_gesture_rotate_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes 2-touch
rotation gestures.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureRotate`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_angle_delta" c:identifier="gtk_gesture_rotate_get_angle_delta">
<doc xml:space="preserve">Gets the angle delta in radians.
If @gesture is active, this function returns the angle difference
in radians since the gesture was first recognized. If @gesture is
not active, 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the angle delta in radians</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureRotate`</doc>
<type name="GestureRotate" c:type="GtkGestureRotate*"/>
</instance-parameter>
</parameters>
</method>
<glib:signal name="angle-changed" when="first">
<doc xml:space="preserve">Emitted when the angle between both tracked points changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="angle" transfer-ownership="none">
<doc xml:space="preserve">Current angle in radians</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="angle_delta" transfer-ownership="none">
<doc xml:space="preserve">Difference with the starting angle, in radians</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureRotateClass" c:type="GtkGestureRotateClass" disguised="1" glib:is-gtype-struct-for="GestureRotate"/>
<class name="GestureSingle" c:symbol-prefix="gesture_single" c:type="GtkGestureSingle" parent="Gesture" glib:type-name="GtkGestureSingle" glib:get-type="gtk_gesture_single_get_type" glib:type-struct="GestureSingleClass">
<doc xml:space="preserve">`GtkGestureSingle` is a `GtkGestures` subclass optimized for singe-touch
and mouse gestures.
Under interaction, these gestures stick to the first interacting sequence,
which is accessible through [method@Gtk.GestureSingle.get_current_sequence]
while the gesture is being interacted with.
By default gestures react to both %GDK_BUTTON_PRIMARY and touch events.
[method@Gtk.GestureSingle.set_touch_only] can be used to change the
touch behavior. Callers may also specify a different mouse button number
to interact with through [method@Gtk.GestureSingle.set_button], or react
to any mouse button by setting it to 0. While the gesture is active, the
button being currently pressed can be known through
[method@Gtk.GestureSingle.get_current_button].</doc>
<method name="get_button" c:identifier="gtk_gesture_single_get_button" glib:get-property="button">
<attribute name="org.gtk.Method.get_property" value="button"/>
<doc xml:space="preserve">Returns the button number @gesture listens for.
If this is 0, the gesture reacts to any button press.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The button number, or 0 for any button</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_button" c:identifier="gtk_gesture_single_get_current_button">
<doc xml:space="preserve">Returns the button number currently interacting
with @gesture, or 0 if there is none.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current button number</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_sequence" c:identifier="gtk_gesture_single_get_current_sequence">
<doc xml:space="preserve">Returns the event sequence currently interacting with @gesture.
This is only meaningful if [method@Gtk.Gesture.is_active]
returns %TRUE.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the current sequence</doc>
<type name="Gdk.EventSequence" c:type="GdkEventSequence*"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_exclusive" c:identifier="gtk_gesture_single_get_exclusive" glib:get-property="exclusive">
<attribute name="org.gtk.Method.get_property" value="exclusive"/>
<doc xml:space="preserve">Gets whether a gesture is exclusive.
For more information, see [method@Gtk.GestureSingle.set_exclusive].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the gesture is exclusive</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_touch_only" c:identifier="gtk_gesture_single_get_touch_only" glib:get-property="touch-only">
<attribute name="org.gtk.Method.get_property" value="touch-only"/>
<doc xml:space="preserve">Returns %TRUE if the gesture is only triggered by touch events.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the gesture only handles touch events</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_button" c:identifier="gtk_gesture_single_set_button" glib:set-property="button">
<attribute name="org.gtk.Method.set_property" value="button"/>
<doc xml:space="preserve">Sets the button number @gesture listens to.
If non-0, every button press from a different button
number will be ignored. Touch events implicitly match
with button 1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
<parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">button number to listen to, or 0 for any button</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_exclusive" c:identifier="gtk_gesture_single_set_exclusive" glib:set-property="exclusive">
<attribute name="org.gtk.Method.set_property" value="exclusive"/>
<doc xml:space="preserve">Sets whether @gesture is exclusive.
An exclusive gesture will only handle pointer and "pointer emulated"
touch events, so at any given time, there is only one sequence able
to interact with those.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
<parameter name="exclusive" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make @gesture exclusive</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_touch_only" c:identifier="gtk_gesture_single_set_touch_only" glib:set-property="touch-only">
<attribute name="org.gtk.Method.set_property" value="touch-only"/>
<doc xml:space="preserve">Sets whether to handle only touch events.
If @touch_only is %TRUE, @gesture will only handle events of type
%GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE or %GDK_TOUCH_END. If %FALSE,
mouse events will be handled too.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSingle`</doc>
<type name="GestureSingle" c:type="GtkGestureSingle*"/>
</instance-parameter>
<parameter name="touch_only" transfer-ownership="none">
<doc xml:space="preserve">whether @gesture handles only touch events</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="button" writable="1" transfer-ownership="none" setter="set_button" getter="get_button">
<attribute name="org.gtk.Property.get" value="gtk_gesture_single_get_button"/>
<attribute name="org.gtk.Property.set" value="gtk_gesture_single_set_button"/>
<doc xml:space="preserve">Mouse button number to listen to, or 0 to listen for any button.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="exclusive" writable="1" transfer-ownership="none" setter="set_exclusive" getter="get_exclusive">
<attribute name="org.gtk.Property.get" value="gtk_gesture_single_get_exclusive"/>
<attribute name="org.gtk.Property.set" value="gtk_gesture_single_set_exclusive"/>
<doc xml:space="preserve">Whether the gesture is exclusive.
Exclusive gestures only listen to pointer and pointer emulated events.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="touch-only" writable="1" transfer-ownership="none" setter="set_touch_only" getter="get_touch_only">
<attribute name="org.gtk.Property.get" value="gtk_gesture_single_get_touch_only"/>
<attribute name="org.gtk.Property.set" value="gtk_gesture_single_set_touch_only"/>
<doc xml:space="preserve">Whether the gesture handles only touch events.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="GestureSingleClass" c:type="GtkGestureSingleClass" disguised="1" glib:is-gtype-struct-for="GestureSingle"/>
<class name="GestureStylus" c:symbol-prefix="gesture_stylus" c:type="GtkGestureStylus" parent="GestureSingle" glib:type-name="GtkGestureStylus" glib:get-type="gtk_gesture_stylus_get_type" glib:type-struct="GestureStylusClass">
<doc xml:space="preserve">`GtkGestureStylus` is a `GtkGesture` specific to stylus input.
The provided signals just relay the basic information of the
stylus events.</doc>
<constructor name="new" c:identifier="gtk_gesture_stylus_new">
<doc xml:space="preserve">Creates a new `GtkGestureStylus`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created stylus gesture</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_axes" c:identifier="gtk_gesture_stylus_get_axes">
<doc xml:space="preserve">Returns the current values for the requested @axes.
This function must be called from the handler of one of the
[signal@Gtk.GestureStylus::down], [signal@Gtk.GestureStylus::motion],
[signal@Gtk.GestureStylus::up] or [signal@Gtk.GestureStylus::proximity]
signals.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a current value for the axes</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureStylus`</doc>
<type name="GestureStylus" c:type="GtkGestureStylus*"/>
</instance-parameter>
<parameter name="axes" transfer-ownership="none">
<doc xml:space="preserve">array of requested axes, terminated with %GDK_AXIS_IGNORE</doc>
<array zero-terminated="0" c:type="GdkAxisUse*">
<type name="Gdk.AxisUse" c:type="GdkAxisUse"/>
</array>
</parameter>
<parameter name="values" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the axis values</doc>
<array zero-terminated="0" c:type="double**">
<type name="gdouble" c:type="double*"/>
</array>
</parameter>
</parameters>
</method>
<method name="get_axis" c:identifier="gtk_gesture_stylus_get_axis">
<doc xml:space="preserve">Returns the current value for the requested @axis.
This function must be called from the handler of one of the
[signal@Gtk.GestureStylus::down], [signal@Gtk.GestureStylus::motion],
[signal@Gtk.GestureStylus::up] or [signal@Gtk.GestureStylus::proximity]
signals.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a current value for the axis</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureStylus`</doc>
<type name="GestureStylus" c:type="GtkGestureStylus*"/>
</instance-parameter>
<parameter name="axis" transfer-ownership="none">
<doc xml:space="preserve">requested device axis</doc>
<type name="Gdk.AxisUse" c:type="GdkAxisUse"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the axis value</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_backlog" c:identifier="gtk_gesture_stylus_get_backlog">
<doc xml:space="preserve">Returns the accumulated backlog of tracking information.
By default, GTK will limit rate of input events. On stylus input
where accuracy of strokes is paramount, this function returns the
accumulated coordinate/timing state before the emission of the
current [Gtk.GestureStylus::motion] signal.
This function may only be called within a [signal@Gtk.GestureStylus::motion]
signal handler, the state given in this signal and obtainable through
[method@Gtk.GestureStylus.get_axis] express the latest (most up-to-date)
state in motion history.
The @backlog is provided in chronological order.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is a backlog to unfold in the current state.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureStylus`</doc>
<type name="GestureStylus" c:type="GtkGestureStylus*"/>
</instance-parameter>
<parameter name="backlog" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">coordinates and times for the backlog events</doc>
<array length="1" zero-terminated="0" c:type="GdkTimeCoord**">
<type name="Gdk.TimeCoord" c:type="GdkTimeCoord*"/>
</array>
</parameter>
<parameter name="n_elems" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the number of elements</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
<method name="get_device_tool" c:identifier="gtk_gesture_stylus_get_device_tool">
<doc xml:space="preserve">Returns the `GdkDeviceTool` currently driving input through this gesture.
This function must be called from the handler of one of the
[signal@Gtk.GestureStylus::down], [signal@Gtk.GestureStylus::motion],
[signal@Gtk.GestureStylus::up] or [signal@Gtk.GestureStylus::proximity]
signals.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current stylus tool</doc>
<type name="Gdk.DeviceTool" c:type="GdkDeviceTool*"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureStylus`</doc>
<type name="GestureStylus" c:type="GtkGestureStylus*"/>
</instance-parameter>
</parameters>
</method>
<glib:signal name="down" when="last">
<doc xml:space="preserve">Emitted when the stylus touches the device.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="motion" when="last">
<doc xml:space="preserve">Emitted when the stylus moves while touching the device.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="proximity" when="last">
<doc xml:space="preserve">Emitted when the stylus is in proximity of the device.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="up" when="last">
<doc xml:space="preserve">Emitted when the stylus no longer touches the device.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the X coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the Y coordinate of the stylus event</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureStylusClass" c:type="GtkGestureStylusClass" disguised="1" glib:is-gtype-struct-for="GestureStylus"/>
<class name="GestureSwipe" c:symbol-prefix="gesture_swipe" c:type="GtkGestureSwipe" parent="GestureSingle" glib:type-name="GtkGestureSwipe" glib:get-type="gtk_gesture_swipe_get_type" glib:type-struct="GestureSwipeClass">
<doc xml:space="preserve">`GtkGestureSwipe` is a `GtkGesture` for swipe gestures.
After a press/move/.../move/release sequence happens, the
[signal@Gtk.GestureSwipe::swipe] signal will be emitted,
providing the velocity and directionality of the sequence
at the time it was lifted.
If the velocity is desired in intermediate points,
[method@Gtk.GestureSwipe.get_velocity] can be called in a
[signal@Gtk.Gesture::update] handler.
All velocities are reported in pixels/sec units.</doc>
<constructor name="new" c:identifier="gtk_gesture_swipe_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes swipes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureSwipe`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_velocity" c:identifier="gtk_gesture_swipe_get_velocity">
<doc xml:space="preserve">Gets the current velocity.
If the gesture is recognized, this function returns %TRUE and fills
in @velocity_x and @velocity_y with the recorded velocity, as per the
last events processed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether velocity could be calculated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureSwipe`</doc>
<type name="GestureSwipe" c:type="GtkGestureSwipe*"/>
</instance-parameter>
<parameter name="velocity_x" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return value for the velocity in the X axis, in pixels/sec</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="velocity_y" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return value for the velocity in the Y axis, in pixels/sec</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<glib:signal name="swipe" when="last">
<doc xml:space="preserve">Emitted when the recognized gesture is finished.
Velocity and direction are a product of previously recorded events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="velocity_x" transfer-ownership="none">
<doc xml:space="preserve">velocity in the X axis, in pixels/sec</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="velocity_y" transfer-ownership="none">
<doc xml:space="preserve">velocity in the Y axis, in pixels/sec</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureSwipeClass" c:type="GtkGestureSwipeClass" disguised="1" glib:is-gtype-struct-for="GestureSwipe"/>
<class name="GestureZoom" c:symbol-prefix="gesture_zoom" c:type="GtkGestureZoom" parent="Gesture" glib:type-name="GtkGestureZoom" glib:get-type="gtk_gesture_zoom_get_type" glib:type-struct="GestureZoomClass">
<doc xml:space="preserve">`GtkGestureZoom` is a `GtkGesture` for 2-finger pinch/zoom gestures.
Whenever the distance between both tracked sequences changes, the
[signal@Gtk.GestureZoom::scale-changed] signal is emitted to report
the scale factor.</doc>
<constructor name="new" c:identifier="gtk_gesture_zoom_new">
<doc xml:space="preserve">Returns a newly created `GtkGesture` that recognizes
pinch/zoom gestures.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkGestureZoom`</doc>
<type name="Gesture" c:type="GtkGesture*"/>
</return-value>
</constructor>
<method name="get_scale_delta" c:identifier="gtk_gesture_zoom_get_scale_delta">
<doc xml:space="preserve">Gets the scale delta.
If @gesture is active, this function returns the zooming
difference since the gesture was recognized (hence the
starting point is considered 1:1). If @gesture is not
active, 1 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scale delta</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="gesture" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGestureZoom`</doc>
<type name="GestureZoom" c:type="GtkGestureZoom*"/>
</instance-parameter>
</parameters>
</method>
<glib:signal name="scale-changed" when="first">
<doc xml:space="preserve">Emitted whenever the distance between both tracked sequences changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">Scale delta, taking the initial state as 1:1</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GestureZoomClass" c:type="GtkGestureZoomClass" disguised="1" glib:is-gtype-struct-for="GestureZoom"/>
<class name="Grid" c:symbol-prefix="grid" c:type="GtkGrid" parent="Widget" glib:type-name="GtkGrid" glib:get-type="gtk_grid_get_type" glib:type-struct="GridClass">
<doc xml:space="preserve">`GtkGrid` is a container which arranges its child widgets in
rows and columns.
![An example GtkGrid](grid.png)
It supports arbitrary positions and horizontal/vertical spans.
Children are added using [method@Gtk.Grid.attach]. They can span multiple
rows or columns. It is also possible to add a child next to an existing
child, using [method@Gtk.Grid.attach_next_to]. To remove a child from the
grid, use [method@Gtk.Grid.remove].
The behaviour of `GtkGrid` when several children occupy the same grid
cell is undefined.
# GtkGrid as GtkBuildable
Every child in a `GtkGrid` has access to a custom [iface@Gtk.Buildable]
element, called `&lt;layout&gt;`. It can by used to specify a position in the
grid and optionally spans. All properties that can be used in the `&lt;layout&gt;`
element are implemented by [class@Gtk.GridLayoutChild].
It is implemented by `GtkWidget` using [class@Gtk.LayoutManager].
To showcase it, here is a simple example:
```xml
&lt;object class="GtkGrid" id="my_grid"&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="button1"&gt;
&lt;property name="label"&gt;Button 1&lt;/property&gt;
&lt;layout&gt;
&lt;property name="column"&gt;0&lt;/property&gt;
&lt;property name="row"&gt;0&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="button2"&gt;
&lt;property name="label"&gt;Button 2&lt;/property&gt;
&lt;layout&gt;
&lt;property name="column"&gt;1&lt;/property&gt;
&lt;property name="row"&gt;0&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="button3"&gt;
&lt;property name="label"&gt;Button 3&lt;/property&gt;
&lt;layout&gt;
&lt;property name="column"&gt;2&lt;/property&gt;
&lt;property name="row"&gt;0&lt;/property&gt;
&lt;property name="row-span"&gt;2&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="button4"&gt;
&lt;property name="label"&gt;Button 4&lt;/property&gt;
&lt;layout&gt;
&lt;property name="column"&gt;0&lt;/property&gt;
&lt;property name="row"&gt;1&lt;/property&gt;
&lt;property name="column-span"&gt;2&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
It organizes the first two buttons side-by-side in one cell each.
The third button is in the last column but spans across two rows.
This is defined by the `row-span` property. The last button is
located in the second row and spans across two columns, which is
defined by the `column-span` property.
# CSS nodes
`GtkGrid` uses a single CSS node with name `grid`.
# Accessibility
`GtkGrid` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_grid_new">
<doc xml:space="preserve">Creates a new grid widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkGrid`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="attach" c:identifier="gtk_grid_attach">
<doc xml:space="preserve">Adds a widget to the grid.
The position of @child is determined by @column and @row.
The number of &#x201C;cells&#x201D; that @child will occupy is determined
by @width and @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column number to attach the left side of @child to</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row number to attach the top side of @child to</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the number of columns that @child will span</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the number of rows that @child will span</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="attach_next_to" c:identifier="gtk_grid_attach_next_to">
<doc xml:space="preserve">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]`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child of @grid that @child will be placed
next to, or %NULL to place @child at the beginning or end</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="side" transfer-ownership="none">
<doc xml:space="preserve">the side of @sibling that @child is positioned next to</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the number of columns that @child will span</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the number of rows that @child will span</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_baseline_row" c:identifier="gtk_grid_get_baseline_row" glib:get-property="baseline-row">
<attribute name="org.gtk.Method.get_property" value="baseline-row"/>
<doc xml:space="preserve">Returns which row defines the global baseline of @grid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the row index defining the global baseline</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_at" c:identifier="gtk_grid_get_child_at">
<doc xml:space="preserve">Gets the child of @grid whose area covers the grid
cell at @column, @row.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child at the given position</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the left edge of the cell</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the top edge of the cell</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_column_homogeneous" c:identifier="gtk_grid_get_column_homogeneous" glib:get-property="column-homogeneous">
<attribute name="org.gtk.Method.get_property" value="column-homogeneous"/>
<doc xml:space="preserve">Returns whether all columns of @grid have the same width.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether all columns of @grid have the same width.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_column_spacing" c:identifier="gtk_grid_get_column_spacing" glib:get-property="column-spacing">
<attribute name="org.gtk.Method.get_property" value="column-spacing"/>
<doc xml:space="preserve">Returns the amount of space between the columns of @grid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the column spacing of @grid</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_baseline_position" c:identifier="gtk_grid_get_row_baseline_position">
<doc xml:space="preserve">Returns the baseline position of @row.
See [method@Gtk.Grid.set_row_baseline_position].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline position of @row</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a row index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_row_homogeneous" c:identifier="gtk_grid_get_row_homogeneous" glib:get-property="row-homogeneous">
<attribute name="org.gtk.Method.get_property" value="row-homogeneous"/>
<doc xml:space="preserve">Returns whether all rows of @grid have the same height.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether all rows of @grid have the same height.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_spacing" c:identifier="gtk_grid_get_row_spacing" glib:get-property="row-spacing">
<attribute name="org.gtk.Method.get_property" value="row-spacing"/>
<doc xml:space="preserve">Returns the amount of space between the rows of @grid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the row spacing of @grid</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_column" c:identifier="gtk_grid_insert_column">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to insert the column at</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_next_to" c:identifier="gtk_grid_insert_next_to">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="sibling" transfer-ownership="none">
<doc xml:space="preserve">the child of @grid that the new row or column will be
placed next to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="side" transfer-ownership="none">
<doc xml:space="preserve">the side of @sibling that @child is positioned next to</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
</parameters>
</method>
<method name="insert_row" c:identifier="gtk_grid_insert_row">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to insert the row at</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="query_child" c:identifier="gtk_grid_query_child">
<doc xml:space="preserve">Queries the attach points and spans of @child inside the given `GtkGrid`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` child of @grid</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="column" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the column used to attach the left side of @child</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="row" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the row used to attach the top side of @child</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the number of columns @child spans</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the number of rows @child spans</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_grid_remove">
<doc xml:space="preserve">Removes a child from @grid.
The child must have been added with
[method@Gtk.Grid.attach] or [method@Gtk.Grid.attach_next_to].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child widget to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove_column" c:identifier="gtk_grid_remove_column">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the column to remove</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="remove_row" c:identifier="gtk_grid_remove_row">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the row to remove</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_baseline_row" c:identifier="gtk_grid_set_baseline_row" glib:set-property="baseline-row">
<attribute name="org.gtk.Method.set_property" value="baseline-row"/>
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_column_homogeneous" c:identifier="gtk_grid_set_column_homogeneous" glib:set-property="column-homogeneous">
<attribute name="org.gtk.Method.set_property" value="column-homogeneous"/>
<doc xml:space="preserve">Sets whether all columns of @grid will have the same width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make columns homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_column_spacing" c:identifier="gtk_grid_set_column_spacing" glib:set-property="column-spacing">
<attribute name="org.gtk.Method.set_property" value="column-spacing"/>
<doc xml:space="preserve">Sets the amount of space between columns of @grid.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the amount of space to insert between columns</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_row_baseline_position" c:identifier="gtk_grid_set_row_baseline_position">
<doc xml:space="preserve">Sets how the baseline should be positioned on @row of the
grid, in case that row is assigned more space than is requested.
The default baseline position is %GTK_BASELINE_POSITION_CENTER.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a row index</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBaselinePosition`</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_row_homogeneous" c:identifier="gtk_grid_set_row_homogeneous" glib:set-property="row-homogeneous">
<attribute name="org.gtk.Method.set_property" value="row-homogeneous"/>
<doc xml:space="preserve">Sets whether all rows of @grid will have the same height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make rows homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_row_spacing" c:identifier="gtk_grid_set_row_spacing" glib:set-property="row-spacing">
<attribute name="org.gtk.Method.set_property" value="row-spacing"/>
<doc xml:space="preserve">Sets the amount of space between rows of @grid.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGrid`</doc>
<type name="Grid" c:type="GtkGrid*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the amount of space to insert between rows</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="baseline-row" writable="1" transfer-ownership="none" setter="set_baseline_row" getter="get_baseline_row">
<attribute name="org.gtk.Property.get" value="gtk_grid_get_baseline_row"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_set_baseline_row"/>
<doc xml:space="preserve">The row to align to the baseline when valign is %GTK_ALIGN_BASELINE.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="column-homogeneous" writable="1" transfer-ownership="none" setter="set_column_homogeneous" getter="get_column_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_grid_get_column_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_set_column_homogeneous"/>
<doc xml:space="preserve">If %TRUE, the columns are all the same width.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="column-spacing" writable="1" transfer-ownership="none" setter="set_column_spacing" getter="get_column_spacing">
<attribute name="org.gtk.Property.get" value="gtk_grid_get_column_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_set_column_spacing"/>
<doc xml:space="preserve">The amount of space between two consecutive columns.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="row-homogeneous" writable="1" transfer-ownership="none" setter="set_row_homogeneous" getter="get_row_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_grid_get_row_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_set_row_homogeneous"/>
<doc xml:space="preserve">If %TRUE, the rows are all the same height.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="row-spacing" writable="1" transfer-ownership="none" setter="set_row_spacing" getter="get_row_spacing">
<attribute name="org.gtk.Property.get" value="gtk_grid_get_row_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_set_row_spacing"/>
<doc xml:space="preserve">The amount of space between two consecutive rows.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
</class>
<record name="GridClass" c:type="GtkGridClass" glib:is-gtype-struct-for="Grid">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="GridLayout" c:symbol-prefix="grid_layout" c:type="GtkGridLayout" parent="LayoutManager" glib:type-name="GtkGridLayout" glib:get-type="gtk_grid_layout_get_type" glib:type-struct="GridLayoutClass">
<doc xml:space="preserve">`GtkGridLayout` is a layout manager which arranges child widgets in
rows and columns.
Children have an "attach point" defined by the horizontal and vertical
index of the cell they occupy; children can span multiple rows or columns.
The layout properties for setting the attach points and spans are set
using the [class@Gtk.GridLayoutChild] associated to each child widget.
The behaviour of `GtkGridLayout` when several children occupy the same
grid cell is undefined.
`GtkGridLayout` can be used like a `GtkBoxLayout` if all children are
attached to the same row or column; however, if you only ever need a
single row or column, you should consider using `GtkBoxLayout`.</doc>
<constructor name="new" c:identifier="gtk_grid_layout_new">
<doc xml:space="preserve">Creates a new `GtkGridLayout`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkGridLayout`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
<method name="get_baseline_row" c:identifier="gtk_grid_layout_get_baseline_row" glib:get-property="baseline-row">
<attribute name="org.gtk.Method.get_property" value="baseline-row"/>
<doc xml:space="preserve">Retrieves the row set with gtk_grid_layout_set_baseline_row().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the global baseline row</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_column_homogeneous" c:identifier="gtk_grid_layout_get_column_homogeneous" glib:get-property="column-homogeneous">
<attribute name="org.gtk.Method.get_property" value="column-homogeneous"/>
<doc xml:space="preserve">Checks whether all columns of @grid should have the same width.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the columns are homogeneous, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_column_spacing" c:identifier="gtk_grid_layout_get_column_spacing" glib:get-property="column-spacing">
<attribute name="org.gtk.Method.get_property" value="column-spacing"/>
<doc xml:space="preserve">Retrieves the spacing set with gtk_grid_layout_set_column_spacing().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the spacing between consecutive columns</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_baseline_position" c:identifier="gtk_grid_layout_get_row_baseline_position">
<doc xml:space="preserve">Returns the baseline position of @row.
If no value has been set with
[method@Gtk.GridLayout.set_row_baseline_position],
the default value of %GTK_BASELINE_POSITION_CENTER
is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline position of @row</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a row index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_row_homogeneous" c:identifier="gtk_grid_layout_get_row_homogeneous" glib:get-property="row-homogeneous">
<attribute name="org.gtk.Method.get_property" value="row-homogeneous"/>
<doc xml:space="preserve">Checks whether all rows of @grid should have the same height.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the rows are homogeneous, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_spacing" c:identifier="gtk_grid_layout_get_row_spacing" glib:get-property="row-spacing">
<attribute name="org.gtk.Method.get_property" value="row-spacing"/>
<doc xml:space="preserve">Retrieves the spacing set with gtk_grid_layout_set_row_spacing().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the spacing between consecutive rows</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_baseline_row" c:identifier="gtk_grid_layout_set_baseline_row" glib:set-property="baseline-row">
<attribute name="org.gtk.Method.set_property" value="baseline-row"/>
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_column_homogeneous" c:identifier="gtk_grid_layout_set_column_homogeneous" glib:set-property="column-homogeneous">
<attribute name="org.gtk.Method.set_property" value="column-homogeneous"/>
<doc xml:space="preserve">Sets whether all columns of @grid should have the same width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make columns homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_column_spacing" c:identifier="gtk_grid_layout_set_column_spacing" glib:set-property="column-spacing">
<attribute name="org.gtk.Method.set_property" value="column-spacing"/>
<doc xml:space="preserve">Sets the amount of space to insert between consecutive columns.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the amount of space between columns, in pixels</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_row_baseline_position" c:identifier="gtk_grid_layout_set_row_baseline_position">
<doc xml:space="preserve">Sets how the baseline should be positioned on @row of the
grid, in case that row is assigned more space than is requested.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a row index</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBaselinePosition`</doc>
<type name="BaselinePosition" c:type="GtkBaselinePosition"/>
</parameter>
</parameters>
</method>
<method name="set_row_homogeneous" c:identifier="gtk_grid_layout_set_row_homogeneous" glib:set-property="row-homogeneous">
<attribute name="org.gtk.Method.set_property" value="row-homogeneous"/>
<doc xml:space="preserve">Sets whether all rows of @grid should have the same height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="homogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make rows homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_row_spacing" c:identifier="gtk_grid_layout_set_row_spacing" glib:set-property="row-spacing">
<attribute name="org.gtk.Method.set_property" value="row-spacing"/>
<doc xml:space="preserve">Sets the amount of space to insert between consecutive rows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="grid" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayout`</doc>
<type name="GridLayout" c:type="GtkGridLayout*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the amount of space between rows, in pixels</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="baseline-row" writable="1" transfer-ownership="none" setter="set_baseline_row" getter="get_baseline_row">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_get_baseline_row"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_set_baseline_row"/>
<doc xml:space="preserve">The row to align to the baseline, when `GtkWidget:valign` is set
to %GTK_ALIGN_BASELINE.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="column-homogeneous" writable="1" transfer-ownership="none" setter="set_column_homogeneous" getter="get_column_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_get_column_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_set_column_homogeneous"/>
<doc xml:space="preserve">Whether all the columns in the grid have the same width.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="column-spacing" writable="1" transfer-ownership="none" setter="set_column_spacing" getter="get_column_spacing">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_get_column_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_set_column_spacing"/>
<doc xml:space="preserve">The amount of space between to consecutive columns.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="row-homogeneous" writable="1" transfer-ownership="none" setter="set_row_homogeneous" getter="get_row_homogeneous">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_get_row_homogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_set_row_homogeneous"/>
<doc xml:space="preserve">Whether all the rows in the grid have the same height.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="row-spacing" writable="1" transfer-ownership="none" setter="set_row_spacing" getter="get_row_spacing">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_get_row_spacing"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_set_row_spacing"/>
<doc xml:space="preserve">The amount of space between to consecutive rows.</doc>
<type name="gint" c:type="gint"/>
</property>
</class>
<class name="GridLayoutChild" c:symbol-prefix="grid_layout_child" c:type="GtkGridLayoutChild" parent="LayoutChild" glib:type-name="GtkGridLayoutChild" glib:get-type="gtk_grid_layout_child_get_type" glib:type-struct="GridLayoutChildClass">
<doc xml:space="preserve">`GtkLayoutChild` subclass for children in a `GtkGridLayout`.</doc>
<method name="get_column" c:identifier="gtk_grid_layout_child_get_column" glib:get-property="column">
<attribute name="org.gtk.Method.get_property" value="column"/>
<doc xml:space="preserve">Retrieves the column number to which @child attaches its left side.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the column number</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_column_span" c:identifier="gtk_grid_layout_child_get_column_span" glib:get-property="column-span">
<attribute name="org.gtk.Method.get_property" value="column-span"/>
<doc xml:space="preserve">Retrieves the number of columns that @child spans to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of columns</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row" c:identifier="gtk_grid_layout_child_get_row" glib:get-property="row">
<attribute name="org.gtk.Method.get_property" value="row"/>
<doc xml:space="preserve">Retrieves the row number to which @child attaches its top side.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the row number</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_span" c:identifier="gtk_grid_layout_child_get_row_span" glib:get-property="row-span">
<attribute name="org.gtk.Method.get_property" value="row-span"/>
<doc xml:space="preserve">Retrieves the number of rows that @child spans to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of row</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_column" c:identifier="gtk_grid_layout_child_set_column" glib:set-property="column">
<attribute name="org.gtk.Method.set_property" value="column"/>
<doc xml:space="preserve">Sets the column number to attach the left side of @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the attach point for @child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_column_span" c:identifier="gtk_grid_layout_child_set_column_span" glib:set-property="column-span">
<attribute name="org.gtk.Method.set_property" value="column-span"/>
<doc xml:space="preserve">Sets the number of columns @child spans to.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
<parameter name="span" transfer-ownership="none">
<doc xml:space="preserve">the span of @child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_row" c:identifier="gtk_grid_layout_child_set_row" glib:set-property="row">
<attribute name="org.gtk.Method.set_property" value="row"/>
<doc xml:space="preserve">Sets the row to place @child in.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row for @child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_row_span" c:identifier="gtk_grid_layout_child_set_row_span" glib:set-property="row-span">
<attribute name="org.gtk.Method.set_property" value="row-span"/>
<doc xml:space="preserve">Sets the number of rows @child spans to.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridLayoutChild`</doc>
<type name="GridLayoutChild" c:type="GtkGridLayoutChild*"/>
</instance-parameter>
<parameter name="span" transfer-ownership="none">
<doc xml:space="preserve">the span of @child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="column" writable="1" transfer-ownership="none" setter="set_column" getter="get_column">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_child_get_column"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_child_set_column"/>
<doc xml:space="preserve">The column to place the child in.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="column-span" writable="1" transfer-ownership="none" setter="set_column_span" getter="get_column_span">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_child_get_column_span"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_child_set_column_span"/>
<doc xml:space="preserve">The number of columns the child spans to.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="row" writable="1" transfer-ownership="none" setter="set_row" getter="get_row">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_child_get_row"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_child_set_row"/>
<doc xml:space="preserve">The row to place the child in.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="row-span" writable="1" transfer-ownership="none" setter="set_row_span" getter="get_row_span">
<attribute name="org.gtk.Property.get" value="gtk_grid_layout_child_get_row_span"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_layout_child_set_row_span"/>
<doc xml:space="preserve">The number of rows the child spans to.</doc>
<type name="gint" c:type="gint"/>
</property>
</class>
<record name="GridLayoutChildClass" c:type="GtkGridLayoutChildClass" glib:is-gtype-struct-for="GridLayoutChild">
<field name="parent_class">
<type name="LayoutChildClass" c:type="GtkLayoutChildClass"/>
</field>
</record>
<record name="GridLayoutClass" c:type="GtkGridLayoutClass" glib:is-gtype-struct-for="GridLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<class name="GridView" c:symbol-prefix="grid_view" c:type="GtkGridView" parent="ListBase" glib:type-name="GtkGridView" glib:get-type="gtk_grid_view_get_type" glib:type-struct="GridViewClass">
<doc xml:space="preserve">`GtkGridView` presents a large dynamic grid of items.
`GtkGridView` uses its factory to generate one child widget for each
visible item and shows them in a grid. The orientation of the grid view
determines if the grid reflows vertically or horizontally.
`GtkGridView` allows the user to select items according to the selection
characteristics of the model. For models that allow multiple selected items,
it is possible to turn on _rubberband selection_, using
[property@Gtk.GridView:enable-rubberband].
To learn more about the list widget framework, see the
[overview](section-list-widget.html).
# CSS nodes
```
gridview
&#x251C;&#x2500;&#x2500; child[.activatable]
&#x2502;
&#x251C;&#x2500;&#x2500; child[.activatable]
&#x2502;
&#x250A;
&#x2570;&#x2500;&#x2500; [rubberband]
```
`GtkGridView` uses a single CSS node with name `gridview`. Each child uses
a single CSS node with name `child`. If the [property@Gtk.ListItem:activatable]
property is set, the corresponding row will have the `.activatable` style
class. For rubberband selection, a subnode with name `rubberband` is used.
# Accessibility
`GtkGridView` uses the %GTK_ACCESSIBLE_ROLE_GRID role, and the items
use the %GTK_ACCESSIBLE_ROLE_GRID_CELL role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_grid_view_new">
<doc xml:space="preserve">Creates a new `GtkGridView` that uses the given @factory for
mapping items to widgets.
The function takes ownership of the
arguments, so you can write code like
```c
grid_view = gtk_grid_view_new (create_model (),
gtk_builder_list_item_factory_new_from_resource ("/resource.ui"));
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkGridView` using the given @model and @factory</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="factory" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The factory to populate items with</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</constructor>
<method name="get_enable_rubberband" c:identifier="gtk_grid_view_get_enable_rubberband" glib:get-property="enable-rubberband">
<attribute name="org.gtk.Method.get_property" value="enable-rubberband"/>
<doc xml:space="preserve">Returns whether rows can be selected by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rubberband selection is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_factory" c:identifier="gtk_grid_view_get_factory" glib:get-property="factory">
<attribute name="org.gtk.Method.get_property" value="factory"/>
<doc xml:space="preserve">Gets the factory that's currently used to populate list items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The factory in use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_columns" c:identifier="gtk_grid_view_get_max_columns" glib:get-property="max-columns">
<attribute name="org.gtk.Method.get_property" value="max-columns"/>
<doc xml:space="preserve">Gets the maximum number of columns that the grid will use.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The maximum number of columns</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_columns" c:identifier="gtk_grid_view_get_min_columns" glib:get-property="min-columns">
<attribute name="org.gtk.Method.get_property" value="min-columns"/>
<doc xml:space="preserve">Gets the minimum number of columns that the grid will use.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The minimum number of columns</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_grid_view_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that's currently used to read the items displayed.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model in use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_single_click_activate" c:identifier="gtk_grid_view_get_single_click_activate" glib:get-property="single-click-activate">
<attribute name="org.gtk.Method.get_property" value="single-click-activate"/>
<doc xml:space="preserve">Returns whether items will be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if items are activated on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_enable_rubberband" c:identifier="gtk_grid_view_set_enable_rubberband" glib:set-property="enable-rubberband">
<attribute name="org.gtk.Method.set_property" value="enable-rubberband"/>
<doc xml:space="preserve">Sets whether selections can be changed by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="enable_rubberband" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable rubberband selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_factory" c:identifier="gtk_grid_view_set_factory" glib:set-property="factory">
<attribute name="org.gtk.Method.set_property" value="factory"/>
<doc xml:space="preserve">Sets the `GtkListItemFactory` to use for populating list items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="factory" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the factory to use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</method>
<method name="set_max_columns" c:identifier="gtk_grid_view_set_max_columns" glib:set-property="max-columns">
<attribute name="org.gtk.Method.set_property" value="max-columns"/>
<doc xml:space="preserve">Sets the maximum number of columns to use.
This number must be at least 1.
If @max_columns is smaller than the minimum set via
[method@Gtk.GridView.set_min_columns], that value is used instead.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="max_columns" transfer-ownership="none">
<doc xml:space="preserve">The maximum number of columns</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_min_columns" c:identifier="gtk_grid_view_set_min_columns" glib:set-property="min-columns">
<attribute name="org.gtk.Method.set_property" value="min-columns"/>
<doc xml:space="preserve">Sets the minimum number of columns to use.
This number must be at least 1.
If @min_columns is smaller than the minimum set via
[method@Gtk.GridView.set_max_columns], that value is ignored.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="min_columns" transfer-ownership="none">
<doc xml:space="preserve">The minimum number of columns</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_grid_view_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the imodel to use.
This must be a [iface@Gtk.SelectionModel].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</method>
<method name="set_single_click_activate" c:identifier="gtk_grid_view_set_single_click_activate" glib:set-property="single-click-activate">
<attribute name="org.gtk.Method.set_property" value="single-click-activate"/>
<doc xml:space="preserve">Sets whether items should be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkGridView`</doc>
<type name="GridView" c:type="GtkGridView*"/>
</instance-parameter>
<parameter name="single_click_activate" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to activate items on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="enable-rubberband" writable="1" transfer-ownership="none" setter="set_enable_rubberband" getter="get_enable_rubberband">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_enable_rubberband"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_enable_rubberband"/>
<doc xml:space="preserve">Allow rubberband selection.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="factory" writable="1" transfer-ownership="none" setter="set_factory" getter="get_factory">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_factory"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_factory"/>
<doc xml:space="preserve">Factory for populating list items.</doc>
<type name="ListItemFactory"/>
</property>
<property name="max-columns" writable="1" transfer-ownership="none" setter="set_max_columns" getter="get_max_columns">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_max_columns"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_max_columns"/>
<doc xml:space="preserve">Maximum number of columns per row.
If this number is smaller than [property@Gtk.GridView:min-columns],
that value is used instead.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="min-columns" writable="1" transfer-ownership="none" setter="set_min_columns" getter="get_min_columns">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_min_columns"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_min_columns"/>
<doc xml:space="preserve">Minimum number of columns per row.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_model"/>
<doc xml:space="preserve">Model for the items displayed.</doc>
<type name="SelectionModel"/>
</property>
<property name="single-click-activate" writable="1" transfer-ownership="none" setter="set_single_click_activate" getter="get_single_click_activate">
<attribute name="org.gtk.Property.get" value="gtk_grid_view_get_single_click_activate"/>
<attribute name="org.gtk.Property.set" value="gtk_grid_view_set_single_click_activate"/>
<doc xml:space="preserve">Activate rows on single click and select them on hover.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="last">
<doc xml:space="preserve">Emitted when a cell has been activated by the user,
usually via activating the GtkGridView|list.activate-item action.
This allows for a convenient way to handle activation in a gridview.
See [property@Gtk.ListItem:activatable] for details on how to use
this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of item to activate</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="GridViewClass" c:type="GtkGridViewClass" disguised="1" glib:is-gtype-struct-for="GridView"/>
<function-macro name="HEADER_BAR" c:identifier="GTK_HEADER_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="HeaderBar" c:symbol-prefix="header_bar" c:type="GtkHeaderBar" parent="Widget" glib:type-name="GtkHeaderBar" glib:get-type="gtk_header_bar_get_type">
<doc xml:space="preserve">`GtkHeaderBar` is a widget for creating custom title bars for windows.
![An example GtkHeaderBar](headerbar.png)
`GtkHeaderBar` is similar to a horizontal `GtkCenterBox`. It allows
children to be placed at the start or the end. In addition, it allows
the window title to be displayed. The title will be centered with respect
to the width of the box, even if the children at either side take up
different amounts of space.
`GtkHeaderBar` can add typical window frame controls, such as minimize,
maximize and close buttons, or the window icon.
For these reasons, `GtkHeaderBar` is the natural choice for use as the
custom titlebar widget of a `GtkWindow` (see [method@Gtk.Window.set_titlebar]),
as it gives features typical of titlebars while allowing the addition of
child widgets.
## GtkHeaderBar as GtkBuildable
The `GtkHeaderBar` implementation of the `GtkBuildable` interface supports
adding children at the start or end sides by specifying &#x201C;start&#x201D; or &#x201C;end&#x201D; as
the &#x201C;type&#x201D; attribute of a &lt;child&gt; element, or setting the title widget by
specifying &#x201C;title&#x201D; value.
By default the `GtkHeaderBar` uses a `GtkLabel` displaying the title of the
window it is contained in as the title widget, equivalent to the following
UI definition:
```xml
&lt;object class="GtkHeaderBar"&gt;
&lt;property name="title-widget"&gt;
&lt;object class="GtkLabel"&gt;
&lt;property name="label" translatable="yes"&gt;Label&lt;/property&gt;
&lt;property name="single-line-mode"&gt;True&lt;/property&gt;
&lt;property name="ellipsize"&gt;end&lt;/property&gt;
&lt;property name="width-chars"&gt;5&lt;/property&gt;
&lt;style&gt;
&lt;class name="title"/&gt;
&lt;/style&gt;
&lt;/object&gt;
&lt;/property&gt;
&lt;/object&gt;
```
# CSS nodes
```
headerbar
&#x2570;&#x2500;&#x2500; windowhandle
&#x2570;&#x2500;&#x2500; box
&#x251C;&#x2500;&#x2500; box.start
&#x2502; &#x251C;&#x2500;&#x2500; windowcontrols.start
&#x2502; &#x2570;&#x2500;&#x2500; [other children]
&#x251C;&#x2500;&#x2500; [Title Widget]
&#x2570;&#x2500;&#x2500; box.end
&#x251C;&#x2500;&#x2500; [other children]
&#x2570;&#x2500;&#x2500; windowcontrols.end
```
A `GtkHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
subnode, which contains a `box` subnode, which contains two `box` subnodes at
the start and end of the header bar, as well as a center node that represents
the title.
Each of the boxes contains a `windowcontrols` subnode, see
[class@Gtk.WindowControls] for details, as well as other children.
# Accessibility
`GtkHeaderBar` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_header_bar_new">
<doc xml:space="preserve">Creates a new `GtkHeaderBar` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkHeaderBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_decoration_layout" c:identifier="gtk_header_bar_get_decoration_layout" glib:get-property="decoration-layout">
<attribute name="org.gtk.Method.get_property" value="decoration-layout"/>
<doc xml:space="preserve">Gets the decoration layout of the `GtkHeaderBar`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the decoration layout</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_title_buttons" c:identifier="gtk_header_bar_get_show_title_buttons" glib:get-property="show-title-buttons">
<attribute name="org.gtk.Method.get_property" value="show-title-buttons"/>
<doc xml:space="preserve">Returns whether this header bar shows the standard window
title buttons.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if title buttons are shown</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title_widget" c:identifier="gtk_header_bar_get_title_widget" glib:get-property="title-widget">
<doc xml:space="preserve">Retrieves the title widget of the header.
See [method@Gtk.HeaderBar.set_title_widget].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the title widget of the header</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="pack_end" c:identifier="gtk_header_bar_pack_end">
<doc xml:space="preserve">Adds @child to @bar, packed with reference to the
end of the @bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">A `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to be added to @bar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="pack_start" c:identifier="gtk_header_bar_pack_start">
<doc xml:space="preserve">Adds @child to @bar, packed with reference to the
start of the @bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">A `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to be added to @bar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_header_bar_remove">
<doc xml:space="preserve">Removes a child from the `GtkHeaderBar`.
The child must have been added with
[method@Gtk.HeaderBar.pack_start],
[method@Gtk.HeaderBar.pack_end] or
[method@Gtk.HeaderBar.set_title_widget].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_decoration_layout" c:identifier="gtk_header_bar_set_decoration_layout" glib:set-property="decoration-layout">
<attribute name="org.gtk.Method.set_property" value="decoration-layout"/>
<doc xml:space="preserve">Sets the decoration layout for this header bar.
This property overrides the
[property@Gtk.Settings:gtk-decoration-layout] setting.
There can be valid reasons for overriding the setting, such
as a header bar design that does not allow for buttons to take
room on the right, or only offers room for a single close button.
Split header bars are another example for overriding the setting.
The format of the string is button names, separated by commas.
A colon separates the buttons that should appear on the left
from those on the right. Recognized button names are minimize,
maximize, close and icon (the window icon).
For example, &#x201C;icon:minimize,maximize,close&#x201D; specifies a icon
on the left, and minimize, maximize and close buttons on the right.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="layout" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a decoration layout, or %NULL to unset the layout</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_show_title_buttons" c:identifier="gtk_header_bar_set_show_title_buttons" glib:set-property="show-title-buttons">
<attribute name="org.gtk.Method.set_property" value="show-title-buttons"/>
<doc xml:space="preserve">Sets whether this header bar shows the standard window
title buttons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show standard title buttons</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_title_widget" c:identifier="gtk_header_bar_set_title_widget" glib:set-property="title-widget">
<doc xml:space="preserve">Sets the title for the `GtkHeaderBar`.
When set to %NULL, the headerbar will display the title of
the window it is contained in.
The title should help a user identify the current view.
To achieve the same style as the builtin title, use the
&#x201C;title&#x201D; style class.
You should set the title widget to %NULL, for the window
title label to be visible again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkHeaderBar`</doc>
<type name="HeaderBar" c:type="GtkHeaderBar*"/>
</instance-parameter>
<parameter name="title_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a widget to use for a title</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="decoration-layout" writable="1" transfer-ownership="none" setter="set_decoration_layout" getter="get_decoration_layout">
<attribute name="org.gtk.Property.get" value="gtk_header_bar_get_decoration_layout"/>
<attribute name="org.gtk.Property.set" value="gtk_header_bar_set_decoration_layout"/>
<doc xml:space="preserve">The decoration layout for buttons.
If this property is not set, the
[property@Gtk.Settings:gtk-decoration-layout] setting is used.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="show-title-buttons" writable="1" transfer-ownership="none" setter="set_show_title_buttons" getter="get_show_title_buttons">
<attribute name="org.gtk.Property.get" value="gtk_header_bar_get_show_title_buttons"/>
<attribute name="org.gtk.Property.set" value="gtk_header_bar_set_show_title_buttons"/>
<doc xml:space="preserve">Whether to show title buttons like close, minimize, maximize.
Which buttons are actually shown and where is determined
by the [property@Gtk.HeaderBar:decoration-layout] property,
and by the state of the window (e.g. a close button will not
be shown if the window can't be closed).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title-widget" writable="1" transfer-ownership="none" setter="set_title_widget" getter="get_title_widget">
<type name="Widget"/>
</property>
</class>
<function-macro name="ICON_PAINTABLE" c:identifier="GTK_ICON_PAINTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ICON_THEME" c:identifier="GTK_ICON_THEME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ICON_VIEW" c:identifier="GTK_ICON_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IMAGE" c:identifier="GTK_IMAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="IMContext" c:symbol-prefix="im_context" c:type="GtkIMContext" parent="GObject.Object" abstract="1" glib:type-name="GtkIMContext" glib:get-type="gtk_im_context_get_type" glib:type-struct="IMContextClass">
<doc xml:space="preserve">`GtkIMContext` defines the interface for GTK input methods.
`GtkIMContext` is used by GTK text input widgets like `GtkText`
to map from key events to Unicode character strings.
An input method may consume multiple key events in sequence before finally
outputting the composed result. This is called *preediting*, and an input
method may provide feedback about this process by displaying the intermediate
composition states as preedit text. To do so, the `GtkIMContext` will emit
[signal@Gtk.IMContext::preedit-start], [signal@Gtk.IMContext::preedit-changed]
and [signal@Gtk.IMContext::preedit-end] signals.
For instance, the built-in GTK input method [class@Gtk.IMContextSimple]
implements the input of arbitrary Unicode code points by holding down the
&lt;kbd&gt;Control&lt;/kbd&gt; and &lt;kbd&gt;Shift&lt;/kbd&gt; keys and then typing &lt;kbd&gt;u&lt;/kbd&gt;
followed by the hexadecimal digits of the code point. When releasing the
&lt;kbd&gt;Control&lt;/kbd&gt; and &lt;kbd&gt;Shift&lt;/kbd&gt; keys, preediting ends and the
character is inserted as text. For example,
Ctrl+Shift+u 2 0 A C
results in the &#x20AC; sign.
Additional input methods can be made available for use by GTK widgets as
loadable modules. An input method module is a small shared library which
provides a `GIOExtension` for the extension point named "gtk-im-module".
To connect a widget to the users preferred input method, you should use
[class@Gtk.IMMulticontext].</doc>
<virtual-method name="commit">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="delete_surrounding" invoker="delete_surrounding">
<doc xml:space="preserve">Asks the widget that the input context is attached to delete
characters around the cursor position by emitting the
`::delete_surrounding` signal.
Note that @offset and @n_chars are in characters not in bytes
which differs from the usage other places in `GtkIMContext`.
In order to use this function, you should first call
[method@Gtk.IMContext.get_surrounding] to get the current context,
and call this function immediately afterwards to make sure that you
know what you are deleting. You should also account for the fact
that even if the signal was handled, the input context might not
have deleted all the characters that were requested to be deleted.
This function is used by an input method that wants to make
subsitutions in the existing text in response to new input.
It is not useful for applications.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal was handled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">offset from cursor position in chars;
a negative value means start before the cursor.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="filter_keypress" invoker="filter_keypress">
<doc xml:space="preserve">Allow an input method to internally handle key press and release
events.
If this function returns %TRUE, then no further processing
should be done for this key event.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input method handled the key event.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the key event</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="focus_in" invoker="focus_in">
<doc xml:space="preserve">Notify the input method that the widget to which this
input context corresponds has gained focus.
The input method may, for example, change the displayed
feedback to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="focus_out" invoker="focus_out">
<doc xml:space="preserve">Notify the input method that the widget to which this
input context corresponds has lost focus.
The input method may, for example, change the displayed
feedback or reset the contexts state to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_preedit_string" invoker="get_preedit_string">
<doc xml:space="preserve">Retrieve the current preedit string for the input context,
and a list of attributes to apply to the string.
This string should be displayed inserted at the insertion point.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="str" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
string. The string retrieved must be freed with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="attrs" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
attribute list. When you are done with this list, you
must unreference it with [method@Pango.AttrList.unref].</doc>
<type name="Pango.AttrList" c:type="PangoAttrList**"/>
</parameter>
<parameter name="cursor_pos" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store position of cursor
(in characters) within the preedit string.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_surrounding" invoker="get_surrounding" deprecated="1" deprecated-version="4.2">
<doc xml:space="preserve">Retrieves context around the insertion point.
Input methods typically want context in order to constrain input text
based on existing text; this is important for languages such as Thai
where only some sequences of characters are allowed.
This function is implemented by emitting the
[signal@Gtk.IMContext::retrieve-surrounding] signal on the input method;
in response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
[method@Gtk.IMContext.set_surrounding].
Note that there is no obligation for a widget to respond to the
`::retrieve-surrounding` signal, so input methods must be prepared to
function without context.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.IMContext.get_surrounding_with_selection] instead.</doc-deprecated>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_surrounding_with_selection" invoker="get_surrounding_with_selection" version="4.2">
<doc xml:space="preserve">Retrieves context around the insertion point.
Input methods typically want context in order to constrain input
text based on existing text; this is important for languages such
as Thai where only some sequences of characters are allowed.
This function is implemented by emitting the
[signal@Gtk.IMContext::retrieve-surrounding] signal on the input method;
in response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
[method@Gtk.IMContext.set_surrounding_with_selection].
Note that there is no obligation for a widget to respond to the
`::retrieve-surrounding` signal, so input methods must be prepared to
function without context.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="anchor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the selection
bound within @text</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="preedit_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="preedit_end">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="preedit_start">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="reset" invoker="reset">
<doc xml:space="preserve">Notify the input method that a change such as a change in cursor
position has been made.
This will typically cause the input method to clear the preedit state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="retrieve_surrounding">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_client_widget" invoker="set_client_widget">
<doc xml:space="preserve">Set the client widget for the input context.
This is the `GtkWidget` holding the input focus. This widget is
used in order to correctly position status windows, and may
also be used for purposes internal to the input method.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the client widget. This may be %NULL to indicate
that the previous client widget no longer exists.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_cursor_location" invoker="set_cursor_location">
<doc xml:space="preserve">Notify the input method that a change in cursor
position has been made.
The location is relative to the client widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">new location</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_surrounding" invoker="set_surrounding" deprecated="1" deprecated-version="4.2">
<doc xml:space="preserve">Sets surrounding context around the insertion point and preedit
string.
This function is expected to be called in response to the
[signal@Gtk.IMContext::retrieve-surrounding] signal, and will
likely have no effect if called at other times.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.IMContext.set_surrounding_with_selection] instead</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_surrounding_with_selection" invoker="set_surrounding_with_selection" version="4.2">
<doc xml:space="preserve">Sets surrounding context around the insertion point and preedit
string. This function is expected to be called in response to the
[signal@Gtk.IMContext::retrieve_surrounding] signal, and will likely
have no effect if called at other times.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="anchor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the selection bound within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_use_preedit" invoker="set_use_preedit">
<doc xml:space="preserve">Sets whether the IM context should use the preedit string
to display feedback.
If @use_preedit is %FALSE (default is %TRUE), then the IM context
may use some other method to display feedback, such as displaying
it in a child of the root window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="use_preedit" transfer-ownership="none">
<doc xml:space="preserve">whether the IM context should use the preedit string.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<method name="delete_surrounding" c:identifier="gtk_im_context_delete_surrounding">
<doc xml:space="preserve">Asks the widget that the input context is attached to delete
characters around the cursor position by emitting the
`::delete_surrounding` signal.
Note that @offset and @n_chars are in characters not in bytes
which differs from the usage other places in `GtkIMContext`.
In order to use this function, you should first call
[method@Gtk.IMContext.get_surrounding] to get the current context,
and call this function immediately afterwards to make sure that you
know what you are deleting. You should also account for the fact
that even if the signal was handled, the input context might not
have deleted all the characters that were requested to be deleted.
This function is used by an input method that wants to make
subsitutions in the existing text in response to new input.
It is not useful for applications.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal was handled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">offset from cursor position in chars;
a negative value means start before the cursor.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="filter_key" c:identifier="gtk_im_context_filter_key">
<doc xml:space="preserve">Allow an input method to forward key press and release events
to another input method without necessarily having a `GdkEvent`
available.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input method handled the key event.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="press" transfer-ownership="none">
<doc xml:space="preserve">whether to forward a key press or release event</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">the surface the event is for</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
<parameter name="device" transfer-ownership="none">
<doc xml:space="preserve">the device that the event is for</doc>
<type name="Gdk.Device" c:type="GdkDevice*"/>
</parameter>
<parameter name="time" transfer-ownership="none">
<doc xml:space="preserve">the timestamp for the event</doc>
<type name="guint32" c:type="guint32"/>
</parameter>
<parameter name="keycode" transfer-ownership="none">
<doc xml:space="preserve">the keycode for the event</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">modifier state for the event</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="group" transfer-ownership="none">
<doc xml:space="preserve">the active keyboard group for the event</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="filter_keypress" c:identifier="gtk_im_context_filter_keypress">
<doc xml:space="preserve">Allow an input method to internally handle key press and release
events.
If this function returns %TRUE, then no further processing
should be done for this key event.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input method handled the key event.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the key event</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</method>
<method name="focus_in" c:identifier="gtk_im_context_focus_in">
<doc xml:space="preserve">Notify the input method that the widget to which this
input context corresponds has gained focus.
The input method may, for example, change the displayed
feedback to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="focus_out" c:identifier="gtk_im_context_focus_out">
<doc xml:space="preserve">Notify the input method that the widget to which this
input context corresponds has lost focus.
The input method may, for example, change the displayed
feedback or reset the contexts state to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_preedit_string" c:identifier="gtk_im_context_get_preedit_string">
<doc xml:space="preserve">Retrieve the current preedit string for the input context,
and a list of attributes to apply to the string.
This string should be displayed inserted at the insertion point.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="str" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
string. The string retrieved must be freed with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="attrs" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
attribute list. When you are done with this list, you
must unreference it with [method@Pango.AttrList.unref].</doc>
<type name="Pango.AttrList" c:type="PangoAttrList**"/>
</parameter>
<parameter name="cursor_pos" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store position of cursor
(in characters) within the preedit string.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_surrounding" c:identifier="gtk_im_context_get_surrounding" deprecated="1" deprecated-version="4.2">
<doc xml:space="preserve">Retrieves context around the insertion point.
Input methods typically want context in order to constrain input text
based on existing text; this is important for languages such as Thai
where only some sequences of characters are allowed.
This function is implemented by emitting the
[signal@Gtk.IMContext::retrieve-surrounding] signal on the input method;
in response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
[method@Gtk.IMContext.set_surrounding].
Note that there is no obligation for a widget to respond to the
`::retrieve-surrounding` signal, so input methods must be prepared to
function without context.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.IMContext.get_surrounding_with_selection] instead.</doc-deprecated>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_surrounding_with_selection" c:identifier="gtk_im_context_get_surrounding_with_selection" version="4.2">
<doc xml:space="preserve">Retrieves context around the insertion point.
Input methods typically want context in order to constrain input
text based on existing text; this is important for languages such
as Thai where only some sequences of characters are allowed.
This function is implemented by emitting the
[signal@Gtk.IMContext::retrieve-surrounding] signal on the input method;
in response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
[method@Gtk.IMContext.set_surrounding_with_selection].
Note that there is no obligation for a widget to respond to the
`::retrieve-surrounding` signal, so input methods must be prepared to
function without context.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="anchor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the selection
bound within @text</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="reset" c:identifier="gtk_im_context_reset">
<doc xml:space="preserve">Notify the input method that a change such as a change in cursor
position has been made.
This will typically cause the input method to clear the preedit state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_client_widget" c:identifier="gtk_im_context_set_client_widget">
<doc xml:space="preserve">Set the client widget for the input context.
This is the `GtkWidget` holding the input focus. This widget is
used in order to correctly position status windows, and may
also be used for purposes internal to the input method.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the client widget. This may be %NULL to indicate
that the previous client widget no longer exists.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_cursor_location" c:identifier="gtk_im_context_set_cursor_location">
<doc xml:space="preserve">Notify the input method that a change in cursor
position has been made.
The location is relative to the client widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">new location</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="set_surrounding" c:identifier="gtk_im_context_set_surrounding" deprecated="1" deprecated-version="4.2">
<doc xml:space="preserve">Sets surrounding context around the insertion point and preedit
string.
This function is expected to be called in response to the
[signal@Gtk.IMContext::retrieve-surrounding] signal, and will
likely have no effect if called at other times.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.IMContext.set_surrounding_with_selection] instead</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_surrounding_with_selection" c:identifier="gtk_im_context_set_surrounding_with_selection" version="4.2">
<doc xml:space="preserve">Sets surrounding context around the insertion point and preedit
string. This function is expected to be called in response to the
[signal@Gtk.IMContext::retrieve_surrounding] signal, and will likely
have no effect if called at other times.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="anchor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the selection bound within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_use_preedit" c:identifier="gtk_im_context_set_use_preedit">
<doc xml:space="preserve">Sets whether the IM context should use the preedit string
to display feedback.
If @use_preedit is %FALSE (default is %TRUE), then the IM context
may use some other method to display feedback, such as displaying
it in a child of the root window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</instance-parameter>
<parameter name="use_preedit" transfer-ownership="none">
<doc xml:space="preserve">whether the IM context should use the preedit string.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="input-hints" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Additional hints that allow input methods to fine-tune
their behaviour.</doc>
<type name="InputHints"/>
</property>
<property name="input-purpose" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The purpose of the text field that the `GtkIMContext is connected to.
This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.</doc>
<type name="InputPurpose"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="commit" when="last">
<doc xml:space="preserve">The ::commit signal is emitted when a complete input sequence
has been entered by the user.
If the commit comes after a preediting sequence, the
::commit signal is emitted after ::preedit-end.
This can be a single character immediately after a key press or
the final result of preediting.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">the completed character(s) entered by the user</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="delete-surrounding" when="last">
<doc xml:space="preserve">The ::delete-surrounding signal is emitted when the input method
needs to delete all or part of the context surrounding the cursor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal was handled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">the character offset from the cursor position of the text
to be deleted. A negative value indicates a position before
the cursor.</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the number of characters to be deleted</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="preedit-changed" when="last">
<doc xml:space="preserve">The ::preedit-changed signal is emitted whenever the preedit sequence
currently being entered has changed.
It is also emitted at the end of a preedit sequence, in which case
[method@Gtk.IMContext.get_preedit_string] returns the empty string.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="preedit-end" when="last">
<doc xml:space="preserve">The ::preedit-end signal is emitted when a preediting sequence
has been completed or canceled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="preedit-start" when="last">
<doc xml:space="preserve">The ::preedit-start signal is emitted when a new preediting sequence
starts.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="retrieve-surrounding" when="last">
<doc xml:space="preserve">The ::retrieve-surrounding signal is emitted when the input method
requires the context surrounding the cursor.
The callback should set the input method surrounding context by
calling the [method@Gtk.IMContext.set_surrounding] method.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal was handled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
</class>
<record name="IMContextClass" c:type="GtkIMContextClass" glib:is-gtype-struct-for="IMContext">
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="preedit_start">
<callback name="preedit_start">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="preedit_end">
<callback name="preedit_end">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="preedit_changed">
<callback name="preedit_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="commit">
<callback name="commit">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="str" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="retrieve_surrounding">
<callback name="retrieve_surrounding">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="delete_surrounding">
<callback name="delete_surrounding">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal was handled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">offset from cursor position in chars;
a negative value means start before the cursor.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">number of characters to delete.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_client_widget">
<callback name="set_client_widget">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the client widget. This may be %NULL to indicate
that the previous client widget no longer exists.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_preedit_string">
<callback name="get_preedit_string">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="str" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
string. The string retrieved must be freed with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="attrs" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store the retrieved
attribute list. When you are done with this list, you
must unreference it with [method@Pango.AttrList.unref].</doc>
<type name="Pango.AttrList" c:type="PangoAttrList**"/>
</parameter>
<parameter name="cursor_pos" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store position of cursor
(in characters) within the preedit string.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="filter_keypress">
<callback name="filter_keypress">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input method handled the key event.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the key event</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="focus_in">
<callback name="focus_in">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="focus_out">
<callback name="focus_out">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="reset">
<callback name="reset">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_cursor_location">
<callback name="set_cursor_location">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">new location</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_use_preedit">
<callback name="set_use_preedit">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="use_preedit" transfer-ownership="none">
<doc xml:space="preserve">whether the IM context should use the preedit string.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_surrounding">
<callback name="set_surrounding">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_surrounding">
<callback name="get_surrounding">
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_surrounding_with_selection">
<callback name="set_surrounding_with_selection">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text surrounding the insertion point, as UTF-8.
the preedit string should not be included within @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">the length of @text, or -1 if @text is nul-terminated</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="cursor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the insertion cursor within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="anchor_index" transfer-ownership="none">
<doc xml:space="preserve">the byte index of the selection bound within @text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_surrounding_with_selection">
<callback name="get_surrounding_with_selection">
<return-value transfer-ownership="none">
<doc xml:space="preserve">`TRUE` if surrounding text was provided; in this case
you must free the result stored in `text`.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMContext`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</parameter>
<parameter name="text" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store a UTF-8 encoded
string of text holding context around the insertion point.
If the function returns %TRUE, then you must free the result
stored in this location with g_free().</doc>
<type name="utf8" c:type="char**"/>
</parameter>
<parameter name="cursor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the insertion
cursor within @text.</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="anchor_index" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store byte index of the selection
bound within @text</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<class name="IMContextSimple" c:symbol-prefix="im_context_simple" c:type="GtkIMContextSimple" parent="IMContext" glib:type-name="GtkIMContextSimple" glib:get-type="gtk_im_context_simple_get_type" glib:type-struct="IMContextSimpleClass">
<doc xml:space="preserve">`GtkIMContextSimple` is an input method supporting table-based input methods.
## Compose sequences
`GtkIMContextSimple` reads compose sequences from the first of the
following files that is found: ~/.config/gtk-4.0/Compose, ~/.XCompose,
/usr/share/X11/locale/$locale/Compose (for locales that have a nontrivial
Compose file). The syntax of these files is described in the Compose(5)
manual page.
If none of these files is found, `GtkIMContextSimple` uses a built-in table
of compose sequences that is derived from the X11 Compose files.
Note that compose sequences typically start with the Compose_key, which is
often not available as a dedicated key on keyboards. Keyboard layouts may
map this keysym to other keys, such as the right Control key.
## Unicode characters
`GtkIMContextSimple` also supports numeric entry of Unicode characters
by typing &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;u&lt;/kbd&gt;, followed by a
hexadecimal Unicode codepoint.
For example,
Ctrl-Shift-u 1 2 3 Enter
yields U+0123 LATIN SMALL LETTER G WITH CEDILLA, i.e. &#x123;.
## Dead keys
`GtkIMContextSimple` supports dead keys. For example, typing
dead_acute a
yields U+00E! LATIN SMALL LETTER_A WITH ACUTE, i.e. &#xE1;. Note that this
depends on the keyboard layout including dead keys.</doc>
<constructor name="new" c:identifier="gtk_im_context_simple_new">
<doc xml:space="preserve">Creates a new `GtkIMContextSimple`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkIMContextSimple`</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</return-value>
</constructor>
<method name="add_compose_file" c:identifier="gtk_im_context_simple_add_compose_file">
<doc xml:space="preserve">Adds an additional table from the X11 compose file.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context_simple" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIMContextSimple`</doc>
<type name="IMContextSimple" c:type="GtkIMContextSimple*"/>
</instance-parameter>
<parameter name="compose_file" transfer-ownership="none">
<doc xml:space="preserve">The path of compose file</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_table" c:identifier="gtk_im_context_simple_add_table" introspectable="0" deprecated="1" deprecated-version="4.4">
<doc xml:space="preserve">Adds an additional table to search to the input context.
Each row of the table consists of @max_seq_len key symbols
followed by two #guint16 interpreted as the high and low
words of a #gunicode value. Tables are searched starting
from the last added.
The table must be sorted in dictionary order on the
numeric value of the key symbol fields. (Values beyond
the length of the sequence should be zero.)</doc>
<doc-deprecated xml:space="preserve">Use gtk_im_context_simple_add_compose_file()</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context_simple" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIMContextSimple`</doc>
<type name="IMContextSimple" c:type="GtkIMContextSimple*"/>
</instance-parameter>
<parameter name="data" transfer-ownership="none">
<doc xml:space="preserve">the table</doc>
<array zero-terminated="0" c:type="guint16*">
<type name="guint16" c:type="guint16"/>
</array>
</parameter>
<parameter name="max_seq_len" transfer-ownership="none">
<doc xml:space="preserve">Maximum length of a sequence in the table</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_seqs" transfer-ownership="none">
<doc xml:space="preserve">number of sequences in the table</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<field name="object">
<type name="IMContext" c:type="GtkIMContext"/>
</field>
<field name="priv" readable="0" private="1">
<type name="IMContextSimplePrivate" c:type="GtkIMContextSimplePrivate*"/>
</field>
</class>
<record name="IMContextSimpleClass" c:type="GtkIMContextSimpleClass" glib:is-gtype-struct-for="IMContextSimple">
<field name="parent_class">
<type name="IMContextClass" c:type="GtkIMContextClass"/>
</field>
</record>
<record name="IMContextSimplePrivate" c:type="GtkIMContextSimplePrivate" disguised="1"/>
<class name="IMMulticontext" c:symbol-prefix="im_multicontext" c:type="GtkIMMulticontext" parent="IMContext" glib:type-name="GtkIMMulticontext" glib:get-type="gtk_im_multicontext_get_type" glib:type-struct="IMMulticontextClass">
<doc xml:space="preserve">`GtkIMMulticontext` is an input method context supporting multiple,
switchable input methods.
Text widgets such as `GtkText` or `GtkTextView` use a `GtkIMMultiContext`
to implement their `im-module` property for switching between different
input methods.</doc>
<constructor name="new" c:identifier="gtk_im_multicontext_new">
<doc xml:space="preserve">Creates a new `GtkIMMulticontext`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkIMMulticontext`.</doc>
<type name="IMContext" c:type="GtkIMContext*"/>
</return-value>
</constructor>
<method name="get_context_id" c:identifier="gtk_im_multicontext_get_context_id">
<doc xml:space="preserve">Gets the id of the currently active delegate of the @context.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the id of the currently active delegate</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMMulticontext`</doc>
<type name="IMMulticontext" c:type="GtkIMMulticontext*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_context_id" c:identifier="gtk_im_multicontext_set_context_id">
<doc xml:space="preserve">Sets the context id for @context.
This causes the currently active delegate of @context to be
replaced by the delegate corresponding to the new context id.
Setting this to a non-%NULL value overrides the system-wide
IM module setting. See the [property@Gtk.Settings:gtk-im-module]
property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIMMulticontext`</doc>
<type name="IMMulticontext" c:type="GtkIMMulticontext*"/>
</instance-parameter>
<parameter name="context_id" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the id to use</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<field name="object">
<type name="IMContext" c:type="GtkIMContext"/>
</field>
<field name="priv" readable="0" private="1">
<type name="IMMulticontextPrivate" c:type="GtkIMMulticontextPrivate*"/>
</field>
</class>
<record name="IMMulticontextClass" c:type="GtkIMMulticontextClass" glib:is-gtype-struct-for="IMMulticontext">
<field name="parent_class">
<type name="IMContextClass" c:type="GtkIMContextClass"/>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="IMMulticontextPrivate" c:type="GtkIMMulticontextPrivate" disguised="1"/>
<function-macro name="IM_CONTEXT" c:identifier="GTK_IM_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_CONTEXT_CLASS" c:identifier="GTK_IM_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_CONTEXT_GET_CLASS" c:identifier="GTK_IM_CONTEXT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_CONTEXT_SIMPLE" c:identifier="GTK_IM_CONTEXT_SIMPLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_CONTEXT_SIMPLE_CLASS" c:identifier="GTK_IM_CONTEXT_SIMPLE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_CONTEXT_SIMPLE_GET_CLASS" c:identifier="GTK_IM_CONTEXT_SIMPLE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="IM_MODULE_EXTENSION_POINT_NAME" value="gtk-im-module" c:type="GTK_IM_MODULE_EXTENSION_POINT_NAME">
<type name="utf8" c:type="gchar*"/>
</constant>
<function-macro name="IM_MULTICONTEXT" c:identifier="GTK_IM_MULTICONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_MULTICONTEXT_CLASS" c:identifier="GTK_IM_MULTICONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IM_MULTICONTEXT_GET_CLASS" c:identifier="GTK_IM_MULTICONTEXT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="INFO_BAR" c:identifier="GTK_INFO_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="INPUT_ERROR" value="-1" c:type="GTK_INPUT_ERROR">
<doc xml:space="preserve">Constant to return from a signal handler for the ::input
signal in case of conversion failure.
See [signal@Gtk.SpinButton::input].</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="INTERFACE_AGE" value="2" c:type="GTK_INTERFACE_AGE">
<doc xml:space="preserve">Like [func@get_interface_age], but from the headers used at
application compile time, rather than from the library linked
against at application run time.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="INVALID_LIST_POSITION" value="4294967295" c:type="GTK_INVALID_LIST_POSITION">
<doc xml:space="preserve">The value used to refer to a guaranteed invalid position
in a `GListModel`.
This value may be returned from some functions, others may
accept it as input. Its interpretation may differ for different
functions.
Refer to each function's documentation for if this value is
allowed and what it does.</doc>
<type name="guint" c:type="guint"/>
</constant>
<function-macro name="IS_ABOUT_DIALOG" c:identifier="GTK_IS_ABOUT_DIALOG" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ACTIONABLE" c:identifier="GTK_IS_ACTIONABLE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ACTION_BAR" c:identifier="GTK_IS_ACTION_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ADJUSTMENT" c:identifier="GTK_IS_ADJUSTMENT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ADJUSTMENT_CLASS" c:identifier="GTK_IS_ADJUSTMENT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APPLICATION" c:identifier="GTK_IS_APPLICATION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APPLICATION_CLASS" c:identifier="GTK_IS_APPLICATION_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APPLICATION_WINDOW" c:identifier="GTK_IS_APPLICATION_WINDOW" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APPLICATION_WINDOW_CLASS" c:identifier="GTK_IS_APPLICATION_WINDOW_CLASS" introspectable="0">
<parameters>
<parameter name="class">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APP_CHOOSER" c:identifier="GTK_IS_APP_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APP_CHOOSER_BUTTON" c:identifier="GTK_IS_APP_CHOOSER_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APP_CHOOSER_DIALOG" c:identifier="GTK_IS_APP_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_APP_CHOOSER_WIDGET" c:identifier="GTK_IS_APP_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ASPECT_FRAME" c:identifier="GTK_IS_ASPECT_FRAME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ASSISTANT" c:identifier="GTK_IS_ASSISTANT" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ASSISTANT_PAGE" c:identifier="GTK_IS_ASSISTANT_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BOX" c:identifier="GTK_IS_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BOX_CLASS" c:identifier="GTK_IS_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUILDABLE" c:identifier="GTK_IS_BUILDABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUILDER" c:identifier="GTK_IS_BUILDER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUILDER_CLASS" c:identifier="GTK_IS_BUILDER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUILDER_LIST_ITEM_FACTORY" c:identifier="GTK_IS_BUILDER_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUILDER_LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_IS_BUILDER_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUTTON" c:identifier="GTK_IS_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_BUTTON_CLASS" c:identifier="GTK_IS_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CALENDAR" c:identifier="GTK_IS_CALENDAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_AREA" c:identifier="GTK_IS_CELL_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_AREA_BOX" c:identifier="GTK_IS_CELL_AREA_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_AREA_CLASS" c:identifier="GTK_IS_CELL_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_AREA_CONTEXT" c:identifier="GTK_IS_CELL_AREA_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_AREA_CONTEXT_CLASS" c:identifier="GTK_IS_CELL_AREA_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_EDITABLE" c:identifier="GTK_IS_CELL_EDITABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_LAYOUT" c:identifier="GTK_IS_CELL_LAYOUT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER" c:identifier="GTK_IS_CELL_RENDERER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_ACCEL" c:identifier="GTK_IS_CELL_RENDERER_ACCEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_CLASS" c:identifier="GTK_IS_CELL_RENDERER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_COMBO" c:identifier="GTK_IS_CELL_RENDERER_COMBO" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_PIXBUF" c:identifier="GTK_IS_CELL_RENDERER_PIXBUF" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_PROGRESS" c:identifier="GTK_IS_CELL_RENDERER_PROGRESS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_SPIN" c:identifier="GTK_IS_CELL_RENDERER_SPIN" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_SPINNER" c:identifier="GTK_IS_CELL_RENDERER_SPINNER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_TEXT" c:identifier="GTK_IS_CELL_RENDERER_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_TEXT_CLASS" c:identifier="GTK_IS_CELL_RENDERER_TEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_RENDERER_TOGGLE" c:identifier="GTK_IS_CELL_RENDERER_TOGGLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CELL_VIEW" c:identifier="GTK_IS_CELL_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CENTER_BOX" c:identifier="GTK_IS_CENTER_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CENTER_BOX_CLASS" c:identifier="GTK_IS_CENTER_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CHECK_BUTTON" c:identifier="GTK_IS_CHECK_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CHECK_BUTTON_CLASS" c:identifier="GTK_IS_CHECK_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLOR_BUTTON" c:identifier="GTK_IS_COLOR_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLOR_CHOOSER" c:identifier="GTK_IS_COLOR_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLOR_CHOOSER_DIALOG" c:identifier="GTK_IS_COLOR_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLOR_CHOOSER_WIDGET" c:identifier="GTK_IS_COLOR_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLUMN_VIEW" c:identifier="GTK_IS_COLUMN_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLUMN_VIEW_CLASS" c:identifier="GTK_IS_COLUMN_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLUMN_VIEW_COLUMN" c:identifier="GTK_IS_COLUMN_VIEW_COLUMN" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COLUMN_VIEW_COLUMN_CLASS" c:identifier="GTK_IS_COLUMN_VIEW_COLUMN_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COMBO_BOX" c:identifier="GTK_IS_COMBO_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COMBO_BOX_CLASS" c:identifier="GTK_IS_COMBO_BOX_CLASS" introspectable="0">
<parameters>
<parameter name="vtable">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_COMBO_BOX_TEXT" c:identifier="GTK_IS_COMBO_BOX_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_CSS_PROVIDER" c:identifier="GTK_IS_CSS_PROVIDER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DIALOG" c:identifier="GTK_IS_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DIALOG_CLASS" c:identifier="GTK_IS_DIALOG_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DRAG_SOURCE" c:identifier="GTK_IS_DRAG_SOURCE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DRAG_SOURCE_CLASS" c:identifier="GTK_IS_DRAG_SOURCE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DRAWING_AREA" c:identifier="GTK_IS_DRAWING_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DRAWING_AREA_CLASS" c:identifier="GTK_IS_DRAWING_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_CONTROLLER_MOTION" c:identifier="GTK_IS_DROP_CONTROLLER_MOTION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_CONTROLLER_MOTION_CLASS" c:identifier="GTK_IS_DROP_CONTROLLER_MOTION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_TARGET" c:identifier="GTK_IS_DROP_TARGET" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_TARGET_ASYNC" c:identifier="GTK_IS_DROP_TARGET_ASYNC" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_TARGET_ASYNC_CLASS" c:identifier="GTK_IS_DROP_TARGET_ASYNC_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_DROP_TARGET_CLASS" c:identifier="GTK_IS_DROP_TARGET_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EDITABLE" c:identifier="GTK_IS_EDITABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EMOJI_CHOOSER" c:identifier="GTK_IS_EMOJI_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EMOJI_CHOOSER_CLASS" c:identifier="GTK_IS_EMOJI_CHOOSER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ENTRY" c:identifier="GTK_IS_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ENTRY_BUFFER" c:identifier="GTK_IS_ENTRY_BUFFER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ENTRY_BUFFER_CLASS" c:identifier="GTK_IS_ENTRY_BUFFER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ENTRY_CLASS" c:identifier="GTK_IS_ENTRY_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ENTRY_COMPLETION" c:identifier="GTK_IS_ENTRY_COMPLETION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER" c:identifier="GTK_IS_EVENT_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_FOCUS" c:identifier="GTK_IS_EVENT_CONTROLLER_FOCUS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_FOCUS_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_FOCUS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_KEY" c:identifier="GTK_IS_EVENT_CONTROLLER_KEY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_KEY_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_KEY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_LEGACY" c:identifier="GTK_IS_EVENT_CONTROLLER_LEGACY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_LEGACY_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_LEGACY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_MOTION" c:identifier="GTK_IS_EVENT_CONTROLLER_MOTION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_MOTION_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_MOTION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_SCROLL" c:identifier="GTK_IS_EVENT_CONTROLLER_SCROLL" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EVENT_CONTROLLER_SCROLL_CLASS" c:identifier="GTK_IS_EVENT_CONTROLLER_SCROLL_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EXPANDER" c:identifier="GTK_IS_EXPANDER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_EXPRESSION" c:identifier="GTK_IS_EXPRESSION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FILE_CHOOSER" c:identifier="GTK_IS_FILE_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FILE_CHOOSER_DIALOG" c:identifier="GTK_IS_FILE_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FILE_CHOOSER_WIDGET" c:identifier="GTK_IS_FILE_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FILE_FILTER" c:identifier="GTK_IS_FILE_FILTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FIXED" c:identifier="GTK_IS_FIXED" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FIXED_CLASS" c:identifier="GTK_IS_FIXED_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FLOW_BOX" c:identifier="GTK_IS_FLOW_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FLOW_BOX_CHILD" c:identifier="GTK_IS_FLOW_BOX_CHILD" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FLOW_BOX_CHILD_CLASS" c:identifier="GTK_IS_FLOW_BOX_CHILD_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FONT_BUTTON" c:identifier="GTK_IS_FONT_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FONT_CHOOSER" c:identifier="GTK_IS_FONT_CHOOSER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FONT_CHOOSER_DIALOG" c:identifier="GTK_IS_FONT_CHOOSER_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FONT_CHOOSER_WIDGET" c:identifier="GTK_IS_FONT_CHOOSER_WIDGET" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FRAME" c:identifier="GTK_IS_FRAME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_FRAME_CLASS" c:identifier="GTK_IS_FRAME_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE" c:identifier="GTK_IS_GESTURE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_CLASS" c:identifier="GTK_IS_GESTURE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_CLICK" c:identifier="GTK_IS_GESTURE_CLICK" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_CLICK_CLASS" c:identifier="GTK_IS_GESTURE_CLICK_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_DRAG" c:identifier="GTK_IS_GESTURE_DRAG" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_DRAG_CLASS" c:identifier="GTK_IS_GESTURE_DRAG_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_LONG_PRESS" c:identifier="GTK_IS_GESTURE_LONG_PRESS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_LONG_PRESS_CLASS" c:identifier="GTK_IS_GESTURE_LONG_PRESS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_PAN" c:identifier="GTK_IS_GESTURE_PAN" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_PAN_CLASS" c:identifier="GTK_IS_GESTURE_PAN_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_ROTATE" c:identifier="GTK_IS_GESTURE_ROTATE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_ROTATE_CLASS" c:identifier="GTK_IS_GESTURE_ROTATE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_SINGLE" c:identifier="GTK_IS_GESTURE_SINGLE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_SINGLE_CLASS" c:identifier="GTK_IS_GESTURE_SINGLE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_STYLUS" c:identifier="GTK_IS_GESTURE_STYLUS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_STYLUS_CLASS" c:identifier="GTK_IS_GESTURE_STYLUS_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_SWIPE" c:identifier="GTK_IS_GESTURE_SWIPE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_SWIPE_CLASS" c:identifier="GTK_IS_GESTURE_SWIPE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_ZOOM" c:identifier="GTK_IS_GESTURE_ZOOM" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GESTURE_ZOOM_CLASS" c:identifier="GTK_IS_GESTURE_ZOOM_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GL_AREA" c:identifier="GTK_IS_GL_AREA" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GL_AREA_CLASS" c:identifier="GTK_IS_GL_AREA_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GRID" c:identifier="GTK_IS_GRID" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GRID_CLASS" c:identifier="GTK_IS_GRID_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GRID_VIEW" c:identifier="GTK_IS_GRID_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_GRID_VIEW_CLASS" c:identifier="GTK_IS_GRID_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_HEADER_BAR" c:identifier="GTK_IS_HEADER_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ICON_PAINTABLE" c:identifier="GTK_IS_ICON_PAINTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ICON_THEME" c:identifier="GTK_IS_ICON_THEME" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ICON_VIEW" c:identifier="GTK_IS_ICON_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IMAGE" c:identifier="GTK_IS_IMAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_CONTEXT" c:identifier="GTK_IS_IM_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_CONTEXT_CLASS" c:identifier="GTK_IS_IM_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_CONTEXT_SIMPLE" c:identifier="GTK_IS_IM_CONTEXT_SIMPLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_CONTEXT_SIMPLE_CLASS" c:identifier="GTK_IS_IM_CONTEXT_SIMPLE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_MULTICONTEXT" c:identifier="GTK_IS_IM_MULTICONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_IM_MULTICONTEXT_CLASS" c:identifier="GTK_IS_IM_MULTICONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_INFO_BAR" c:identifier="GTK_IS_INFO_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LABEL" c:identifier="GTK_IS_LABEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LEVEL_BAR" c:identifier="GTK_IS_LEVEL_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LINK_BUTTON" c:identifier="GTK_IS_LINK_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_BASE" c:identifier="GTK_IS_LIST_BASE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_BASE_CLASS" c:identifier="GTK_IS_LIST_BASE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_BOX" c:identifier="GTK_IS_LIST_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_BOX_ROW" c:identifier="GTK_IS_LIST_BOX_ROW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_BOX_ROW_CLASS" c:identifier="GTK_IS_LIST_BOX_ROW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_ITEM" c:identifier="GTK_IS_LIST_ITEM" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_ITEM_CLASS" c:identifier="GTK_IS_LIST_ITEM_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_ITEM_FACTORY" c:identifier="GTK_IS_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_IS_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_STORE" c:identifier="GTK_IS_LIST_STORE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_STORE_CLASS" c:identifier="GTK_IS_LIST_STORE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_VIEW" c:identifier="GTK_IS_LIST_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LIST_VIEW_CLASS" c:identifier="GTK_IS_LIST_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_LOCK_BUTTON" c:identifier="GTK_IS_LOCK_BUTTON" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_MENU_BUTTON" c:identifier="GTK_IS_MENU_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_MESSAGE_DIALOG" c:identifier="GTK_IS_MESSAGE_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_MOUNT_OPERATION" c:identifier="GTK_IS_MOUNT_OPERATION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_MOUNT_OPERATION_CLASS" c:identifier="GTK_IS_MOUNT_OPERATION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_NOTEBOOK" c:identifier="GTK_IS_NOTEBOOK" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_NOTEBOOK_PAGE" c:identifier="GTK_IS_NOTEBOOK_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_ORIENTABLE" c:identifier="GTK_IS_ORIENTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_OVERLAY" c:identifier="GTK_IS_OVERLAY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PAD_CONTROLLER" c:identifier="GTK_IS_PAD_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PAD_CONTROLLER_CLASS" c:identifier="GTK_IS_PAD_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PAGE_SETUP" c:identifier="GTK_IS_PAGE_SETUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PAGE_SETUP_UNIX_DIALOG" c:identifier="GTK_IS_PAGE_SETUP_UNIX_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PANED" c:identifier="GTK_IS_PANED" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PARAM_SPEC_EXPRESSION" c:identifier="GTK_IS_PARAM_SPEC_EXPRESSION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PASSWORD_ENTRY" c:identifier="GTK_IS_PASSWORD_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_POPOVER" c:identifier="GTK_IS_POPOVER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_POPOVER_CLASS" c:identifier="GTK_IS_POPOVER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_POPOVER_MENU" c:identifier="GTK_IS_POPOVER_MENU" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_POPOVER_MENU_BAR" c:identifier="GTK_IS_POPOVER_MENU_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINTER" c:identifier="GTK_IS_PRINTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_CONTEXT" c:identifier="GTK_IS_PRINT_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_JOB" c:identifier="GTK_IS_PRINT_JOB" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_OPERATION" c:identifier="GTK_IS_PRINT_OPERATION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_OPERATION_CLASS" c:identifier="GTK_IS_PRINT_OPERATION_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_OPERATION_PREVIEW" c:identifier="GTK_IS_PRINT_OPERATION_PREVIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_SETTINGS" c:identifier="GTK_IS_PRINT_SETTINGS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PRINT_UNIX_DIALOG" c:identifier="GTK_IS_PRINT_UNIX_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_PROGRESS_BAR" c:identifier="GTK_IS_PROGRESS_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_RANGE" c:identifier="GTK_IS_RANGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_RANGE_CLASS" c:identifier="GTK_IS_RANGE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_RECENT_MANAGER" c:identifier="GTK_IS_RECENT_MANAGER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_RECENT_MANAGER_CLASS" c:identifier="GTK_IS_RECENT_MANAGER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_REVEALER" c:identifier="GTK_IS_REVEALER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCALE" c:identifier="GTK_IS_SCALE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCALE_BUTTON" c:identifier="GTK_IS_SCALE_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCALE_BUTTON_CLASS" c:identifier="GTK_IS_SCALE_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCALE_CLASS" c:identifier="GTK_IS_SCALE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCROLLABLE" c:identifier="GTK_IS_SCROLLABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCROLLBAR" c:identifier="GTK_IS_SCROLLBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SCROLLED_WINDOW" c:identifier="GTK_IS_SCROLLED_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SEARCH_BAR" c:identifier="GTK_IS_SEARCH_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SEARCH_ENTRY" c:identifier="GTK_IS_SEARCH_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SEPARATOR" c:identifier="GTK_IS_SEPARATOR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SETTINGS" c:identifier="GTK_IS_SETTINGS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUTS_GROUP" c:identifier="GTK_IS_SHORTCUTS_GROUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUTS_SECTION" c:identifier="GTK_IS_SHORTCUTS_SECTION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUTS_SHORTCUT" c:identifier="GTK_IS_SHORTCUTS_SHORTCUT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUTS_WINDOW" c:identifier="GTK_IS_SHORTCUTS_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUT_CONTROLLER" c:identifier="GTK_IS_SHORTCUT_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUT_CONTROLLER_CLASS" c:identifier="GTK_IS_SHORTCUT_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SHORTCUT_LABEL" c:identifier="GTK_IS_SHORTCUT_LABEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SIGNAL_LIST_ITEM_FACTORY" c:identifier="GTK_IS_SIGNAL_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SIGNAL_LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_IS_SIGNAL_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SIZE_GROUP" c:identifier="GTK_IS_SIZE_GROUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SNAPSHOT" c:identifier="GTK_IS_SNAPSHOT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SPINNER" c:identifier="GTK_IS_SPINNER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SPIN_BUTTON" c:identifier="GTK_IS_SPIN_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STACK" c:identifier="GTK_IS_STACK" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STACK_PAGE" c:identifier="GTK_IS_STACK_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STACK_SIDEBAR" c:identifier="GTK_IS_STACK_SIDEBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STACK_SWITCHER" c:identifier="GTK_IS_STACK_SWITCHER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STATUSBAR" c:identifier="GTK_IS_STATUSBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STYLE_CONTEXT" c:identifier="GTK_IS_STYLE_CONTEXT" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STYLE_CONTEXT_CLASS" c:identifier="GTK_IS_STYLE_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="c">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_STYLE_PROVIDER" c:identifier="GTK_IS_STYLE_PROVIDER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_SWITCH" c:identifier="GTK_IS_SWITCH" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT" c:identifier="GTK_IS_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_BUFFER" c:identifier="GTK_IS_TEXT_BUFFER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_BUFFER_CLASS" c:identifier="GTK_IS_TEXT_BUFFER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_CHILD_ANCHOR" c:identifier="GTK_IS_TEXT_CHILD_ANCHOR" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_CHILD_ANCHOR_CLASS" c:identifier="GTK_IS_TEXT_CHILD_ANCHOR_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_MARK" c:identifier="GTK_IS_TEXT_MARK" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_MARK_CLASS" c:identifier="GTK_IS_TEXT_MARK_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_TAG" c:identifier="GTK_IS_TEXT_TAG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_TAG_CLASS" c:identifier="GTK_IS_TEXT_TAG_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_TAG_TABLE" c:identifier="GTK_IS_TEXT_TAG_TABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_VIEW" c:identifier="GTK_IS_TEXT_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TEXT_VIEW_CLASS" c:identifier="GTK_IS_TEXT_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TOGGLE_BUTTON" c:identifier="GTK_IS_TOGGLE_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TOGGLE_BUTTON_CLASS" c:identifier="GTK_IS_TOGGLE_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TOOLTIP" c:identifier="GTK_IS_TOOLTIP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_DRAG_DEST" c:identifier="GTK_IS_TREE_DRAG_DEST" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_DRAG_SOURCE" c:identifier="GTK_IS_TREE_DRAG_SOURCE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_MODEL" c:identifier="GTK_IS_TREE_MODEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_MODEL_FILTER" c:identifier="GTK_IS_TREE_MODEL_FILTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_MODEL_FILTER_CLASS" c:identifier="GTK_IS_TREE_MODEL_FILTER_CLASS" introspectable="0">
<parameters>
<parameter name="vtable">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_MODEL_SORT" c:identifier="GTK_IS_TREE_MODEL_SORT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_MODEL_SORT_CLASS" c:identifier="GTK_IS_TREE_MODEL_SORT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_SELECTION" c:identifier="GTK_IS_TREE_SELECTION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_SORTABLE" c:identifier="GTK_IS_TREE_SORTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_STORE" c:identifier="GTK_IS_TREE_STORE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_STORE_CLASS" c:identifier="GTK_IS_TREE_STORE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_VIEW" c:identifier="GTK_IS_TREE_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_VIEW_CLASS" c:identifier="GTK_IS_TREE_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_TREE_VIEW_COLUMN" c:identifier="GTK_IS_TREE_VIEW_COLUMN" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_VIEWPORT" c:identifier="GTK_IS_VIEWPORT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_VOLUME_BUTTON" c:identifier="GTK_IS_VOLUME_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WIDGET" c:identifier="GTK_IS_WIDGET" introspectable="0">
<parameters>
<parameter name="widget">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WIDGET_CLASS" c:identifier="GTK_IS_WIDGET_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WINDOW" c:identifier="GTK_IS_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WINDOW_CLASS" c:identifier="GTK_IS_WINDOW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WINDOW_GROUP" c:identifier="GTK_IS_WINDOW_GROUP" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="IS_WINDOW_GROUP_CLASS" c:identifier="GTK_IS_WINDOW_GROUP_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<bitfield name="IconLookupFlags" glib:type-name="GtkIconLookupFlags" glib:get-type="gtk_icon_lookup_flags_get_type" c:type="GtkIconLookupFlags">
<doc xml:space="preserve">Used to specify options for gtk_icon_theme_lookup_icon().</doc>
<member name="force_regular" value="1" c:identifier="GTK_ICON_LOOKUP_FORCE_REGULAR" glib:nick="force-regular" glib:name="GTK_ICON_LOOKUP_FORCE_REGULAR">
<doc xml:space="preserve">Try to always load regular icons, even
when symbolic icon names are given</doc>
</member>
<member name="force_symbolic" value="2" c:identifier="GTK_ICON_LOOKUP_FORCE_SYMBOLIC" glib:nick="force-symbolic" glib:name="GTK_ICON_LOOKUP_FORCE_SYMBOLIC">
<doc xml:space="preserve">Try to always load symbolic icons, even
when regular icon names are given</doc>
</member>
<member name="preload" value="4" c:identifier="GTK_ICON_LOOKUP_PRELOAD" glib:nick="preload" glib:name="GTK_ICON_LOOKUP_PRELOAD">
<doc xml:space="preserve">Starts loading the texture in the background
so it is ready when later needed.</doc>
</member>
</bitfield>
<class name="IconPaintable" c:symbol-prefix="icon_paintable" c:type="GtkIconPaintable" parent="GObject.Object" glib:type-name="GtkIconPaintable" glib:get-type="gtk_icon_paintable_get_type">
<doc xml:space="preserve">Contains information found when looking up an icon in `GtkIconTheme`.
`GtkIconPaintable` implements `GdkPaintable`.</doc>
<implements name="Gdk.Paintable"/>
<implements name="SymbolicPaintable"/>
<constructor name="new_for_file" c:identifier="gtk_icon_paintable_new_for_file">
<doc xml:space="preserve">Creates a `GtkIconPaintable` for a file with a given size and scale.
The icon can then be rendered by using it as a `GdkPaintable`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkIconPaintable` containing
for the icon. Unref with g_object_unref()</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</return-value>
<parameters>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">a `GFile`</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">desired icon size</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">the desired scale</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</constructor>
<method name="get_file" c:identifier="gtk_icon_paintable_get_file" glib:get-property="file">
<attribute name="org.gtk.Method.get_property" value="file"/>
<doc xml:space="preserve">Gets the `GFile` that was used to load the icon.
Returns %NULL if the icon was not loaded from a file.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the `GFile` for the icon</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconPaintable`</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_icon_paintable_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Get the icon name being used for this icon.
When an icon looked up in the icon theme was not available, the
icon theme may use fallback icons - either those specified to
gtk_icon_theme_lookup_icon() or the always-available
"image-missing". The icon chosen is returned by this function.
If the icon was created without an icon theme, this function
returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the themed icon-name for the
icon, or %NULL if its not a themed icon.</doc>
<type name="filename" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconPaintable`</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_symbolic" c:identifier="gtk_icon_paintable_is_symbolic">
<attribute name="org.gtk.Method.get_property" value="is-symbolic"/>
<doc xml:space="preserve">Checks if the icon is symbolic or not.
This currently uses only the file name and not the file contents
for determining this. This behaviour may change in the future.
Note that to render a symbolic `GtkIconPaintable` properly (with
recoloring), you have to set its icon name on a `GtkImage`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the icon is symbolic, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconPaintable`</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</instance-parameter>
</parameters>
</method>
<property name="file" writable="1" construct-only="1" transfer-ownership="none" getter="get_file">
<attribute name="org.gtk.Property.get" value="gtk_icon_paintable_get_file"/>
<doc xml:space="preserve">The file representing the icon, if any.</doc>
<type name="Gio.File"/>
</property>
<property name="icon-name" writable="1" construct-only="1" transfer-ownership="none" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_icon_paintable_get_icon_name"/>
<doc xml:space="preserve">The icon name that was chosen during lookup.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="is-symbolic" writable="1" construct-only="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_icon_paintable_is_symbolic"/>
<doc xml:space="preserve">Whether the icon is symbolic or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<enumeration name="IconSize" glib:type-name="GtkIconSize" glib:get-type="gtk_icon_size_get_type" c:type="GtkIconSize">
<doc xml:space="preserve">Built-in icon sizes.
Icon sizes default to being inherited. Where they cannot be
inherited, text size is the default.
All widgets which use `GtkIconSize` set the normal-icons or
large-icons style classes correspondingly, and let themes
determine the actual size to be used with the
`-gtk-icon-size` CSS property.</doc>
<member name="inherit" value="0" c:identifier="GTK_ICON_SIZE_INHERIT" glib:nick="inherit" glib:name="GTK_ICON_SIZE_INHERIT">
<doc xml:space="preserve">Keep the size of the parent element</doc>
</member>
<member name="normal" value="1" c:identifier="GTK_ICON_SIZE_NORMAL" glib:nick="normal" glib:name="GTK_ICON_SIZE_NORMAL">
<doc xml:space="preserve">Size similar to text size</doc>
</member>
<member name="large" value="2" c:identifier="GTK_ICON_SIZE_LARGE" glib:nick="large" glib:name="GTK_ICON_SIZE_LARGE">
<doc xml:space="preserve">Large size, for example in an icon view</doc>
</member>
</enumeration>
<class name="IconTheme" c:symbol-prefix="icon_theme" c:type="GtkIconTheme" parent="GObject.Object" glib:type-name="GtkIconTheme" glib:get-type="gtk_icon_theme_get_type">
<doc xml:space="preserve">`GtkIconTheme` provides a facility for loading themed icons.
The main reason for using a name rather than simply providing a filename
is to allow different icons to be used depending on what &#x201C;icon theme&#x201D; is
selected by the user. The operation of icon themes on Linux and Unix
follows the [Icon Theme Specification](http://www.freedesktop.org/Standards/icon-theme-spec)
There is a fallback icon theme, named `hicolor`, where applications
should install their icons, but additional icon themes can be installed
as operating system vendors and users choose.
In many cases, named themes are used indirectly, via [class@Gtk.Image]
rather than directly, but looking up icons directly is also simple. The
`GtkIconTheme` object acts as a database of all the icons in the current
theme. You can create new `GtkIconTheme` objects, but it&#x2019;s much more
efficient to use the standard icon theme of the `GtkWidget` so that the
icon information is shared with other people looking up icons.
```c
GtkIconTheme *icon_theme;
GtkIconPaintable *icon;
GdkPaintable *paintable;
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (my_widget));
icon = gtk_icon_theme_lookup_icon (icon_theme,
"my-icon-name", // icon name
48, // icon size
1, // scale
0, // flags);
paintable = GDK_PAINTABLE (icon);
// Use the paintable
g_object_unref (icon);
```</doc>
<constructor name="new" c:identifier="gtk_icon_theme_new">
<doc xml:space="preserve">Creates a new icon theme object.
Icon theme objects are used to lookup up an icon by name
in a particular icon theme. Usually, you&#x2019;ll want to use
[func@Gtk.IconTheme.get_for_display] rather than creating
a new icon theme object for scratch.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created `GtkIconTheme` object.</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</return-value>
</constructor>
<function name="get_for_display" c:identifier="gtk_icon_theme_get_for_display">
<doc xml:space="preserve">Gets the icon theme object associated with @display.
If this function has not previously been called for the given
display, a new icon theme object will be created and associated
with the display. Icon theme objects are fairly expensive to create,
so using this function is usually a better choice than calling
[ctor@Gtk.IconTheme.new] and setting the display yourself; by using
this function a single icon theme object will be shared between users.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A unique `GtkIconTheme` associated with
the given display. This icon theme is associated with the display
and can be used as long as the display is open. Do not ref or unref it.</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</function>
<method name="add_resource_path" c:identifier="gtk_icon_theme_add_resource_path">
<doc xml:space="preserve">Adds a resource path that will be looked at when looking
for icons, similar to search paths.
See [method@Gtk.IconTheme.set_resource_path].
This function should be used to make application-specific icons
available as part of the icon theme.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a resource path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_search_path" c:identifier="gtk_icon_theme_add_search_path">
<doc xml:space="preserve">Appends a directory to the search path.
See [method@Gtk.IconTheme.set_search_path].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">directory name to append to the icon path</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_display" c:identifier="gtk_icon_theme_get_display" glib:get-property="display">
<doc xml:space="preserve">Returns the display that the `GtkIconTheme` object was
created for.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the display of @icon_theme</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_names" c:identifier="gtk_icon_theme_get_icon_names" glib:get-property="icon-names">
<doc xml:space="preserve">Lists the names of icons in the current icon theme.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a string array
holding the names of all the icons in the theme. You must
free the array using g_strfreev().</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_sizes" c:identifier="gtk_icon_theme_get_icon_sizes">
<doc xml:space="preserve">Returns an array of integers describing the sizes at which
the icon is available without scaling.
A size of -1 means that the icon is available in a scalable
format. The array is zero-terminated.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly
allocated array describing the sizes at which the icon is
available. The array should be freed with g_free() when it is no
longer needed.</doc>
<array c:type="int*">
<type name="gint" c:type="int"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:space="preserve">the name of an icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_resource_path" c:identifier="gtk_icon_theme_get_resource_path" glib:get-property="resource-path">
<doc xml:space="preserve">Gets the current resource path.
See [method@Gtk.IconTheme.set_resource_path].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">
A list of resource paths</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search_path" c:identifier="gtk_icon_theme_get_search_path" glib:get-property="search-path">
<doc xml:space="preserve">Gets the current search path.
See [method@Gtk.IconTheme.set_search_path].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">
a list of icon theme path directories</doc>
<array c:type="char**">
<type name="filename"/>
</array>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_theme_name" c:identifier="gtk_icon_theme_get_theme_name" glib:get-property="theme-name">
<doc xml:space="preserve">Gets the current icon theme name.
Returns (transfer full): the current icon theme name,</doc>
<return-value transfer-ownership="full">
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_gicon" c:identifier="gtk_icon_theme_has_gicon" version="4.2">
<doc xml:space="preserve">Checks whether an icon theme includes an icon
for a particular `GIcon`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self includes an icon for @gicon</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="gicon" transfer-ownership="none">
<doc xml:space="preserve">a `GIcon`</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</method>
<method name="has_icon" c:identifier="gtk_icon_theme_has_icon">
<doc xml:space="preserve">Checks whether an icon theme includes an icon
for a particular name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self includes an
icon for @icon_name.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:space="preserve">the name of an icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="lookup_by_gicon" c:identifier="gtk_icon_theme_lookup_by_gicon">
<doc xml:space="preserve">Looks up a icon for a desired size and window scale.
The icon can then be rendered by using it as a `GdkPaintable`,
or you can get information such as the filename and size.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkIconPaintable` containing
information about the icon. Unref with g_object_unref()</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="icon" transfer-ownership="none">
<doc xml:space="preserve">the `GIcon` to look up</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">desired icon size</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">the desired scale</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">text direction the icon will be displayed in</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags modifying the behavior of the icon lookup</doc>
<type name="IconLookupFlags" c:type="GtkIconLookupFlags"/>
</parameter>
</parameters>
</method>
<method name="lookup_icon" c:identifier="gtk_icon_theme_lookup_icon">
<doc xml:space="preserve">Looks up a named icon for a desired size and window scale,
returning a `GtkIconPaintable`.
The icon can then be rendered by using it as a `GdkPaintable`,
or you can get information such as the filename and size.
If the available @icon_name is not available and @fallbacks are
provided, they will be tried in order.
If no matching icon is found, then a paintable that renders the
"missing icon" icon is returned. If you need to do something else
for missing icons you need to use [method@Gtk.IconTheme.has_icon].
Note that you probably want to listen for icon theme changes and
update the icon. This is usually done by overriding the
GtkWidgetClass.css-changed() function.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkIconPaintable` object
containing the icon.</doc>
<type name="IconPaintable" c:type="GtkIconPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the icon to lookup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="fallbacks" transfer-ownership="none" nullable="1" allow-none="1">
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">desired icon size.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">the window scale this will be displayed on</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">text direction the icon will be displayed in</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags modifying the behavior of the icon lookup</doc>
<type name="IconLookupFlags" c:type="GtkIconLookupFlags"/>
</parameter>
</parameters>
</method>
<method name="set_resource_path" c:identifier="gtk_icon_theme_set_resource_path" glib:set-property="resource-path">
<doc xml:space="preserve">Sets the resource paths that will be looked at when
looking for icons, similar to search paths.
The resources are considered as part of the hicolor icon theme
and must be located in subdirectories that are defined in the
hicolor icon theme, such as `@path/16x16/actions/run.png`
or `@path/scalable/actions/run.svg`.
Icons that are directly placed in the resource path instead
of a subdirectory are also considered as ultimate fallback,
but they are treated like unthemed icons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">
NULL-terminated array of resource paths
that are searched for icons</doc>
<array c:type="const char* const*">
<type name="utf8"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_search_path" c:identifier="gtk_icon_theme_set_search_path" glib:set-property="search-path">
<doc xml:space="preserve">Sets the search path for the icon theme object.
When looking for an icon theme, GTK will search for a subdirectory
of one or more of the directories in @path with the same name
as the icon theme containing an index.theme file. (Themes from
multiple of the path elements are combined to allow themes to be
extended by adding icons in the user&#x2019;s home directory.)
In addition if an icon found isn&#x2019;t found either in the current
icon theme or the default icon theme, and an image file with
the right name is found directly in one of the elements of
@path, then that image will be used for the icon name.
(This is legacy feature, and new icons should be put
into the fallback icon theme, which is called hicolor,
rather than directly on the icon path.)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">NULL-terminated
array of directories that are searched for icon themes</doc>
<array c:type="const char* const*">
<type name="filename"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_theme_name" c:identifier="gtk_icon_theme_set_theme_name" glib:set-property="theme-name">
<doc xml:space="preserve">Sets the name of the icon theme that the `GtkIconTheme` object uses
overriding system configuration.
This function cannot be called on the icon theme objects returned
from [func@Gtk.IconTheme.get_for_display].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconTheme`</doc>
<type name="IconTheme" c:type="GtkIconTheme*"/>
</instance-parameter>
<parameter name="theme_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">name of icon theme to use instead of
configured theme, or %NULL to unset a previously set custom theme</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="display" writable="1" transfer-ownership="none" getter="get_display">
<doc xml:space="preserve">The display that this icon theme object is attached to.</doc>
<type name="Gdk.Display"/>
</property>
<property name="icon-names" transfer-ownership="none" getter="get_icon_names">
<doc xml:space="preserve">The icon names that are supported by the icon theme.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="resource-path" writable="1" transfer-ownership="none" setter="set_resource_path" getter="get_resource_path">
<doc xml:space="preserve">Resource paths that will be looked at when looking for icons,
similar to search paths.
The resources are considered as part of the hicolor icon theme
and must be located in subdirectories that are defined in the
hicolor icon theme, such as `@path/16x16/actions/run.png`.
Icons that are directly placed in the resource path instead
of a subdirectory are also considered as ultimate fallback.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="search-path" writable="1" transfer-ownership="none" setter="set_search_path" getter="get_search_path">
<doc xml:space="preserve">The search path for this icon theme.
When looking for icons, GTK will search for a subdirectory of
one or more of the directories in the search path with the same
name as the icon theme containing an index.theme file. (Themes
from multiple of the path elements are combined to allow themes
to be extended by adding icons in the user&#x2019;s home directory.)</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="theme-name" writable="1" transfer-ownership="none" setter="set_theme_name" getter="get_theme_name">
<doc xml:space="preserve">The name of the icon theme that is being used.
Unless set to a different value, this will be the value of
the `GtkSettings:gtk-icon-theme-name` property of the `GtkSettings`
object associated to the display of the icontheme object.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted when the icon theme changes.
This can happen becuase current icon theme is switched or
because GTK detects that a change has occurred in the
contents of the current icon theme.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<enumeration name="IconThemeError" glib:type-name="GtkIconThemeError" glib:get-type="gtk_icon_theme_error_get_type" c:type="GtkIconThemeError" glib:error-domain="gtk-icon-theme-error-quark">
<doc xml:space="preserve">Error codes for `GtkIconTheme` operations.</doc>
<member name="not_found" value="0" c:identifier="GTK_ICON_THEME_NOT_FOUND" glib:nick="not-found" glib:name="GTK_ICON_THEME_NOT_FOUND">
<doc xml:space="preserve">The icon specified does not exist in the theme</doc>
</member>
<member name="failed" value="1" c:identifier="GTK_ICON_THEME_FAILED" glib:nick="failed" glib:name="GTK_ICON_THEME_FAILED">
<doc xml:space="preserve">An unspecified error occurred.</doc>
</member>
<function name="quark" c:identifier="gtk_icon_theme_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<class name="IconView" c:symbol-prefix="icon_view" c:type="GtkIconView" parent="Widget" glib:type-name="GtkIconView" glib:get-type="gtk_icon_view_get_type">
<doc xml:space="preserve">`GtkIconView` is a widget which displays data in a grid of icons.
`GtkIconView` provides an alternative view on a `GtkTreeModel`.
It displays the model as a grid of icons with labels. Like
[class@Gtk.TreeView], it allows to select one or multiple items
(depending on the selection mode, see [method@Gtk.IconView.set_selection_mode]).
In addition to selection with the arrow keys, `GtkIconView` supports
rubberband selection, which is controlled by dragging the pointer.
Note that if the tree model is backed by an actual tree store (as
opposed to a flat list where the mapping to icons is obvious),
`GtkIconView` will only display the first level of the tree and
ignore the tree&#x2019;s branches.
# CSS nodes
```
iconview.view
&#x2570;&#x2500;&#x2500; [rubberband]
```
`GtkIconView` has a single CSS node with name iconview and style class .view.
For rubberband selection, a subnode with name rubberband is used.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<implements name="ConstraintTarget"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_icon_view_new">
<doc xml:space="preserve">Creates a new `GtkIconView` widget</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkIconView` widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_area" c:identifier="gtk_icon_view_new_with_area">
<doc xml:space="preserve">Creates a new `GtkIconView` widget using the
specified @area to layout cells inside the icons.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkIconView` widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea` to use to layout cells</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_model" c:identifier="gtk_icon_view_new_with_model">
<doc xml:space="preserve">Creates a new `GtkIconView` widget with the model @model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkIconView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">The model.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</constructor>
<method name="create_drag_icon" c:identifier="gtk_icon_view_create_drag_icon">
<doc xml:space="preserve">Creates a `GdkPaintable` representation of the item at @path.
This image is used for a drag icon.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly-allocated `GdkPaintable` of the drag icon.</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` in @icon_view</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="enable_model_drag_dest" c:identifier="gtk_icon_view_enable_model_drag_dest">
<doc xml:space="preserve">Turns @icon_view into a drop destination for automatic DND. Calling this
method sets `GtkIconView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="formats" transfer-ownership="none">
<doc xml:space="preserve">the formats that the drag will support</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the bitmask of possible actions for a drag to this
widget</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="enable_model_drag_source" c:identifier="gtk_icon_view_enable_model_drag_source">
<doc xml:space="preserve">Turns @icon_view into a drag source for automatic DND. Calling this
method sets `GtkIconView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="start_button_mask" transfer-ownership="none">
<doc xml:space="preserve">Mask of allowed buttons to start drag</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="formats" transfer-ownership="none">
<doc xml:space="preserve">the formats that the drag will support</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the bitmask of possible actions for a drag from this
widget</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="get_activate_on_single_click" c:identifier="gtk_icon_view_get_activate_on_single_click" glib:get-property="activate-on-single-click">
<doc xml:space="preserve">Gets the setting set by gtk_icon_view_set_activate_on_single_click().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if item-activated will be emitted on a single click</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cell_rect" c:identifier="gtk_icon_view_get_cell_rect">
<doc xml:space="preserve">Fills the bounding rectangle in widget coordinates for the cell specified by
@path and @cell. If @cell is %NULL the main cell area is used.
This function is only valid if @icon_view is realized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if there is no such item, %TRUE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">rectangle to fill with cell rect</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_column_spacing" c:identifier="gtk_icon_view_get_column_spacing" glib:get-property="column-spacing">
<doc xml:space="preserve">Returns the value of the ::column-spacing property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the space between columns</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_columns" c:identifier="gtk_icon_view_get_columns" glib:get-property="columns">
<doc xml:space="preserve">Returns the value of the ::columns property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of columns, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cursor" c:identifier="gtk_icon_view_get_cursor">
<doc xml:space="preserve">Fills in @path and @cell with the current cursor path and cell.
If the cursor isn&#x2019;t currently set, then *@path will be %NULL.
If no cell currently has focus, then *@cell will be %NULL.
The returned `GtkTreePath` must be freed with gtk_tree_path_free().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cursor is set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the current
cursor path</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="cell" direction="out" caller-allocates="0" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">Return location the current
focus cell</doc>
<type name="CellRenderer" c:type="GtkCellRenderer**"/>
</parameter>
</parameters>
</method>
<method name="get_dest_item_at_pos" c:identifier="gtk_icon_view_get_dest_item_at_pos">
<doc xml:space="preserve">Determines the destination item for a given position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there is an item at the given position.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="drag_x" transfer-ownership="none">
<doc xml:space="preserve">the position to determine the destination item for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="drag_y" transfer-ownership="none">
<doc xml:space="preserve">the position to determine the destination item for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the path of the item</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the drop position</doc>
<type name="IconViewDropPosition" c:type="GtkIconViewDropPosition*"/>
</parameter>
</parameters>
</method>
<method name="get_drag_dest_item" c:identifier="gtk_icon_view_get_drag_dest_item">
<doc xml:space="preserve">Gets information about the item that is highlighted for feedback.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the path of
the highlighted item</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the drop position</doc>
<type name="IconViewDropPosition" c:type="GtkIconViewDropPosition*"/>
</parameter>
</parameters>
</method>
<method name="get_item_at_pos" c:identifier="gtk_icon_view_get_item_at_pos">
<doc xml:space="preserve">Gets the path and cell for the icon at the given position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an item exists at the specified position</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The x position to be identified</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The y position to be identified</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the path</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="cell" direction="out" caller-allocates="0" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the renderer
responsible for the cell at (@x, @y)</doc>
<type name="CellRenderer" c:type="GtkCellRenderer**"/>
</parameter>
</parameters>
</method>
<method name="get_item_column" c:identifier="gtk_icon_view_get_item_column">
<doc xml:space="preserve">Gets the column in which the item @path is currently
displayed. Column numbers start at 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The column in which the item is displayed</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath` of the item</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_item_orientation" c:identifier="gtk_icon_view_get_item_orientation" glib:get-property="item-orientation">
<doc xml:space="preserve">Returns the value of the ::item-orientation property which determines
whether the labels are drawn beside the icons instead of below.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the relative position of texts and icons</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_item_padding" c:identifier="gtk_icon_view_get_item_padding" glib:get-property="item-padding">
<doc xml:space="preserve">Returns the value of the ::item-padding property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the padding around items</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_item_row" c:identifier="gtk_icon_view_get_item_row">
<doc xml:space="preserve">Gets the row in which the item @path is currently
displayed. Row numbers start at 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The row in which the item is displayed</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath` of the item</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_item_width" c:identifier="gtk_icon_view_get_item_width" glib:get-property="item-width">
<doc xml:space="preserve">Returns the value of the ::item-width property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the width of a single item, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin" c:identifier="gtk_icon_view_get_margin" glib:get-property="margin">
<doc xml:space="preserve">Returns the value of the ::margin property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the space at the borders</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_markup_column" c:identifier="gtk_icon_view_get_markup_column" glib:get-property="markup-column">
<doc xml:space="preserve">Returns the column with markup text for @icon_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the markup column, or -1 if it&#x2019;s unset.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_icon_view_get_model" glib:get-property="model">
<doc xml:space="preserve">Returns the model the `GtkIconView` is based on. Returns %NULL if the
model is unset.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The currently used `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_path_at_pos" c:identifier="gtk_icon_view_get_path_at_pos">
<doc xml:space="preserve">Gets the path for the icon at the given position.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The `GtkTreePath` corresponding
to the icon or %NULL if no icon exists at that position.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The x position to be identified</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The y position to be identified</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_pixbuf_column" c:identifier="gtk_icon_view_get_pixbuf_column" glib:get-property="pixbuf-column">
<doc xml:space="preserve">Returns the column with pixbufs for @icon_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the pixbuf column, or -1 if it&#x2019;s unset.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reorderable" c:identifier="gtk_icon_view_get_reorderable" glib:get-property="reorderable">
<doc xml:space="preserve">Retrieves whether the user can reorder the list via drag-and-drop.
See gtk_icon_view_set_reorderable().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the list can be reordered.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_spacing" c:identifier="gtk_icon_view_get_row_spacing" glib:get-property="row-spacing">
<doc xml:space="preserve">Returns the value of the ::row-spacing property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the space between rows</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_items" c:identifier="gtk_icon_view_get_selected_items">
<doc xml:space="preserve">Creates a list of paths of all selected items. Additionally, if you are
planning on modifying the model after calling this function, you may
want to convert the returned list into a list of `GtkTreeRowReferences`.
To do this, you can use gtk_tree_row_reference_new().
To free the return value, use `g_list_free_full`:
|[&lt;!-- language="C" --&gt;
GtkWidget *icon_view = gtk_icon_view_new ();
// Use icon_view
GList *list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (icon_view));
// use list
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
]|</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A `GList` containing a `GtkTreePath` for each selected row.</doc>
<type name="GLib.List" c:type="GList*">
<type name="TreePath"/>
</type>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_mode" c:identifier="gtk_icon_view_get_selection_mode" glib:get-property="selection-mode">
<doc xml:space="preserve">Gets the selection mode of the @icon_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current selection mode</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_spacing" c:identifier="gtk_icon_view_get_spacing" glib:get-property="spacing">
<doc xml:space="preserve">Returns the value of the ::spacing property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the space between cells</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text_column" c:identifier="gtk_icon_view_get_text_column" glib:get-property="text-column">
<doc xml:space="preserve">Returns the column with text for @icon_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the text column, or -1 if it&#x2019;s unset.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tooltip_column" c:identifier="gtk_icon_view_get_tooltip_column" glib:get-property="tooltip-column">
<doc xml:space="preserve">Returns the column of @icon_view&#x2019;s model which is being used for
displaying tooltips on @icon_view&#x2019;s rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the tooltip column that is currently being
used, or -1 if this is disabled.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tooltip_context" c:identifier="gtk_icon_view_get_tooltip_context">
<doc xml:space="preserve">This function is supposed to be used in a `GtkWidget::query-tooltip`
signal handler for `GtkIconView`. The @x, @y and @keyboard_tip values
which are received in the signal handler, should be passed to this
function without modification.
The return value indicates whether there is an icon view item at the given
coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
tooltips the item returned will be the cursor item. When %TRUE, then any of
@model, @path and @iter which have been provided will be set to point to
that row and the corresponding model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether or not the given tooltip context points to an item</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">an `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate (relative to widget coordinates)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate (relative to widget coordinates)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="keyboard_tip" transfer-ownership="none">
<doc xml:space="preserve">whether this is a keyboard tooltip or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="model" direction="out" caller-allocates="0" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to receive a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel**"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to receive a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to receive a `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_visible_range" c:identifier="gtk_icon_view_get_visible_range">
<doc xml:space="preserve">Sets @start_path and @end_path to be the first and last visible path.
Note that there may be invisible paths in between.
Both paths should be freed with gtk_tree_path_free() after use.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if valid paths were placed in @start_path and @end_path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="start_path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for start of region</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="end_path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for end of region</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
</parameters>
</method>
<method name="item_activated" c:identifier="gtk_icon_view_item_activated">
<doc xml:space="preserve">Activates the item determined by @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be activated</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="path_is_selected" c:identifier="gtk_icon_view_path_is_selected">
<doc xml:space="preserve">Returns %TRUE if the icon pointed to by @path is currently
selected. If @path does not point to a valid location, %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @path is selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to check selection on.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="scroll_to_path" c:identifier="gtk_icon_view_scroll_to_path">
<doc xml:space="preserve">Moves the alignments of @icon_view to the position specified by @path.
@row_align determines where the row is placed, and @col_align determines
where @column is placed. Both are expected to be between 0.0 and 1.0.
0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means
center.
If @use_align is %FALSE, then the alignment arguments are ignored, and the
tree does the minimum amount of work to scroll the item onto the screen.
This means that the item will be scrolled to the edge closest to its current
position. If the item is currently visible on the screen, nothing is done.
This function only works if the model is set, and @path is a valid row on
the model. If the model changes before the @icon_view is realized, the
centered path will be modified to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The path of the item to move to.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="use_align" transfer-ownership="none">
<doc xml:space="preserve">whether to use alignment arguments, or %FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="row_align" transfer-ownership="none">
<doc xml:space="preserve">The vertical alignment of the item specified by @path.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="col_align" transfer-ownership="none">
<doc xml:space="preserve">The horizontal alignment of the item specified by @path.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="select_all" c:identifier="gtk_icon_view_select_all">
<doc xml:space="preserve">Selects all the icons. @icon_view must has its selection mode set
to %GTK_SELECTION_MULTIPLE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_path" c:identifier="gtk_icon_view_select_path">
<doc xml:space="preserve">Selects the row at @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be selected.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="selected_foreach" c:identifier="gtk_icon_view_selected_foreach">
<doc xml:space="preserve">Calls a function for each selected icon. Note that the model or
selection cannot be modified from within this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">The function to call for each selected icon.</doc>
<type name="IconViewForeachFunc" c:type="GtkIconViewForeachFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to pass to the function.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="set_activate_on_single_click" c:identifier="gtk_icon_view_set_activate_on_single_click" glib:set-property="activate-on-single-click">
<doc xml:space="preserve">Causes the `GtkIconView`::item-activated signal to be emitted on
a single click instead of a double click.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="single" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to emit item-activated on a single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_column_spacing" c:identifier="gtk_icon_view_set_column_spacing" glib:set-property="column-spacing">
<doc xml:space="preserve">Sets the ::column-spacing property which specifies the space
which is inserted between the columns of the icon view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="column_spacing" transfer-ownership="none">
<doc xml:space="preserve">the column spacing</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_columns" c:identifier="gtk_icon_view_set_columns" glib:set-property="columns">
<doc xml:space="preserve">Sets the ::columns property which determines in how
many columns the icons are arranged. If @columns is
-1, the number of columns will be chosen automatically
to fill the available area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="columns" transfer-ownership="none">
<doc xml:space="preserve">the number of columns</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_cursor" c:identifier="gtk_icon_view_set_cursor">
<doc xml:space="preserve">Sets the current keyboard focus to be at @path, and selects it. This is
useful when you want to focus the user&#x2019;s attention on a particular item.
If @cell is not %NULL, then focus is given to the cell specified by
it. Additionally, if @start_editing is %TRUE, then editing should be
started in the specified cell.
This function is often followed by `gtk_widget_grab_focus
(icon_view)` in order to give keyboard focus to the widget.
Please note that editing can only happen when the widget is realized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">One of the cell renderers of @icon_view</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="start_editing" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the specified cell should start being edited.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_drag_dest_item" c:identifier="gtk_icon_view_set_drag_dest_item">
<doc xml:space="preserve">Sets the item that is highlighted for feedback.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The path of the item to highlight</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">Specifies where to drop, relative to the item</doc>
<type name="IconViewDropPosition" c:type="GtkIconViewDropPosition"/>
</parameter>
</parameters>
</method>
<method name="set_item_orientation" c:identifier="gtk_icon_view_set_item_orientation" glib:set-property="item-orientation">
<doc xml:space="preserve">Sets the ::item-orientation property which determines whether the labels
are drawn beside the icons instead of below.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the relative position of texts and icons</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<method name="set_item_padding" c:identifier="gtk_icon_view_set_item_padding" glib:set-property="item-padding">
<doc xml:space="preserve">Sets the `GtkIconView`:item-padding property which specifies the padding
around each of the icon view&#x2019;s items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="item_padding" transfer-ownership="none">
<doc xml:space="preserve">the item padding</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_item_width" c:identifier="gtk_icon_view_set_item_width" glib:set-property="item-width">
<doc xml:space="preserve">Sets the ::item-width property which specifies the width
to use for each item. If it is set to -1, the icon view will
automatically determine a suitable item size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="item_width" transfer-ownership="none">
<doc xml:space="preserve">the width for each item</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_margin" c:identifier="gtk_icon_view_set_margin" glib:set-property="margin">
<doc xml:space="preserve">Sets the ::margin property which specifies the space
which is inserted at the top, bottom, left and right
of the icon view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the margin</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_markup_column" c:identifier="gtk_icon_view_set_markup_column" glib:set-property="markup-column">
<doc xml:space="preserve">Sets the column with markup information for @icon_view to be
@column. The markup column must be of type `G_TYPE_STRING`.
If the markup column is set to something, it overrides
the text column set by gtk_icon_view_set_text_column().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">A column in the currently used model, or -1 to display no text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_icon_view_set_model" glib:set-property="model">
<doc xml:space="preserve">Sets the model for a `GtkIconView`.
If the @icon_view already has a model set, it will remove
it before setting the new model. If @model is %NULL, then
it will unset the old model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</method>
<method name="set_pixbuf_column" c:identifier="gtk_icon_view_set_pixbuf_column" glib:set-property="pixbuf-column">
<doc xml:space="preserve">Sets the column with pixbufs for @icon_view to be @column. The pixbuf
column must be of type `GDK_TYPE_PIXBUF`</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">A column in the currently used model, or -1 to disable</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_reorderable" c:identifier="gtk_icon_view_set_reorderable" glib:set-property="reorderable">
<doc xml:space="preserve">This function is a convenience function to allow you to reorder models that
support the `GtkTreeDragSourceIface` and the `GtkTreeDragDestIface`. Both
`GtkTreeStore` and `GtkListStore` support these. If @reorderable is %TRUE, then
the user can reorder the model by dragging and dropping rows. The
developer can listen to these changes by connecting to the model's
row_inserted and row_deleted signals. The reordering is implemented by setting up
the icon view as a drag source and destination. Therefore, drag and
drop can not be used in a reorderable view for any other purpose.
This function does not give you any degree of control over the order -- any
reordering is allowed. If more control is needed, you should probably
handle drag and drop manually.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="reorderable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the list of items can be reordered.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_row_spacing" c:identifier="gtk_icon_view_set_row_spacing" glib:set-property="row-spacing">
<doc xml:space="preserve">Sets the ::row-spacing property which specifies the space
which is inserted between the rows of the icon view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="row_spacing" transfer-ownership="none">
<doc xml:space="preserve">the row spacing</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_selection_mode" c:identifier="gtk_icon_view_set_selection_mode" glib:set-property="selection-mode">
<doc xml:space="preserve">Sets the selection mode of the @icon_view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">The selection mode</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</parameter>
</parameters>
</method>
<method name="set_spacing" c:identifier="gtk_icon_view_set_spacing" glib:set-property="spacing">
<doc xml:space="preserve">Sets the ::spacing property which specifies the space
which is inserted between the cells (i.e. the icon and
the text) of an item.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">the spacing</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_text_column" c:identifier="gtk_icon_view_set_text_column" glib:set-property="text-column">
<doc xml:space="preserve">Sets the column with text for @icon_view to be @column. The text
column must be of type `G_TYPE_STRING`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">A column in the currently used model, or -1 to display no text</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_cell" c:identifier="gtk_icon_view_set_tooltip_cell">
<doc xml:space="preserve">Sets the tip area of @tooltip to the area which @cell occupies in
the item pointed to by @path. See also gtk_tooltip_set_tip_area().
See also gtk_icon_view_set_tooltip_column() for a simpler alternative.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_column" c:identifier="gtk_icon_view_set_tooltip_column" glib:set-property="tooltip-column">
<doc xml:space="preserve">If you only plan to have simple (text-only) tooltips on full items, you
can use this function to have `GtkIconView` handle these automatically
for you. @column should be set to the column in @icon_view&#x2019;s model
containing the tooltip texts, or -1 to disable this feature.
When enabled, `GtkWidget:has-tooltip` will be set to %TRUE and
@icon_view will connect a `GtkWidget::query-tooltip` signal handler.
Note that the signal handler sets the text with gtk_tooltip_set_markup(),
so &amp;, &lt;, etc have to be escaped in the text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">an integer, which is a valid column number for @icon_view&#x2019;s model</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_item" c:identifier="gtk_icon_view_set_tooltip_item">
<doc xml:space="preserve">Sets the tip area of @tooltip to be the area covered by the item at @path.
See also gtk_icon_view_set_tooltip_column() for a simpler alternative.
See also gtk_tooltip_set_tip_area().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="unselect_all" c:identifier="gtk_icon_view_unselect_all">
<doc xml:space="preserve">Unselects all the icons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="unselect_path" c:identifier="gtk_icon_view_unselect_path">
<doc xml:space="preserve">Unselects the row at @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkIconView`.</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be unselected.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="unset_model_drag_dest" c:identifier="gtk_icon_view_unset_model_drag_dest">
<doc xml:space="preserve">Undoes the effect of gtk_icon_view_enable_model_drag_dest(). Calling this
method sets `GtkIconView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<method name="unset_model_drag_source" c:identifier="gtk_icon_view_unset_model_drag_source">
<doc xml:space="preserve">Undoes the effect of gtk_icon_view_enable_model_drag_source(). Calling this
method sets `GtkIconView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</instance-parameter>
</parameters>
</method>
<property name="activate-on-single-click" writable="1" transfer-ownership="none" setter="set_activate_on_single_click" getter="get_activate_on_single_click">
<doc xml:space="preserve">The activate-on-single-click property specifies whether the "item-activated" signal
will be emitted after a single click.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="cell-area" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellArea` used to layout cell renderers for this view.
If no area is specified when creating the icon view with gtk_icon_view_new_with_area()
a `GtkCellAreaBox` will be used.</doc>
<type name="CellArea"/>
</property>
<property name="column-spacing" writable="1" transfer-ownership="none" setter="set_column_spacing" getter="get_column_spacing">
<doc xml:space="preserve">The column-spacing property specifies the space which is inserted between
the columns of the icon view.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="columns" writable="1" transfer-ownership="none" setter="set_columns" getter="get_columns">
<doc xml:space="preserve">The columns property contains the number of the columns in which the
items should be displayed. If it is -1, the number of columns will
be chosen automatically to fill the available area.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="item-orientation" writable="1" transfer-ownership="none" setter="set_item_orientation" getter="get_item_orientation">
<doc xml:space="preserve">The item-orientation property specifies how the cells (i.e. the icon and
the text) of the item are positioned relative to each other.</doc>
<type name="Orientation"/>
</property>
<property name="item-padding" writable="1" transfer-ownership="none" setter="set_item_padding" getter="get_item_padding">
<doc xml:space="preserve">The item-padding property specifies the padding around each
of the icon view's item.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="item-width" writable="1" transfer-ownership="none" setter="set_item_width" getter="get_item_width">
<doc xml:space="preserve">The item-width property specifies the width to use for each item.
If it is set to -1, the icon view will automatically determine a
suitable item size.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="margin" writable="1" transfer-ownership="none" setter="set_margin" getter="get_margin">
<doc xml:space="preserve">The margin property specifies the space which is inserted
at the edges of the icon view.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="markup-column" writable="1" transfer-ownership="none" setter="set_markup_column" getter="get_markup_column">
<doc xml:space="preserve">The ::markup-column property contains the number of the model column
containing markup information to be displayed. The markup column must be
of type `G_TYPE_STRING`. If this property and the :text-column property
are both set to column numbers, it overrides the text column.
If both are set to -1, no texts are displayed.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<type name="TreeModel"/>
</property>
<property name="pixbuf-column" writable="1" transfer-ownership="none" setter="set_pixbuf_column" getter="get_pixbuf_column">
<doc xml:space="preserve">The ::pixbuf-column property contains the number of the model column
containing the pixbufs which are displayed. The pixbuf column must be
of type `GDK_TYPE_PIXBUF`. Setting this property to -1 turns off the
display of pixbufs.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="reorderable" writable="1" transfer-ownership="none" setter="set_reorderable" getter="get_reorderable">
<doc xml:space="preserve">The reorderable property specifies if the items can be reordered
by DND.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="row-spacing" writable="1" transfer-ownership="none" setter="set_row_spacing" getter="get_row_spacing">
<doc xml:space="preserve">The row-spacing property specifies the space which is inserted between
the rows of the icon view.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="selection-mode" writable="1" transfer-ownership="none" setter="set_selection_mode" getter="get_selection_mode">
<doc xml:space="preserve">The ::selection-mode property specifies the selection mode of
icon view. If the mode is %GTK_SELECTION_MULTIPLE, rubberband selection
is enabled, for the other modes, only keyboard selection is possible.</doc>
<type name="SelectionMode"/>
</property>
<property name="spacing" writable="1" transfer-ownership="none" setter="set_spacing" getter="get_spacing">
<doc xml:space="preserve">The spacing property specifies the space which is inserted between
the cells (i.e. the icon and the text) of an item.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="text-column" writable="1" transfer-ownership="none" setter="set_text_column" getter="get_text_column">
<doc xml:space="preserve">The ::text-column property contains the number of the model column
containing the texts which are displayed. The text column must be
of type `G_TYPE_STRING`. If this property and the :markup-column
property are both set to -1, no texts are displayed.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="tooltip-column" writable="1" transfer-ownership="none" setter="set_tooltip_column" getter="get_tooltip_column">
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="activate-cursor-item" when="last" action="1">
<doc xml:space="preserve">A [keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user activates the currently
focused item.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control activation
programmatically.
The default bindings for this signal are Space, Return and Enter.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="item-activated" when="last">
<doc xml:space="preserve">The ::item-activated signal is emitted when the method
gtk_icon_view_item_activated() is called, when the user double
clicks an item with the "activate-on-single-click" property set
to %FALSE, or when the user single clicks an item when the
"activate-on-single-click" property set to %TRUE. It is also
emitted when a non-editable item is selected and one of the keys:
Space, Return or Enter is pressed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath` for the activated item</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">The ::move-cursor signal is a
[keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user initiates a cursor movement.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal include
- Arrow keys which move by individual steps
- Home/End keys which move to the first/last item
- PageUp/PageDown which move by "pages"
All of these will extend the selection when combined with
the Shift modifier.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the move, as a `GtkMovementStep`</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<doc xml:space="preserve">whether to extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="modify" transfer-ownership="none">
<doc xml:space="preserve">whether to modify the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-all" when="last" action="1">
<doc xml:space="preserve">A [keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user selects all items.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control selection
programmatically.
The default binding for this signal is Ctrl-a.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="select-cursor-item" when="last" action="1">
<doc xml:space="preserve">A [keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user selects the item that is currently
focused.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control selection
programmatically.
There is no default binding for this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="selection-changed" when="first">
<doc xml:space="preserve">The ::selection-changed signal is emitted when the selection
(i.e. the set of selected items) changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggle-cursor-item" when="last" action="1">
<doc xml:space="preserve">A [keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user toggles whether the currently
focused item is selected or not. The exact effect of this
depend on the selection mode.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control selection
programmatically.
There is no default binding for this signal is Ctrl-Space.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="unselect-all" when="last" action="1">
<doc xml:space="preserve">A [keybinding signal][class@Gtk.SignalAction]
which gets emitted when the user unselects all items.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control selection
programmatically.
The default binding for this signal is Ctrl-Shift-a.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<enumeration name="IconViewDropPosition" glib:type-name="GtkIconViewDropPosition" glib:get-type="gtk_icon_view_drop_position_get_type" c:type="GtkIconViewDropPosition">
<doc xml:space="preserve">An enum for determining where a dropped item goes.</doc>
<member name="no_drop" value="0" c:identifier="GTK_ICON_VIEW_NO_DROP" glib:nick="no-drop" glib:name="GTK_ICON_VIEW_NO_DROP">
<doc xml:space="preserve">no drop possible</doc>
</member>
<member name="drop_into" value="1" c:identifier="GTK_ICON_VIEW_DROP_INTO" glib:nick="drop-into" glib:name="GTK_ICON_VIEW_DROP_INTO">
<doc xml:space="preserve">dropped item replaces the item</doc>
</member>
<member name="drop_left" value="2" c:identifier="GTK_ICON_VIEW_DROP_LEFT" glib:nick="drop-left" glib:name="GTK_ICON_VIEW_DROP_LEFT">
<doc xml:space="preserve">dropped item is inserted to the left</doc>
</member>
<member name="drop_right" value="3" c:identifier="GTK_ICON_VIEW_DROP_RIGHT" glib:nick="drop-right" glib:name="GTK_ICON_VIEW_DROP_RIGHT">
<doc xml:space="preserve">dropped item is inserted to the right</doc>
</member>
<member name="drop_above" value="4" c:identifier="GTK_ICON_VIEW_DROP_ABOVE" glib:nick="drop-above" glib:name="GTK_ICON_VIEW_DROP_ABOVE">
<doc xml:space="preserve">dropped item is inserted above</doc>
</member>
<member name="drop_below" value="5" c:identifier="GTK_ICON_VIEW_DROP_BELOW" glib:nick="drop-below" glib:name="GTK_ICON_VIEW_DROP_BELOW">
<doc xml:space="preserve">dropped item is inserted below</doc>
</member>
</enumeration>
<callback name="IconViewForeachFunc" c:type="GtkIconViewForeachFunc">
<doc xml:space="preserve">A function used by gtk_icon_view_selected_foreach() to map all
selected rows.
It will be called on every selected row in the view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="icon_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkIconView`</doc>
<type name="IconView" c:type="GtkIconView*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` of a selected row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="Image" c:symbol-prefix="image" c:type="GtkImage" parent="Widget" glib:type-name="GtkImage" glib:get-type="gtk_image_get_type">
<doc xml:space="preserve">The `GtkImage` widget displays an image.
![An example GtkImage](image.png)
Various kinds of object can be displayed as an image; most typically,
you would load a `GdkTexture` from a file, using the convenience function
[ctor@Gtk.Image.new_from_file], for instance:
```c
GtkWidget *image = gtk_image_new_from_file ("myfile.png");
```
If the file isn&#x2019;t loaded successfully, the image will contain a
&#x201C;broken image&#x201D; icon similar to that used in many web browsers.
If you want to handle errors in loading the file yourself,
for example by displaying an error message, then load the image with
[ctor@Gdk.Texture.new_from_file], then create the `GtkImage` with
[ctor@Gtk.Image.new_from_paintable].
Sometimes an application will want to avoid depending on external data
files, such as image files. See the documentation of `GResource` inside
GIO, for details. In this case, [property@Gtk.Image:resource],
[ctor@Gtk.Image.new_from_resource], and [method@Gtk.Image.set_from_resource]
should be used.
`GtkImage` displays its image as an icon, with a size that is determined
by the application. See [class@Gtk.Picture] if you want to show an image
at is actual size.
## CSS nodes
`GtkImage` has a single CSS node with the name `image`. The style classes
`.normal-icons` or `.large-icons` may appear, depending on the
[property@Gtk.Image:icon-size] property.
## Accessibility
`GtkImage` uses the `GTK_ACCESSIBLE_ROLE_IMG` role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_image_new">
<doc xml:space="preserve">Creates a new empty `GtkImage` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkImage` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_from_file" c:identifier="gtk_image_new_from_file">
<doc xml:space="preserve">Creates a new `GtkImage` displaying the file @filename.
If the file isn&#x2019;t found or can&#x2019;t be loaded, the resulting `GtkImage`
will display a &#x201C;broken image&#x201D; icon. This function never returns %NULL,
it always returns a valid `GtkImage` widget.
If you need to detect failures to load the file, use
[ctor@Gdk.Texture.new_from_file] to load the file yourself,
then create the `GtkImage` from the texture.
The storage type (see [method@Gtk.Image.get_storage_type])
of the returned image is not defined, it will be whatever
is appropriate for displaying the file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">a filename</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_gicon" c:identifier="gtk_image_new_from_gicon">
<doc xml:space="preserve">Creates a `GtkImage` displaying an icon from the current icon theme.
If the icon name isn&#x2019;t known, a &#x201C;broken image&#x201D; icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage` displaying the themed icon</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="icon" transfer-ownership="none">
<doc xml:space="preserve">an icon</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_icon_name" c:identifier="gtk_image_new_from_icon_name">
<doc xml:space="preserve">Creates a `GtkImage` displaying an icon from the current icon theme.
If the icon name isn&#x2019;t known, a &#x201C;broken image&#x201D; icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage` displaying the themed icon</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_paintable" c:identifier="gtk_image_new_from_paintable">
<doc xml:space="preserve">Creates a new `GtkImage` displaying @paintable.
The `GtkImage` does not assume a reference to the paintable; you still
need to unref it if you own references. `GtkImage` will add its own
reference rather than adopting yours.
The `GtkImage` will track changes to the @paintable and update
its size and contents in response to it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_pixbuf" c:identifier="gtk_image_new_from_pixbuf">
<doc xml:space="preserve">Creates a new `GtkImage` displaying @pixbuf.
The `GtkImage` does not assume a reference to the pixbuf; you still
need to unref it if you own references. `GtkImage` will add its own
reference rather than adopting yours.
This is a helper for [ctor@Gtk.Image.new_from_paintable], and you can't
get back the exact pixbuf once this is called, only a texture.
Note that this function just creates an `GtkImage` from the pixbuf.
The `GtkImage` created will not react to state changes. Should you
want that, you should use [ctor@Gtk.Image.new_from_icon_name].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="pixbuf" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPixbuf`</doc>
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_resource" c:identifier="gtk_image_new_from_resource">
<doc xml:space="preserve">Creates a new `GtkImage` displaying the resource file @resource_path.
If the file isn&#x2019;t found or can&#x2019;t be loaded, the resulting `GtkImage` will
display a &#x201C;broken image&#x201D; icon. This function never returns %NULL,
it always returns a valid `GtkImage` widget.
If you need to detect failures to load the file, use
[ctor@GdkPixbuf.Pixbuf.new_from_file] to load the file yourself,
then create the `GtkImage` from the pixbuf.
The storage type (see [method@Gtk.Image.get_storage_type]) of
the returned image is not defined, it will be whatever is
appropriate for displaying the file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkImage`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">a resource path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="clear" c:identifier="gtk_image_clear">
<doc xml:space="preserve">Resets the image to be empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_gicon" c:identifier="gtk_image_get_gicon" glib:get-property="gicon">
<attribute name="org.gtk.Method.get_property" value="gicon"/>
<doc xml:space="preserve">Gets the `GIcon` being displayed by the `GtkImage`.
The storage type of the image must be %GTK_IMAGE_EMPTY or
%GTK_IMAGE_GICON (see [method@Gtk.Image.get_storage_type]).
The caller of this function does not own a reference to the
returned `GIcon`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GIcon`</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_image_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Gets the icon name and size being displayed by the `GtkImage`.
The storage type of the image must be %GTK_IMAGE_EMPTY or
%GTK_IMAGE_ICON_NAME (see [method@Gtk.Image.get_storage_type]).
The returned string is owned by the `GtkImage` and should not
be freed.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the icon name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_size" c:identifier="gtk_image_get_icon_size" glib:get-property="icon-size">
<attribute name="org.gtk.Method.get_property" value="icon-size"/>
<doc xml:space="preserve">Gets the icon size used by the @image when rendering icons.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the image size used by icons</doc>
<type name="IconSize" c:type="GtkIconSize"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paintable" c:identifier="gtk_image_get_paintable" glib:get-property="paintable">
<attribute name="org.gtk.Method.get_property" value="paintable"/>
<doc xml:space="preserve">Gets the image `GdkPaintable` being displayed by the `GtkImage`.
The storage type of the image must be %GTK_IMAGE_EMPTY or
%GTK_IMAGE_PAINTABLE (see [method@Gtk.Image.get_storage_type]).
The caller of this function does not own a reference to the
returned paintable.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the displayed paintable</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pixel_size" c:identifier="gtk_image_get_pixel_size" glib:get-property="pixel-size">
<attribute name="org.gtk.Method.get_property" value="pixel-size"/>
<doc xml:space="preserve">Gets the pixel size used for named icons.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the pixel size used for named icons.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_storage_type" c:identifier="gtk_image_get_storage_type" glib:get-property="storage-type">
<attribute name="org.gtk.Method.get_property" value="storage-type"/>
<doc xml:space="preserve">Gets the type of representation being used by the `GtkImage`
to store image data.
If the `GtkImage` has no image data, the return value will
be %GTK_IMAGE_EMPTY.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">image representation being used</doc>
<type name="ImageType" c:type="GtkImageType"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_from_file" c:identifier="gtk_image_set_from_file">
<attribute name="org.gtk.Method.set_property" value="file"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a file.
See [ctor@Gtk.Image.new_from_file] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a filename</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_from_gicon" c:identifier="gtk_image_set_from_gicon">
<attribute name="org.gtk.Method.set_property" value="gicon"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a `GIcon`.
See [ctor@Gtk.Image.new_from_gicon] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="icon" transfer-ownership="none">
<doc xml:space="preserve">an icon</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</method>
<method name="set_from_icon_name" c:identifier="gtk_image_set_from_icon_name">
<attribute name="org.gtk.Method.set_property" value="icon-name"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a named icon.
See [ctor@Gtk.Image.new_from_icon_name] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_from_paintable" c:identifier="gtk_image_set_from_paintable">
<attribute name="org.gtk.Method.set_property" value="paintable"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a `GdkPaintable`.
See [ctor@Gtk.Image.new_from_paintable] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="set_from_pixbuf" c:identifier="gtk_image_set_from_pixbuf">
<attribute name="org.gtk.Method.set_property" value="paintable"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a `GdkPixbuf`.
See [ctor@Gtk.Image.new_from_pixbuf] for details.
Note: This is a helper for [method@Gtk.Image.set_from_paintable],
and you can't get back the exact pixbuf once this is called,
only a paintable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="pixbuf" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPixbuf` or `NULL`</doc>
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</method>
<method name="set_from_resource" c:identifier="gtk_image_set_from_resource">
<attribute name="org.gtk.Method.set_property" value="resource"/>
<doc xml:space="preserve">Sets a `GtkImage` to show a resource.
See [ctor@Gtk.Image.new_from_resource] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a resource path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_size" c:identifier="gtk_image_set_icon_size" glib:set-property="icon-size">
<attribute name="org.gtk.Method.set_property" value="icon-size"/>
<doc xml:space="preserve">Suggests an icon size to the theme for named icons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="icon_size" transfer-ownership="none">
<doc xml:space="preserve">the new icon size</doc>
<type name="IconSize" c:type="GtkIconSize"/>
</parameter>
</parameters>
</method>
<method name="set_pixel_size" c:identifier="gtk_image_set_pixel_size" glib:set-property="pixel-size">
<attribute name="org.gtk.Method.set_property" value="pixel-size"/>
<doc xml:space="preserve">Sets the pixel size to use for named icons.
If the pixel size is set to a value != -1, it is used instead
of the icon size set by [method@Gtk.Image.set_from_icon_name].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="image" transfer-ownership="none">
<doc xml:space="preserve">a `GtkImage`</doc>
<type name="Image" c:type="GtkImage*"/>
</instance-parameter>
<parameter name="pixel_size" transfer-ownership="none">
<doc xml:space="preserve">the new pixel size</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="file" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.set" value="gtk_image_set_from_file"/>
<doc xml:space="preserve">The `GFile to display.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gicon" writable="1" transfer-ownership="none" getter="get_gicon">
<attribute name="org.gtk.Property.get" value="gtk_image_get_gicon"/>
<attribute name="org.gtk.Property.set" value="gtk_image_set_from_gicon"/>
<doc xml:space="preserve">The `GIcon` displayed in the GtkImage.
For themed icons, If the icon theme is changed, the image will be updated
automatically.</doc>
<type name="Gio.Icon"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_image_get_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_image_set_from_icon_name"/>
<doc xml:space="preserve">The name of the icon in the icon theme.
If the icon theme is changed, the image will be updated automatically.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="icon-size" writable="1" transfer-ownership="none" setter="set_icon_size" getter="get_icon_size">
<attribute name="org.gtk.Property.get" value="gtk_image_get_icon_size"/>
<attribute name="org.gtk.Property.set" value="gtk_image_set_icon_size"/>
<doc xml:space="preserve">The symbolic size to display icons at.</doc>
<type name="IconSize"/>
</property>
<property name="paintable" writable="1" transfer-ownership="none" getter="get_paintable">
<attribute name="org.gtk.Property.get" value="gtk_image_get_paintable"/>
<attribute name="org.gtk.Property.set" value="gtk_image_set_from_paintable"/>
<doc xml:space="preserve">The `GdkPaintable` to display.</doc>
<type name="Gdk.Paintable"/>
</property>
<property name="pixel-size" writable="1" transfer-ownership="none" setter="set_pixel_size" getter="get_pixel_size">
<attribute name="org.gtk.Property.get" value="gtk_image_get_pixel_size"/>
<attribute name="org.gtk.Property.set" value="gtk_image_set_pixel_size"/>
<doc xml:space="preserve">The size in pixels to display icons at.
If set to a value != -1, this property overrides the
[property@Gtk.Image:icon-size] property for images of type
`GTK_IMAGE_ICON_NAME`.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="resource" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.set" value="gtk_image_set_from_resource"/>
<doc xml:space="preserve">A path to a resource file to display.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="storage-type" transfer-ownership="none" getter="get_storage_type">
<attribute name="org.gtk.Property.get" value="gtk_image_get_storage_type"/>
<doc xml:space="preserve">The representation being used for image data.</doc>
<type name="ImageType"/>
</property>
<property name="use-fallback" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the icon displayed in the `GtkImage` will use
standard icon names fallback.
The value of this property is only relevant for images of type
%GTK_IMAGE_ICON_NAME and %GTK_IMAGE_GICON.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<enumeration name="ImageType" glib:type-name="GtkImageType" glib:get-type="gtk_image_type_get_type" c:type="GtkImageType">
<doc xml:space="preserve">Describes the image data representation used by a [class@Gtk.Image].
If you want to get the image from the widget, you can only get the
currently-stored representation; for instance, if the gtk_image_get_storage_type()
returns %GTK_IMAGE_PAINTABLE, then you can call gtk_image_get_paintable().
For empty images, you can request any storage type (call any of the "get"
functions), but they will all return %NULL values.</doc>
<member name="empty" value="0" c:identifier="GTK_IMAGE_EMPTY" glib:nick="empty" glib:name="GTK_IMAGE_EMPTY">
<doc xml:space="preserve">there is no image displayed by the widget</doc>
</member>
<member name="icon_name" value="1" c:identifier="GTK_IMAGE_ICON_NAME" glib:nick="icon-name" glib:name="GTK_IMAGE_ICON_NAME">
<doc xml:space="preserve">the widget contains a named icon</doc>
</member>
<member name="gicon" value="2" c:identifier="GTK_IMAGE_GICON" glib:nick="gicon" glib:name="GTK_IMAGE_GICON">
<doc xml:space="preserve">the widget contains a `GIcon`</doc>
</member>
<member name="paintable" value="3" c:identifier="GTK_IMAGE_PAINTABLE" glib:nick="paintable" glib:name="GTK_IMAGE_PAINTABLE">
<doc xml:space="preserve">the widget contains a `GdkPaintable`</doc>
</member>
</enumeration>
<class name="InfoBar" c:symbol-prefix="info_bar" c:type="GtkInfoBar" parent="Widget" glib:type-name="GtkInfoBar" glib:get-type="gtk_info_bar_get_type">
<doc xml:space="preserve">`GtkInfoBar` can be show messages to the user without a dialog.
![An example GtkInfoBar](info-bar.png)
It is often temporarily shown at the top or bottom of a document.
In contrast to [class@Gtk.Dialog], which has an action area at the
bottom, `GtkInfoBar` has an action area at the side.
The API of `GtkInfoBar` is very similar to `GtkDialog`, allowing you
to add buttons to the action area with [method@Gtk.InfoBar.add_button]
or [ctor@Gtk.InfoBar.new_with_buttons]. The sensitivity of action widgets
can be controlled with [method@Gtk.InfoBar.set_response_sensitive].
To add widgets to the main content area of a `GtkInfoBar`, use
[method@Gtk.InfoBar.add_child].
Similar to [class@Gtk.MessageDialog], the contents of a `GtkInfoBar`
can by classified as error message, warning, informational message, etc,
by using [method@Gtk.InfoBar.set_message_type]. GTK may use the message
type to determine how the message is displayed.
A simple example for using a `GtkInfoBar`:
```c
GtkWidget *message_label;
GtkWidget *widget;
GtkWidget *grid;
GtkInfoBar *bar;
// set up info bar
widget = gtk_info_bar_new ();
bar = GTK_INFO_BAR (widget);
grid = gtk_grid_new ();
message_label = gtk_label_new ("");
gtk_info_bar_add_child (bar, message_label);
gtk_info_bar_add_button (bar,
_("_OK"),
GTK_RESPONSE_OK);
g_signal_connect (bar,
"response",
G_CALLBACK (gtk_widget_hide),
NULL);
gtk_grid_attach (GTK_GRID (grid),
widget,
0, 2, 1, 1);
// ...
// show an error message
gtk_label_set_text (GTK_LABEL (message_label), "An error occurred!");
gtk_info_bar_set_message_type (bar, GTK_MESSAGE_ERROR);
gtk_widget_show (bar);
```
# GtkInfoBar as GtkBuildable
`GtkInfoBar` supports a custom `&lt;action-widgets&gt;` element, which can contain
multiple `&lt;action-widget&gt;` elements. The &#x201C;response&#x201D; attribute specifies a
numeric response, and the content of the element is the id of widget
(which should be a child of the dialogs @action_area).
`GtkInfoBar` supports adding action widgets by specifying &#x201C;action&#x201D; as
the &#x201C;type&#x201D; attribute of a `&lt;child&gt;` element. The widget will be added
either to the action area. The response id has to be associated
with the action widget using the `&lt;action-widgets&gt;` element.
# CSS nodes
`GtkInfoBar` has a single CSS node with name infobar. The node may get
one of the style classes .info, .warning, .error or .question, depending
on the message type.
If the info bar shows a close button, that button will have the .close
style class applied.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_info_bar_new">
<doc xml:space="preserve">Creates a new `GtkInfoBar` object.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkInfoBar` object</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_buttons" c:identifier="gtk_info_bar_new_with_buttons" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkInfoBar` with buttons.
Button text/response ID pairs should be listed, with a %NULL pointer
ending the list. A response ID can be any positive number,
or one of the values in the `GtkResponseType` enumeration. If the
user clicks one of these dialog buttons, GtkInfoBar will emit
the [signal@Gtk.InfoBar::response] signal with the corresponding
response ID.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkInfoBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="first_button_text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">ext to go in first button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">response ID for first button, then additional buttons, ending
with %NULL</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<method name="add_action_widget" c:identifier="gtk_info_bar_add_action_widget">
<doc xml:space="preserve">Add an activatable widget to the action area of a `GtkInfoBar`.
This also connects a signal handler that will emit the
[signal@Gtk.InfoBar::response] signal on the message area
when the widget is activated. The widget is appended to the
end of the message areas action area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">an activatable widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID for @child</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="add_button" c:identifier="gtk_info_bar_add_button">
<doc xml:space="preserve">Adds a button with the given text.
Clicking the button will emit the [signal@Gtk.InfoBar::response]
signal with the given response_id. The button is appended to the
end of the info bars's action area. The button widget is returned,
but usually you don't need it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkButton` widget
that was added</doc>
<type name="Button" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="button_text" transfer-ownership="none">
<doc xml:space="preserve">text of button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">response ID for the button</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="add_buttons" c:identifier="gtk_info_bar_add_buttons" introspectable="0">
<doc xml:space="preserve">Adds multiple buttons.
This is the same as calling [method@Gtk.InfoBar.add_button]
repeatedly. The variable argument list should be %NULL-terminated
as with [ctor@Gtk.InfoBar.new_with_buttons]. Each button must have both
text and response ID.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="first_button_text" transfer-ownership="none">
<doc xml:space="preserve">button text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">response ID for first button, then more text-response_id pairs,
ending with %NULL</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="add_child" c:identifier="gtk_info_bar_add_child">
<doc xml:space="preserve">Adds a widget to the content area of the info bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the child to be added</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_message_type" c:identifier="gtk_info_bar_get_message_type" glib:get-property="message-type">
<attribute name="org.gtk.Method.get_property" value="message-type"/>
<doc xml:space="preserve">Returns the message type of the message area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the message type of the message area.</doc>
<type name="MessageType" c:type="GtkMessageType"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_revealed" c:identifier="gtk_info_bar_get_revealed" glib:get-property="revealed">
<attribute name="org.gtk.Method.get_property" value="revealed"/>
<doc xml:space="preserve">Returns whether the info bar is currently revealed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current value of the [property@Gtk.InfoBar:revealed] property</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_close_button" c:identifier="gtk_info_bar_get_show_close_button" glib:get-property="show-close-button">
<attribute name="org.gtk.Method.get_property" value="show-close-button"/>
<doc xml:space="preserve">Returns whether the widget will display a standard close button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget displays standard close button</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_action_widget" c:identifier="gtk_info_bar_remove_action_widget">
<doc xml:space="preserve">Removes a widget from the action area of @info_bar.
The widget must have been put there by a call to
[method@Gtk.InfoBar.add_action_widget] or [method@Gtk.InfoBar.add_button].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">an action widget to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove_child" c:identifier="gtk_info_bar_remove_child">
<doc xml:space="preserve">Removes a widget from the content area of the info bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a child that has been added to the content area</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="response" c:identifier="gtk_info_bar_response">
<doc xml:space="preserve">Emits the &#x201C;response&#x201D; signal with the given @response_id.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">a response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="set_default_response" c:identifier="gtk_info_bar_set_default_response">
<doc xml:space="preserve">Sets the last widget in the info bar&#x2019;s action area with
the given response_id as the default widget for the dialog.
Pressing &#x201C;Enter&#x201D; normally activates the default widget.
Note that this function currently requires @info_bar to
be added to a widget hierarchy.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">a response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</method>
<method name="set_message_type" c:identifier="gtk_info_bar_set_message_type" glib:set-property="message-type">
<attribute name="org.gtk.Method.set_property" value="message-type"/>
<doc xml:space="preserve">Sets the message type of the message area.
GTK uses this type to determine how the message is displayed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="message_type" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMessageType`</doc>
<type name="MessageType" c:type="GtkMessageType"/>
</parameter>
</parameters>
</method>
<method name="set_response_sensitive" c:identifier="gtk_info_bar_set_response_sensitive">
<doc xml:space="preserve">Sets the sensitivity of action widgets for @response_id.
Calls `gtk_widget_set_sensitive (widget, setting)` for each
widget in the info bars&#x2019;s action area with the given @response_id.
A convenient way to sensitize/desensitize buttons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">a response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">TRUE for sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_revealed" c:identifier="gtk_info_bar_set_revealed" glib:set-property="revealed">
<attribute name="org.gtk.Method.set_property" value="revealed"/>
<doc xml:space="preserve">Sets whether the `GtkInfoBar` is revealed.
Changing this will make @info_bar reveal or conceal
itself via a sliding transition.
Note: this does not show or hide @info_bar in the
[property@Gtk.Widget:visible] sense, so revealing has no effect
if [property@Gtk.Widget:visible] is %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="revealed" transfer-ownership="none">
<doc xml:space="preserve">The new value of the property</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_close_button" c:identifier="gtk_info_bar_set_show_close_button" glib:set-property="show-close-button">
<attribute name="org.gtk.Method.set_property" value="show-close-button"/>
<doc xml:space="preserve">If true, a standard close button is shown.
When clicked it emits the response %GTK_RESPONSE_CLOSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info_bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkInfoBar`</doc>
<type name="InfoBar" c:type="GtkInfoBar*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to include a close button</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="message-type" writable="1" construct="1" transfer-ownership="none" setter="set_message_type" getter="get_message_type">
<attribute name="org.gtk.Property.get" value="gtk_info_bar_get_message_type"/>
<attribute name="org.gtk.Property.set" value="gtk_info_bar_set_message_type"/>
<doc xml:space="preserve">The type of the message.
The type may be used to determine the appearance of the info bar.</doc>
<type name="MessageType"/>
</property>
<property name="revealed" writable="1" transfer-ownership="none" setter="set_revealed" getter="get_revealed">
<attribute name="org.gtk.Property.get" value="gtk_info_bar_get_revealed"/>
<attribute name="org.gtk.Property.set" value="gtk_info_bar_set_revealed"/>
<doc xml:space="preserve">Whether the info bar shows its contents.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-close-button" writable="1" construct="1" transfer-ownership="none" setter="set_show_close_button" getter="get_show_close_button">
<attribute name="org.gtk.Property.get" value="gtk_info_bar_get_show_close_button"/>
<attribute name="org.gtk.Property.set" value="gtk_info_bar_set_show_close_button"/>
<doc xml:space="preserve">Whether to include a standard close button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="close" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user uses a keybinding to dismiss the info bar.
The ::close signal is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is the Escape key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="response" when="last">
<doc xml:space="preserve">Emitted when an action widget is clicked.
The signal is also emitted when the application programmer
calls [method@Gtk.InfoBar.response]. The @response_id depends
on which action widget was clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">the response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</glib:signal>
</class>
<bitfield name="InputHints" glib:type-name="GtkInputHints" glib:get-type="gtk_input_hints_get_type" c:type="GtkInputHints">
<doc xml:space="preserve">Describes hints that might be taken into account by input methods
or applications.
Note that input methods may already tailor their behaviour according
to the [enum@InputPurpose] of the entry.
Some common sense is expected when using these flags - mixing
%GTK_INPUT_HINT_LOWERCASE with any of the uppercase hints makes no sense.
This enumeration may be extended in the future; input methods should
ignore unknown values.</doc>
<member name="none" value="0" c:identifier="GTK_INPUT_HINT_NONE" glib:nick="none" glib:name="GTK_INPUT_HINT_NONE">
<doc xml:space="preserve">No special behaviour suggested</doc>
</member>
<member name="spellcheck" value="1" c:identifier="GTK_INPUT_HINT_SPELLCHECK" glib:nick="spellcheck" glib:name="GTK_INPUT_HINT_SPELLCHECK">
<doc xml:space="preserve">Suggest checking for typos</doc>
</member>
<member name="no_spellcheck" value="2" c:identifier="GTK_INPUT_HINT_NO_SPELLCHECK" glib:nick="no-spellcheck" glib:name="GTK_INPUT_HINT_NO_SPELLCHECK">
<doc xml:space="preserve">Suggest not checking for typos</doc>
</member>
<member name="word_completion" value="4" c:identifier="GTK_INPUT_HINT_WORD_COMPLETION" glib:nick="word-completion" glib:name="GTK_INPUT_HINT_WORD_COMPLETION">
<doc xml:space="preserve">Suggest word completion</doc>
</member>
<member name="lowercase" value="8" c:identifier="GTK_INPUT_HINT_LOWERCASE" glib:nick="lowercase" glib:name="GTK_INPUT_HINT_LOWERCASE">
<doc xml:space="preserve">Suggest to convert all text to lowercase</doc>
</member>
<member name="uppercase_chars" value="16" c:identifier="GTK_INPUT_HINT_UPPERCASE_CHARS" glib:nick="uppercase-chars" glib:name="GTK_INPUT_HINT_UPPERCASE_CHARS">
<doc xml:space="preserve">Suggest to capitalize all text</doc>
</member>
<member name="uppercase_words" value="32" c:identifier="GTK_INPUT_HINT_UPPERCASE_WORDS" glib:nick="uppercase-words" glib:name="GTK_INPUT_HINT_UPPERCASE_WORDS">
<doc xml:space="preserve">Suggest to capitalize the first
character of each word</doc>
</member>
<member name="uppercase_sentences" value="64" c:identifier="GTK_INPUT_HINT_UPPERCASE_SENTENCES" glib:nick="uppercase-sentences" glib:name="GTK_INPUT_HINT_UPPERCASE_SENTENCES">
<doc xml:space="preserve">Suggest to capitalize the
first word of each sentence</doc>
</member>
<member name="inhibit_osk" value="128" c:identifier="GTK_INPUT_HINT_INHIBIT_OSK" glib:nick="inhibit-osk" glib:name="GTK_INPUT_HINT_INHIBIT_OSK">
<doc xml:space="preserve">Suggest to not show an onscreen keyboard
(e.g for a calculator that already has all the keys).</doc>
</member>
<member name="vertical_writing" value="256" c:identifier="GTK_INPUT_HINT_VERTICAL_WRITING" glib:nick="vertical-writing" glib:name="GTK_INPUT_HINT_VERTICAL_WRITING">
<doc xml:space="preserve">The text is vertical</doc>
</member>
<member name="emoji" value="512" c:identifier="GTK_INPUT_HINT_EMOJI" glib:nick="emoji" glib:name="GTK_INPUT_HINT_EMOJI">
<doc xml:space="preserve">Suggest offering Emoji support</doc>
</member>
<member name="no_emoji" value="1024" c:identifier="GTK_INPUT_HINT_NO_EMOJI" glib:nick="no-emoji" glib:name="GTK_INPUT_HINT_NO_EMOJI">
<doc xml:space="preserve">Suggest not offering Emoji support</doc>
</member>
<member name="private" value="2048" c:identifier="GTK_INPUT_HINT_PRIVATE" glib:nick="private" glib:name="GTK_INPUT_HINT_PRIVATE">
<doc xml:space="preserve">Request that the input method should not
update personalized data (like typing history)</doc>
</member>
</bitfield>
<enumeration name="InputPurpose" glib:type-name="GtkInputPurpose" glib:get-type="gtk_input_purpose_get_type" c:type="GtkInputPurpose">
<doc xml:space="preserve">Describes primary purpose of the input widget.
This information is useful for on-screen keyboards and similar input
methods to decide which keys should be presented to the user.
Note that the purpose is not meant to impose a totally strict rule
about allowed characters, and does not replace input validation.
It is fine for an on-screen keyboard to let the user override the
character set restriction that is expressed by the purpose. The
application is expected to validate the entry contents, even if
it specified a purpose.
The difference between %GTK_INPUT_PURPOSE_DIGITS and
%GTK_INPUT_PURPOSE_NUMBER is that the former accepts only digits
while the latter also some punctuation (like commas or points, plus,
minus) and &#x201C;e&#x201D; or &#x201C;E&#x201D; as in 3.14E+000.
This enumeration may be extended in the future; input methods should
interpret unknown values as &#x201C;free form&#x201D;.</doc>
<member name="free_form" value="0" c:identifier="GTK_INPUT_PURPOSE_FREE_FORM" glib:nick="free-form" glib:name="GTK_INPUT_PURPOSE_FREE_FORM">
<doc xml:space="preserve">Allow any character</doc>
</member>
<member name="alpha" value="1" c:identifier="GTK_INPUT_PURPOSE_ALPHA" glib:nick="alpha" glib:name="GTK_INPUT_PURPOSE_ALPHA">
<doc xml:space="preserve">Allow only alphabetic characters</doc>
</member>
<member name="digits" value="2" c:identifier="GTK_INPUT_PURPOSE_DIGITS" glib:nick="digits" glib:name="GTK_INPUT_PURPOSE_DIGITS">
<doc xml:space="preserve">Allow only digits</doc>
</member>
<member name="number" value="3" c:identifier="GTK_INPUT_PURPOSE_NUMBER" glib:nick="number" glib:name="GTK_INPUT_PURPOSE_NUMBER">
<doc xml:space="preserve">Edited field expects numbers</doc>
</member>
<member name="phone" value="4" c:identifier="GTK_INPUT_PURPOSE_PHONE" glib:nick="phone" glib:name="GTK_INPUT_PURPOSE_PHONE">
<doc xml:space="preserve">Edited field expects phone number</doc>
</member>
<member name="url" value="5" c:identifier="GTK_INPUT_PURPOSE_URL" glib:nick="url" glib:name="GTK_INPUT_PURPOSE_URL">
<doc xml:space="preserve">Edited field expects URL</doc>
</member>
<member name="email" value="6" c:identifier="GTK_INPUT_PURPOSE_EMAIL" glib:nick="email" glib:name="GTK_INPUT_PURPOSE_EMAIL">
<doc xml:space="preserve">Edited field expects email address</doc>
</member>
<member name="name" value="7" c:identifier="GTK_INPUT_PURPOSE_NAME" glib:nick="name" glib:name="GTK_INPUT_PURPOSE_NAME">
<doc xml:space="preserve">Edited field expects the name of a person</doc>
</member>
<member name="password" value="8" c:identifier="GTK_INPUT_PURPOSE_PASSWORD" glib:nick="password" glib:name="GTK_INPUT_PURPOSE_PASSWORD">
<doc xml:space="preserve">Like %GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden</doc>
</member>
<member name="pin" value="9" c:identifier="GTK_INPUT_PURPOSE_PIN" glib:nick="pin" glib:name="GTK_INPUT_PURPOSE_PIN">
<doc xml:space="preserve">Like %GTK_INPUT_PURPOSE_DIGITS, but characters are hidden</doc>
</member>
<member name="terminal" value="10" c:identifier="GTK_INPUT_PURPOSE_TERMINAL" glib:nick="terminal" glib:name="GTK_INPUT_PURPOSE_TERMINAL">
<doc xml:space="preserve">Allow any character, in addition to control codes</doc>
</member>
</enumeration>
<enumeration name="Justification" glib:type-name="GtkJustification" glib:get-type="gtk_justification_get_type" c:type="GtkJustification">
<doc xml:space="preserve">Used for justifying the text inside a [class@Label] widget.</doc>
<member name="left" value="0" c:identifier="GTK_JUSTIFY_LEFT" glib:nick="left" glib:name="GTK_JUSTIFY_LEFT">
<doc xml:space="preserve">The text is placed at the left edge of the label.</doc>
</member>
<member name="right" value="1" c:identifier="GTK_JUSTIFY_RIGHT" glib:nick="right" glib:name="GTK_JUSTIFY_RIGHT">
<doc xml:space="preserve">The text is placed at the right edge of the label.</doc>
</member>
<member name="center" value="2" c:identifier="GTK_JUSTIFY_CENTER" glib:nick="center" glib:name="GTK_JUSTIFY_CENTER">
<doc xml:space="preserve">The text is placed in the center of the label.</doc>
</member>
<member name="fill" value="3" c:identifier="GTK_JUSTIFY_FILL" glib:nick="fill" glib:name="GTK_JUSTIFY_FILL">
<doc xml:space="preserve">The text is placed is distributed across the label.</doc>
</member>
</enumeration>
<class name="KeyvalTrigger" c:symbol-prefix="keyval_trigger" c:type="GtkKeyvalTrigger" parent="ShortcutTrigger" glib:type-name="GtkKeyvalTrigger" glib:get-type="gtk_keyval_trigger_get_type" glib:type-struct="KeyvalTriggerClass">
<doc xml:space="preserve">A `GtkShortcutTrigger` that triggers when a specific keyval and modifiers are pressed.</doc>
<constructor name="new" c:identifier="gtk_keyval_trigger_new">
<doc xml:space="preserve">Creates a `GtkShortcutTrigger` that will trigger whenever
the key with the given @keyval and @modifiers is pressed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">The keyval to trigger for</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="modifiers" transfer-ownership="none">
<doc xml:space="preserve">the modifiers that need to be present</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</constructor>
<method name="get_keyval" c:identifier="gtk_keyval_trigger_get_keyval" glib:get-property="keyval">
<attribute name="org.gtk.Method.get_property" value="keyval"/>
<doc xml:space="preserve">Gets the keyval that must be pressed to succeed
triggering @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the keyval</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a keyval `GtkShortcutTrigger`</doc>
<type name="KeyvalTrigger" c:type="GtkKeyvalTrigger*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modifiers" c:identifier="gtk_keyval_trigger_get_modifiers" glib:get-property="modifiers">
<attribute name="org.gtk.Method.get_property" value="modifiers"/>
<doc xml:space="preserve">Gets the modifiers that must be present to succeed
triggering @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the modifiers</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a keyval `GtkShortcutTrigger`</doc>
<type name="KeyvalTrigger" c:type="GtkKeyvalTrigger*"/>
</instance-parameter>
</parameters>
</method>
<property name="keyval" writable="1" construct-only="1" transfer-ownership="none" getter="get_keyval">
<attribute name="org.gtk.Property.get" value="gtk_keyval_trigger_get_keyval"/>
<doc xml:space="preserve">The key value for the trigger.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="modifiers" writable="1" construct-only="1" transfer-ownership="none" getter="get_modifiers">
<attribute name="org.gtk.Property.get" value="gtk_keyval_trigger_get_modifiers"/>
<doc xml:space="preserve">The key modifiers for the trigger.</doc>
<type name="Gdk.ModifierType"/>
</property>
</class>
<record name="KeyvalTriggerClass" c:type="GtkKeyvalTriggerClass" disguised="1" glib:is-gtype-struct-for="KeyvalTrigger"/>
<function-macro name="LABEL" c:identifier="GTK_LABEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LEVEL_BAR" c:identifier="GTK_LEVEL_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="LEVEL_BAR_OFFSET_FULL" value="full" c:type="GTK_LEVEL_BAR_OFFSET_FULL">
<doc xml:space="preserve">The name used for the stock full offset included by `GtkLevelBar`.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="LEVEL_BAR_OFFSET_HIGH" value="high" c:type="GTK_LEVEL_BAR_OFFSET_HIGH">
<doc xml:space="preserve">The name used for the stock high offset included by `GtkLevelBar`.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="LEVEL_BAR_OFFSET_LOW" value="low" c:type="GTK_LEVEL_BAR_OFFSET_LOW">
<doc xml:space="preserve">The name used for the stock low offset included by `GtkLevelBar`.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<function-macro name="LINK_BUTTON" c:identifier="GTK_LINK_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BASE" c:identifier="GTK_LIST_BASE" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BASE_CLASS" c:identifier="GTK_LIST_BASE_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BASE_GET_CLASS" c:identifier="GTK_LIST_BASE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BOX" c:identifier="GTK_LIST_BOX" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BOX_ROW" c:identifier="GTK_LIST_BOX_ROW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BOX_ROW_CLASS" c:identifier="GTK_LIST_BOX_ROW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_BOX_ROW_GET_CLASS" c:identifier="GTK_LIST_BOX_ROW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM" c:identifier="GTK_LIST_ITEM" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM_CLASS" c:identifier="GTK_LIST_ITEM_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM_FACTORY" c:identifier="GTK_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM_FACTORY_GET_CLASS" c:identifier="GTK_LIST_ITEM_FACTORY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_ITEM_GET_CLASS" c:identifier="GTK_LIST_ITEM_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_STORE" c:identifier="GTK_LIST_STORE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_STORE_CLASS" c:identifier="GTK_LIST_STORE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_STORE_GET_CLASS" c:identifier="GTK_LIST_STORE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_VIEW" c:identifier="GTK_LIST_VIEW" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_VIEW_CLASS" c:identifier="GTK_LIST_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="LIST_VIEW_GET_CLASS" c:identifier="GTK_LIST_VIEW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="LOCK_BUTTON" c:identifier="GTK_LOCK_BUTTON" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<class name="Label" c:symbol-prefix="label" c:type="GtkLabel" parent="Widget" glib:type-name="GtkLabel" glib:get-type="gtk_label_get_type">
<doc xml:space="preserve">The `GtkLabel` widget displays a small amount of text.
As the name implies, most labels are used to label another widget
such as a [class@Button].
![An example GtkLabel](label.png)
# CSS nodes
```
label
&#x251C;&#x2500;&#x2500; [selection]
&#x251C;&#x2500;&#x2500; [link]
&#x250A;
&#x2570;&#x2500;&#x2500; [link]
```
`GtkLabel` has a single CSS node with the name label. A wide variety
of style classes may be applied to labels, such as .title, .subtitle,
.dim-label, etc. In the `GtkShortcutsWindow`, labels are used with the
.keycap style class.
If the label has a selection, it gets a subnode with name selection.
If the label has links, there is one subnode per link. These subnodes
carry the link or visited state depending on whether they have been
visited. In this case, label node also gets a .link style class.
# GtkLabel as GtkBuildable
The GtkLabel implementation of the GtkBuildable interface supports a
custom &lt;attributes&gt; element, which supports any number of &lt;attribute&gt;
elements. The &lt;attribute&gt; element has attributes named &#x201C;name&#x201C;, &#x201C;value&#x201C;,
&#x201C;start&#x201C; and &#x201C;end&#x201C; and allows you to specify [struct@Pango.Attribute]
values for this label.
An example of a UI definition fragment specifying Pango attributes:
```xml
&lt;object class="GtkLabel"&gt;
&lt;attributes&gt;
&lt;attribute name="weight" value="PANGO_WEIGHT_BOLD"/&gt;
&lt;attribute name="background" value="red" start="5" end="10"/&gt;
&lt;/attributes&gt;
&lt;/object&gt;
```
The start and end attributes specify the range of characters to which the
Pango attribute applies. If start and end are not specified, the attribute is
applied to the whole text. Note that specifying ranges does not make much
sense with translatable attributes. Use markup embedded in the translatable
content instead.
# Accessibility
`GtkLabel` uses the %GTK_ACCESSIBLE_ROLE_LABEL role.
# Mnemonics
Labels may contain &#x201C;mnemonics&#x201D;. Mnemonics are underlined characters in the
label, used for keyboard navigation. Mnemonics are created by providing a
string with an underscore before the mnemonic character, such as `"_File"`,
to the functions [ctor@Gtk.Label.new_with_mnemonic] or
[method@Gtk.Label.set_text_with_mnemonic].
Mnemonics automatically activate any activatable widget the label is
inside, such as a [class@Gtk.Button]; if the label is not inside the
mnemonic&#x2019;s target widget, you have to tell the label about the target
using [class@Gtk.Label.set_mnemonic_widget]. Here&#x2019;s a simple example where
the label is inside a button:
```c
// Pressing Alt+H will activate this button
GtkWidget *button = gtk_button_new ();
GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
gtk_button_set_child (GTK_BUTTON (button), label);
```
There&#x2019;s a convenience function to create buttons with a mnemonic label
already inside:
```c
// Pressing Alt+H will activate this button
GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello");
```
To create a mnemonic for a widget alongside the label, such as a
[class@Gtk.Entry], you have to point the label at the entry with
[method@Gtk.Label.set_mnemonic_widget]:
```c
// Pressing Alt+H will focus the entry
GtkWidget *entry = gtk_entry_new ();
GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
```
# Markup (styled text)
To make it easy to format text in a label (changing colors,
fonts, etc.), label text can be provided in a simple
markup format:
Here&#x2019;s how to create a label with a small font:
```c
GtkWidget *label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "&lt;small&gt;Small text&lt;/small&gt;");
```
(See the Pango manual for complete documentation] of available
tags, [func@Pango.parse_markup])
The markup passed to gtk_label_set_markup() must be valid; for example,
literal &lt;, &gt; and &amp; characters must be escaped as &amp;lt;, &amp;gt;, and &amp;amp;.
If you pass text obtained from the user, file, or a network to
[method@Gtk.Label.set_markup], you&#x2019;ll want to escape it with
g_markup_escape_text() or g_markup_printf_escaped().
Markup strings are just a convenient way to set the [struct@Pango.AttrList]
on a label; [method@Gtk.Label.set_attributes] may be a simpler way to set
attributes in some cases. Be careful though; [struct@Pango.AttrList] tends
to cause internationalization problems, unless you&#x2019;re applying attributes
to the entire string (i.e. unless you set the range of each attribute
to [0, %G_MAXINT)). The reason is that specifying the start_index and
end_index for a [struct@Pango.Attribute] requires knowledge of the exact
string being displayed, so translations will cause problems.
# Selectable labels
Labels can be made selectable with [method@Gtk.Label.set_selectable].
Selectable labels allow the user to copy the label contents to
the clipboard. Only labels that contain useful-to-copy information
&#x2014; such as error messages &#x2014; should be made selectable.
# Text layout
A label can contain any number of paragraphs, but will have
performance problems if it contains more than a small number.
Paragraphs are separated by newlines or other paragraph separators
understood by Pango.
Labels can automatically wrap text if you call [method@Gtk.Label.set_wrap].
[method@Gtk.Label.set_justify] sets how the lines in a label align
with one another. If you want to set how the label as a whole aligns
in its available space, see the [property@Gtk.Widget:halign] and
[property@Gtk.Widget:valign] properties.
The [property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars]
properties can be used to control the size allocation of ellipsized or
wrapped labels. For ellipsizing labels, if either is specified (and less
than the actual text size), it is used as the minimum width, and the actual
text size is used as the natural width of the label. For wrapping labels,
width-chars is used as the minimum width, if specified, and max-width-chars
is used as the natural width. Even if max-width-chars specified, wrapping
labels will be rewrapped to use all of the available width.
# Links
GTK supports markup for clickable hyperlinks in addition to regular Pango
markup. The markup for links is borrowed from HTML, using the `&lt;a&gt;` with
&#x201C;href&#x201C;, &#x201C;title&#x201C; and &#x201C;class&#x201C; attributes. GTK renders links similar to the
way they appear in web browsers, with colored, underlined text. The &#x201C;title&#x201C;
attribute is displayed as a tooltip on the link. The &#x201C;class&#x201C; attribute is
used as style class on the CSS node for the link.
An example looks like this:
```c
const char *text =
"Go to the"
"&lt;a href=\"http://www.gtk.org title=\"&amp;lt;i&amp;gt;Our&amp;lt;/i&amp;gt; website\"&gt;"
"GTK website&lt;/a&gt; for more...";
GtkWidget *label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), text);
```
It is possible to implement custom handling for links and their tooltips
with the [signal@Gtk.Label::activate-link] signal and the
[method@Gtk.Label.get_current_uri] function.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_label_new">
<doc xml:space="preserve">Creates a new label with the given text inside it.
You can pass %NULL to get an empty label widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkLabel`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="str" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The text of the label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_mnemonic" c:identifier="gtk_label_new_with_mnemonic">
<doc xml:space="preserve">Creates a new `GtkLabel`, containing the text in @str.
If characters in @str are preceded by an underscore, they are
underlined. If you need a literal underscore character in a label, use
'__' (two underscores). The first underlined character represents a
keyboard accelerator called a mnemonic. The mnemonic key can be used
to activate another widget, chosen automatically, or explicitly using
[method@Gtk.Label.set_mnemonic_widget].
If [method@Gtk.Label.set_mnemonic_widget] is not called, then the first
activatable ancestor of the `GtkLabel` will be chosen as the mnemonic
widget. For instance, if the label is inside a button or menu item,
the button or menu item will automatically become the mnemonic widget
and be activated by the mnemonic.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkLabel`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="str" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The text of the label, with an underscore in front of the
mnemonic character</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_attributes" c:identifier="gtk_label_get_attributes" glib:get-property="attributes">
<attribute name="org.gtk.Method.get_property" value="attributes"/>
<doc xml:space="preserve">Gets the labels attribute list.
This is the [struct@Pango.AttrList] that was set on the label using
[method@Gtk.Label.set_attributes], if any. This function does not
reflect attributes that come from the labels markup (see
[method@Gtk.Label.set_markup]). If you want to get the effective
attributes for the label, use
`pango_layout_get_attribute (gtk_label_get_layout (self))`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the attribute list</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_current_uri" c:identifier="gtk_label_get_current_uri">
<doc xml:space="preserve">Returns the URI for the currently active link in the label.
The active link is the one under the mouse pointer or, in a
selectable label, the link in which the text cursor is currently
positioned.
This function is intended for use in a [signal@Gtk.Label::activate-link]
handler or for use in a [signal@Gtk.Widget::query-tooltip] handler.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the currently active URI</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ellipsize" c:identifier="gtk_label_get_ellipsize" glib:get-property="ellipsize">
<attribute name="org.gtk.Method.get_property" value="ellipsize"/>
<doc xml:space="preserve">Returns the ellipsizing position of the label.
See [method@Gtk.Label.set_ellipsize].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`PangoEllipsizeMode`</doc>
<type name="Pango.EllipsizeMode" c:type="PangoEllipsizeMode"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_extra_menu" c:identifier="gtk_label_get_extra_menu" glib:get-property="extra-menu">
<attribute name="org.gtk.Method.get_property" value="extra-menu"/>
<doc xml:space="preserve">Gets the extra menu model of @label.
See [method@Gtk.Label.set_extra_menu].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu model</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_justify" c:identifier="gtk_label_get_justify" glib:get-property="justify">
<attribute name="org.gtk.Method.get_property" value="justify"/>
<doc xml:space="preserve">Returns the justification of the label.
See [method@Gtk.Label.set_justify].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`GtkJustification`</doc>
<type name="Justification" c:type="GtkJustification"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_label_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Fetches the text from a label.
The returned text includes any embedded underlines indicating
mnemonics and Pango markup. (See [method@Gtk.Label.get_text]).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the text of the label widget. This string is
owned by the widget and must not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout" c:identifier="gtk_label_get_layout">
<doc xml:space="preserve">Gets the `PangoLayout` used to display the label.
The layout is useful to e.g. convert text positions to pixel
positions, in combination with [method@Gtk.Label.get_layout_offsets].
The returned layout is owned by the @label so need not be
freed by the caller. The @label is free to recreate its layout
at any time, so it should be considered read-only.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the [class@Pango.Layout] for this label</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout_offsets" c:identifier="gtk_label_get_layout_offsets">
<doc xml:space="preserve">Obtains the coordinates where the label will draw its `PangoLayout`.
The coordinates are useful to convert mouse events into coordinates
inside the [class@Pango.Layout], e.g. to take some action if some part
of the label is clicked. Remember when using the [class@Pango.Layout]
functions you need to convert to and from pixels using PANGO_PIXELS()
or [const@Pango.SCALE].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store X offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store Y offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_lines" c:identifier="gtk_label_get_lines" glib:get-property="lines">
<attribute name="org.gtk.Method.get_property" value="lines"/>
<doc xml:space="preserve">Gets the number of lines to which an ellipsized, wrapping
label should be limited.
See [method@Gtk.Label.set_lines].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of lines</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_width_chars" c:identifier="gtk_label_get_max_width_chars" glib:get-property="max-width-chars">
<attribute name="org.gtk.Method.get_property" value="max-width-chars"/>
<doc xml:space="preserve">Retrieves the desired maximum width of @label, in characters.
See [method@Gtk.Label.set_width_chars].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum width of the label in characters.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mnemonic_keyval" c:identifier="gtk_label_get_mnemonic_keyval" glib:get-property="mnemonic-keyval">
<attribute name="org.gtk.Method.get_property" value="mnemonic-keyval"/>
<doc xml:space="preserve">Return the mnemonic accelerator.
If the label has been set so that it has a mnemonic key this function
returns the keyval used for the mnemonic accelerator. If there is no
mnemonic set up it returns `GDK_KEY_VoidSymbol`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">GDK keyval usable for accelerators, or `GDK_KEY_VoidSymbol`</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mnemonic_widget" c:identifier="gtk_label_get_mnemonic_widget" glib:get-property="mnemonic-widget">
<attribute name="org.gtk.Method.get_property" value="mnemonic-widget"/>
<doc xml:space="preserve">Retrieves the target of the mnemonic (keyboard shortcut) of this
label.
See [method@Gtk.Label.set_mnemonic_widget].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the target of the label&#x2019;s mnemonic,
or %NULL if none has been set and the default algorithm will be used.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_natural_wrap_mode" c:identifier="gtk_label_get_natural_wrap_mode" glib:get-property="natural-wrap-mode" version="4.6">
<attribute name="org.gtk.Method.get_property" value="natural-wrap-mode"/>
<doc xml:space="preserve">Returns line wrap mode used by the label.
See [method@Gtk.Label.set_natural_wrap_mode].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the natural line wrap mode</doc>
<type name="NaturalWrapMode" c:type="GtkNaturalWrapMode"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selectable" c:identifier="gtk_label_get_selectable" glib:get-property="selectable">
<attribute name="org.gtk.Method.get_property" value="selectable"/>
<doc xml:space="preserve">Returns whether the label is selectable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the user can copy text from the label</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_bounds" c:identifier="gtk_label_get_selection_bounds">
<doc xml:space="preserve">Gets the selected range of characters in the label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if selection is non-empty</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="start" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for start of selection, as a character offset</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="end" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for end of selection, as a character offset</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_single_line_mode" c:identifier="gtk_label_get_single_line_mode" glib:get-property="single-line-mode">
<attribute name="org.gtk.Method.get_property" value="single-line-mode"/>
<doc xml:space="preserve">Returns whether the label is in single line mode.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE when the label is in single line mode.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_label_get_text">
<doc xml:space="preserve">Fetches the text from a label.
The returned text is as it appears on screen. This does not include
any embedded underlines indicating mnemonics or Pango markup. (See
[method@Gtk.Label.get_label])</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the text in the label widget. This is the internal
string used by the label, and must not be modified.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_markup" c:identifier="gtk_label_get_use_markup" glib:get-property="use-markup">
<attribute name="org.gtk.Method.get_property" value="use-markup"/>
<doc xml:space="preserve">Returns whether the label&#x2019;s text is interpreted as Pango markup.
See [method@Gtk.Label.set_use_markup].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the label&#x2019;s text will be parsed for markup.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_label_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">Returns whether an embedded underlines in the label indicate mnemonics.
See [method@Gtk.Label.set_use_underline].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE whether an embedded underline in the label indicates
the mnemonic accelerator keys.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width_chars" c:identifier="gtk_label_get_width_chars" glib:get-property="width-chars">
<attribute name="org.gtk.Method.get_property" value="width-chars"/>
<doc xml:space="preserve">Retrieves the desired width of @label, in characters.
See [method@Gtk.Label.set_width_chars].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the width of the label in characters.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_wrap" c:identifier="gtk_label_get_wrap" glib:get-property="wrap">
<attribute name="org.gtk.Method.get_property" value="wrap"/>
<doc xml:space="preserve">Returns whether lines in the label are automatically wrapped.
See [method@Gtk.Label.set_wrap].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the lines of the label are automatically wrapped.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_wrap_mode" c:identifier="gtk_label_get_wrap_mode" glib:get-property="wrap-mode">
<attribute name="org.gtk.Method.get_property" value="wrap-mode"/>
<doc xml:space="preserve">Returns line wrap mode used by the label.
See [method@Gtk.Label.set_wrap_mode].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the line wrap mode</doc>
<type name="Pango.WrapMode" c:type="PangoWrapMode"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_xalign" c:identifier="gtk_label_get_xalign" glib:get-property="xalign">
<attribute name="org.gtk.Method.get_property" value="xalign"/>
<doc xml:space="preserve">Gets the `xalign` of the label.
See the [property@Gtk.Label:xalign] property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the xalign property</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_yalign" c:identifier="gtk_label_get_yalign" glib:get-property="yalign">
<attribute name="org.gtk.Method.set_property" value="yalign"/>
<doc xml:space="preserve">Gets the `yalign` of the label.
See the [property@Gtk.Label:yalign] property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the yalign property</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_region" c:identifier="gtk_label_select_region">
<doc xml:space="preserve">Selects a range of characters in the label, if the label is selectable.
See [method@Gtk.Label.set_selectable]. If the label is not selectable,
this function has no effect. If @start_offset or
@end_offset are -1, then the end of the label will be substituted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="start_offset" transfer-ownership="none">
<doc xml:space="preserve">start offset (in characters not bytes)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="end_offset" transfer-ownership="none">
<doc xml:space="preserve">end offset (in characters not bytes)</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_label_set_attributes" glib:set-property="attributes">
<attribute name="org.gtk.Method.set_property" value="attributes"/>
<doc xml:space="preserve">Apply attributes to the label text.
The attributes set with this function will be applied and merged with
any other attributes previously effected by way of the
[property@Gtk.Label:use-underline] or [property@Gtk.Label:use-markup]
properties. While it is not recommended to mix markup strings with
manually set attributes, if you must; know that the attributes will
be applied to the label after the markup string is parsed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="attrs" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a [struct@Pango.AttrList]</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</parameter>
</parameters>
</method>
<method name="set_ellipsize" c:identifier="gtk_label_set_ellipsize" glib:set-property="ellipsize">
<attribute name="org.gtk.Method.set_property" value="ellipsize"/>
<doc xml:space="preserve">Sets the mode used to ellipsizei the text.
The text will be ellipsized if there is not enough space
to render the entire string.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">a `PangoEllipsizeMode`</doc>
<type name="Pango.EllipsizeMode" c:type="PangoEllipsizeMode"/>
</parameter>
</parameters>
</method>
<method name="set_extra_menu" c:identifier="gtk_label_set_extra_menu" glib:set-property="extra-menu">
<attribute name="org.gtk.Method.set_property" value="extra-menu"/>
<doc xml:space="preserve">Sets a menu model to add when constructing
the context menu for @label.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_justify" c:identifier="gtk_label_set_justify" glib:set-property="justify">
<attribute name="org.gtk.Method.set_property" value="justify"/>
<doc xml:space="preserve">Sets the alignment of the lines in the text of the label relative to
each other.
%GTK_JUSTIFY_LEFT is the default value when the widget is first created
with [ctor@Gtk.Label.new]. If you instead want to set the alignment of
the label as a whole, use [method@Gtk.Widget.set_halign] instead.
[method@Gtk.Label.set_justify] has no effect on labels containing
only a single line.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="jtype" transfer-ownership="none">
<doc xml:space="preserve">a `GtkJustification`</doc>
<type name="Justification" c:type="GtkJustification"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_label_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Sets the text of the label.
The label is interpreted as including embedded underlines and/or Pango
markup depending on the values of the [property@Gtk.Label:use-underline]
and [property@Gtk.Label:use-markup] properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">the new text to set for the label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_lines" c:identifier="gtk_label_set_lines" glib:set-property="lines">
<attribute name="org.gtk.Method.set_property" value="lines"/>
<doc xml:space="preserve">Sets the number of lines to which an ellipsized, wrapping label
should be limited.
This has no effect if the label is not wrapping or ellipsized.
Set this to -1 if you don&#x2019;t want to limit the number of lines.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="lines" transfer-ownership="none">
<doc xml:space="preserve">the desired number of lines, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_markup" c:identifier="gtk_label_set_markup">
<doc xml:space="preserve">Sets the labels text and attributes from markup.
The string must be marked up with Pango markup
(see [func@Pango.parse_markup]).
If the @str is external data, you may need to escape it
with g_markup_escape_text() or g_markup_printf_escaped():
```c
GtkWidget *self = gtk_label_new (NULL);
const char *str = "...";
const char *format = "&lt;span style=\"italic\"&gt;\%s&lt;/span&gt;";
char *markup;
markup = g_markup_printf_escaped (format, str);
gtk_label_set_markup (GTK_LABEL (self), markup);
g_free (markup);
```
This function will set the [property@Gtk.Label:use-markup] property
to %TRUE as a side effect.
If you set the label contents using the [property@Gtk.Label:label]
property you should also ensure that you set the
[property@Gtk.Label:use-markup] property accordingly.
See also: [method@Gtk.Label.set_text]</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">a markup string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_markup_with_mnemonic" c:identifier="gtk_label_set_markup_with_mnemonic">
<doc xml:space="preserve">Sets the labels text, attributes and mnemonic from markup.
Parses @str which is marked up with Pango markup (see [func@Pango.parse_markup]),
setting the label&#x2019;s text and attribute list based on the parse results.
If characters in @str are preceded by an underscore, they are underlined
indicating that they represent a keyboard accelerator called a mnemonic.
The mnemonic key can be used to activate another widget, chosen
automatically, or explicitly using [method@Gtk.Label.set_mnemonic_widget].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">a markup string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_max_width_chars" c:identifier="gtk_label_set_max_width_chars" glib:set-property="max-width-chars">
<attribute name="org.gtk.Method.set_property" value="max-width-chars"/>
<doc xml:space="preserve">Sets the desired maximum width in characters of @label to @n_chars.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the new desired maximum width, in characters.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_mnemonic_widget" c:identifier="gtk_label_set_mnemonic_widget" glib:set-property="mnemonic-widget">
<attribute name="org.gtk.Method.set_property" value="mnemonic-widget"/>
<doc xml:space="preserve">Associate the label with its mnemonic target.
If the label has been set so that it has a mnemonic key (using
i.e. [method@Gtk.Label.set_markup_with_mnemonic],
[method@Gtk.Label.set_text_with_mnemonic],
[ctor@Gtk.Label.new_with_mnemonic]
or the [property@Gtk.Label:use_underline] property) the label can be
associated with a widget that is the target of the mnemonic. When the
label is inside a widget (like a [class@Gtk.Button] or a
[class@Gtk.Notebook] tab) it is automatically associated with the correct
widget, but sometimes (i.e. when the target is a [class@Gtk.Entry] next to
the label) you need to set it explicitly using this function.
The target widget will be accelerated by emitting the
[signal@GtkWidget::mnemonic-activate] signal on it. The default handler for
this signal will activate the widget if there are no mnemonic collisions
and toggle focus between the colliding widgets otherwise.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the target `GtkWidget`, or %NULL to unset</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_natural_wrap_mode" c:identifier="gtk_label_set_natural_wrap_mode" glib:set-property="natural-wrap-mode" version="4.6">
<attribute name="org.gtk.Method.set_property" value="natural-wrap-mode"/>
<doc xml:space="preserve">Select the line wrapping for the natural size request.
This only affects the natural size requested, for the actual wrapping used,
see the [property@Gtk.Label:wrap-mode] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="wrap_mode" transfer-ownership="none">
<doc xml:space="preserve">the line wrapping mode</doc>
<type name="NaturalWrapMode" c:type="GtkNaturalWrapMode"/>
</parameter>
</parameters>
</method>
<method name="set_selectable" c:identifier="gtk_label_set_selectable" glib:set-property="selectable">
<attribute name="org.gtk.Method.set_property" value="selectable"/>
<doc xml:space="preserve">Makes text in the label selectable.
Selectable labels allow the user to select text from the label,
for copy-and-paste.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to allow selecting text in the label</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_single_line_mode" c:identifier="gtk_label_set_single_line_mode" glib:set-property="single-line-mode">
<attribute name="org.gtk.Method.set_property" value="single-line-mode"/>
<doc xml:space="preserve">Sets whether the label is in single line mode.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="single_line_mode" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the label should be in single line mode</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_label_set_text">
<doc xml:space="preserve">Sets the text within the `GtkLabel` widget.
It overwrites any text that was there before.
This function will clear any previously set mnemonic accelerators,
and set the [property@Gtk.Label:use-underline property] to %FALSE as
a side effect.
This function will set the [property@Gtk.Label:use-markup] property
to %FALSE as a side effect.
See also: [method@Gtk.Label.set_markup]</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">The text you want to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_text_with_mnemonic" c:identifier="gtk_label_set_text_with_mnemonic">
<doc xml:space="preserve">Sets the label&#x2019;s text from the string @str.
If characters in @str are preceded by an underscore, they are underlined
indicating that they represent a keyboard accelerator called a mnemonic.
The mnemonic key can be used to activate another widget, chosen
automatically, or explicitly using [method@Gtk.Label.set_mnemonic_widget].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">a string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_use_markup" c:identifier="gtk_label_set_use_markup" glib:set-property="use-markup">
<attribute name="org.gtk.Method.set_property" value="use-markup"/>
<doc xml:space="preserve">Sets whether the text of the label contains markup.
See [method@Gtk.Label.set_markup].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the label&#x2019;s text should be parsed for markup.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_label_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">Sets whether underlines in the text indicate mnemonics.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if underlines in the text indicate mnemonics</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_width_chars" c:identifier="gtk_label_set_width_chars" glib:set-property="width-chars">
<attribute name="org.gtk.Method.set_property" value="width-chars"/>
<doc xml:space="preserve">Sets the desired width in characters of @label to @n_chars.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="n_chars" transfer-ownership="none">
<doc xml:space="preserve">the new desired width, in characters.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_wrap" c:identifier="gtk_label_set_wrap" glib:set-property="wrap">
<attribute name="org.gtk.Method.set_property" value="wrap"/>
<doc xml:space="preserve">Toggles line wrapping within the `GtkLabel` widget.
%TRUE makes it break lines if text exceeds the widget&#x2019;s size.
%FALSE lets the text get cut off by the edge of the widget if
it exceeds the widget size.
Note that setting line wrapping to %TRUE does not make the label
wrap at its parent container&#x2019;s width, because GTK widgets
conceptually can&#x2019;t make their requisition depend on the parent
container&#x2019;s size. For a label that wraps at a specific position,
set the label&#x2019;s width using [method@Gtk.Widget.set_size_request].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="wrap" transfer-ownership="none">
<doc xml:space="preserve">the setting</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_wrap_mode" c:identifier="gtk_label_set_wrap_mode" glib:set-property="wrap-mode">
<attribute name="org.gtk.Method.set_property" value="wrap-mode"/>
<doc xml:space="preserve">Controls how line wrapping is done.
This only affects the label if line wrapping is on. (See
[method@Gtk.Label.set_wrap]) The default is %PANGO_WRAP_WORD
which means wrap on word boundaries.
For sizing behavior, also consider the [property@Gtk.Label:natural-wrap-mode]
property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="wrap_mode" transfer-ownership="none">
<doc xml:space="preserve">the line wrapping mode</doc>
<type name="Pango.WrapMode" c:type="PangoWrapMode"/>
</parameter>
</parameters>
</method>
<method name="set_xalign" c:identifier="gtk_label_set_xalign" glib:set-property="xalign">
<attribute name="org.gtk.Method.set_property" value="xalign"/>
<doc xml:space="preserve">Sets the `xalign` of the label.
See the [property@Gtk.Label:xalign] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">the new xalign value, between 0 and 1</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_yalign" c:identifier="gtk_label_set_yalign" glib:set-property="yalign">
<attribute name="org.gtk.Method.get_property" value="yalign"/>
<doc xml:space="preserve">Sets the `yalign` of the label.
See the [property@Gtk.Label:yalign] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLabel`</doc>
<type name="Label" c:type="GtkLabel*"/>
</instance-parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">the new yalign value, between 0 and 1</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<property name="attributes" writable="1" transfer-ownership="none" setter="set_attributes" getter="get_attributes">
<attribute name="org.gtk.Property.get" value="gtk_label_get_attributes"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_attributes"/>
<doc xml:space="preserve">A list of style attributes to apply to the text of the label.</doc>
<type name="Pango.AttrList"/>
</property>
<property name="ellipsize" writable="1" transfer-ownership="none" setter="set_ellipsize" getter="get_ellipsize">
<attribute name="org.gtk.Property.get" value="gtk_label_get_ellipsize"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_ellipsize"/>
<doc xml:space="preserve">The preferred place to ellipsize the string, if the label does
not have enough room to display the entire string.
Note that setting this property to a value other than
%PANGO_ELLIPSIZE_NONE has the side-effect that the label requests
only enough space to display the ellipsis "...". In particular, this
means that ellipsizing labels do not work well in notebook tabs, unless
the [property@Gtk.NotebookPage:tab-expand] child property is set to %TRUE.
Other ways to set a label's width are [method@Gtk.Widget.set_size_request]
and [method@Gtk.Label.set_width_chars].</doc>
<type name="Pango.EllipsizeMode"/>
</property>
<property name="extra-menu" writable="1" transfer-ownership="none" setter="set_extra_menu" getter="get_extra_menu">
<attribute name="org.gtk.Property.get" value="gtk_label_get_extra_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_extra_menu"/>
<doc xml:space="preserve">A menu model whose contents will be appended to the context menu.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="justify" writable="1" transfer-ownership="none" setter="set_justify" getter="get_justify">
<attribute name="org.gtk.Property.get" value="gtk_label_get_justify"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_justify"/>
<doc xml:space="preserve">The alignment of the lines in the text of the label, relative to each other.
This does *not* affect the alignment of the label within its allocation.
See [property@Gtk.Label:xalign] for that.</doc>
<type name="Justification"/>
</property>
<property name="label" writable="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_label_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_label"/>
<doc xml:space="preserve">The contents of the label.
If the string contains Pango markup (see [func@Pango.parse_markup]),
you will have to set the [property@Gtk.Label:use-markup] property to
%TRUE in order for the label to display the markup attributes. See also
[method@Gtk.Label.set_markup] for a convenience function that sets both
this property and the [property@Gtk.Label:use-markup] property at the
same time.
If the string contains underlines acting as mnemonics, you will have to
set the [property@Gtk.Label:use-underline] property to %TRUE in order
for the label to display them.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="lines" writable="1" transfer-ownership="none" setter="set_lines" getter="get_lines">
<attribute name="org.gtk.Property.get" value="gtk_label_get_lines"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_lines"/>
<doc xml:space="preserve">The number of lines to which an ellipsized, wrapping label
should be limited.
This property has no effect if the label is not wrapping or ellipsized.
Set this property to -1 if you don't want to limit the number of lines.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="max-width-chars" writable="1" transfer-ownership="none" setter="set_max_width_chars" getter="get_max_width_chars">
<attribute name="org.gtk.Property.get" value="gtk_label_set_max_width_chars"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_max_width_chars"/>
<doc xml:space="preserve">The desired maximum width of the label, in characters.
If this property is set to -1, the width will be calculated automatically.
See the section on [text layout](class.Label.html#text-layout) for details of how
[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars]
determine the width of ellipsized and wrapped labels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="mnemonic-keyval" transfer-ownership="none" getter="get_mnemonic_keyval">
<attribute name="org.gtk.Property.get" value="gtk_label_get_mnemonic_keyval"/>
<doc xml:space="preserve">The mnemonic accelerator key for the label.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="mnemonic-widget" writable="1" transfer-ownership="none" setter="set_mnemonic_widget" getter="get_mnemonic_widget">
<attribute name="org.gtk.Property.get" value="gtk_label_get_mnemonic_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_mnemonic_widget"/>
<doc xml:space="preserve">The widget to be activated when the labels mnemonic key is pressed.</doc>
<type name="Widget"/>
</property>
<property name="natural-wrap-mode" version="4.6" writable="1" transfer-ownership="none" setter="set_natural_wrap_mode" getter="get_natural_wrap_mode">
<attribute name="org.gtk.Property.get" value="gtk_label_get_natural_wrap_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_natural_wrap_mode"/>
<doc xml:space="preserve">Select the line wrapping for the natural size request.
This only affects the natural size requested. For the actual wrapping used,
see the [property@Gtk.Label:wrap-mode] property.
The default is %GTK_NATURAL_WRAP_INHERIT, which inherits the behavior of the
[property@Gtk.Label:wrap-mode] property.</doc>
<type name="NaturalWrapMode"/>
</property>
<property name="selectable" writable="1" transfer-ownership="none" setter="set_selectable" getter="get_selectable">
<attribute name="org.gtk.Property.get" value="gtk_label_get_selectable"/>
<attribute name="og.gtk.Property.set" value="gtk_label_set_selectable"/>
<doc xml:space="preserve">Whether the label text can be selected with the mouse.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="single-line-mode" writable="1" transfer-ownership="none" setter="set_single_line_mode" getter="get_single_line_mode">
<attribute name="org.gtk.Property.get" value="gtk_label_get_single_line_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_single_line_mode"/>
<doc xml:space="preserve">Whether the label is in single line mode.
In single line mode, the height of the label does not depend on the
actual text, it is always set to ascent + descent of the font. This
can be an advantage in situations where resizing the label because
of text changes would be distracting, e.g. in a statusbar.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-markup" writable="1" transfer-ownership="none" setter="set_use_markup" getter="get_use_markup">
<attribute name="org.gtk.Property.get" value="gtk_label_get_use_markup"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_use_markup"/>
<doc xml:space="preserve">%TRUE if the text of the label includes Pango markup.
See [func@Pango.parse_markup].</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-underline" writable="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_label_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_use_underline"/>
<doc xml:space="preserve">%TRUE if the text of the label indicates a mnemonic with _.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="width-chars" writable="1" transfer-ownership="none" setter="set_width_chars" getter="get_width_chars">
<attribute name="org.gtk.Property.get" value="gtk_label_get_width_chars"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_width_chars"/>
<doc xml:space="preserve">The desired width of the label, in characters.
If this property is set to -1, the width will be calculated automatically.
See the section on [text layout](class.Label.html#text-layout) for details of how
[property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars]
determine the width of ellipsized and wrapped labels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="wrap" writable="1" transfer-ownership="none" setter="set_wrap" getter="get_wrap">
<attribute name="org.gtk.Property.get" value="gtk_label_get_wrap"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_wrap"/>
<doc xml:space="preserve">%TRUE if the label text will wrap if it gets too wide.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="wrap-mode" writable="1" transfer-ownership="none" setter="set_wrap_mode" getter="get_wrap_mode">
<attribute name="org.gtk.Property.get" value="gtk_label_get_wrap_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_wrap_mode"/>
<doc xml:space="preserve">Controls how the line wrapping is done.
This only affects the formatting if line wrapping is on (see the
[property@Gtk.Label:wrap] property). The default is %PANGO_WRAP_WORD,
which means wrap on word boundaries.
For sizing behavior, also consider the [property@Gtk.Label:natural-wrap-mode]
property.</doc>
<type name="Pango.WrapMode"/>
</property>
<property name="xalign" writable="1" transfer-ownership="none" setter="set_xalign" getter="get_xalign">
<attribute name="org.gtk.Property.get" value="gtk_label_get_xalign"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_xalign"/>
<doc xml:space="preserve">The horizontal alignment of the label text inside its size allocation.
Compare this to [property@Gtk.Widget:halign], which determines how the
labels size allocation is positioned in the space available for the label.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="yalign" writable="1" transfer-ownership="none" setter="set_yalign" getter="get_yalign">
<attribute name="org.gtk.Property.get" value="gtk_label_get_yalign"/>
<attribute name="org.gtk.Property.set" value="gtk_label_set_yalign"/>
<doc xml:space="preserve">The vertical alignment of the label text inside its size allocation.
Compare this to [property@Gtk.Widget:valign], which determines how the
labels size allocation is positioned in the space available for the label.</doc>
<type name="gfloat" c:type="gfloat"/>
</property>
<glib:signal name="activate-current-link" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user activates a link in the label.
The ::activate-current-link is a [keybinding signal](class.SignalAction.html).
Applications may also emit the signal with g_signal_emit_by_name()
if they need to control activation of URIs programmatically.
The default bindings for this signal are all forms of the Enter key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="activate-link" when="last">
<doc xml:space="preserve">Gets emitted to activate a URI.
Applications may connect to it to override the default behaviour,
which is to call gtk_show_uri().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the link has been activated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the URI that is activated</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="copy-clipboard" when="last" action="1">
<doc xml:space="preserve">Gets emitted to copy the slection to the clipboard.
The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is Ctrl-c.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user initiates a cursor movement.
The ::move-cursor signal is a [keybinding signal](class.SignalAction.html).
If the cursor is not visible in @entry, this signal causes the viewport to
be moved instead.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants,
the variant with the Shift modifier extends the selection,
the variant without the Shift modifier does not.
There are too many key combinations to list them all here.
- Arrow keys move by individual characters/lines
- Ctrl-arrow key combinations move by words/paragraphs
- Home/End keys move to the ends of the buffer</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the move, as a `GtkMovementStep`</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the move should extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="LayoutChild" c:symbol-prefix="layout_child" c:type="GtkLayoutChild" parent="GObject.Object" abstract="1" glib:type-name="GtkLayoutChild" glib:get-type="gtk_layout_child_get_type" glib:type-struct="LayoutChildClass">
<doc xml:space="preserve">`GtkLayoutChild` is the base class for objects that are meant to hold
layout properties.
If a `GtkLayoutManager` has per-child properties, like their packing type,
or the horizontal and vertical span, or the icon name, then the layout
manager should use a `GtkLayoutChild` implementation to store those properties.
A `GtkLayoutChild` instance is only ever valid while a widget is part
of a layout.</doc>
<method name="get_child_widget" c:identifier="gtk_layout_child_get_child_widget" glib:get-property="child-widget">
<attribute name="org.gtk.Method.get_property" value="child-widget"/>
<doc xml:space="preserve">Retrieves the `GtkWidget` associated to the given @layout_child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="layout_child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutChild`</doc>
<type name="LayoutChild" c:type="GtkLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout_manager" c:identifier="gtk_layout_child_get_layout_manager" glib:get-property="layout-manager">
<attribute name="org.gtk.Method.get_property" value="layout-manager"/>
<doc xml:space="preserve">Retrieves the `GtkLayoutManager` instance that created the
given @layout_child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
<parameters>
<instance-parameter name="layout_child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutChild`</doc>
<type name="LayoutChild" c:type="GtkLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<property name="child-widget" writable="1" construct-only="1" transfer-ownership="none" getter="get_child_widget">
<attribute name="org.gtk.Property.get" value="gtk_layout_child_get_child_widget"/>
<doc xml:space="preserve">The widget that is associated to the `GtkLayoutChild` instance.</doc>
<type name="Widget"/>
</property>
<property name="layout-manager" writable="1" construct-only="1" transfer-ownership="none" getter="get_layout_manager">
<attribute name="org.gtk.Property.get" value="gtk_layout_child_get_layout_manager"/>
<doc xml:space="preserve">The layout manager that created the `GtkLayoutChild` instance.</doc>
<type name="LayoutManager"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="LayoutChildClass" c:type="GtkLayoutChildClass" glib:is-gtype-struct-for="LayoutChild">
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="LayoutManager" c:symbol-prefix="layout_manager" c:type="GtkLayoutManager" parent="GObject.Object" abstract="1" glib:type-name="GtkLayoutManager" glib:get-type="gtk_layout_manager_get_type" glib:type-struct="LayoutManagerClass">
<doc xml:space="preserve">Layout managers are delegate classes that handle the preferred size
and the allocation of a widget.
You typically subclass `GtkLayoutManager` if you want to implement a
layout policy for the children of a widget, or if you want to determine
the size of a widget depending on its contents.
Each `GtkWidget` can only have a `GtkLayoutManager` instance associated
to it at any given time; it is possible, though, to replace the layout
manager instance using [method@Gtk.Widget.set_layout_manager].
## Layout properties
A layout manager can expose properties for controlling the layout of
each child, by creating an object type derived from [class@Gtk.LayoutChild]
and installing the properties on it as normal `GObject` properties.
Each `GtkLayoutChild` instance storing the layout properties for a
specific child is created through the [method@Gtk.LayoutManager.get_layout_child]
method; a `GtkLayoutManager` controls the creation of its `GtkLayoutChild`
instances by overriding the GtkLayoutManagerClass.create_layout_child()
virtual function. The typical implementation should look like:
```c
static GtkLayoutChild *
create_layout_child (GtkLayoutManager *manager,
GtkWidget *container,
GtkWidget *child)
{
return g_object_new (your_layout_child_get_type (),
"layout-manager", manager,
"child-widget", child,
NULL);
}
```
The [property@Gtk.LayoutChild:layout-manager] and
[property@Gtk.LayoutChild:child-widget] properties
on the newly created `GtkLayoutChild` instance are mandatory. The
`GtkLayoutManager` will cache the newly created `GtkLayoutChild` instance
until the widget is removed from its parent, or the parent removes the
layout manager.
Each `GtkLayoutManager` instance creating a `GtkLayoutChild` should use
[method@Gtk.LayoutManager.get_layout_child] every time it needs to query
the layout properties; each `GtkLayoutChild` instance should call
[method@Gtk.LayoutManager.layout_changed] every time a property is
updated, in order to queue a new size measuring and allocation.</doc>
<virtual-method name="allocate" invoker="allocate">
<doc xml:space="preserve">Assigns the given @width, @height, and @baseline to
a @widget, and computes the position and sizes of the children of
the @widget using the layout management policy of @manager.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new width of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new height of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">the baseline position of the @widget, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="create_layout_child">
<doc xml:space="preserve">Create a `GtkLayoutChild` instance for the given @for_child widget.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkLayoutChild`</doc>
<type name="LayoutChild" c:type="GtkLayoutChild*"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">the `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget using the @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="for_child" transfer-ownership="none">
<doc xml:space="preserve">the child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_request_mode">
<return-value transfer-ownership="none">
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="measure" invoker="measure">
<doc xml:space="preserve">Measures the size of the @widget using @manager, for the
given @orientation and size.
See the [class@Gtk.Widget] documentation on layout management for
more details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation; for instance, if
the @orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height
of the widget; if the @orientation is %GTK_ORIENTATION_VERTICAL, this
is the width of the widget. This allows to measure the height for the
given width, and the width for the given height. Use -1 if the size
is not known</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the minimum size for the given size and
orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the natural, or preferred size for the
given size and orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="root">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="unroot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="allocate" c:identifier="gtk_layout_manager_allocate">
<doc xml:space="preserve">Assigns the given @width, @height, and @baseline to
a @widget, and computes the position and sizes of the children of
the @widget using the layout management policy of @manager.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new width of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new height of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">the baseline position of the @widget, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_layout_child" c:identifier="gtk_layout_manager_get_layout_child">
<doc xml:space="preserve">Retrieves a `GtkLayoutChild` instance for the `GtkLayoutManager`,
creating one if necessary.
The @child widget must be a child of the widget using @manager.
The `GtkLayoutChild` instance is owned by the `GtkLayoutManager`,
and is guaranteed to exist as long as @child is a child of the
`GtkWidget` using the given `GtkLayoutManager`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutChild`</doc>
<type name="LayoutChild" c:type="GtkLayoutChild*"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_request_mode" c:identifier="gtk_layout_manager_get_request_mode">
<doc xml:space="preserve">Retrieves the request mode of @manager.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeRequestMode`</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widget" c:identifier="gtk_layout_manager_get_widget">
<doc xml:space="preserve">Retrieves the `GtkWidget` using the given `GtkLayoutManager`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
</parameters>
</method>
<method name="layout_changed" c:identifier="gtk_layout_manager_layout_changed">
<doc xml:space="preserve">Queues a resize on the `GtkWidget` using @manager, if any.
This function should be called by subclasses of `GtkLayoutManager`
in response to changes to their layout management policies.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
</parameters>
</method>
<method name="measure" c:identifier="gtk_layout_manager_measure">
<doc xml:space="preserve">Measures the size of the @widget using @manager, for the
given @orientation and size.
See the [class@Gtk.Widget] documentation on layout management for
more details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation; for instance, if
the @orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height
of the widget; if the @orientation is %GTK_ORIENTATION_VERTICAL, this
is the width of the widget. This allows to measure the height for the
given width, and the width for the given height. Use -1 if the size
is not known</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the minimum size for the given size and
orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the natural, or preferred size for the
given size and orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="LayoutManagerClass" c:type="GtkLayoutManagerClass" glib:is-gtype-struct-for="LayoutManager">
<doc xml:space="preserve">The `GtkLayoutManagerClass` structure contains only private data, and
should only be accessed through the provided API, or when subclassing
`GtkLayoutManager`.</doc>
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="get_request_mode">
<callback name="get_request_mode">
<return-value transfer-ownership="none">
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="measure">
<callback name="measure">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation; for instance, if
the @orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height
of the widget; if the @orientation is %GTK_ORIENTATION_VERTICAL, this
is the width of the widget. This allows to measure the height for the
given width, and the width for the given height. Use -1 if the size
is not known</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the minimum size for the given size and
orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the natural, or preferred size for the
given size and orientation</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">the baseline position for the
natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="allocate">
<callback name="allocate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` using @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new width of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new height of the @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">the baseline position of the @widget, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="layout_child_type">
<doc xml:space="preserve">the type of `GtkLayoutChild` used by this layout manager</doc>
<type name="GType" c:type="GType"/>
</field>
<field name="create_layout_child">
<callback name="create_layout_child">
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkLayoutChild`</doc>
<type name="LayoutChild" c:type="GtkLayoutChild*"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">the `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget using the @manager</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="for_child" transfer-ownership="none">
<doc xml:space="preserve">the child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="root">
<callback name="root">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unroot">
<callback name="unroot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="16">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="LevelBar" c:symbol-prefix="level_bar" c:type="GtkLevelBar" parent="Widget" glib:type-name="GtkLevelBar" glib:get-type="gtk_level_bar_get_type">
<doc xml:space="preserve">`GtkLevelBar` is a widget that can be used as a level indicator.
Typical use cases are displaying the strength of a password, or
showing the charge level of a battery.
![An example GtkLevelBar](levelbar.png)
Use [method@Gtk.LevelBar.set_value] to set the current value, and
[method@Gtk.LevelBar.add_offset_value] to set the value offsets at which
the bar will be considered in a different state. GTK will add a few
offsets by default on the level bar: %GTK_LEVEL_BAR_OFFSET_LOW,
%GTK_LEVEL_BAR_OFFSET_HIGH and %GTK_LEVEL_BAR_OFFSET_FULL, with
values 0.25, 0.75 and 1.0 respectively.
Note that it is your responsibility to update preexisting offsets
when changing the minimum or maximum value. GTK will simply clamp
them to the new range.
## Adding a custom offset on the bar
```c
static GtkWidget *
create_level_bar (void)
{
GtkWidget *widget;
GtkLevelBar *bar;
widget = gtk_level_bar_new ();
bar = GTK_LEVEL_BAR (widget);
// This changes the value of the default low offset
gtk_level_bar_add_offset_value (bar,
GTK_LEVEL_BAR_OFFSET_LOW,
0.10);
// This adds a new offset to the bar; the application will
// be able to change its color CSS like this:
//
// levelbar block.my-offset {
// background-color: magenta;
// border-style: solid;
// border-color: black;
// border-style: 1px;
// }
gtk_level_bar_add_offset_value (bar, "my-offset", 0.60);
return widget;
}
```
The default interval of values is between zero and one, but it&#x2019;s possible
to modify the interval using [method@Gtk.LevelBar.set_min_value] and
[method@Gtk.LevelBar.set_max_value]. The value will be always drawn in
proportion to the admissible interval, i.e. a value of 15 with a specified
interval between 10 and 20 is equivalent to a value of 0.5 with an interval
between 0 and 1. When %GTK_LEVEL_BAR_MODE_DISCRETE is used, the bar level
is rendered as a finite number of separated blocks instead of a single one.
The number of blocks that will be rendered is equal to the number of units
specified by the admissible interval.
For instance, to build a bar rendered with five blocks, it&#x2019;s sufficient to
set the minimum value to 0 and the maximum value to 5 after changing the
indicator mode to discrete.
# GtkLevelBar as GtkBuildable
The `GtkLevelBar` implementation of the `GtkBuildable` interface supports a
custom &lt;offsets&gt; element, which can contain any number of &lt;offset&gt; elements,
each of which must have name and value attributes.
# CSS nodes
```
levelbar[.discrete]
&#x2570;&#x2500;&#x2500; trough
&#x251C;&#x2500;&#x2500; block.filled.level-name
&#x250A;
&#x251C;&#x2500;&#x2500; block.empty
&#x250A;
```
`GtkLevelBar` has a main CSS node with name levelbar and one of the style
classes .discrete or .continuous and a subnode with name trough. Below the
trough node are a number of nodes with name block and style class .filled
or .empty. In continuous mode, there is exactly one node of each, in discrete
mode, the number of filled and unfilled nodes corresponds to blocks that are
drawn. The block.filled nodes also get a style class .level-name corresponding
to the level for the current value.
In horizontal orientation, the nodes are always arranged from left to right,
regardless of text direction.
# Accessibility
`GtkLevelBar` uses the %GTK_ACCESSIBLE_ROLE_METER role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_level_bar_new">
<doc xml:space="preserve">Creates a new `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_for_interval" c:identifier="gtk_level_bar_new_for_interval">
<doc xml:space="preserve">Creates a new `GtkLevelBar` for the specified interval.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="min_value" transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max_value" transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<method name="add_offset_value" c:identifier="gtk_level_bar_add_offset_value">
<doc xml:space="preserve">Adds a new offset marker on @self at the position specified by @value.
When the bar value is in the interval topped by @value (or between @value
and [property@Gtk.LevelBar:max-value] in case the offset is the last one
on the bar) a style class named `level-`@name will be applied
when rendering the level bar fill.
If another offset marker named @name exists, its value will be
replaced by @value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the new offset</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the value for the new offset</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="get_inverted" c:identifier="gtk_level_bar_get_inverted" glib:get-property="inverted">
<attribute name="org.gtk.Method.get_property" value="inverted"/>
<doc xml:space="preserve">Returns whether the levelbar is inverted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the level bar is inverted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_value" c:identifier="gtk_level_bar_get_max_value" glib:get-property="max-value">
<attribute name="org.gtk.Method.get_property" value="max-value"/>
<doc xml:space="preserve">Returns the `max-value` of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_value" c:identifier="gtk_level_bar_get_min_value" glib:get-property="min-value">
<attribute name="org.gtk.Method.get_property" value="min-value"/>
<doc xml:space="preserve">Returns the `min-value of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mode" c:identifier="gtk_level_bar_get_mode" glib:get-property="mode">
<attribute name="org.gtk.Method.get_property" value="mode"/>
<doc xml:space="preserve">Returns the `mode` of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBarMode`</doc>
<type name="LevelBarMode" c:type="GtkLevelBarMode"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_offset_value" c:identifier="gtk_level_bar_get_offset_value">
<doc xml:space="preserve">Fetches the value specified for the offset marker @name in @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the specified offset is found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of an offset in the bar</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location where to store the value</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_level_bar_get_value" glib:get-property="value">
<attribute name="org.gtk.Method.get_property" value="value"/>
<doc xml:space="preserve">Returns the `value` of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a value in the interval between
[property@Gtk.LevelBar:min-value[ and [property@Gtk.LevelBar:max-value]</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_offset_value" c:identifier="gtk_level_bar_remove_offset_value">
<doc xml:space="preserve">Removes an offset marker from a `GtkLevelBar`.
The marker must have been previously added with
[method@Gtk.LevelBar.add_offset_value].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of an offset in the bar</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_inverted" c:identifier="gtk_level_bar_set_inverted" glib:set-property="inverted">
<attribute name="org.gtk.Method.set_property" value="inverted"/>
<doc xml:space="preserve">Sets whether the `GtkLevelBar` is inverted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="inverted" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to invert the level bar</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_max_value" c:identifier="gtk_level_bar_set_max_value" glib:set-property="max-value">
<attribute name="org.gtk.Method.set_property" value="max-value"/>
<doc xml:space="preserve">Sets the `max-value` of the `GtkLevelBar`.
You probably want to update preexisting level offsets after calling
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_min_value" c:identifier="gtk_level_bar_set_min_value" glib:set-property="min-value">
<attribute name="org.gtk.Method.set_property" value="min-value"/>
<doc xml:space="preserve">Sets the `min-value` of the `GtkLevelBar`.
You probably want to update preexisting level offsets after calling
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a positive value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_mode" c:identifier="gtk_level_bar_set_mode" glib:set-property="mode">
<attribute name="org.gtk.Method.set_property" value="mode"/>
<doc xml:space="preserve">Sets the `mode` of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBarMode`</doc>
<type name="LevelBarMode" c:type="GtkLevelBarMode"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_level_bar_set_value" glib:set-property="value">
<attribute name="org.gtk.Method.set_property" value="value"/>
<doc xml:space="preserve">Sets the value of the `GtkLevelBar`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLevelBar`</doc>
<type name="LevelBar" c:type="GtkLevelBar*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a value in the interval between
[property@Gtk.LevelBar:min-value] and [property@Gtk.LevelBar:max-value]</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<property name="inverted" writable="1" transfer-ownership="none" setter="set_inverted" getter="get_inverted">
<attribute name="org.gtk.Property.get" value="gtk_level_bar_get_inverted"/>
<attribute name="org.gtk.Property.set" value="gtk_level_bar_set_inverted"/>
<doc xml:space="preserve">Whether the `GtkLeveBar` is inverted.
Level bars normally grow from top to bottom or left to right.
Inverted level bars grow in the opposite direction.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-value" writable="1" transfer-ownership="none" setter="set_max_value" getter="get_max_value">
<attribute name="org.gtk.Property.get" value="gtk_level_bar_get_max_value"/>
<attribute name="org.gtk.Property.set" value="gtk_level_bar_set_max_value"/>
<doc xml:space="preserve">Determines the maximum value of the interval that can be displayed by the bar.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="min-value" writable="1" transfer-ownership="none" setter="set_min_value" getter="get_min_value">
<attribute name="org.gtk.Property.get" value="gtk_level_bar_get_min_value"/>
<attribute name="org.gtk.Property.set" value="gtk_level_bar_set_min_value"/>
<doc xml:space="preserve">Determines the minimum value of the interval that can be displayed by the bar.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="mode" writable="1" transfer-ownership="none" setter="set_mode" getter="get_mode">
<attribute name="org.gtk.Property.get" value="gtk_level_bar_get_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_level_bar_set_mode"/>
<doc xml:space="preserve">Determines the way `GtkLevelBar` interprets the value properties to draw the
level fill area.
Specifically, when the value is %GTK_LEVEL_BAR_MODE_CONTINUOUS,
`GtkLevelBar` will draw a single block representing the current value in
that area; when the value is %GTK_LEVEL_BAR_MODE_DISCRETE,
the widget will draw a succession of separate blocks filling the
draw area, with the number of blocks being equal to the units separating
the integral roundings of [property@Gtk.LevelBar:min-value] and
[property@Gtk.LevelBar:max-value].</doc>
<type name="LevelBarMode"/>
</property>
<property name="value" writable="1" transfer-ownership="none" setter="set_value" getter="get_value">
<attribute name="org.gtk.Property.get" value="gtk_level_bar_get_value"/>
<attribute name="org.gtk.Property.set" value="gtk_level_bar_set_value"/>
<doc xml:space="preserve">Determines the currently filled value of the level bar.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<glib:signal name="offset-changed" when="first" detailed="1">
<doc xml:space="preserve">Emitted when an offset specified on the bar changes value.
This typically is the result of a [method@Gtk.LevelBar.add_offset_value]
call.
The signal supports detailed connections; you can connect to the
detailed signal "changed::x" in order to only receive callbacks when
the value of offset "x" changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the offset that changed value</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="LevelBarMode" glib:type-name="GtkLevelBarMode" glib:get-type="gtk_level_bar_mode_get_type" c:type="GtkLevelBarMode">
<doc xml:space="preserve">Describes how [class@LevelBar] contents should be rendered.
Note that this enumeration could be extended with additional modes
in the future.</doc>
<member name="continuous" value="0" c:identifier="GTK_LEVEL_BAR_MODE_CONTINUOUS" glib:nick="continuous" glib:name="GTK_LEVEL_BAR_MODE_CONTINUOUS">
<doc xml:space="preserve">the bar has a continuous mode</doc>
</member>
<member name="discrete" value="1" c:identifier="GTK_LEVEL_BAR_MODE_DISCRETE" glib:nick="discrete" glib:name="GTK_LEVEL_BAR_MODE_DISCRETE">
<doc xml:space="preserve">the bar has a discrete mode</doc>
</member>
</enumeration>
<enumeration name="License" glib:type-name="GtkLicense" glib:get-type="gtk_license_get_type" c:type="GtkLicense">
<doc xml:space="preserve">The type of license for an application.
This enumeration can be expanded at later date.</doc>
<member name="unknown" value="0" c:identifier="GTK_LICENSE_UNKNOWN" glib:nick="unknown" glib:name="GTK_LICENSE_UNKNOWN">
<doc xml:space="preserve">No license specified</doc>
</member>
<member name="custom" value="1" c:identifier="GTK_LICENSE_CUSTOM" glib:nick="custom" glib:name="GTK_LICENSE_CUSTOM">
<doc xml:space="preserve">A license text is going to be specified by the
developer</doc>
</member>
<member name="gpl_2_0" value="2" c:identifier="GTK_LICENSE_GPL_2_0" glib:nick="gpl-2-0" glib:name="GTK_LICENSE_GPL_2_0">
<doc xml:space="preserve">The GNU General Public License, version 2.0 or later</doc>
</member>
<member name="gpl_3_0" value="3" c:identifier="GTK_LICENSE_GPL_3_0" glib:nick="gpl-3-0" glib:name="GTK_LICENSE_GPL_3_0">
<doc xml:space="preserve">The GNU General Public License, version 3.0 or later</doc>
</member>
<member name="lgpl_2_1" value="4" c:identifier="GTK_LICENSE_LGPL_2_1" glib:nick="lgpl-2-1" glib:name="GTK_LICENSE_LGPL_2_1">
<doc xml:space="preserve">The GNU Lesser General Public License, version 2.1 or later</doc>
</member>
<member name="lgpl_3_0" value="5" c:identifier="GTK_LICENSE_LGPL_3_0" glib:nick="lgpl-3-0" glib:name="GTK_LICENSE_LGPL_3_0">
<doc xml:space="preserve">The GNU Lesser General Public License, version 3.0 or later</doc>
</member>
<member name="bsd" value="6" c:identifier="GTK_LICENSE_BSD" glib:nick="bsd" glib:name="GTK_LICENSE_BSD">
<doc xml:space="preserve">The BSD standard license</doc>
</member>
<member name="mit_x11" value="7" c:identifier="GTK_LICENSE_MIT_X11" glib:nick="mit-x11" glib:name="GTK_LICENSE_MIT_X11">
<doc xml:space="preserve">The MIT/X11 standard license</doc>
</member>
<member name="artistic" value="8" c:identifier="GTK_LICENSE_ARTISTIC" glib:nick="artistic" glib:name="GTK_LICENSE_ARTISTIC">
<doc xml:space="preserve">The Artistic License, version 2.0</doc>
</member>
<member name="gpl_2_0_only" value="9" c:identifier="GTK_LICENSE_GPL_2_0_ONLY" glib:nick="gpl-2-0-only" glib:name="GTK_LICENSE_GPL_2_0_ONLY">
<doc xml:space="preserve">The GNU General Public License, version 2.0 only</doc>
</member>
<member name="gpl_3_0_only" value="10" c:identifier="GTK_LICENSE_GPL_3_0_ONLY" glib:nick="gpl-3-0-only" glib:name="GTK_LICENSE_GPL_3_0_ONLY">
<doc xml:space="preserve">The GNU General Public License, version 3.0 only</doc>
</member>
<member name="lgpl_2_1_only" value="11" c:identifier="GTK_LICENSE_LGPL_2_1_ONLY" glib:nick="lgpl-2-1-only" glib:name="GTK_LICENSE_LGPL_2_1_ONLY">
<doc xml:space="preserve">The GNU Lesser General Public License, version 2.1 only</doc>
</member>
<member name="lgpl_3_0_only" value="12" c:identifier="GTK_LICENSE_LGPL_3_0_ONLY" glib:nick="lgpl-3-0-only" glib:name="GTK_LICENSE_LGPL_3_0_ONLY">
<doc xml:space="preserve">The GNU Lesser General Public License, version 3.0 only</doc>
</member>
<member name="agpl_3_0" value="13" c:identifier="GTK_LICENSE_AGPL_3_0" glib:nick="agpl-3-0" glib:name="GTK_LICENSE_AGPL_3_0">
<doc xml:space="preserve">The GNU Affero General Public License, version 3.0 or later</doc>
</member>
<member name="agpl_3_0_only" value="14" c:identifier="GTK_LICENSE_AGPL_3_0_ONLY" glib:nick="agpl-3-0-only" glib:name="GTK_LICENSE_AGPL_3_0_ONLY">
<doc xml:space="preserve">The GNU Affero General Public License, version 3.0 only</doc>
</member>
<member name="bsd_3" value="15" c:identifier="GTK_LICENSE_BSD_3" glib:nick="bsd-3" glib:name="GTK_LICENSE_BSD_3">
<doc xml:space="preserve">The 3-clause BSD licence</doc>
</member>
<member name="apache_2_0" value="16" c:identifier="GTK_LICENSE_APACHE_2_0" glib:nick="apache-2-0" glib:name="GTK_LICENSE_APACHE_2_0">
<doc xml:space="preserve">The Apache License, version 2.0</doc>
</member>
<member name="mpl_2_0" value="17" c:identifier="GTK_LICENSE_MPL_2_0" glib:nick="mpl-2-0" glib:name="GTK_LICENSE_MPL_2_0">
<doc xml:space="preserve">The Mozilla Public License, version 2.0</doc>
</member>
</enumeration>
<class name="LinkButton" c:symbol-prefix="link_button" c:type="GtkLinkButton" parent="Button" glib:type-name="GtkLinkButton" glib:get-type="gtk_link_button_get_type">
<doc xml:space="preserve">A `GtkLinkButton` is a button with a hyperlink.
![An example GtkLinkButton](link-button.png)
It is useful to show quick links to resources.
A link button is created by calling either [ctor@Gtk.LinkButton.new] or
[ctor@Gtk.LinkButton.new_with_label]. If using the former, the URI you
pass to the constructor is used as a label for the widget.
The URI bound to a `GtkLinkButton` can be set specifically using
[method@Gtk.LinkButton.set_uri].
By default, `GtkLinkButton` calls [func@Gtk.show_uri] when the button
is clicked. This behaviour can be overridden by connecting to the
[signal@Gtk.LinkButton::activate-link] signal and returning %TRUE from
the signal handler.
# CSS nodes
`GtkLinkButton` has a single CSS node with name button. To differentiate
it from a plain `GtkButton`, it gets the .link style class.
# Accessibility
`GtkLinkButton` uses the %GTK_ACCESSIBLE_ROLE_LINK role.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_link_button_new">
<doc xml:space="preserve">Creates a new `GtkLinkButton` with the URI as its text.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new link button widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a valid URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_label" c:identifier="gtk_link_button_new_with_label">
<doc xml:space="preserve">Creates a new `GtkLinkButton` containing a label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new link button widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a valid URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the text of the button</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_uri" c:identifier="gtk_link_button_get_uri" glib:get-property="uri">
<attribute name="org.gtk.Method.get_property" value="uri"/>
<doc xml:space="preserve">Retrieves the URI of the `GtkLinkButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a valid URI. The returned string is owned by the link button
and should not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="link_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLinkButton`</doc>
<type name="LinkButton" c:type="GtkLinkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visited" c:identifier="gtk_link_button_get_visited" glib:get-property="visited">
<attribute name="org.gtk.Method.get_property" value="visited"/>
<doc xml:space="preserve">Retrieves the &#x201C;visited&#x201D; state of the `GtkLinkButton`.
The button becomes visited when it is clicked. If the URI
is changed on the button, the &#x201C;visited&#x201D; state is unset again.
The state may also be changed using [method@Gtk.LinkButton.set_visited].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the link has been visited, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="link_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLinkButton`</doc>
<type name="LinkButton" c:type="GtkLinkButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_uri" c:identifier="gtk_link_button_set_uri" glib:set-property="uri">
<attribute name="org.gtk.Method.set_property" value="uri"/>
<doc xml:space="preserve">Sets @uri as the URI where the `GtkLinkButton` points.
As a side-effect this unsets the &#x201C;visited&#x201D; state of the button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="link_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLinkButton`</doc>
<type name="LinkButton" c:type="GtkLinkButton*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a valid URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_visited" c:identifier="gtk_link_button_set_visited" glib:set-property="visited">
<attribute name="org.gtk.Method.set_property" value="visited"/>
<doc xml:space="preserve">Sets the &#x201C;visited&#x201D; state of the `GtkLinkButton`.
See [method@Gtk.LinkButton.get_visited] for more details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="link_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLinkButton`</doc>
<type name="LinkButton" c:type="GtkLinkButton*"/>
</instance-parameter>
<parameter name="visited" transfer-ownership="none">
<doc xml:space="preserve">the new &#x201C;visited&#x201D; state</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="uri" writable="1" transfer-ownership="none" setter="set_uri" getter="get_uri">
<attribute name="org.gtk.Property.get" value="gtk_link_button_get_uri"/>
<attribute name="org.gtk.Property.set" value="gtk_link_button_set_uri"/>
<doc xml:space="preserve">The URI bound to this button.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="visited" writable="1" transfer-ownership="none" setter="set_visited" getter="get_visited">
<attribute name="org.gtk.Property.get" value="gtk_link_button_get_visited"/>
<attribute name="org.gtk.Property.set" value="gtk_link_button_set_visited"/>
<doc xml:space="preserve">The 'visited' state of this button.
A visited link is drawn in a different color.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate-link" when="last">
<doc xml:space="preserve">Emitted each time the `GtkLinkButton` is clicked.
The default handler will call [func@Gtk.show_uri] with the URI
stored inside the [property@Gtk.LinkButton:uri] property.
To override the default behavior, you can connect to the
::activate-link signal and stop the propagation of the signal
by returning %TRUE from your handler.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
</class>
<class name="ListBase" c:symbol-prefix="list_base" c:type="GtkListBase" parent="Widget" abstract="1" glib:type-name="GtkListBase" glib:get-type="gtk_list_base_get_type" glib:type-struct="ListBaseClass">
<doc xml:space="preserve">`GtkListBase` is the abstract base class for GTK's list widgets.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<implements name="Scrollable"/>
<property name="orientation" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The orientation of the list. See GtkOrientable:orientation
for details.</doc>
<type name="Orientation"/>
</property>
</class>
<record name="ListBaseClass" c:type="GtkListBaseClass" disguised="1" glib:is-gtype-struct-for="ListBase"/>
<class name="ListBox" c:symbol-prefix="list_box" c:type="GtkListBox" parent="Widget" glib:type-name="GtkListBox" glib:get-type="gtk_list_box_get_type">
<doc xml:space="preserve">`GtkListBox` is a vertical list.
A `GtkListBox` only contains `GtkListBoxRow` children. These rows can
by dynamically sorted and filtered, and headers can be added dynamically
depending on the row content. It also allows keyboard and mouse navigation
and selection like a typical list.
Using `GtkListBox` is often an alternative to `GtkTreeView`, especially
when the list contents has a more complicated layout than what is allowed
by a `GtkCellRenderer`, or when the contents is interactive (i.e. has a
button in it).
Although a `GtkListBox` must have only `GtkListBoxRow` children, you can
add any kind of widget to it via [method@Gtk.ListBox.prepend],
[method@Gtk.ListBox.append] and [method@Gtk.ListBox.insert] and a
`GtkListBoxRow` widget will automatically be inserted between the list
and the widget.
`GtkListBoxRows` can be marked as activatable or selectable. If a row is
activatable, [signal@Gtk.ListBox::row-activated] will be emitted for it when
the user tries to activate it. If it is selectable, the row will be marked
as selected when the user tries to select it.
# GtkListBox as GtkBuildable
The `GtkListBox` implementation of the `GtkBuildable` interface supports
setting a child as the placeholder by specifying &#x201C;placeholder&#x201D; as the &#x201C;type&#x201D;
attribute of a &lt;child&gt; element. See [method@Gtk.ListBox.set_placeholder]
for info.
# CSS nodes
|[&lt;!-- language="plain" --&gt;
list[.separators][.rich-list][.navigation-sidebar]
&#x2570;&#x2500;&#x2500; row[.activatable]
]|
`GtkListBox` uses a single CSS node named list. It may carry the .separators
style class, when the [property@Gtk.ListBox:show-separators] property is set.
Each `GtkListBoxRow` uses a single CSS node named row. The row nodes get the
.activatable style class added when appropriate.
The main list node may also carry style classes to select
the style of [list presentation](section-list-widget.html#list-styles):
.rich-list, .navigation-sidebar or .data-table.
# Accessibility
`GtkListBox` uses the %GTK_ACCESSIBLE_ROLE_LIST role and `GtkListBoxRow` uses
the %GTK_ACCESSIBLE_ROLE_LIST_ITEM role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_list_box_new">
<doc xml:space="preserve">Creates a new `GtkListBox` container.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkListBox`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="append" c:identifier="gtk_list_box_append">
<doc xml:space="preserve">Append a widget to the list.
If a sort function is set, the widget will
actually be inserted at the calculated position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="bind_model" c:identifier="gtk_list_box_bind_model">
<doc xml:space="preserve">Binds @model to @box.
If @box was already bound to a model, that previous binding is
destroyed.
The contents of @box are cleared and then filled with widgets that
represent items from @model. @box is updated whenever @model changes.
If @model is %NULL, @box is left empty.
It is undefined to add or remove widgets directly (for example, with
[method@Gtk.ListBox.insert]) while @box is bound to a model.
Note that using a model is incompatible with the filtering and sorting
functionality in `GtkListBox`. When using a model, filtering and sorting
should be implemented by the model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GListModel` to be bound to @box</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="create_widget_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">a function that creates widgets for items
or %NULL in case you also passed %NULL as @model</doc>
<type name="ListBoxCreateWidgetFunc" c:type="GtkListBoxCreateWidgetFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @create_widget_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_data_free_func" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function for freeing @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="drag_highlight_row" c:identifier="gtk_list_box_drag_highlight_row">
<doc xml:space="preserve">Add a drag highlight to a row.
This is a helper function for implementing DnD onto a `GtkListBox`.
The passed in @row will be highlighted by setting the
%GTK_STATE_FLAG_DROP_ACTIVE state and any previously highlighted
row will be unhighlighted.
The row will also be unhighlighted when the widget gets
a drag leave event.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
</parameters>
</method>
<method name="drag_unhighlight_row" c:identifier="gtk_list_box_drag_unhighlight_row">
<doc xml:space="preserve">If a row has previously been highlighted via gtk_list_box_drag_highlight_row(),
it will have the highlight removed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_activate_on_single_click" c:identifier="gtk_list_box_get_activate_on_single_click" glib:get-property="activate-on-single-click">
<attribute name="org.gtk.Metthod.get_property" value="activate-on-single-click"/>
<doc xml:space="preserve">Returns whether rows activate on single clicks.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rows are activated on single click, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_adjustment" c:identifier="gtk_list_box_get_adjustment">
<doc xml:space="preserve">Gets the adjustment (if any) that the widget uses to
for vertical scrolling.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_at_index" c:identifier="gtk_list_box_get_row_at_index">
<doc xml:space="preserve">Gets the n-th child in the list (not counting headers).
If @index_ is negative or larger than the number of items in the
list, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child `GtkWidget`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the index of the row</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_row_at_y" c:identifier="gtk_list_box_get_row_at_y">
<doc xml:space="preserve">Gets the row at the @y position.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the row</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">position</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_selected_row" c:identifier="gtk_list_box_get_selected_row">
<doc xml:space="preserve">Gets the selected row, or %NULL if no rows are selected.
Note that the box may allow multiple selection, in which
case you should use [method@Gtk.ListBox.selected_foreach] to
find all selected rows.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the selected row</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_rows" c:identifier="gtk_list_box_get_selected_rows">
<doc xml:space="preserve">Creates a list of all selected children.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">
A `GList` containing the `GtkWidget` for each selected child.
Free with g_list_free() when done.</doc>
<type name="GLib.List" c:type="GList*">
<type name="ListBoxRow"/>
</type>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_mode" c:identifier="gtk_list_box_get_selection_mode" glib:get-property="selection-mode">
<attribute name="org.gtk.Method.get_property" value="selection-mode"/>
<doc xml:space="preserve">Gets the selection mode of the listbox.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionMode`</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_separators" c:identifier="gtk_list_box_get_show_separators" glib:get-property="show-separators">
<attribute name="org.gtk.Method.get_property" value="show-separators"/>
<doc xml:space="preserve">Returns whether the list box should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the list box shows separators</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_list_box_insert">
<doc xml:space="preserve">Insert the @child into the @box at @position.
If a sort function is
set, the widget will actually be inserted at the calculated position.
If @position is -1, or larger than the total number of items in the
@box, then the @child will be appended to the end.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to insert @child in</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="invalidate_filter" c:identifier="gtk_list_box_invalidate_filter">
<doc xml:space="preserve">Update the filtering for all rows.
Call this when result
of the filter function on the @box is changed due
to an external factor. For instance, this would be used
if the filter function just looked for a specific search
string and the entry with the search string has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="invalidate_headers" c:identifier="gtk_list_box_invalidate_headers">
<doc xml:space="preserve">Update the separators for all rows.
Call this when result
of the header function on the @box is changed due
to an external factor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="invalidate_sort" c:identifier="gtk_list_box_invalidate_sort">
<doc xml:space="preserve">Update the sorting for all rows.
Call this when result
of the sort function on the @box is changed due
to an external factor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_list_box_prepend">
<doc xml:space="preserve">Prepend a widget to the list.
If a sort function is set, the widget will
actually be inserted at the calculated position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_list_box_remove">
<doc xml:space="preserve">Removes a child from @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="select_all" c:identifier="gtk_list_box_select_all">
<doc xml:space="preserve">Select all children of @box, if the selection mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_row" c:identifier="gtk_list_box_select_row">
<doc xml:space="preserve">Make @row the currently selected row.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The row to select</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
</parameters>
</method>
<method name="selected_foreach" c:identifier="gtk_list_box_selected_foreach">
<doc xml:space="preserve">Calls a function for each selected child.
Note that the selection cannot be modified from within this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">the function to call for each selected child</doc>
<type name="ListBoxForeachFunc" c:type="GtkListBoxForeachFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to the function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="set_activate_on_single_click" c:identifier="gtk_list_box_set_activate_on_single_click" glib:set-property="activate-on-single-click">
<attribute name="org.gtk.Method.set_property" value="activate-on-single-click"/>
<doc xml:space="preserve">If @single is %TRUE, rows will be activated when you click on them,
otherwise you need to double-click.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="single" transfer-ownership="none">
<doc xml:space="preserve">a boolean</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_adjustment" c:identifier="gtk_list_box_set_adjustment">
<doc xml:space="preserve">Sets the adjustment (if any) that the widget uses to
for vertical scrolling.
For instance, this is used to get the page size for
PageUp/Down key handling.
In the normal case when the @box is packed inside
a `GtkScrolledWindow` the adjustment from that will
be picked up automatically, so there is no need
to manually do that.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_filter_func" c:identifier="gtk_list_box_set_filter_func">
<doc xml:space="preserve">By setting a filter function on the @box one can decide dynamically which
of the rows to show.
For instance, to implement a search function on a list that
filters the original list to only show the matching rows.
The @filter_func will be called for each row after the call, and
it will continue to be called each time a row changes (via
[method@Gtk.ListBoxRow.changed]) or when [method@Gtk.ListBox.invalidate_filter]
is called.
Note that using a filter function is incompatible with using a model
(see [method@Gtk.ListBox.bind_model]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="filter_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">callback that lets you filter which rows to show</doc>
<type name="ListBoxFilterFunc" c:type="GtkListBoxFilterFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @filter_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_header_func" c:identifier="gtk_list_box_set_header_func">
<doc xml:space="preserve">Sets a header function.
By setting a header function on the @box one can dynamically add headers
in front of rows, depending on the contents of the row and its position
in the list.
For instance, one could use it to add headers in front of the first item
of a new kind, in a list sorted by the kind.
The @update_header can look at the current header widget using
[method@Gtk.ListBoxRow.get_header] and either update the state of the widget
as needed, or set a new one using [method@Gtk.ListBoxRow.set_header]. If no
header is needed, set the header to %NULL.
Note that you may get many calls @update_header to this for a particular
row when e.g. changing things that don&#x2019;t affect the header. In this case
it is important for performance to not blindly replace an existing header
with an identical one.
The @update_header function will be called for each row after the call,
and it will continue to be called each time a row changes (via
[method@Gtk.ListBoxRow.changed]) and when the row before changes (either
by [method@Gtk.ListBoxRow.changed] on the previous row, or when the previous
row becomes a different row). It is also called for all rows when
[method@Gtk.ListBox.invalidate_headers] is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="update_header" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">callback that lets you add row headers</doc>
<type name="ListBoxUpdateHeaderFunc" c:type="GtkListBoxUpdateHeaderFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @update_header</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_placeholder" c:identifier="gtk_list_box_set_placeholder">
<doc xml:space="preserve">Sets the placeholder widget that is shown in the list when
it doesn't display any visible children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="placeholder" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_selection_mode" c:identifier="gtk_list_box_set_selection_mode" glib:set-property="selection-mode">
<attribute name="org.gtk.Method.set_property" value="selection-mode"/>
<doc xml:space="preserve">Sets how selection works in the listbox.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">The `GtkSelectionMode`</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</parameter>
</parameters>
</method>
<method name="set_show_separators" c:identifier="gtk_list_box_set_show_separators" glib:set-property="show-separators">
<attribute name="org.gtk.Method.set_property" value="show-separators"/>
<doc xml:space="preserve">Sets whether the list box should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="show_separators" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show separators</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_sort_func" c:identifier="gtk_list_box_set_sort_func">
<doc xml:space="preserve">Sets a sort function.
By setting a sort function on the @box one can dynamically reorder
the rows of the list, based on the contents of the rows.
The @sort_func will be called for each row after the call, and will
continue to be called each time a row changes (via
[method@Gtk.ListBoxRow.changed]) and when [method@Gtk.ListBox.invalidate_sort]
is called.
Note that using a sort function is incompatible with using a model
(see [method@Gtk.ListBox.bind_model]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="sort_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the sort function</doc>
<type name="ListBoxSortFunc" c:type="GtkListBoxSortFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="unselect_all" c:identifier="gtk_list_box_unselect_all">
<doc xml:space="preserve">Unselect all children of @box, if the selection mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
</parameters>
</method>
<method name="unselect_row" c:identifier="gtk_list_box_unselect_row">
<doc xml:space="preserve">Unselects a single row of @box, if the selection mode allows it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</instance-parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row to unselected</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
</parameters>
</method>
<property name="accept-unpaired-release" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to accept unpaired release events.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="activate-on-single-click" writable="1" transfer-ownership="none" setter="set_activate_on_single_click" getter="get_activate_on_single_click">
<attribute name="org.gtk.Property.get" value="gtk_list_box_get_activate_on_single_click"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_set_activate_on_single_click"/>
<doc xml:space="preserve">Determines whether children can be activated with a single
click, or require a double-click.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="selection-mode" writable="1" transfer-ownership="none" setter="set_selection_mode" getter="get_selection_mode">
<attribute name="org.gtk.Property.get" value="gtk_list_box_get_selection_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_set_selection_mode"/>
<doc xml:space="preserve">The selection mode used by the list box.</doc>
<type name="SelectionMode"/>
</property>
<property name="show-separators" writable="1" transfer-ownership="none" setter="set_show_separators" getter="get_show_separators">
<attribute name="org.gtk.Property.get" value="gtk_list_box_get_show_separators"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_set_show_separators"/>
<doc xml:space="preserve">Whether to show separators between rows.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate-cursor-row" when="last" action="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="MovementStep"/>
</parameter>
<parameter name="p0" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="p1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="p2" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-activated" when="last">
<doc xml:space="preserve">Emitted when a row has been activated by the user.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the activated row</doc>
<type name="ListBoxRow"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-selected" when="last">
<doc xml:space="preserve">Emitted when a new row is selected, or (with a %NULL @row)
when the selection is cleared.
When the @box is using %GTK_SELECTION_MULTIPLE, this signal will not
give you the full picture of selection changes, and you should use
the [signal@Gtk.ListBox::selected-rows-changed] signal instead.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="row" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the selected row</doc>
<type name="ListBoxRow"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-all" when="last" action="1">
<doc xml:space="preserve">Emitted to select all children of the box, if the selection
mode permits it.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="selected-rows-changed" when="first">
<doc xml:space="preserve">Emitted when the set of selected rows changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggle-cursor-row" when="last" action="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="unselect-all" when="last" action="1">
<doc xml:space="preserve">Emitted to unselect all children of the box, if the selection
mode permits it.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="ListBoxCreateWidgetFunc" c:type="GtkListBoxCreateWidgetFunc">
<doc xml:space="preserve">Called for list boxes that are bound to a `GListModel` with
gtk_list_box_bind_model() for each item that gets added to the model.
If the widget returned is not a #GtkListBoxRow widget, then the widget
will be inserted as the child of an intermediate #GtkListBoxRow.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkWidget` that represents @item</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="item" transfer-ownership="none">
<doc xml:space="preserve">the item from the model for which to create a widget for</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="ListBoxFilterFunc" c:type="GtkListBoxFilterFunc">
<doc xml:space="preserve">Will be called whenever the row changes or is added and lets you control
if the row should be visible or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row should be visible, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row that may be filtered</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="ListBoxForeachFunc" c:type="GtkListBoxForeachFunc">
<doc xml:space="preserve">A function used by gtk_list_box_selected_foreach().
It will be called on every selected child of the @box.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="box" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBox`</doc>
<type name="ListBox" c:type="GtkListBox*"/>
</parameter>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="ListBoxRow" c:symbol-prefix="list_box_row" c:type="GtkListBoxRow" parent="Widget" glib:type-name="GtkListBoxRow" glib:get-type="gtk_list_box_row_get_type" glib:type-struct="ListBoxRowClass">
<doc xml:space="preserve">`GtkListBoxRow` is the kind of widget that can be added to a `GtkListBox`.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_list_box_row_new">
<doc xml:space="preserve">Creates a new `GtkListBoxRow`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkListBoxRow`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<virtual-method name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="changed" c:identifier="gtk_list_box_row_changed">
<doc xml:space="preserve">Marks @row as changed, causing any state that depends on this
to be updated.
This affects sorting, filtering and headers.
Note that calls to this method must be in sync with the data
used for the row functions. For instance, if the list is
mirroring some external data set, and *two* rows changed in the
external data set then when you call gtk_list_box_row_changed()
on the first row the sort function must only read the new data
for the first of the two changed rows, otherwise the resorting
of the rows will be wrong.
This generally means that if you don&#x2019;t fully control the data
model you have to duplicate the data that affects the listbox
row functions into the row widgets themselves. Another alternative
is to call [method@Gtk.ListBox.invalidate_sort] on any model change,
but that is more expensive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_activatable" c:identifier="gtk_list_box_row_get_activatable" glib:get-property="activatable">
<attribute name="org.gtk.Method.get_property" value="activatable"/>
<doc xml:space="preserve">Gets whether the row is activatable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row is activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_list_box_row_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @row.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @row</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_header" c:identifier="gtk_list_box_row_get_header">
<doc xml:space="preserve">Returns the current header of the @row.
This can be used
in a [callback@Gtk.ListBoxUpdateHeaderFunc] to see if
there is a header set already, and if so to update
the state of it.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current header</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_index" c:identifier="gtk_list_box_row_get_index">
<doc xml:space="preserve">Gets the current index of the @row in its `GtkListBox` container.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the @row, or -1 if the @row is not in a listbox</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selectable" c:identifier="gtk_list_box_row_get_selectable" glib:get-property="selectable">
<attribute name="org.gtk.Method.get_property" value="selectable"/>
<doc xml:space="preserve">Gets whether the row can be selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row is selectable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_selected" c:identifier="gtk_list_box_row_is_selected">
<doc xml:space="preserve">Returns whether the child is currently selected in its
`GtkListBox` container.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @row is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_activatable" c:identifier="gtk_list_box_row_set_activatable" glib:set-property="activatable">
<attribute name="org.gtk.Method.set_property" value="activatable"/>
<doc xml:space="preserve">Set whether the row is activatable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
<parameter name="activatable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to mark the row as activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_list_box_row_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_header" c:identifier="gtk_list_box_row_set_header">
<doc xml:space="preserve">Sets the current header of the @row.
This is only allowed to be called
from a [callback@Gtk.ListBoxUpdateHeaderFunc].
It will replace any existing header in the row,
and be shown in front of the row in the listbox.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
<parameter name="header" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the header</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_selectable" c:identifier="gtk_list_box_row_set_selectable" glib:set-property="selectable">
<attribute name="org.gtk.Method.set_property" value="selectable"/>
<doc xml:space="preserve">Set whether the row can be selected.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListBoxRow`</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</instance-parameter>
<parameter name="selectable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to mark the row as selectable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="activatable" writable="1" transfer-ownership="none" setter="set_activatable" getter="get_activatable">
<attribute name="org.gtk.Property.get" value="gtk_list_box_row_get_activatable"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_row_set_activatable"/>
<doc xml:space="preserve">Determines whether the ::row-activated
signal will be emitted for this row.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Proeprty.get" value="gtk_list_box_row_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_row_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="selectable" writable="1" transfer-ownership="none" setter="set_selectable" getter="get_selectable">
<attribute name="org.gtk.Property.get" value="gtk_list_box_row_get_selectable"/>
<attribute name="org.gtk.Property.set" value="gtk_list_box_row_set_selectable"/>
<doc xml:space="preserve">Determines whether this row can be selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="first" action="1">
<doc xml:space="preserve">This is a keybinding signal, which will cause this row to be activated.
If you want to be notified when the user activates a row (by key or not),
use the [signal@Gtk.ListBox::row-activated] signal on the row&#x2019;s parent
`GtkListBox`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="ListBoxRowClass" c:type="GtkListBoxRowClass" glib:is-gtype-struct-for="ListBoxRow">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="activate">
<callback name="activate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="row" transfer-ownership="none">
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<callback name="ListBoxSortFunc" c:type="GtkListBoxSortFunc">
<doc xml:space="preserve">Compare two rows to determine which should be first.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">&lt; 0 if @row1 should be before @row2, 0 if they are
equal and &gt; 0 otherwise</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="row1" transfer-ownership="none">
<doc xml:space="preserve">the first row</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="row2" transfer-ownership="none">
<doc xml:space="preserve">the second row</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="ListBoxUpdateHeaderFunc" c:type="GtkListBoxUpdateHeaderFunc">
<doc xml:space="preserve">Whenever @row changes or which row is before @row changes this
is called, which lets you update the header on @row.
You may remove or set a new one via [method@Gtk.ListBoxRow.set_header]
or just change the state of the current header widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="row" transfer-ownership="none">
<doc xml:space="preserve">the row to update</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="before" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the row before @row, or %NULL if it is first</doc>
<type name="ListBoxRow" c:type="GtkListBoxRow*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="ListItem" c:symbol-prefix="list_item" c:type="GtkListItem" parent="GObject.Object" glib:type-name="GtkListItem" glib:get-type="gtk_list_item_get_type" glib:type-struct="ListItemClass">
<doc xml:space="preserve">`GtkListItem` is used by list widgets to represent items in a `GListModel`.
The `GtkListItem`s are managed by the list widget (with its factory)
and cannot be created by applications, but they need to be populated
by application code. This is done by calling [method@Gtk.ListItem.set_child].
`GtkListItem`s exist in 2 stages:
1. The unbound stage where the listitem is not currently connected to
an item in the list. In that case, the [property@Gtk.ListItem:item]
property is set to %NULL.
2. The bound stage where the listitem references an item from the list.
The [property@Gtk.ListItem:item] property is not %NULL.</doc>
<method name="get_activatable" c:identifier="gtk_list_item_get_activatable" glib:get-property="activatable">
<attribute name="org.gtk.Method.get_property" value="activatable"/>
<doc xml:space="preserve">Checks if a list item has been set to be activatable via
gtk_list_item_set_activatable().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_list_item_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child previously set via gtk_list_item_set_child() or
%NULL if none was set.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The child</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_item" c:identifier="gtk_list_item_get_item" glib:get-property="item">
<attribute name="org.gtk.Method.get_property" value="item"/>
<doc xml:space="preserve">Gets the model item that associated with @self.
If @self is unbound, this function returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The item displayed</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_list_item_get_position" glib:get-property="position">
<attribute name="org.gtk.Method.get_property" value="position"/>
<doc xml:space="preserve">Gets the position in the model that @self currently displays.
If @self is unbound, %GTK_INVALID_LIST_POSITION is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The position of this item</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selectable" c:identifier="gtk_list_item_get_selectable" glib:get-property="selectable">
<attribute name="org.gtk.Method.get_property" value="selectable"/>
<doc xml:space="preserve">Checks if a list item has been set to be selectable via
gtk_list_item_set_selectable().
Do not confuse this function with [method@Gtk.ListItem.get_selected].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is selectable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected" c:identifier="gtk_list_item_get_selected" glib:get-property="selected">
<attribute name="org.gtk.Method.get_property" value="selected"/>
<doc xml:space="preserve">Checks if the item is displayed as selected.
The selected state is maintained by the liste widget and its model
and cannot be set otherwise.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_activatable" c:identifier="gtk_list_item_set_activatable" glib:set-property="activatable">
<attribute name="org.gtk.Method.set_property" value="activatable"/>
<doc xml:space="preserve">Sets @self to be activatable.
If an item is activatable, double-clicking on the item, using
the Return key or calling gtk_widget_activate() will activate
the item. Activating instructs the containing view to handle
activation. `GtkListView` for example will be emitting the
[signal@Gtk.ListView::activate] signal.
By default, list items are activatable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
<parameter name="activatable" transfer-ownership="none">
<doc xml:space="preserve">if the item should be activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_list_item_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child to be used for this listitem.
This function is typically called by applications when
setting up a listitem so that the widget can be reused when
binding it multiple times.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The list item's child or %NULL to unset</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_selectable" c:identifier="gtk_list_item_set_selectable" glib:set-property="selectable">
<attribute name="org.gtk.Method.set_property" value="selectable"/>
<doc xml:space="preserve">Sets @self to be selectable.
If an item is selectable, clicking on the item or using the keyboard
will try to select or unselect the item. If this succeeds is up to
the model to determine, as it is managing the selected state.
Note that this means that making an item non-selectable has no
influence on the selected state at all. A non-selectable item
may still be selected.
By default, list items are selectable. When rebinding them to
a new item, they will also be reset to be selectable by GTK.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListItem`</doc>
<type name="ListItem" c:type="GtkListItem*"/>
</instance-parameter>
<parameter name="selectable" transfer-ownership="none">
<doc xml:space="preserve">if the item should be selectable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="activatable" writable="1" transfer-ownership="none" setter="set_activatable" getter="get_activatable">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_activatable"/>
<attribute name="org.gtk.Property.set" value="gtk_list_item_set_activatable"/>
<doc xml:space="preserve">If the item can be activated by the user.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_list_item_set_child"/>
<doc xml:space="preserve">Widget used for display.</doc>
<type name="Widget"/>
</property>
<property name="item" transfer-ownership="none" getter="get_item">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_item"/>
<doc xml:space="preserve">Displayed item.</doc>
<type name="GObject.Object"/>
</property>
<property name="position" transfer-ownership="none" getter="get_position">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_position"/>
<doc xml:space="preserve">Position of the item.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="selectable" writable="1" transfer-ownership="none" setter="set_selectable" getter="get_selectable">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_selectable"/>
<attribute name="org.gtk.Property.set" value="gtk_list_item_set_selectable"/>
<doc xml:space="preserve">If the item can be selected by the user.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="selected" transfer-ownership="none" getter="get_selected">
<attribute name="org.gtk.Property.get" value="gtk_list_item_get_selected"/>
<doc xml:space="preserve">If the item is currently selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="ListItemClass" c:type="GtkListItemClass" disguised="1" glib:is-gtype-struct-for="ListItem"/>
<class name="ListItemFactory" c:symbol-prefix="list_item_factory" c:type="GtkListItemFactory" parent="GObject.Object" glib:type-name="GtkListItemFactory" glib:get-type="gtk_list_item_factory_get_type" glib:type-struct="ListItemFactoryClass">
<doc xml:space="preserve">A `GtkListItemFactory` creates widgets for the items taken from a `GListModel`.
This is one of the core concepts of handling list widgets such
as [class@Gtk.ListView] or [class@Gtk.GridView].
The `GtkListItemFactory` is tasked with creating widgets for items
taken from the model when the views need them and updating them as
the items displayed by the view change.
A view is usually only able to display anything after both a factory
and a model have been set on the view. So it is important that you do
not skip this step when setting up your first view.
Because views do not display the whole list at once but only a few
items, they only need to maintain a few widgets at a time. They will
instruct the `GtkListItemFactory` to create these widgets and bind them
to the items that are currently displayed.
As the list model changes or the user scrolls to the list, the items will
change and the view will instruct the factory to bind the widgets to those
new items.
The actual widgets used for displaying those widgets is provided by you.
When the factory needs widgets created, it will create a `GtkListItem`
and hand it to your code to set up a widget for. This list item will provide
various properties with information about what item to display and provide
you with some opportunities to configure its behavior. See the
[class@Gtk.ListItem] documentation for further details.
Various implementations of `GtkListItemFactory` exist to allow you different
ways to provide those widgets. The most common implementations are
[class@Gtk.BuilderListItemFactory] which takes a `GtkBuilder` .ui file
and then creates widgets and manages everything automatically from the
information in that file and [class@Gtk.SignalListItemFactory] which allows
you to connect to signals with your own code and retain full control over
how the widgets are setup and managed.
A `GtkListItemFactory` is supposed to be final - that means its behavior should
not change and the first widget created from it should behave the same way as
the last widget created from it.
If you intend to do changes to the behavior, it is recommended that you create
a new `GtkListItemFactory` which will allow the views to recreate its widgets.
Once you have chosen your factory and created it, you need to set it
on the view widget you want to use it with, such as via
[method@Gtk.ListView.set_factory]. Reusing factories across different
views is allowed, but very uncommon.</doc>
</class>
<record name="ListItemFactoryClass" c:type="GtkListItemFactoryClass" disguised="1" glib:is-gtype-struct-for="ListItemFactory"/>
<class name="ListStore" c:symbol-prefix="list_store" c:type="GtkListStore" parent="GObject.Object" glib:type-name="GtkListStore" glib:get-type="gtk_list_store_get_type" glib:type-struct="ListStoreClass">
<doc xml:space="preserve">A list-like data structure that can be used with the [class@Gtk.TreeView].
The `GtkListStore` object is a list model for use with a `GtkTreeView`
widget. It implements the `GtkTreeModel` interface, and consequentialy,
can use all of the methods available there. It also implements the
`GtkTreeSortable` interface so it can be sorted by the view.
Finally, it also implements the tree
[drag](iface.TreeDragSource.html) and [drop](iface.TreeDragDest.html)
interfaces.
The `GtkListStore` can accept most `GType`s as a column type, though
it can&#x2019;t accept all custom types. Internally, it will keep a copy of
data passed in (such as a string or a boxed pointer). Columns that
accept `GObject`s are handled a little differently. The
`GtkListStore` will keep a reference to the object instead of copying the
value. As a result, if the object is modified, it is up to the
application writer to call [method@Gtk.TreeModel.row_changed] to emit the
[signal@Gtk.TreeModel::row_changed] signal. This most commonly affects lists
with [class@Gdk.Texture]s stored.
An example for creating a simple list store:
```c
enum {
COLUMN_STRING,
COLUMN_INT,
COLUMN_BOOLEAN,
N_COLUMNS
};
{
GtkListStore *list_store;
GtkTreePath *path;
GtkTreeIter iter;
int i;
list_store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_INT,
G_TYPE_BOOLEAN);
for (i = 0; i &lt; 10; i++)
{
char *some_data;
some_data = get_some_data (i);
// Add a new row to the model
gtk_list_store_append (list_store, &amp;iter);
gtk_list_store_set (list_store, &amp;iter,
COLUMN_STRING, some_data,
COLUMN_INT, i,
COLUMN_BOOLEAN, FALSE,
-1);
// As the store will keep a copy of the string internally,
// we free some_data.
g_free (some_data);
}
// Modify a particular row
path = gtk_tree_path_new_from_string ("4");
gtk_tree_model_get_iter (GTK_TREE_MODEL (list_store),
&amp;iter,
path);
gtk_tree_path_free (path);
gtk_list_store_set (list_store, &amp;iter,
COLUMN_BOOLEAN, TRUE,
-1);
}
```
# Performance Considerations
Internally, the `GtkListStore` was originally implemented with a linked list
with a tail pointer. As a result, it was fast at data insertion and deletion,
and not fast at random data access. The `GtkListStore` sets the
`GTK_TREE_MODEL_ITERS_PERSIST` flag, which means that `GtkTreeIter`s can be
cached while the row exists. Thus, if access to a particular row is needed
often and your code is expected to run on older versions of GTK, it is worth
keeping the iter around.
# Atomic Operations
It is important to note that only the methods
gtk_list_store_insert_with_values() and gtk_list_store_insert_with_valuesv()
are atomic, in the sense that the row is being appended to the store and the
values filled in in a single operation with regard to `GtkTreeModel` signaling.
In contrast, using e.g. gtk_list_store_append() and then gtk_list_store_set()
will first create a row, which triggers the `GtkTreeModel::row-inserted` signal
on `GtkListStore`. The row, however, is still empty, and any signal handler
connecting to `GtkTreeModel::row-inserted` on this particular store should be prepared
for the situation that the row might be empty. This is especially important
if you are wrapping the `GtkListStore` inside a `GtkTreeModel`Filter and are
using a `GtkTreeModel`FilterVisibleFunc. Using any of the non-atomic operations
to append rows to the `GtkListStore` will cause the
`GtkTreeModel`FilterVisibleFunc to be visited with an empty row first; the
function must be prepared for that.
# GtkListStore as GtkBuildable
The GtkListStore implementation of the [iface@Gtk.Buildable] interface allows
to specify the model columns with a `&lt;columns&gt;` element that may contain
multiple `&lt;column&gt;` elements, each specifying one model column. The &#x201C;type&#x201D;
attribute specifies the data type for the column.
Additionally, it is possible to specify content for the list store
in the UI definition, with the `&lt;data&gt;` element. It can contain multiple
`&lt;row&gt;` elements, each specifying to content for one row of the list model.
Inside a `&lt;row&gt;`, the `&lt;col&gt;` elements specify the content for individual cells.
Note that it is probably more common to define your models in the code,
and one might consider it a layering violation to specify the content of
a list store in a UI definition, data, not presentation, and common wisdom
is to separate the two, as far as possible.
An example of a UI Definition fragment for a list store:
```xml
&lt;object class="GtkListStore"&gt;
&lt;columns&gt;
&lt;column type="gchararray"/&gt;
&lt;column type="gchararray"/&gt;
&lt;column type="gint"/&gt;
&lt;/columns&gt;
&lt;data&gt;
&lt;row&gt;
&lt;col id="0"&gt;John&lt;/col&gt;
&lt;col id="1"&gt;Doe&lt;/col&gt;
&lt;col id="2"&gt;25&lt;/col&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;col id="0"&gt;Johan&lt;/col&gt;
&lt;col id="1"&gt;Dahlin&lt;/col&gt;
&lt;col id="2"&gt;50&lt;/col&gt;
&lt;/row&gt;
&lt;/data&gt;
&lt;/object&gt;
```</doc>
<implements name="Buildable"/>
<implements name="TreeDragDest"/>
<implements name="TreeDragSource"/>
<implements name="TreeModel"/>
<implements name="TreeSortable"/>
<constructor name="new" c:identifier="gtk_list_store_new" shadowed-by="newv" introspectable="0">
<doc xml:space="preserve">Creates a new list store as with @n_columns columns each of the types passed
in. Note that only types derived from standard GObject fundamental types
are supported.
As an example, `gtk_list_store_new (3, G_TYPE_INT, G_TYPE_STRING,
GDK_TYPE_TEXTURE);` will create a new `GtkListStore` with three columns, of type
int, string and `GdkTexture`, respectively.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</return-value>
<parameters>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">number of columns in the list store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">all `GType` types for the columns, from first to last</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<constructor name="newv" c:identifier="gtk_list_store_newv" shadows="new">
<doc xml:space="preserve">Non-vararg creation function. Used primarily by language bindings.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</return-value>
<parameters>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">number of columns in the list store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="types" transfer-ownership="none">
<doc xml:space="preserve">an array of `GType` types for the columns, from first to last</doc>
<array length="0" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="append" c:identifier="gtk_list_store_append">
<doc xml:space="preserve">Appends a new row to @list_store. @iter will be changed to point to this new
row. The row will be empty after this function is called. To fill in
values, you need to call gtk_list_store_set() or gtk_list_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the appended row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="clear" c:identifier="gtk_list_store_clear">
<doc xml:space="preserve">Removes all rows from the list store.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListStore`.</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_list_store_insert">
<doc xml:space="preserve">Creates a new row at @position. @iter will be changed to point to this new
row. If @position is -1 or is larger than the number of rows on the list,
then the new row will be appended to the list. The row will be empty after
this function is called. To fill in values, you need to call
gtk_list_store_set() or gtk_list_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 for last</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_after" c:identifier="gtk_list_store_insert_after">
<doc xml:space="preserve">Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
prepended to the beginning of the list. @iter will be changed to point to
this new row. The row will be empty after this function is called. To fill
in values, you need to call gtk_list_store_set() or gtk_list_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="insert_before" c:identifier="gtk_list_store_insert_before">
<doc xml:space="preserve">Inserts a new row before @sibling. If @sibling is %NULL, then the row will
be appended to the end of the list. @iter will be changed to point to this
new row. The row will be empty after this function is called. To fill in
values, you need to call gtk_list_store_set() or gtk_list_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="insert_with_values" c:identifier="gtk_list_store_insert_with_values" shadowed-by="insert_with_valuesv" introspectable="0">
<doc xml:space="preserve">Creates a new row at @position. @iter will be changed to point to this new
row. If @position is -1, or larger than the number of rows in the list, then
the new row will be appended to the list. The row will be filled with the
values given to this function.
Calling
`gtk_list_store_insert_with_values (list_store, iter, position...)`
has the same effect as calling:
|[&lt;!-- language="C" --&gt;
static void
insert_value (GtkListStore *list_store,
GtkTreeIter *iter,
int position)
{
gtk_list_store_insert (list_store, iter, position);
gtk_list_store_set (list_store,
iter
// ...
);
}
]|
with the difference that the former will only emit `GtkTreeModel`::row-inserted
once, while the latter will emit `GtkTreeModel`::row-inserted,
`GtkTreeModel`::row-changed and, if the list store is sorted,
`GtkTreeModel`::rows-reordered for every inserted value.
Since emitting the `GtkTreeModel::rows-reordered` signal repeatedly can
affect the performance of the program, gtk_list_store_insert_with_values()
should generally be preferred when inserting rows in a sorted list store.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 to append after existing
rows</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">pairs of column number and value, terminated with -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="insert_with_valuesv" c:identifier="gtk_list_store_insert_with_valuesv" shadows="insert_with_values">
<doc xml:space="preserve">A variant of gtk_list_store_insert_with_values() which
takes the columns and values as two arrays, instead of
varargs.
This function is mainly intended for language-bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 for last</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="columns" transfer-ownership="none">
<doc xml:space="preserve">an array of column numbers</doc>
<array length="4" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of GValues</doc>
<array length="4" zero-terminated="0" c:type="GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
<parameter name="n_values" transfer-ownership="none">
<doc xml:space="preserve">the length of the @columns and @values arrays</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="iter_is_valid" c:identifier="gtk_list_store_iter_is_valid">
<doc xml:space="preserve">Checks if the given iter is a valid iter for this `GtkListStore`.
This function is slow. Only use it for debugging and/or testing
purposes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the iter is valid, %FALSE if the iter is invalid.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">a list store</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the iterator to check</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="move_after" c:identifier="gtk_list_store_move_after">
<doc xml:space="preserve">Moves @iter in @store to the position after @position. Note that this
function only works with unsorted stores. If @position is %NULL, @iter
will be moved to the start of the list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`.</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="move_before" c:identifier="gtk_list_store_move_before">
<doc xml:space="preserve">Moves @iter in @store to the position before @position. Note that this
function only works with unsorted stores. If @position is %NULL, @iter
will be moved to the end of the list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`.</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_list_store_prepend">
<doc xml:space="preserve">Prepends a new row to @list_store. @iter will be changed to point to this new
row. The row will be empty after this function is called. To fill in
values, you need to call gtk_list_store_set() or gtk_list_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the prepend row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_list_store_remove">
<doc xml:space="preserve">Removes the given row from the list store. After being removed,
@iter is set to be the next valid row, or invalidated if it pointed
to the last row in @list_store.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is valid, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="reorder" c:identifier="gtk_list_store_reorder">
<doc xml:space="preserve">Reorders @store to follow the order indicated by @new_order. Note that
this function only works with unsorted stores.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`.</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers mapping the new
position of each child to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`. It must have
exactly as many items as the list store&#x2019;s length.</doc>
<array c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
</parameters>
</method>
<method name="set" c:identifier="gtk_list_store_set" shadowed-by="set_valuesv" introspectable="0">
<doc xml:space="preserve">Sets the value of one or more cells in the row referenced by @iter.
The variable argument list should contain integer column numbers,
each column number followed by the value to be set.
The list is terminated by a -1. For example, to set column 0 with type
%G_TYPE_STRING to &#x201C;Foo&#x201D;, you would write `gtk_list_store_set (store, iter,
0, "Foo", -1)`.
The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">row iterator</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">pairs of column number and value, terminated with -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="set_column_types" c:identifier="gtk_list_store_set_column_types">
<doc xml:space="preserve">This function is meant primarily for `GObject`s that inherit from `GtkListStore`,
and should only be used when constructing a new `GtkListStore`. It will not
function after a row has been added, or a method on the `GtkTreeModel`
interface is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">Number of columns for the list store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="types" transfer-ownership="none">
<doc xml:space="preserve">An array length n of `GType`s</doc>
<array length="0" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_valist" c:identifier="gtk_list_store_set_valist" introspectable="0">
<doc xml:space="preserve">See gtk_list_store_set(); this version takes a va_list for use by language
bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="var_args" transfer-ownership="none">
<doc xml:space="preserve">va_list of column/value pairs</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_list_store_set_value">
<doc xml:space="preserve">Sets the data in the cell specified by @iter and @column.
The type of @value must be convertible to the type of the
column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">column number to modify</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">new value for the cell</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="set_valuesv" c:identifier="gtk_list_store_set_valuesv" shadows="set">
<doc xml:space="preserve">A variant of gtk_list_store_set_valist() which
takes the columns and values as two arrays, instead of
varargs. This function is mainly intended for
language-bindings and in case the number of columns to
change is not known until run-time.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="list_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="columns" transfer-ownership="none">
<doc xml:space="preserve">an array of column numbers</doc>
<array length="3" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of GValues</doc>
<array length="3" zero-terminated="0" c:type="GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
<parameter name="n_values" transfer-ownership="none">
<doc xml:space="preserve">the length of the @columns and @values arrays</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="swap" c:identifier="gtk_list_store_swap">
<doc xml:space="preserve">Swaps @a and @b in @store. Note that this function only works with
unsorted stores.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkListStore`.</doc>
<type name="ListStore" c:type="GtkListStore*"/>
</instance-parameter>
<parameter name="a" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">Another `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<field name="parent">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv" readable="0" private="1">
<type name="ListStorePrivate" c:type="GtkListStorePrivate*"/>
</field>
</class>
<record name="ListStoreClass" c:type="GtkListStoreClass" glib:is-gtype-struct-for="ListStore">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="ListStorePrivate" c:type="GtkListStorePrivate" disguised="1"/>
<class name="ListView" c:symbol-prefix="list_view" c:type="GtkListView" parent="ListBase" glib:type-name="GtkListView" glib:get-type="gtk_list_view_get_type" glib:type-struct="ListViewClass">
<doc xml:space="preserve">`GtkListView` presents a large dynamic list of items.
`GtkListView` uses its factory to generate one row widget for each visible
item and shows them in a linear display, either vertically or horizontally.
The [property@Gtk.ListView:show-separators] property offers a simple way to
display separators between the rows.
`GtkListView` allows the user to select items according to the selection
characteristics of the model. For models that allow multiple selected items,
it is possible to turn on _rubberband selection_, using
[property@Gtk.ListView:enable-rubberband].
If you need multiple columns with headers, see [class@Gtk.ColumnView].
To learn more about the list widget framework, see the
[overview](section-list-widget.html).
An example of using `GtkListView`:
```c
static void
setup_listitem_cb (GtkListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *image;
image = gtk_image_new ();
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
gtk_list_item_set_child (list_item, image);
}
static void
bind_listitem_cb (GtkListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *image;
GAppInfo *app_info;
image = gtk_list_item_get_child (list_item);
app_info = gtk_list_item_get_item (list_item);
gtk_image_set_from_gicon (GTK_IMAGE (image), g_app_info_get_icon (app_info));
}
static void
activate_cb (GtkListView *list,
guint position,
gpointer unused)
{
GAppInfo *app_info;
app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
g_app_info_launch (app_info, NULL, NULL, NULL);
g_object_unref (app_info);
}
...
model = create_application_list ();
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
list = gtk_list_view_new (GTK_SELECTION_MODEL (gtk_single_selection_new (model)), factory);
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
```
# CSS nodes
```
listview[.separators][.rich-list][.navigation-sidebar][.data-table]
&#x251C;&#x2500;&#x2500; row[.activatable]
&#x2502;
&#x251C;&#x2500;&#x2500; row[.activatable]
&#x2502;
&#x250A;
&#x2570;&#x2500;&#x2500; [rubberband]
```
`GtkListView` uses a single CSS node named `listview`. It may carry the
`.separators` style class, when [property@Gtk.ListView:show-separators]
property is set. Each child widget uses a single CSS node named `row`.
If the [property@Gtk.ListItem:activatable] property is set, the
corresponding row will have the `.activatable` style class. For
rubberband selection, a node with name `rubberband` is used.
The main listview node may also carry style classes to select
the style of [list presentation](ListContainers.html#list-styles):
.rich-list, .navigation-sidebar or .data-table.
# Accessibility
`GtkListView` uses the %GTK_ACCESSIBLE_ROLE_LIST role, and the list
items use the %GTK_ACCESSIBLE_ROLE_LIST_ITEM role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_list_view_new">
<doc xml:space="preserve">Creates a new `GtkListView` that uses the given @factory for
mapping items to widgets.
The function takes ownership of the
arguments, so you can write code like
```c
list_view = gtk_list_view_new (create_model (),
gtk_builder_list_item_factory_new_from_resource ("/resource.ui"));
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkListView` using the given @model and @factory</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="factory" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The factory to populate items with</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</constructor>
<method name="get_enable_rubberband" c:identifier="gtk_list_view_get_enable_rubberband" glib:get-property="enable-rubberband">
<attribute name="org.gtk.Method.get_property" value="enable-rubberband"/>
<doc xml:space="preserve">Returns whether rows can be selected by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rubberband selection is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_factory" c:identifier="gtk_list_view_get_factory" glib:get-property="factory">
<attribute name="org.gtk.Method.get_property" value="factory"/>
<doc xml:space="preserve">Gets the factory that's currently used to populate list items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The factory in use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_list_view_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that's currently used to read the items displayed.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model in use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_separators" c:identifier="gtk_list_view_get_show_separators" glib:get-property="show-separators">
<attribute name="org.gtk.Method.get_property" value="show-separators"/>
<doc xml:space="preserve">Returns whether the list box should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the list box shows separators</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_single_click_activate" c:identifier="gtk_list_view_get_single_click_activate" glib:get-property="single-click-activate">
<attribute name="org.gtk.Method.set_property" value="single-click-activate"/>
<doc xml:space="preserve">Returns whether rows will be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rows are activated on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_enable_rubberband" c:identifier="gtk_list_view_set_enable_rubberband" glib:set-property="enable-rubberband">
<attribute name="org.gtk.Method.set_property" value="enable-rubberband"/>
<doc xml:space="preserve">Sets whether selections can be changed by dragging with the mouse.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
<parameter name="enable_rubberband" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable rubberband selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_factory" c:identifier="gtk_list_view_set_factory" glib:set-property="factory">
<attribute name="org.gtk.Method.set_property" value="factory"/>
<doc xml:space="preserve">Sets the `GtkListItemFactory` to use for populating list items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
<parameter name="factory" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the factory to use</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_list_view_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to use.
This must be a [iface@Gtk.SelectionModel] to use.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to use</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</method>
<method name="set_show_separators" c:identifier="gtk_list_view_set_show_separators" glib:set-property="show-separators">
<attribute name="org.gtk.Method.set_property" value="show-separators"/>
<doc xml:space="preserve">Sets whether the list box should show separators
between rows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
<parameter name="show_separators" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show separators</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_single_click_activate" c:identifier="gtk_list_view_set_single_click_activate" glib:set-property="single-click-activate">
<attribute name="org.gtk.Method.set_property" value="single-click-activate"/>
<doc xml:space="preserve">Sets whether rows should be activated on single click and
selected on hover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkListView`</doc>
<type name="ListView" c:type="GtkListView*"/>
</instance-parameter>
<parameter name="single_click_activate" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to activate items on single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="enable-rubberband" writable="1" transfer-ownership="none" setter="set_enable_rubberband" getter="get_enable_rubberband">
<attribute name="org.gtk.Property.get" value="gtk_list_view_get_enable_rubberband"/>
<attribute name="org.gtk.Property.set" value="gtk_list_view_set_enable_rubberband"/>
<doc xml:space="preserve">Allow rubberband selection.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="factory" writable="1" transfer-ownership="none" setter="set_factory" getter="get_factory">
<attribute name="org.gtk.Property.get" value="gtk_list_view_get_factory"/>
<attribute name="org.gtk.Property.set" value="gtk_list_view_set_factory"/>
<doc xml:space="preserve">Factory for populating list items.</doc>
<type name="ListItemFactory"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_list_view_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_list_view_set_model"/>
<doc xml:space="preserve">Model for the items displayed.</doc>
<type name="SelectionModel"/>
</property>
<property name="show-separators" writable="1" transfer-ownership="none" setter="set_show_separators" getter="get_show_separators">
<attribute name="org.gtk.Property.get" value="gtk_list_view_get_show_separators"/>
<attribute name="org.gtk.Property.set" value="gtk_list_view_set_show_separators"/>
<doc xml:space="preserve">Show separators between rows.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="single-click-activate" writable="1" transfer-ownership="none" setter="set_single_click_activate" getter="get_single_click_activate">
<attribute name="org.gtk.Property.get" value="gtk_list_view_get_single_click_activate"/>
<attribute name="org.gtk.Property.set" value="gtk_list_view_set_single_click_activate"/>
<doc xml:space="preserve">Activate rows on single click and select them on hover.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="last">
<doc xml:space="preserve">Emitted when a row has been activated by the user,
usually via activating the GtkListView|list.activate-item action.
This allows for a convenient way to handle activation in a listview.
See [method@Gtk.ListItem.set_activatable] for details on how to use
this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of item to activate</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="ListViewClass" c:type="GtkListViewClass" disguised="1" glib:is-gtype-struct-for="ListView"/>
<class name="LockButton" c:symbol-prefix="lock_button" c:type="GtkLockButton" parent="Button" glib:type-name="GtkLockButton" glib:get-type="gtk_lock_button_get_type">
<doc xml:space="preserve">`GtkLockButton` is a widget to obtain and revoke authorizations
needed to operate the controls.
![An example GtkLockButton](lock-button.png)
It is typically used in preference dialogs or control panels.
The required authorization is represented by a `GPermission` object.
Concrete implementations of `GPermission` may use PolicyKit or some
other authorization framework. To obtain a PolicyKit-based
`GPermission`, use `polkit_permission_new()`.
If the user is not currently allowed to perform the action, but can
obtain the permission, the widget looks like this:
![](lockbutton-locked.png)
and the user can click the button to request the permission. Depending
on the platform, this may pop up an authentication dialog or ask the user
to authenticate in some other way. Once the user has obtained the permission,
the widget changes to this:
![](lockbutton-unlocked.png)
and the permission can be dropped again by clicking the button. If the user
is not able to obtain the permission at all, the widget looks like this:
![](lockbutton-sorry.png)
If the user has the permission and cannot drop it, the button is hidden.
The text (and tooltips) that are shown in the various cases can be adjusted
with the [property@Gtk.LockButton:text-lock],
[property@Gtk.LockButton:text-unlock],
[property@Gtk.LockButton:tooltip-lock],
[property@Gtk.LockButton:tooltip-unlock] and
[property@Gtk.LockButton:tooltip-not-authorized] properties.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_lock_button_new">
<doc xml:space="preserve">Creates a new lock button which reflects the @permission.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkLockButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="permission" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GPermission`</doc>
<type name="Gio.Permission" c:type="GPermission*"/>
</parameter>
</parameters>
</constructor>
<method name="get_permission" c:identifier="gtk_lock_button_get_permission" glib:get-property="permission">
<attribute name="org.gtk.Method.get_property" value="permission"/>
<doc xml:space="preserve">Obtains the `GPermission` object that controls @button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GPermission` of @button</doc>
<type name="Gio.Permission" c:type="GPermission*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLockButton`</doc>
<type name="LockButton" c:type="GtkLockButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_permission" c:identifier="gtk_lock_button_set_permission" glib:set-property="permission">
<attribute name="org.gtk.Method.set_property" value="permission"/>
<doc xml:space="preserve">Sets the `GPermission` object that controls @button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkLockButton`</doc>
<type name="LockButton" c:type="GtkLockButton*"/>
</instance-parameter>
<parameter name="permission" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GPermission` object</doc>
<type name="Gio.Permission" c:type="GPermission*"/>
</parameter>
</parameters>
</method>
<property name="permission" writable="1" transfer-ownership="none" setter="set_permission" getter="get_permission">
<attribute name="org.gtk.Property.get" value="gtk_lock_button_get_permission"/>
<attribute name="org.gtk.Property.set" value="gtk_lock_button_set_permission"/>
<doc xml:space="preserve">The `GPermission object controlling this button.</doc>
<type name="Gio.Permission"/>
</property>
<property name="text-lock" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The text to display when prompting the user to lock.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="text-unlock" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The text to display when prompting the user to unlock.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="tooltip-lock" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The tooltip to display when prompting the user to lock.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="tooltip-not-authorized" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The tooltip to display when the user cannot obtain authorization.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="tooltip-unlock" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The tooltip to display when prompting the user to unlock.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<constant name="MAJOR_VERSION" value="4" c:type="GTK_MAJOR_VERSION">
<doc xml:space="preserve">Like [func@get_major_version], but from the headers used at
application compile time, rather than from the library linked
against at application run time.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="MAX_COMPOSE_LEN" value="7" c:type="GTK_MAX_COMPOSE_LEN">
<type name="gint" c:type="gint"/>
</constant>
<constant name="MEDIA_FILE_EXTENSION_POINT_NAME" value="gtk-media-file" c:type="GTK_MEDIA_FILE_EXTENSION_POINT_NAME">
<type name="utf8" c:type="gchar*"/>
</constant>
<function-macro name="MENU_BUTTON" c:identifier="GTK_MENU_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="MESSAGE_DIALOG" c:identifier="GTK_MESSAGE_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="MICRO_VERSION" value="2" c:type="GTK_MICRO_VERSION">
<doc xml:space="preserve">Like [func@get_micro_version], but from the headers used at
application compile time, rather than from the library linked
against at application run time.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="MINOR_VERSION" value="6" c:type="GTK_MINOR_VERSION">
<doc xml:space="preserve">Like [func@get_minor_version], but from the headers used at
application compile time, rather than from the library linked
against at application run time.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="MOUNT_OPERATION" c:identifier="GTK_MOUNT_OPERATION" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="MOUNT_OPERATION_CLASS" c:identifier="GTK_MOUNT_OPERATION_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="MOUNT_OPERATION_GET_CLASS" c:identifier="GTK_MOUNT_OPERATION_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<class name="MapListModel" c:symbol-prefix="map_list_model" c:type="GtkMapListModel" parent="GObject.Object" glib:type-name="GtkMapListModel" glib:get-type="gtk_map_list_model_get_type" glib:type-struct="MapListModelClass">
<doc xml:space="preserve">A `GtkMapListModel` maps the items in a list model to different items.
`GtkMapListModel` uses a [callback@Gtk.MapListModelMapFunc].
Example: Create a list of `GtkEventControllers`
```c
static gpointer
map_to_controllers (gpointer widget,
gpointer data)
{
gpointer result = gtk_widget_observe_controllers (widget);
g_object_unref (widget);
return result;
}
widgets = gtk_widget_observe_children (widget);
controllers = gtk_map_list_model_new (widgets,
map_to_controllers,
NULL, NULL);
model = gtk_flatten_list_model_new (GTK_TYPE_EVENT_CONTROLLER,
controllers);
```
`GtkMapListModel` will attempt to discard the mapped objects as soon as
they are no longer needed and recreate them if necessary.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_map_list_model_new">
<doc xml:space="preserve">Creates a new `GtkMapListModel` for the given arguments.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMapListModel`</doc>
<type name="MapListModel" c:type="GtkMapListModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to map</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="map_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">map function</doc>
<type name="MapListModelMapFunc" c:type="GtkMapListModelMapFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @map_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_map_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that is currently being mapped or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model that gets mapped</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMapListModel`</doc>
<type name="MapListModel" c:type="GtkMapListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_map" c:identifier="gtk_map_list_model_has_map" glib:get-property="has-map">
<attribute name="org.gtk.Method.get_property" value="has-map"/>
<doc xml:space="preserve">Checks if a map function is currently set on @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a map function is set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMapListModel`</doc>
<type name="MapListModel" c:type="GtkMapListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_map_func" c:identifier="gtk_map_list_model_set_map_func">
<doc xml:space="preserve">Sets the function used to map items.
The function will be called whenever an item needs to be mapped
and must return the item to use for the given input item.
Note that `GtkMapListModel` may call this function multiple times
on the same item, because it may delete items it doesn't need anymore.
GTK makes no effort to ensure that @map_func conforms to the item type
of @self. It assumes that the caller knows what they are doing and the map
function returns items of the appropriate type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMapListModel`</doc>
<type name="MapListModel" c:type="GtkMapListModel*"/>
</instance-parameter>
<parameter name="map_func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">map function</doc>
<type name="MapListModelMapFunc" c:type="GtkMapListModelMapFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data passed to @map_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_map_list_model_set_model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to be mapped.
GTK makes no effort to ensure that @model conforms to the item type
expected by the map function. It assumes that the caller knows what
they are doing and have set up an appropriate map function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMapListModel`</doc>
<type name="MapListModel" c:type="GtkMapListModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to be mapped</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<property name="has-map" transfer-ownership="none" getter="has_map">
<attribute name="org.gtk.Property.get" value="gtk_map_list_model_has_map"/>
<doc xml:space="preserve">If a map is set for this model</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" construct-only="1" transfer-ownership="none" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_map_list_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_map_list_model_set_model"/>
<doc xml:space="preserve">The model being mapped.</doc>
<type name="Gio.ListModel"/>
</property>
</class>
<record name="MapListModelClass" c:type="GtkMapListModelClass" glib:is-gtype-struct-for="MapListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<callback name="MapListModelMapFunc" c:type="GtkMapListModelMapFunc">
<doc xml:space="preserve">User function that is called to map an @item of the original model to
an item expected by the map model.
The returned items must conform to the item type of the model they are
used with.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">The item to map to</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<parameter name="item" transfer-ownership="full">
<doc xml:space="preserve">The item to map</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="MediaControls" c:symbol-prefix="media_controls" c:type="GtkMediaControls" parent="Widget" glib:type-name="GtkMediaControls" glib:get-type="gtk_media_controls_get_type" glib:type-struct="MediaControlsClass">
<doc xml:space="preserve">`GtkMediaControls` is a widget to show controls for a video.
![An example GtkMediaControls](media-controls.png)
Usually, `GtkMediaControls` is used as part of [class@Gtk.Video].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_media_controls_new">
<doc xml:space="preserve">Creates a new `GtkMediaControls` managing the @stream passed to it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkMediaControls`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="stream" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkMediaStream` to manage</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</constructor>
<method name="get_media_stream" c:identifier="gtk_media_controls_get_media_stream" glib:get-property="media-stream">
<attribute name="org.gtk.Method.get_property" value="media-stream"/>
<doc xml:space="preserve">Gets the media stream managed by @controls or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The media stream managed by @controls</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<instance-parameter name="controls" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaControls`</doc>
<type name="MediaControls" c:type="GtkMediaControls*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_media_stream" c:identifier="gtk_media_controls_set_media_stream" glib:set-property="media-stream">
<attribute name="org.gtk.Method.set_property" value="media-stream"/>
<doc xml:space="preserve">Sets the stream that is controlled by @controls.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controls" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaControls` widget</doc>
<type name="MediaControls" c:type="GtkMediaControls*"/>
</instance-parameter>
<parameter name="stream" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</method>
<property name="media-stream" writable="1" transfer-ownership="none" setter="set_media_stream" getter="get_media_stream">
<attribute name="org.gtk.Property.get" value="gtk_media_controls_get_media_stream"/>
<attribute name="org.gtk.Property.set" value="gtk_media_controls_set_media_stream"/>
<doc xml:space="preserve">The media-stream managed by this object or %NULL if none.</doc>
<type name="MediaStream"/>
</property>
</class>
<record name="MediaControlsClass" c:type="GtkMediaControlsClass" glib:is-gtype-struct-for="MediaControls">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<class name="MediaFile" c:symbol-prefix="media_file" c:type="GtkMediaFile" parent="MediaStream" abstract="1" glib:type-name="GtkMediaFile" glib:get-type="gtk_media_file_get_type" glib:type-struct="MediaFileClass">
<doc xml:space="preserve">`GtkMediaFile` implements `GtkMediaStream` for files.
This provides a simple way to play back video files with GTK.
GTK provides a GIO extension point for `GtkMediaFile` implementations
to allow for external implementations using various media frameworks.
GTK itself includes implementations using GStreamer and ffmpeg.</doc>
<implements name="Gdk.Paintable"/>
<constructor name="new" c:identifier="gtk_media_file_new">
<doc xml:space="preserve">Creates a new empty media file.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaStream*"/>
</return-value>
</constructor>
<constructor name="new_for_file" c:identifier="gtk_media_file_new_for_file">
<doc xml:space="preserve">Creates a new media file to play @file.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMediaFile` playing @file</doc>
<type name="MediaFile" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<parameter name="file" transfer-ownership="none">
<doc xml:space="preserve">The file to play</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_filename" c:identifier="gtk_media_file_new_for_filename">
<doc xml:space="preserve">Creates a new media file for the given filename.
This is a utility function that converts the given @filename
to a `GFile` and calls [ctor@Gtk.MediaFile.new_for_file].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMediaFile` playing @filename</doc>
<type name="MediaFile" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">filename to open</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_input_stream" c:identifier="gtk_media_file_new_for_input_stream">
<doc xml:space="preserve">Creates a new media file to play @stream.
If you want the resulting media to be seekable,
the stream should implement the `GSeekable` interface.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<parameter name="stream" transfer-ownership="none">
<doc xml:space="preserve">The stream to play</doc>
<type name="Gio.InputStream" c:type="GInputStream*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_resource" c:identifier="gtk_media_file_new_for_resource">
<doc xml:space="preserve">Creates a new new media file for the given resource.
This is a utility function that converts the given @resource
to a `GFile` and calls [ctor@Gtk.MediaFile.new_for_file].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMediaFile` playing @resource_path</doc>
<type name="MediaFile" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<parameter name="resource_path" transfer-ownership="none">
<doc xml:space="preserve">resource path to open</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="close">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="open">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="clear" c:identifier="gtk_media_file_clear">
<doc xml:space="preserve">Resets the media file to be empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_media_file_get_file" glib:get-property="file">
<attribute name="org.gtk.Method.get_property" value="file"/>
<doc xml:space="preserve">Returns the file that @self is currently playing from.
When @self is not playing or not playing from a file,
%NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The currently playing file</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_stream" c:identifier="gtk_media_file_get_input_stream" glib:get-property="input-stream">
<attribute name="org.gtk.Method.get_property" value="input-stream"/>
<doc xml:space="preserve">Returns the stream that @self is currently playing from.
When @self is not playing or not playing from a stream,
%NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The currently playing stream</doc>
<type name="Gio.InputStream" c:type="GInputStream*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_file" c:identifier="gtk_media_file_set_file" glib:set-property="file">
<attribute name="org.gtk.Method.set_property" value="file"/>
<doc xml:space="preserve">Sets the `GtkMediaFile` to play the given file.
If any file is still playing, stop playing it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the file to play</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_filename" c:identifier="gtk_media_file_set_filename">
<doc xml:space="preserve">Sets the `GtkMediaFile to play the given file.
This is a utility function that converts the given @filename
to a `GFile` and calls [method@Gtk.MediaFile.set_file].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">name of file to play</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_input_stream" c:identifier="gtk_media_file_set_input_stream" glib:set-property="input-stream">
<attribute name="org.gtk.Method.set_property" value="input-stream"/>
<doc xml:space="preserve">Sets the `GtkMediaFile` to play the given stream.
If anything is still playing, stop playing it.
Full control about the @stream is assumed for the duration of
playback. The stream will not be closed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
<parameter name="stream" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the stream to play from</doc>
<type name="Gio.InputStream" c:type="GInputStream*"/>
</parameter>
</parameters>
</method>
<method name="set_resource" c:identifier="gtk_media_file_set_resource">
<doc xml:space="preserve">Sets the `GtkMediaFile to play the given resource.
This is a utility function that converts the given @resource_path
to a `GFile` and calls [method@Gtk.MediaFile.set_file].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaFile`</doc>
<type name="MediaFile" c:type="GtkMediaFile*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">path to resource to play</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="file" writable="1" transfer-ownership="none" setter="set_file" getter="get_file">
<attribute name="org.gtk.Property.get" value="gtk_media_file_get_file"/>
<attribute name="org.gtk.Property.set" value="gtk_media_file_set_file"/>
<doc xml:space="preserve">The file being played back or %NULL if not playing a file.</doc>
<type name="Gio.File"/>
</property>
<property name="input-stream" writable="1" transfer-ownership="none" setter="set_input_stream" getter="get_input_stream">
<attribute name="org.gtk.Property.get" value="gtk_media_file_get_input_stream"/>
<attribute name="org.gtk.Property.set" value="gtk_media_file_set_input_stream"/>
<doc xml:space="preserve">The stream being played back or %NULL if not playing a stream.
This is %NULL when playing a file.</doc>
<type name="Gio.InputStream"/>
</property>
<field name="parent_instance">
<type name="MediaStream" c:type="GtkMediaStream"/>
</field>
</class>
<record name="MediaFileClass" c:type="GtkMediaFileClass" glib:is-gtype-struct-for="MediaFile">
<field name="parent_class">
<type name="MediaStreamClass" c:type="GtkMediaStreamClass"/>
</field>
<field name="open">
<callback name="open">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="MediaFile" c:type="GtkMediaFile*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="close">
<callback name="close">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="MediaFile" c:type="GtkMediaFile*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<class name="MediaStream" c:symbol-prefix="media_stream" c:type="GtkMediaStream" parent="GObject.Object" abstract="1" glib:type-name="GtkMediaStream" glib:get-type="gtk_media_stream_get_type" glib:type-struct="MediaStreamClass">
<doc xml:space="preserve">`GtkMediaStream` is the integration point for media playback inside GTK.
GTK provides an implementation of the `GtkMediaStream` interface that
is called [class@Gtk.MediaFile].
Apart from application-facing API for stream playback, `GtkMediaStream`
has a number of APIs that are only useful for implementations and should
not be used in applications:
[method@Gtk.MediaStream.prepared],
[method@Gtk.MediaStream.unprepared],
[method@Gtk.MediaStream.update],
[method@Gtk.MediaStream.ended],
[method@Gtk.MediaStream.seek_success],
[method@Gtk.MediaStream.seek_failed],
[method@Gtk.MediaStream.gerror],
[method@Gtk.MediaStream.error],
[method@Gtk.MediaStream.error_valist].</doc>
<implements name="Gdk.Paintable"/>
<virtual-method name="pause" invoker="pause">
<doc xml:space="preserve">Pauses playback of the stream.
If the stream is not playing, do nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="play">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="realize" invoker="realize">
<doc xml:space="preserve">Called by users to attach the media stream to a `GdkSurface` they manage.
The stream can then access the resources of @surface for its
rendering purposes. In particular, media streams might want to
create a `GdkGLContext` or sync to the `GdkFrameClock`.
Whoever calls this function is responsible for calling
[method@Gtk.MediaStream.unrealize] before either the stream
or @surface get destroyed.
Multiple calls to this function may happen from different
users of the video, even with the same @surface. Each of these
calls must be followed by its own call to
[method@Gtk.MediaStream.unrealize].
It is not required to call this function to make a media stream work.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSurface`</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="seek" invoker="seek">
<doc xml:space="preserve">Start a seek operation on @self to @timestamp.
If @timestamp is out of range, it will be clamped.
Seek operations may not finish instantly. While a
seek operation is in process, the [property@Gtk.MediaStream:seeking]
property will be set.
When calling gtk_media_stream_seek() during an
ongoing seek operation, the new seek will override
any pending seek.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">timestamp to seek to.</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unrealize" invoker="unrealize">
<doc xml:space="preserve">Undoes a previous call to gtk_media_stream_realize().
This causes the stream to release all resources it had
allocated from @surface.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream` previously realized</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">the `GdkSurface` the stream was realized with</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="update_audio">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="muted" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="volume" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</virtual-method>
<method name="ended" c:identifier="gtk_media_stream_ended" glib:get-property="ended" introspectable="0" deprecated="1" deprecated-version="4.4">
<doc xml:space="preserve">Pauses the media stream and marks it as ended.
This is a hint only, calls to [method@Gtk.MediaStream.play]
may still happen.
The media stream must be prepared when this function is called.</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.MediaStream.stream_ended] instead</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="error" c:identifier="gtk_media_stream_error" introspectable="0">
<doc xml:space="preserve">Sets @self into an error state using a printf()-style format string.
This is a utility function that calls [method@Gtk.MediaStream.gerror].
See that function for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="domain" transfer-ownership="none">
<doc xml:space="preserve">error domain</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</parameter>
<parameter name="code" transfer-ownership="none">
<doc xml:space="preserve">error code</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="format" transfer-ownership="none">
<doc xml:space="preserve">printf()-style format for error message</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">parameters for message format</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="error_valist" c:identifier="gtk_media_stream_error_valist" introspectable="0">
<doc xml:space="preserve">Sets @self into an error state using a printf()-style format string.
This is a utility function that calls [method@Gtk.MediaStream.gerror].
See that function for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="domain" transfer-ownership="none">
<doc xml:space="preserve">error domain</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</parameter>
<parameter name="code" transfer-ownership="none">
<doc xml:space="preserve">error code</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="format" transfer-ownership="none">
<doc xml:space="preserve">printf()-style format for error message</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="args" transfer-ownership="none">
<doc xml:space="preserve">`va_list` of parameters for the message format</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="gerror" c:identifier="gtk_media_stream_gerror">
<doc xml:space="preserve">Sets @self into an error state.
This will pause the stream (you can check for an error
via [method@Gtk.MediaStream.get_error] in your
GtkMediaStream.pause() implementation), abort pending
seeks and mark the stream as prepared.
if the stream is already in an error state, this call
will be ignored and the existing error will be retained.
To unset an error, the stream must be reset via a call to
[method@Gtk.MediaStream.unprepared].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="error" transfer-ownership="full">
<doc xml:space="preserve">the `GError` to set</doc>
<type name="GLib.Error" c:type="GError*"/>
</parameter>
</parameters>
</method>
<method name="get_duration" c:identifier="gtk_media_stream_get_duration" glib:get-property="duration">
<attribute name="org.gtk.Method.get_property" value="duration"/>
<doc xml:space="preserve">Gets the duration of the stream.
If the duration is not known, 0 will be returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the duration of the stream or 0 if not known.</doc>
<type name="gint64" c:type="gint64"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ended" c:identifier="gtk_media_stream_get_ended" glib:get-property="ended">
<attribute name="org.gtk.Method.get_property" value="ended"/>
<doc xml:space="preserve">Returns whether the streams playback is finished.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if playback is finished</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_error" c:identifier="gtk_media_stream_get_error" glib:get-property="error">
<attribute name="org.gtk.Method.get_property" value="error"/>
<doc xml:space="preserve">If the stream is in an error state, returns the `GError`
explaining that state.
Any type of error can be reported here depending on the
implementation of the media stream.
A media stream in an error cannot be operated on, calls
like [method@Gtk.MediaStream.play] or
[method@Gtk.MediaStream.seek] will not have any effect.
`GtkMediaStream` itself does not provide a way to unset
an error, but implementations may provide options. For example,
a [class@Gtk.MediaFile] will unset errors when a new source is
set, e.g. with [method@Gtk.MediaFile.set_file].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">%NULL if not in an
error state or the `GError` of the stream</doc>
<type name="GLib.Error" c:type="const GError*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_loop" c:identifier="gtk_media_stream_get_loop" glib:get-property="loop">
<attribute name="org.gtk.Method.get_property" value="loop"/>
<doc xml:space="preserve">Returns whether the stream is set to loop.
See [method@Gtk.MediaStream.set_loop] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should loop</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_muted" c:identifier="gtk_media_stream_get_muted" glib:get-property="muted">
<attribute name="org.gtk.Method.get_property" value="muted"/>
<doc xml:space="preserve">Returns whether the audio for the stream is muted.
See [method@Gtk.MediaStream.set_muted] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream is muted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_playing" c:identifier="gtk_media_stream_get_playing" glib:get-property="playing">
<attribute name="org.gtk.Method.get_property" value="playing"/>
<doc xml:space="preserve">Return whether the stream is currently playing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream is playing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_timestamp" c:identifier="gtk_media_stream_get_timestamp" glib:get-property="timestamp">
<attribute name="org.gtk.Method.get_property" value="timestamp"/>
<doc xml:space="preserve">Returns the current presentation timestamp in microseconds.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the timestamp in microseconds</doc>
<type name="gint64" c:type="gint64"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_volume" c:identifier="gtk_media_stream_get_volume" glib:get-property="volume">
<attribute name="org.gtk.Method.get_property" value="volume"/>
<doc xml:space="preserve">Returns the volume of the audio for the stream.
See [method@Gtk.MediaStream.set_volume] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">volume of the stream from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_audio" c:identifier="gtk_media_stream_has_audio" glib:get-property="has-audio">
<attribute name="org.gtk.Method.get_property" value="has-audio"/>
<doc xml:space="preserve">Returns whether the stream has audio.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream has audio</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_video" c:identifier="gtk_media_stream_has_video" glib:get-property="has-video">
<attribute name="org.gtk.Method.get_property" value="has-video"/>
<doc xml:space="preserve">Returns whether the stream has video.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream has video</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_prepared" c:identifier="gtk_media_stream_is_prepared">
<attribute name="org.gtk.Method.get_property" value="prepared"/>
<doc xml:space="preserve">Returns whether the stream has finished initializing.
At this point the existence of audio and video is known.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream is prepared</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_seekable" c:identifier="gtk_media_stream_is_seekable">
<attribute name="org.gtk.Method.get_property" value="seekable"/>
<doc xml:space="preserve">Checks if a stream may be seekable.
This is meant to be a hint. Streams may not allow seeking even if
this function returns %TRUE. However, if this function returns
%FALSE, streams are guaranteed to not be seekable and user interfaces
may hide controls that allow seeking.
It is allowed to call [method@Gtk.MediaStream.seek] on a non-seekable
stream, though it will not do anything.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream may support seeking</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_seeking" c:identifier="gtk_media_stream_is_seeking">
<attribute name="org.gtk.Method.get_property" value="seeking"/>
<doc xml:space="preserve">Checks if there is currently a seek operation going on.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a seek operation is ongoing.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="pause" c:identifier="gtk_media_stream_pause">
<doc xml:space="preserve">Pauses playback of the stream.
If the stream is not playing, do nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="play" c:identifier="gtk_media_stream_play">
<doc xml:space="preserve">Starts playing the stream.
If the stream is in error or already playing, do nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepared" c:identifier="gtk_media_stream_prepared" introspectable="0" deprecated="1" deprecated-version="4.4">
<doc xml:space="preserve">Same as gtk_media_stream_stream_prepared().</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.MediaStream.stream_prepared] instead.</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="has_audio" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise audio support</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="has_video" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise video support</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="seekable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise seekability</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="duration" transfer-ownership="none">
<doc xml:space="preserve">The duration of the stream or 0 if unknown</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</method>
<method name="realize" c:identifier="gtk_media_stream_realize">
<doc xml:space="preserve">Called by users to attach the media stream to a `GdkSurface` they manage.
The stream can then access the resources of @surface for its
rendering purposes. In particular, media streams might want to
create a `GdkGLContext` or sync to the `GdkFrameClock`.
Whoever calls this function is responsible for calling
[method@Gtk.MediaStream.unrealize] before either the stream
or @surface get destroyed.
Multiple calls to this function may happen from different
users of the video, even with the same @surface. Each of these
calls must be followed by its own call to
[method@Gtk.MediaStream.unrealize].
It is not required to call this function to make a media stream work.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSurface`</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</method>
<method name="seek" c:identifier="gtk_media_stream_seek">
<doc xml:space="preserve">Start a seek operation on @self to @timestamp.
If @timestamp is out of range, it will be clamped.
Seek operations may not finish instantly. While a
seek operation is in process, the [property@Gtk.MediaStream:seeking]
property will be set.
When calling gtk_media_stream_seek() during an
ongoing seek operation, the new seek will override
any pending seek.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">timestamp to seek to.</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</method>
<method name="seek_failed" c:identifier="gtk_media_stream_seek_failed">
<doc xml:space="preserve">Ends a seek operation started via GtkMediaStream.seek() as a failure.
This will not cause an error on the stream and will assume that
playback continues as if no seek had happened.
See [method@Gtk.MediaStream.seek_success] for the other way of
ending a seek.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="seek_success" c:identifier="gtk_media_stream_seek_success">
<doc xml:space="preserve">Ends a seek operation started via GtkMediaStream.seek() successfully.
This function will unset the GtkMediaStream:ended property
if it was set.
See [method@Gtk.MediaStream.seek_failed] for the other way of
ending a seek.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_loop" c:identifier="gtk_media_stream_set_loop" glib:set-property="loop">
<attribute name="org.gtk.Method.set_property" value="loop"/>
<doc xml:space="preserve">Sets whether the stream should loop.
In this case, it will attempt to restart playback
from the beginning instead of stopping at the end.
Not all streams may support looping, in particular
non-seekable streams. Those streams will ignore the
loop setting and just end.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="loop" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should loop</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_muted" c:identifier="gtk_media_stream_set_muted" glib:set-property="muted">
<attribute name="org.gtk.Method.set_property" value="muted"/>
<doc xml:space="preserve">Sets whether the audio stream should be muted.
Muting a stream will cause no audio to be played, but it
does not modify the volume. This means that muting and
then unmuting the stream will restore the volume settings.
If the stream has no audio, calling this function will
still work but it will not have an audible effect.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="muted" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should be muted</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_playing" c:identifier="gtk_media_stream_set_playing" glib:set-property="playing">
<attribute name="org.gtk.Method.set_property" value="playing"/>
<doc xml:space="preserve">Starts or pauses playback of the stream.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="playing" transfer-ownership="none">
<doc xml:space="preserve">whether to start or pause playback</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_volume" c:identifier="gtk_media_stream_set_volume" glib:set-property="volume">
<attribute name="org.gtk.Method.set_property" value="volume"/>
<doc xml:space="preserve">Sets the volume of the audio stream.
This function call will work even if the stream is muted.
The given @volume should range from 0.0 for silence to 1.0
for as loud as possible. Values outside of this range will
be clamped to the nearest value.
If the stream has no audio or is muted, calling this function
will still work but it will not have an immediate audible effect.
When the stream is unmuted, the new volume setting will take effect.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="volume" transfer-ownership="none">
<doc xml:space="preserve">New volume of the stream from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="stream_ended" c:identifier="gtk_media_stream_stream_ended" version="4.4">
<doc xml:space="preserve">Pauses the media stream and marks it as ended.
This is a hint only, calls to [method@Gtk.MediaStream.play]
may still happen.
The media stream must be prepared when this function is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="stream_prepared" c:identifier="gtk_media_stream_stream_prepared" version="4.4">
<doc xml:space="preserve">Called by `GtkMediaStream` implementations to advertise the stream
being ready to play and providing details about the stream.
Note that the arguments are hints. If the stream implementation
cannot determine the correct values, it is better to err on the
side of caution and return %TRUE. User interfaces will use those
values to determine what controls to show.
This function may not be called again until the stream has been
reset via [method@Gtk.MediaStream.stream_unprepared].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="has_audio" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise audio support</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="has_video" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise video support</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="seekable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the stream should advertise seekability</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="duration" transfer-ownership="none">
<doc xml:space="preserve">The duration of the stream or 0 if unknown</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</method>
<method name="stream_unprepared" c:identifier="gtk_media_stream_stream_unprepared" version="4.4">
<doc xml:space="preserve">Resets a given media stream implementation.
[method@Gtk.MediaStream.stream_prepared] can then be called again.
This function will also reset any error state the stream was in.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="unprepared" c:identifier="gtk_media_stream_unprepared" introspectable="0" deprecated="1" deprecated-version="4.4">
<doc xml:space="preserve">Same as gtk_media_stream_stream_unprepared().</doc>
<doc-deprecated xml:space="preserve">Use [method@Gtk.MediaStream.stream_unprepared] instead.</doc-deprecated>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
</parameters>
</method>
<method name="unrealize" c:identifier="gtk_media_stream_unrealize">
<doc xml:space="preserve">Undoes a previous call to gtk_media_stream_realize().
This causes the stream to release all resources it had
allocated from @surface.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream` previously realized</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">the `GdkSurface` the stream was realized with</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</method>
<method name="update" c:identifier="gtk_media_stream_update">
<doc xml:space="preserve">Media stream implementations should regularly call this
function to update the timestamp reported by the stream.
It is up to implementations to call this at the frequency
they deem appropriate.
The media stream must be prepared when this function is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</instance-parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">the new timestamp</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</method>
<property name="duration" transfer-ownership="none" getter="get_duration">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_duration"/>
<doc xml:space="preserve">The stream's duration in microseconds or 0 if unknown.</doc>
<type name="gint64" c:type="gint64"/>
</property>
<property name="ended" transfer-ownership="none" getter="ended">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_ended"/>
<doc xml:space="preserve">Set when playback has finished.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="error" transfer-ownership="none" getter="get_error">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_error"/>
<doc xml:space="preserve">%NULL for a properly working stream or the `GError`
that the stream is in.</doc>
<type name="GLib.Error"/>
</property>
<property name="has-audio" transfer-ownership="none" getter="has_audio">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_has_audio"/>
<doc xml:space="preserve">Whether the stream contains audio.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-video" transfer-ownership="none" getter="has_video">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_has_video"/>
<doc xml:space="preserve">Whether the stream contains video.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="loop" writable="1" transfer-ownership="none" setter="set_loop" getter="get_loop">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_loop"/>
<attribute name="org.gtk.Property.set" value="gtk_media_stream_set_loop"/>
<doc xml:space="preserve">Try to restart the media from the beginning once it ended.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="muted" writable="1" transfer-ownership="none" setter="set_muted" getter="get_muted">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_muted"/>
<attribute name="org.gtk.Property.set" value="gtk_media_stream_set_muted"/>
<doc xml:space="preserve">Whether the audio stream should be muted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="playing" writable="1" transfer-ownership="none" setter="set_playing" getter="get_playing">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_playing"/>
<attribute name="org.gtk.Property.set" value="gtk_media_stream_set_playing"/>
<doc xml:space="preserve">Whether the stream is currently playing.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="prepared" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_is_prepared"/>
<doc xml:space="preserve">Whether the stream has finished initializing and existence of
audio and video is known.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="seekable" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_is_seekable"/>
<doc xml:space="preserve">Set unless the stream is known to not support seeking.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="seeking" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_is_seeking"/>
<doc xml:space="preserve">Set while a seek is in progress.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="timestamp" transfer-ownership="none" getter="get_timestamp">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_timestamp"/>
<doc xml:space="preserve">The current presentation timestamp in microseconds.</doc>
<type name="gint64" c:type="gint64"/>
</property>
<property name="volume" writable="1" transfer-ownership="none" setter="set_volume" getter="get_volume">
<attribute name="org.gtk.Property.get" value="gtk_media_stream_get_volume"/>
<attribute name="org.gtk.Property.set" value="gtk_media_stream_set_volume"/>
<doc xml:space="preserve">Volume of the audio stream.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="MediaStreamClass" c:type="GtkMediaStreamClass" glib:is-gtype-struct-for="MediaStream">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="play">
<callback name="play">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="pause">
<callback name="pause">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="seek">
<callback name="seek">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">timestamp to seek to.</doc>
<type name="gint64" c:type="gint64"/>
</parameter>
</parameters>
</callback>
</field>
<field name="update_audio">
<callback name="update_audio">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
<parameter name="muted" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="volume" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</callback>
</field>
<field name="realize">
<callback name="realize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSurface`</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unrealize">
<callback name="unrealize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMediaStream` previously realized</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">the `GdkSurface` the stream was realized with</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved6" introspectable="0">
<callback name="_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved7" introspectable="0">
<callback name="_gtk_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved8" introspectable="0">
<callback name="_gtk_reserved8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<class name="MenuButton" c:symbol-prefix="menu_button" c:type="GtkMenuButton" parent="Widget" glib:type-name="GtkMenuButton" glib:get-type="gtk_menu_button_get_type">
<doc xml:space="preserve">The `GtkMenuButton` widget is used to display a popup when clicked.
![An example GtkMenuButton](menu-button.png)
This popup can be provided either as a `GtkPopover` or as an abstract
`GMenuModel`.
The `GtkMenuButton` widget can show either an icon (set with the
[property@Gtk.MenuButton:icon-name] property) or a label (set with the
[property@Gtk.MenuButton:label] property). If neither is explicitly set,
a [class@Gtk.Image] is automatically created, using an arrow image oriented
according to [property@Gtk.MenuButton:direction] or the generic
&#x201C;open-menu-symbolic&#x201D; icon if the direction is not set.
The positioning of the popup is determined by the
[property@Gtk.MenuButton:direction] property of the menu button.
For menus, the [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign]
properties of the menu are also taken into account. For example, when the
direction is %GTK_ARROW_DOWN and the horizontal alignment is %GTK_ALIGN_START,
the menu will be positioned below the button, with the starting edge
(depending on the text direction) of the menu aligned with the starting
edge of the button. If there is not enough space below the button, the
menu is popped up above the button instead. If the alignment would move
part of the menu offscreen, it is &#x201C;pushed in&#x201D;.
| | start | center | end |
| - | --- | --- | --- |
| **down** | ![](down-start.png) | ![](down-center.png) | ![](down-end.png) |
| **up** | ![](up-start.png) | ![](up-center.png) | ![](up-end.png) |
| **left** | ![](left-start.png) | ![](left-center.png) | ![](left-end.png) |
| **right** | ![](right-start.png) | ![](right-center.png) | ![](right-end.png) |
# CSS nodes
```
menubutton
&#x2570;&#x2500;&#x2500; button.toggle
&#x2570;&#x2500;&#x2500; &lt;content&gt;
&#x2570;&#x2500;&#x2500; [arrow]
```
`GtkMenuButton` has a single CSS node with name `menubutton`
which contains a `button` node with a `.toggle` style class.
If the button contains an icon, it will have the `.image-button` style class,
if it contains text, it will have `.text-button` style class. If an arrow is
visible in addition to an icon, text or a custom child, it will also have
`.arrow-button` style class.
Inside the toggle button content, there is an `arrow` node for
the indicator, which will carry one of the `.none`, `.up`, `.down`,
`.left` or `.right` style classes to indicate the direction that
the menu will appear in. The CSS is expected to provide a suitable
image for each of these cases using the `-gtk-icon-source` property.
Optionally, the `menubutton` node can carry the `.circular` style class
to request a round appearance.
# Accessibility
`GtkMenuButton` uses the %GTK_ACCESSIBLE_ROLE_BUTTON role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_menu_button_new">
<doc xml:space="preserve">Creates a new `GtkMenuButton` widget with downwards-pointing
arrow as the only child.
You can replace the child widget with another `GtkWidget`
should you wish to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The newly created `GtkMenuButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_always_show_arrow" c:identifier="gtk_menu_button_get_always_show_arrow" glib:get-property="always-show-arrow" version="4.4">
<attribute name="org.gtk.Method.get_property" value="always-show-arrow"/>
<doc xml:space="preserve">Gets whether to show a dropdown arrow even when using an icon.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to show a dropdown arrow even when using an icon</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_menu_button_get_child" glib:get-property="child" version="4.6">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @menu_button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @menu_button</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_direction" c:identifier="gtk_menu_button_get_direction" glib:get-property="direction">
<attribute name="org.gtk.Method.get_property" value="direction"/>
<doc xml:space="preserve">Returns the direction the popup will be pointing at when popped up.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkArrowType` value</doc>
<type name="ArrowType" c:type="GtkArrowType"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_frame" c:identifier="gtk_menu_button_get_has_frame" glib:get-property="has-frame">
<attribute name="org.gtk.Method.get_property" value="has-frame"/>
<doc xml:space="preserve">Returns whether the button has a frame.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the button has a frame</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_menu_button_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Gets the name of the icon shown in the button.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the name of the icon shown in the button</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_menu_button_get_label" glib:get-property="label">
<attribute name="org.gtk.Method.get_property" value="label"/>
<doc xml:space="preserve">Gets the label shown in the button</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the label shown in the button</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_menu_model" c:identifier="gtk_menu_button_get_menu_model" glib:get-property="menu-model">
<attribute name="org.gtk.Method.get_property" value="menu-model"/>
<doc xml:space="preserve">Returns the `GMenuModel` used to generate the popup.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popover" c:identifier="gtk_menu_button_get_popover" glib:get-property="popover">
<attribute name="org.gtk.Method.get_property" value="popover"/>
<doc xml:space="preserve">Returns the `GtkPopover` that pops out of the button.
If the button is not using a `GtkPopover`, this function
returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkPopover` or %NULL</doc>
<type name="Popover" c:type="GtkPopover*"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_primary" c:identifier="gtk_menu_button_get_primary" glib:get-property="primary" version="4.4">
<attribute name="org.gtk.Method.get_property" value="primary"/>
<doc xml:space="preserve">Returns whether the menu button acts as a primary menu.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the button is a primary menu</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_menu_button_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">Returns whether an embedded underline in the text indicates a
mnemonic.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE whether an embedded underline in the text indicates
the mnemonic accelerator keys.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="popdown" c:identifier="gtk_menu_button_popdown">
<doc xml:space="preserve">Dismiss the menu.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="popup" c:identifier="gtk_menu_button_popup">
<doc xml:space="preserve">Pop up the menu.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_always_show_arrow" c:identifier="gtk_menu_button_set_always_show_arrow" glib:set-property="always-show-arrow" version="4.4">
<attribute name="org.gtk.Method.set_property" value="always-show-arrow"/>
<doc xml:space="preserve">Sets whether to show a dropdown arrow even when using an icon or a custom
child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="always_show_arrow" transfer-ownership="none">
<doc xml:space="preserve">hether to show a dropdown arrow even when using an icon</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_menu_button_set_child" glib:set-property="child" version="4.6">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @menu_button.
Setting a child resets [property@Gtk.MenuButton:label] and
[property@Gtk.MenuButton:icon-name].
If [property@Gtk.MenuButton:always-show-arrow] is set to `TRUE` and
[property@Gtk.MenuButton:direction] is not `GTK_ARROW_NONE`, a dropdown arrow
will be shown next to the child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_create_popup_func" c:identifier="gtk_menu_button_set_create_popup_func">
<doc xml:space="preserve">Sets @func to be called when a popup is about to be shown.
@func should use one of
- [method@Gtk.MenuButton.set_popover]
- [method@Gtk.MenuButton.set_menu_model]
to set a popup for @menu_button.
If @func is non-%NULL, @menu_button will always be sensitive.
Using this function will not reset the menu widget attached to
@menu_button. Instead, this can be done manually in @func.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to call when a popup is about to
be shown, but none has been provided via other means, or %NULL
to reset to default behavior.</doc>
<type name="MenuButtonCreatePopupFunc" c:type="GtkMenuButtonCreatePopupFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @func.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_direction" c:identifier="gtk_menu_button_set_direction" glib:set-property="direction">
<attribute name="org.gtk.Method.set_property" value="direction"/>
<doc xml:space="preserve">Sets the direction in which the popup will be popped up.
If the button is automatically populated with an arrow icon,
its direction will be changed to match.
If the does not fit in the available space in the given direction,
GTK will its best to keep it inside the screen and fully visible.
If you pass %GTK_ARROW_NONE for a @direction, the popup will behave
as if you passed %GTK_ARROW_DOWN (although you won&#x2019;t see any arrows).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">a `GtkArrowType`</doc>
<type name="ArrowType" c:type="GtkArrowType"/>
</parameter>
</parameters>
</method>
<method name="set_has_frame" c:identifier="gtk_menu_button_set_has_frame" glib:set-property="has-frame">
<attribute name="org.gtk.Method.set_property" value="has-frame"/>
<doc xml:space="preserve">Sets the style of the button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="has_frame" transfer-ownership="none">
<doc xml:space="preserve">whether the button should have a visible frame</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_name" c:identifier="gtk_menu_button_set_icon_name" glib:set-property="icon-name">
<attribute name="org.gtk.Method.set_property" value="icon-name"/>
<doc xml:space="preserve">Sets the name of an icon to show inside the menu button.
Setting icon name resets [property@Gtk.MenuButton:label] and
[property@Gtk.MenuButton:child].
If [property@Gtk.MenuButton:always-show-arrow] is set to `TRUE` and
[property@Gtk.MenuButton:direction] is not `GTK_ARROW_NONE`, a dropdown arrow
will be shown next to the icon.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none">
<doc xml:space="preserve">the icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_label" c:identifier="gtk_menu_button_set_label" glib:set-property="label">
<attribute name="org.gtk.Method.set_property" value="label"/>
<doc xml:space="preserve">Sets the label to show inside the menu button.
Setting a label resets [property@Gtk.MenuButton:icon-name] and
[property@Gtk.MenuButton:child].
If [property@Gtk.MenuButton:direction] is not `GTK_ARROW_NONE`, a dropdown
arrow will be shown next to the label.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">the label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_menu_model" c:identifier="gtk_menu_button_set_menu_model" glib:set-property="menu-model">
<attribute name="org.gtk.Method.set_property" value="menu-model"/>
<doc xml:space="preserve">Sets the `GMenuModel` from which the popup will be constructed.
If @menu_model is %NULL, the button is disabled.
A [class@Gtk.Popover] will be created from the menu model with
[ctor@Gtk.PopoverMenu.new_from_model]. Actions will be connected
as documented for this function.
If [property@Gtk.MenuButton:popover] is already set, it will be
dissociated from the @menu_button, and the property is set to %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="menu_model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`, or %NULL to unset and disable the
button</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_popover" c:identifier="gtk_menu_button_set_popover" glib:set-property="popover">
<attribute name="org.gtk.Method.set_property" value="popover"/>
<doc xml:space="preserve">Sets the `GtkPopover` that will be popped up when the @menu_button is clicked.
If @popover is %NULL, the button is disabled.
If [property@Gtk.MenuButton:menu-model] is set, the menu model is dissociated
from the @menu_button, and the property is set to %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="popover" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkPopover`, or %NULL to unset and disable the button</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_primary" c:identifier="gtk_menu_button_set_primary" glib:set-property="primary" version="4.4">
<attribute name="org.gtk.Method.set_property" value="primary"/>
<doc xml:space="preserve">Sets whether menu button acts as a primary menu.
Primary menus can be opened with the &lt;kbd&gt;F10&lt;/kbd&gt; key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="primary" transfer-ownership="none">
<doc xml:space="preserve">whether the menubutton should act as a primary menu</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_menu_button_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">If true, an underline in the text indicates a mnemonic.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</instance-parameter>
<parameter name="use_underline" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if underlines in the text indicate mnemonics</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="always-show-arrow" version="4.4" writable="1" transfer-ownership="none" setter="set_always_show_arrow" getter="get_always_show_arrow">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_always_show_arrow"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_always_show_arrow"/>
<doc xml:space="preserve">Whether to show a dropdown arrow even when using an icon or a custom child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="child" version="4.6" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="direction" writable="1" transfer-ownership="none" setter="set_direction" getter="get_direction">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_direction"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_direction"/>
<doc xml:space="preserve">The `GtkArrowType` representing the direction in which the
menu or popover will be popped out.</doc>
<type name="ArrowType"/>
</property>
<property name="has-frame" writable="1" transfer-ownership="none" setter="set_has_frame" getter="get_has_frame">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_has_frame"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_has_frame"/>
<doc xml:space="preserve">Whether the button has a frame.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none" setter="set_icon_name" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_icon_name"/>
<doc xml:space="preserve">The name of the icon used to automatically populate the button.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="label" writable="1" transfer-ownership="none" setter="set_label" getter="get_label">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_label"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_label"/>
<doc xml:space="preserve">The label for the button.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="menu-model" writable="1" transfer-ownership="none" setter="set_menu_model" getter="get_menu_model">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_menu_model"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_menu_model"/>
<doc xml:space="preserve">The `GMenuModel` from which the popup will be created.
See [method@Gtk.MenuButton.set_menu_model] for the interaction
with the [property@Gtk.MenuButton:popover] property.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="popover" writable="1" transfer-ownership="none" setter="set_popover" getter="get_popover">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_popover"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_popover"/>
<doc xml:space="preserve">The `GtkPopover` that will be popped up when the button is clicked.</doc>
<type name="Popover"/>
</property>
<property name="primary" version="4.4" writable="1" transfer-ownership="none" setter="set_primary" getter="get_primary">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_primary"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_primary"/>
<doc xml:space="preserve">Whether the menu button acts as a primary menu.
Primary menus can be opened using the &lt;kbd&gt;F10&lt;/kbd&gt; key</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="use-underline" writable="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_menu_button_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_menu_button_set_use_underline"/>
<doc xml:space="preserve">If set an underscore in the text indicates a mnemonic.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="first" action="1" version="4.4">
<doc xml:space="preserve">Emitted to when the menu button is activated.
The `::activate` signal on `GtkMenuButton` is an action signal and
emitting it causes the button to pop up its menu.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="MenuButtonCreatePopupFunc" c:type="GtkMenuButtonCreatePopupFunc">
<doc xml:space="preserve">User-provided callback function to create a popup for a
`GtkMenuButton` on demand.
This function is called when the popup of @menu_button is shown,
but none has been provided via [method@Gtk.MenuButton.set_popover]
or [method@Gtk.MenuButton.set_menu_model].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="menu_button" transfer-ownership="none">
<doc xml:space="preserve">the `GtkMenuButton`</doc>
<type name="MenuButton" c:type="GtkMenuButton*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">User data passed to gtk_menu_button_set_create_popup_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="MessageDialog" c:symbol-prefix="message_dialog" c:type="GtkMessageDialog" parent="Dialog" glib:type-name="GtkMessageDialog" glib:get-type="gtk_message_dialog_get_type" glib:type-struct="MessageDialogClass">
<doc xml:space="preserve">`GtkMessageDialog` presents a dialog with some message text.
![An example GtkMessageDialog](messagedialog.png)
It&#x2019;s simply a convenience widget; you could construct the equivalent of
`GtkMessageDialog` from `GtkDialog` without too much effort, but
`GtkMessageDialog` saves typing.
The easiest way to do a modal message dialog is to use the %GTK_DIALOG_MODAL
flag, which will call [method@Gtk.Window.set_modal] internally. The dialog will
prevent interaction with the parent window until it's hidden or destroyed.
You can use the [signal@Gtk.Dialog::response] signal to know when the user
dismissed the dialog.
An example for using a modal dialog:
```c
GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL;
dialog = gtk_message_dialog_new (parent_window,
flags,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error reading &#x201C;%s&#x201D;: %s",
filename,
g_strerror (errno));
// Destroy the dialog when the user responds to it
// (e.g. clicks a button)
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_window_destroy),
NULL);
```
You might do a non-modal `GtkMessageDialog` simply by omitting the
%GTK_DIALOG_MODAL flag:
```c
GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
dialog = gtk_message_dialog_new (parent_window,
flags,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error reading &#x201C;%s&#x201D;: %s",
filename,
g_strerror (errno));
// Destroy the dialog when the user responds to it
// (e.g. clicks a button)
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_window_destroy),
NULL);
```
# GtkMessageDialog as GtkBuildable
The `GtkMessageDialog` implementation of the `GtkBuildable` interface exposes
the message area as an internal child with the name &#x201C;message_area&#x201D;.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_message_dialog_new" introspectable="0">
<doc xml:space="preserve">Creates a new message dialog.
This is a simple dialog with some text the user may want to see.
When the user clicks a button a &#x201C;response&#x201D; signal is emitted with
response IDs from [enum@Gtk.ResponseType]. See [class@Gtk.Dialog]
for more details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkMessageDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags</doc>
<type name="DialogFlags" c:type="GtkDialogFlags"/>
</parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">type of message</doc>
<type name="MessageType" c:type="GtkMessageType"/>
</parameter>
<parameter name="buttons" transfer-ownership="none">
<doc xml:space="preserve">set of buttons to use</doc>
<type name="ButtonsType" c:type="GtkButtonsType"/>
</parameter>
<parameter name="message_format" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">printf()-style format string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments for @message_format</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_markup" c:identifier="gtk_message_dialog_new_with_markup" introspectable="0">
<doc xml:space="preserve">Creates a new message dialog.
This is a simple dialog with some text that is marked up with
Pango markup. When the user clicks a button a &#x201C;response&#x201D; signal
is emitted with response IDs from [enum@Gtk.ResponseType]. See
[class@Gtk.Dialog] for more details.
Special XML characters in the printf() arguments passed to this
function will automatically be escaped as necessary.
(See g_markup_printf_escaped() for how this is implemented.)
Usually this is what you want, but if you have an existing
Pango markup string that you want to use literally as the
label, then you need to use [method@Gtk.MessageDialog.set_markup]
instead, since you can&#x2019;t pass the markup string either
as the format (it might contain &#x201C;%&#x201D; characters) or as a string
argument.
```c
GtkWidget *dialog;
GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
dialog = gtk_message_dialog_new (parent_window,
flags,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
NULL);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
markup);
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkMessageDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags</doc>
<type name="DialogFlags" c:type="GtkDialogFlags"/>
</parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">type of message</doc>
<type name="MessageType" c:type="GtkMessageType"/>
</parameter>
<parameter name="buttons" transfer-ownership="none">
<doc xml:space="preserve">set of buttons to use</doc>
<type name="ButtonsType" c:type="GtkButtonsType"/>
</parameter>
<parameter name="message_format" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">printf()-style format string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments for @message_format</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<method name="format_secondary_markup" c:identifier="gtk_message_dialog_format_secondary_markup" introspectable="0">
<doc xml:space="preserve">Sets the secondary text of the message dialog.
The @message_format is assumed to contain Pango markup.
Due to an oversight, this function does not escape special
XML characters like [ctor@Gtk.MessageDialog.new_with_markup]
does. Thus, if the arguments may contain special XML characters,
you should use g_markup_printf_escaped() to escape it.
```c
char *msg;
msg = g_markup_printf_escaped (message_format, ...);
gtk_message_dialog_format_secondary_markup (message_dialog,
"%s", msg);
g_free (msg);
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="message_dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMessageDialog`</doc>
<type name="MessageDialog" c:type="GtkMessageDialog*"/>
</instance-parameter>
<parameter name="message_format" transfer-ownership="none">
<doc xml:space="preserve">printf()-style string with Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments for @message_format</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="format_secondary_text" c:identifier="gtk_message_dialog_format_secondary_text" introspectable="0">
<doc xml:space="preserve">Sets the secondary text of the message dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="message_dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMessageDialog`</doc>
<type name="MessageDialog" c:type="GtkMessageDialog*"/>
</instance-parameter>
<parameter name="message_format" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">printf()-style format string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments for @message_format</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="get_message_area" c:identifier="gtk_message_dialog_get_message_area" glib:get-property="message-area">
<doc xml:space="preserve">Returns the message area of the dialog.
This is the box where the dialog&#x2019;s primary and secondary labels
are packed. You can add your own extra content to that box and it
will appear below those labels. See [method@Gtk.Dialog.get_content_area]
for the corresponding function in the parent [class@Gtk.Dialog].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GtkBox` corresponding to the
&#x201C;message area&#x201D; in the @message_dialog</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="message_dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMessageDialog`</doc>
<type name="MessageDialog" c:type="GtkMessageDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_markup" c:identifier="gtk_message_dialog_set_markup">
<doc xml:space="preserve">Sets the text of the message dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="message_dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMessageDialog`</doc>
<type name="MessageDialog" c:type="GtkMessageDialog*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">string with Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="buttons" readable="0" writable="1" construct-only="1" transfer-ownership="none">
<type name="ButtonsType"/>
</property>
<property name="message-area" transfer-ownership="none" getter="get_message_area">
<doc xml:space="preserve">The `GtkBox` that corresponds to the message area of this dialog.
See [method@Gtk.MessageDialog.get_message_area] for a detailed
description of this area.</doc>
<type name="Widget"/>
</property>
<property name="message-type" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">The type of the message.</doc>
<type name="MessageType"/>
</property>
<property name="secondary-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The secondary text of the message dialog.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="secondary-use-markup" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the secondary text of the dialog includes Pango markup.
See [func@Pango.parse_markup].</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The primary text of the message dialog.
If the dialog has a secondary text, this will appear as the title.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="use-markup" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the primary text of the dialog includes Pango markup.
See [func@Pango.parse_markup].</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Dialog" c:type="GtkDialog"/>
</field>
</class>
<record name="MessageDialogClass" c:type="GtkMessageDialogClass" disguised="1" glib:is-gtype-struct-for="MessageDialog"/>
<enumeration name="MessageType" glib:type-name="GtkMessageType" glib:get-type="gtk_message_type_get_type" c:type="GtkMessageType">
<doc xml:space="preserve">The type of message being displayed in a [class@MessageDialog].</doc>
<member name="info" value="0" c:identifier="GTK_MESSAGE_INFO" glib:nick="info" glib:name="GTK_MESSAGE_INFO">
<doc xml:space="preserve">Informational message</doc>
</member>
<member name="warning" value="1" c:identifier="GTK_MESSAGE_WARNING" glib:nick="warning" glib:name="GTK_MESSAGE_WARNING">
<doc xml:space="preserve">Non-fatal warning message</doc>
</member>
<member name="question" value="2" c:identifier="GTK_MESSAGE_QUESTION" glib:nick="question" glib:name="GTK_MESSAGE_QUESTION">
<doc xml:space="preserve">Question requiring a choice</doc>
</member>
<member name="error" value="3" c:identifier="GTK_MESSAGE_ERROR" glib:nick="error" glib:name="GTK_MESSAGE_ERROR">
<doc xml:space="preserve">Fatal error message</doc>
</member>
<member name="other" value="4" c:identifier="GTK_MESSAGE_OTHER" glib:nick="other" glib:name="GTK_MESSAGE_OTHER">
<doc xml:space="preserve">None of the above</doc>
</member>
</enumeration>
<class name="MnemonicAction" c:symbol-prefix="mnemonic_action" c:type="GtkMnemonicAction" parent="ShortcutAction" glib:type-name="GtkMnemonicAction" glib:get-type="gtk_mnemonic_action_get_type" glib:type-struct="MnemonicActionClass">
<doc xml:space="preserve">A `GtkShortcutAction` that calls gtk_widget_mnemonic_activate().</doc>
<function name="get" c:identifier="gtk_mnemonic_action_get">
<doc xml:space="preserve">Gets the mnemonic action.
This is an action that calls gtk_widget_mnemonic_activate()
on the given widget upon activation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The mnemonic action</doc>
<type name="MnemonicAction" c:type="GtkShortcutAction*"/>
</return-value>
</function>
</class>
<record name="MnemonicActionClass" c:type="GtkMnemonicActionClass" disguised="1" glib:is-gtype-struct-for="MnemonicAction"/>
<class name="MnemonicTrigger" c:symbol-prefix="mnemonic_trigger" c:type="GtkMnemonicTrigger" parent="ShortcutTrigger" glib:type-name="GtkMnemonicTrigger" glib:get-type="gtk_mnemonic_trigger_get_type" glib:type-struct="MnemonicTriggerClass">
<doc xml:space="preserve">A `GtkShortcutTrigger` that triggers when a specific mnemonic is pressed.
Mnemonics require a *mnemonic modifier* (typically &lt;kbd&gt;Alt&lt;/kbd&gt;) to be
pressed together with the mnemonic key.</doc>
<constructor name="new" c:identifier="gtk_mnemonic_trigger_new">
<doc xml:space="preserve">Creates a `GtkShortcutTrigger` that will trigger whenever the key with
the given @keyval is pressed and mnemonics have been activated.
Mnemonics are activated by calling code when a key event with the right
modifiers is detected.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkShortcutTrigger`</doc>
<type name="MnemonicTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">The keyval to trigger for</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</constructor>
<method name="get_keyval" c:identifier="gtk_mnemonic_trigger_get_keyval" glib:get-property="keyval">
<attribute name="org.gtk.Method.get_property" value="keyval"/>
<doc xml:space="preserve">Gets the keyval that must be pressed to succeed triggering @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the keyval</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a mnemonic `GtkShortcutTrigger`</doc>
<type name="MnemonicTrigger" c:type="GtkMnemonicTrigger*"/>
</instance-parameter>
</parameters>
</method>
<property name="keyval" writable="1" construct-only="1" transfer-ownership="none" getter="get_keyval">
<attribute name="org.gtk.Property.get" value="gtk_mnemonic_trigger_get_keyval"/>
<doc xml:space="preserve">The key value for the trigger.</doc>
<type name="guint" c:type="guint"/>
</property>
</class>
<record name="MnemonicTriggerClass" c:type="GtkMnemonicTriggerClass" disguised="1" glib:is-gtype-struct-for="MnemonicTrigger"/>
<class name="MountOperation" c:symbol-prefix="mount_operation" c:type="GtkMountOperation" parent="Gio.MountOperation" glib:type-name="GtkMountOperation" glib:get-type="gtk_mount_operation_get_type" glib:type-struct="MountOperationClass">
<doc xml:space="preserve">`GtkMountOperation` is an implementation of `GMountOperation`.
The functions and objects described here make working with GTK and
GIO more convenient.
`GtkMountOperation` is needed when mounting volumes:
It is an implementation of `GMountOperation` that can be used with
GIO functions for mounting volumes such as
g_file_mount_enclosing_volume(), g_file_mount_mountable(),
g_volume_mount(), g_mount_unmount_with_operation() and others.
When necessary, `GtkMountOperation` shows dialogs to let the user
enter passwords, ask questions or show processes blocking unmount.</doc>
<constructor name="new" c:identifier="gtk_mount_operation_new">
<doc xml:space="preserve">Creates a new `GtkMountOperation`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMountOperation`</doc>
<type name="Gio.MountOperation" c:type="GMountOperation*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent of the window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</constructor>
<method name="get_display" c:identifier="gtk_mount_operation_get_display" glib:get-property="display">
<attribute name="org.gtk.Method.get_property" value="display"/>
<doc xml:space="preserve">Gets the display on which windows of the `GtkMountOperation`
will be shown.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the display on which windows of @op are shown</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMountOperation`</doc>
<type name="MountOperation" c:type="GtkMountOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_parent" c:identifier="gtk_mount_operation_get_parent" glib:get-property="parent">
<attribute name="org.gtk.Method.get_property" value="parent"/>
<doc xml:space="preserve">Gets the transient parent used by the `GtkMountOperation`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the transient parent for windows shown by @op</doc>
<type name="Window" c:type="GtkWindow*"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMountOperation`</doc>
<type name="MountOperation" c:type="GtkMountOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_showing" c:identifier="gtk_mount_operation_is_showing" glib:get-property="is-showing">
<attribute name="org.gtk.Method.get_property" value="is-showing"/>
<doc xml:space="preserve">Returns whether the `GtkMountOperation` is currently displaying
a window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @op is currently displaying a window</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMountOperation`</doc>
<type name="MountOperation" c:type="GtkMountOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_display" c:identifier="gtk_mount_operation_set_display" glib:set-property="display">
<attribute name="org.gtk.Method.set_property" value="display"/>
<doc xml:space="preserve">Sets the display to show windows of the `GtkMountOperation` on.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMountOperation`</doc>
<type name="MountOperation" c:type="GtkMountOperation*"/>
</instance-parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</method>
<method name="set_parent" c:identifier="gtk_mount_operation_set_parent" glib:set-property="parent">
<attribute name="org.gtk.Method.set_property" value="parent"/>
<doc xml:space="preserve">Sets the transient parent for windows shown by the
`GtkMountOperation`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMountOperation`</doc>
<type name="MountOperation" c:type="GtkMountOperation*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent of the window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<property name="display" writable="1" transfer-ownership="none" setter="set_display" getter="get_display">
<attribute name="org.gtk.Property.get" value="gtk_mount_operation_get_display"/>
<attribute name="org.gtk.Property.set" value="gtk_mount_operation_set_display"/>
<doc xml:space="preserve">The display where dialogs will be shown.</doc>
<type name="Gdk.Display"/>
</property>
<property name="is-showing" transfer-ownership="none" getter="is_showing">
<attribute name="org.gtk.Property.get" value="gtk_mount_operation_is_showing"/>
<doc xml:space="preserve">Whether a dialog is currently shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="parent" writable="1" transfer-ownership="none" setter="set_parent" getter="get_parent">
<attribute name="org.gtk.Property.get" value="gtk_mount_operation_get_parent"/>
<attribute name="org.gtk.Property.set" value="gtk_mount_operation_set_parent"/>
<doc xml:space="preserve">The parent window.</doc>
<type name="Window"/>
</property>
<field name="parent_instance">
<type name="Gio.MountOperation" c:type="GMountOperation"/>
</field>
<field name="priv">
<type name="MountOperationPrivate" c:type="GtkMountOperationPrivate*"/>
</field>
</class>
<record name="MountOperationClass" c:type="GtkMountOperationClass" glib:is-gtype-struct-for="MountOperation">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="Gio.MountOperationClass" c:type="GMountOperationClass"/>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="MountOperationPrivate" c:type="GtkMountOperationPrivate" disguised="1"/>
<enumeration name="MovementStep" glib:type-name="GtkMovementStep" glib:get-type="gtk_movement_step_get_type" c:type="GtkMovementStep">
<doc xml:space="preserve">Passed as argument to various keybinding signals for moving the
cursor position.</doc>
<member name="logical_positions" value="0" c:identifier="GTK_MOVEMENT_LOGICAL_POSITIONS" glib:nick="logical-positions" glib:name="GTK_MOVEMENT_LOGICAL_POSITIONS">
<doc xml:space="preserve">Move forward or back by graphemes</doc>
</member>
<member name="visual_positions" value="1" c:identifier="GTK_MOVEMENT_VISUAL_POSITIONS" glib:nick="visual-positions" glib:name="GTK_MOVEMENT_VISUAL_POSITIONS">
<doc xml:space="preserve">Move left or right by graphemes</doc>
</member>
<member name="words" value="2" c:identifier="GTK_MOVEMENT_WORDS" glib:nick="words" glib:name="GTK_MOVEMENT_WORDS">
<doc xml:space="preserve">Move forward or back by words</doc>
</member>
<member name="display_lines" value="3" c:identifier="GTK_MOVEMENT_DISPLAY_LINES" glib:nick="display-lines" glib:name="GTK_MOVEMENT_DISPLAY_LINES">
<doc xml:space="preserve">Move up or down lines (wrapped lines)</doc>
</member>
<member name="display_line_ends" value="4" c:identifier="GTK_MOVEMENT_DISPLAY_LINE_ENDS" glib:nick="display-line-ends" glib:name="GTK_MOVEMENT_DISPLAY_LINE_ENDS">
<doc xml:space="preserve">Move to either end of a line</doc>
</member>
<member name="paragraphs" value="5" c:identifier="GTK_MOVEMENT_PARAGRAPHS" glib:nick="paragraphs" glib:name="GTK_MOVEMENT_PARAGRAPHS">
<doc xml:space="preserve">Move up or down paragraphs (newline-ended lines)</doc>
</member>
<member name="paragraph_ends" value="6" c:identifier="GTK_MOVEMENT_PARAGRAPH_ENDS" glib:nick="paragraph-ends" glib:name="GTK_MOVEMENT_PARAGRAPH_ENDS">
<doc xml:space="preserve">Move to either end of a paragraph</doc>
</member>
<member name="pages" value="7" c:identifier="GTK_MOVEMENT_PAGES" glib:nick="pages" glib:name="GTK_MOVEMENT_PAGES">
<doc xml:space="preserve">Move by pages</doc>
</member>
<member name="buffer_ends" value="8" c:identifier="GTK_MOVEMENT_BUFFER_ENDS" glib:nick="buffer-ends" glib:name="GTK_MOVEMENT_BUFFER_ENDS">
<doc xml:space="preserve">Move to ends of the buffer</doc>
</member>
<member name="horizontal_pages" value="9" c:identifier="GTK_MOVEMENT_HORIZONTAL_PAGES" glib:nick="horizontal-pages" glib:name="GTK_MOVEMENT_HORIZONTAL_PAGES">
<doc xml:space="preserve">Move horizontally by pages</doc>
</member>
</enumeration>
<class name="MultiFilter" c:symbol-prefix="multi_filter" c:type="GtkMultiFilter" parent="Filter" abstract="1" glib:type-name="GtkMultiFilter" glib:get-type="gtk_multi_filter_get_type" glib:type-struct="MultiFilterClass">
<doc xml:space="preserve">`GtkMultiFilter` is the base class for filters that combine multiple filters.</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<method name="append" c:identifier="gtk_multi_filter_append">
<doc xml:space="preserve">Adds a @filter to @self to use for matching.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiFilter`</doc>
<type name="MultiFilter" c:type="GtkMultiFilter*"/>
</instance-parameter>
<parameter name="filter" transfer-ownership="full">
<doc xml:space="preserve">A new filter to use</doc>
<type name="Filter" c:type="GtkFilter*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_multi_filter_remove">
<doc xml:space="preserve">Removes the filter at the given @position from the list of filters used
by @self.
If @position is larger than the number of filters, nothing happens and
the function returns.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiFilter`</doc>
<type name="MultiFilter" c:type="GtkMultiFilter*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of filter to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
</class>
<record name="MultiFilterClass" c:type="GtkMultiFilterClass" disguised="1" glib:is-gtype-struct-for="MultiFilter"/>
<class name="MultiSelection" c:symbol-prefix="multi_selection" c:type="GtkMultiSelection" parent="GObject.Object" glib:type-name="GtkMultiSelection" glib:get-type="gtk_multi_selection_get_type" glib:type-struct="MultiSelectionClass">
<doc xml:space="preserve">`GtkMultiSelection` is a `GtkSelectionModel` that allows selecting multiple
elements.</doc>
<implements name="Gio.ListModel"/>
<implements name="SelectionModel"/>
<constructor name="new" c:identifier="gtk_multi_selection_new">
<doc xml:space="preserve">Creates a new selection to handle @model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMultiSelection`</doc>
<type name="MultiSelection" c:type="GtkMultiSelection*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GListModel` to manage</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_multi_selection_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Returns the underlying model of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the underlying model</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiSelection`</doc>
<type name="MultiSelection" c:type="GtkMultiSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_multi_selection_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model that @self should wrap.
If @model is %NULL, @self will be empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiSelection`</doc>
<type name="MultiSelection" c:type="GtkMultiSelection*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GListModel` to wrap</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_multi_selection_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_multi_selection_set_model"/>
<doc xml:space="preserve">The list managed by this selection.</doc>
<type name="Gio.ListModel"/>
</property>
</class>
<record name="MultiSelectionClass" c:type="GtkMultiSelectionClass" glib:is-gtype-struct-for="MultiSelection">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="MultiSorter" c:symbol-prefix="multi_sorter" c:type="GtkMultiSorter" parent="Sorter" glib:type-name="GtkMultiSorter" glib:get-type="gtk_multi_sorter_get_type" glib:type-struct="MultiSorterClass">
<doc xml:space="preserve">`GtkMultiSorter` combines multiple sorters by trying them
in turn.
If the first sorter compares two items as equal,
the second is tried next, and so on.</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_multi_sorter_new">
<doc xml:space="preserve">Creates a new multi sorter.
This sorter compares items by trying each of the sorters
in turn, until one returns non-zero. In particular, if
no sorter has been added to it, it will always compare
items as equal.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkMultiSorter`</doc>
<type name="MultiSorter" c:type="GtkMultiSorter*"/>
</return-value>
</constructor>
<method name="append" c:identifier="gtk_multi_sorter_append">
<doc xml:space="preserve">Add @sorter to @self to use for sorting at the end.
@self will consult all existing sorters before it will
sort with the given @sorter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiSorter`</doc>
<type name="MultiSorter" c:type="GtkMultiSorter*"/>
</instance-parameter>
<parameter name="sorter" transfer-ownership="full">
<doc xml:space="preserve">a sorter to add</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_multi_sorter_remove">
<doc xml:space="preserve">Removes the sorter at the given @position from the list of sorter
used by @self.
If @position is larger than the number of sorters, nothing happens.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkMultiSorter`</doc>
<type name="MultiSorter" c:type="GtkMultiSorter*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of sorter to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
</class>
<record name="MultiSorterClass" c:type="GtkMultiSorterClass" glib:is-gtype-struct-for="MultiSorter">
<field name="parent_class">
<type name="SorterClass" c:type="GtkSorterClass"/>
</field>
</record>
<function-macro name="NOTE" c:identifier="GTK_NOTE" introspectable="0">
<parameters>
<parameter name="type">
</parameter>
<parameter name="action">
</parameter>
</parameters>
</function-macro>
<function-macro name="NOTEBOOK" c:identifier="GTK_NOTEBOOK" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="NOTEBOOK_PAGE" c:identifier="GTK_NOTEBOOK_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="NamedAction" c:symbol-prefix="named_action" c:type="GtkNamedAction" parent="ShortcutAction" glib:type-name="GtkNamedAction" glib:get-type="gtk_named_action_get_type" glib:type-struct="NamedActionClass">
<doc xml:space="preserve">A `GtkShortcutAction` that activates an action by name.</doc>
<constructor name="new" c:identifier="gtk_named_action_new">
<doc xml:space="preserve">Creates an action that when activated, activates
the named action on the widget.
It also passes the given arguments to it.
See [method@Gtk.Widget.insert_action_group] for
how to add actions to widgets.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkShortcutAction`</doc>
<type name="NamedAction" c:type="GtkShortcutAction*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the detailed name of the action</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_action_name" c:identifier="gtk_named_action_get_action_name" glib:get-property="action-name">
<attribute name="org.gtk.Method.get_property" value="action-name"/>
<doc xml:space="preserve">Returns the name of the action that will be activated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of the action to activate</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a named action</doc>
<type name="NamedAction" c:type="GtkNamedAction*"/>
</instance-parameter>
</parameters>
</method>
<property name="action-name" writable="1" construct-only="1" transfer-ownership="none" getter="get_action_name">
<attribute name="org.gtk.Property.get" value="gtk_named_action_get_action_name"/>
<doc xml:space="preserve">The name of the action to activate.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="NamedActionClass" c:type="GtkNamedActionClass" disguised="1" glib:is-gtype-struct-for="NamedAction"/>
<interface name="Native" c:symbol-prefix="native" c:type="GtkNative" glib:type-name="GtkNative" glib:get-type="gtk_native_get_type" glib:type-struct="NativeInterface">
<doc xml:space="preserve">`GtkNative` is the interface implemented by all widgets that have
their own `GdkSurface`.
The obvious example of a `GtkNative` is `GtkWindow`.
Every widget that is not itself a `GtkNative` is contained in one,
and you can get it with [method@Gtk.Widget.get_native].
To get the surface of a `GtkNative`, use [method@Gtk.Native.get_surface].
It is also possible to find the `GtkNative` to which a surface
belongs, with [func@Gtk.Native.get_for_surface].
In addition to a [class@Gdk.Surface], a `GtkNative` also provides
a [class@Gsk.Renderer] for rendering on that surface. To get the
renderer, use [method@Gtk.Native.get_renderer].</doc>
<prerequisite name="Widget"/>
<function name="get_for_surface" c:identifier="gtk_native_get_for_surface">
<doc xml:space="preserve">Finds the `GtkNative` associated with the surface.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkNative` that is associated with @surface</doc>
<type name="Native" c:type="GtkNative*"/>
</return-value>
<parameters>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSurface`</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</function>
<method name="get_renderer" c:identifier="gtk_native_get_renderer">
<doc xml:space="preserve">Returns the renderer that is used for this `GtkNative`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the renderer for @self</doc>
<type name="Gsk.Renderer" c:type="GskRenderer*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNative`</doc>
<type name="Native" c:type="GtkNative*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_surface" c:identifier="gtk_native_get_surface">
<doc xml:space="preserve">Returns the surface of this `GtkNative`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the surface of @self</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNative`</doc>
<type name="Native" c:type="GtkNative*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_surface_transform" c:identifier="gtk_native_get_surface_transform">
<doc xml:space="preserve">Retrieves the surface transform of @self.
This is the translation from @self's surface coordinates into
@self's widget coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNative`</doc>
<type name="Native" c:type="GtkNative*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the x coordinate</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the y coordinate</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="realize" c:identifier="gtk_native_realize">
<doc xml:space="preserve">Realizes a `GtkNative`.
This should only be used by subclasses.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNative`</doc>
<type name="Native" c:type="GtkNative*"/>
</instance-parameter>
</parameters>
</method>
<method name="unrealize" c:identifier="gtk_native_unrealize">
<doc xml:space="preserve">Unrealizes a `GtkNative`.
This should only be used by subclasses.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNative`</doc>
<type name="Native" c:type="GtkNative*"/>
</instance-parameter>
</parameters>
</method>
</interface>
<class name="NativeDialog" c:symbol-prefix="native_dialog" c:type="GtkNativeDialog" parent="GObject.Object" abstract="1" glib:type-name="GtkNativeDialog" glib:get-type="gtk_native_dialog_get_type" glib:type-struct="NativeDialogClass">
<doc xml:space="preserve">Native dialogs are platform dialogs that don't use `GtkDialog`.
They are used in order to integrate better with a platform, by
looking the same as other native applications and supporting
platform specific features.
The [class@Gtk.Dialog] functions cannot be used on such objects,
but we need a similar API in order to drive them. The `GtkNativeDialog`
object is an API that allows you to do this. It allows you to set
various common properties on the dialog, as well as show and hide
it and get a [signal@Gtk.NativeDialog::response] signal when the user
finished with the dialog.
Note that unlike `GtkDialog`, `GtkNativeDialog` objects are not
toplevel widgets, and GTK does not keep them alive. It is your
responsibility to keep a reference until you are done with the
object.</doc>
<virtual-method name="hide" invoker="hide">
<doc xml:space="preserve">Hides the dialog if it is visible, aborting any interaction.
Once this is called the [signal@Gtk.NativeDialog::response] signal
will *not* be emitted until after the next call to
[method@Gtk.NativeDialog.show].
If the dialog is not visible this does nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="response">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
<parameter name="response_id" transfer-ownership="none">
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="show" invoker="show">
<doc xml:space="preserve">Shows the dialog on the display.
When the user accepts the state of the dialog the dialog will
be automatically hidden and the [signal@Gtk.NativeDialog::response]
signal will be emitted.
Multiple calls while the dialog is visible will be ignored.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="destroy" c:identifier="gtk_native_dialog_destroy">
<doc xml:space="preserve">Destroys a dialog.
When a dialog is destroyed, it will break any references it holds
to other objects.
If it is visible it will be hidden and any underlying window system
resources will be destroyed.
Note that this does not release any reference to the object (as opposed
to destroying a `GtkWindow`) because there is no reference from the
windowing system to the `GtkNativeDialog`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modal" c:identifier="gtk_native_dialog_get_modal" glib:get-property="modal">
<attribute name="org.gtk.Method.get_property" value="modal"/>
<doc xml:space="preserve">Returns whether the dialog is modal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog is set to be modal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_native_dialog_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Gets the title of the `GtkNativeDialog`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the title of the dialog, or %NULL if none has
been set explicitly. The returned string is owned by the widget
and must not be modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transient_for" c:identifier="gtk_native_dialog_get_transient_for" glib:get-property="transient-for">
<attribute name="org.gtk.Method.get_property" value="transient-for"/>
<doc xml:space="preserve">Fetches the transient parent for this window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the transient parent for this window,
or %NULL if no transient parent has been set.</doc>
<type name="Window" c:type="GtkWindow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_native_dialog_get_visible" glib:get-property="visible">
<attribute name="org.gtk.Method.get_property" value="visible"/>
<doc xml:space="preserve">Determines whether the dialog is visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the dialog is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="hide" c:identifier="gtk_native_dialog_hide">
<doc xml:space="preserve">Hides the dialog if it is visible, aborting any interaction.
Once this is called the [signal@Gtk.NativeDialog::response] signal
will *not* be emitted until after the next call to
[method@Gtk.NativeDialog.show].
If the dialog is not visible this does nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_modal" c:identifier="gtk_native_dialog_set_modal" glib:set-property="modal">
<attribute name="org.gtk.Method.set_property" value="modal"/>
<doc xml:space="preserve">Sets a dialog modal or non-modal.
Modal dialogs prevent interaction with other windows in the same
application. To keep modal dialogs on top of main application
windows, use [method@Gtk.NativeDialog.set_transient_for] to make
the dialog transient for the parent; most window managers will
then disallow lowering the dialog below the parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
<parameter name="modal" transfer-ownership="none">
<doc xml:space="preserve">whether the window is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_native_dialog_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the title of the `GtkNativeDialog.`</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_transient_for" c:identifier="gtk_native_dialog_set_transient_for" glib:set-property="transient-for">
<attribute name="org.gtk.Method.set_property" value="transient-for"/>
<doc xml:space="preserve">Dialog windows should be set transient for the main application
window they were spawned from.
This allows window managers to e.g. keep the dialog on top of the
main window, or center the dialog over the main window.
Passing %NULL for @parent unsets the current transient window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">parent window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="show" c:identifier="gtk_native_dialog_show">
<doc xml:space="preserve">Shows the dialog on the display.
When the user accepts the state of the dialog the dialog will
be automatically hidden and the [signal@Gtk.NativeDialog::response]
signal will be emitted.
Multiple calls while the dialog is visible will be ignored.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</instance-parameter>
</parameters>
</method>
<property name="modal" writable="1" transfer-ownership="none" setter="set_modal" getter="get_modal">
<attribute name="org.gtk.Property.get" value="gtk_native_dialog_get_modal"/>
<attribute name="org.gtk.Property.set" value="gtk_native_dialog_set_modal"/>
<doc xml:space="preserve">Whether the window should be modal with respect to its transient parent.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_native_dialog_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_native_dialog_set_title"/>
<doc xml:space="preserve">The title of the dialog window</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="transient-for" writable="1" construct="1" transfer-ownership="none" setter="set_transient_for" getter="get_transient_for">
<attribute name="org.gtk.Property.get" value="gtk_native_dialog_get_transient_for"/>
<attribute name="org.gtk.Property.set" value="gtk_native_dialog_set_transient_for"/>
<doc xml:space="preserve">The transient parent of the dialog, or %NULL for none.</doc>
<type name="Window"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" getter="get_visible">
<attribute name="org.gtk.Property.get" value="gtk_native_dialog_get_visible"/>
<doc xml:space="preserve">Whether the window is currently visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="response" when="last">
<doc xml:space="preserve">Emitted when the user responds to the dialog.
When this is called the dialog has been hidden.
If you call [method@Gtk.NativeDialog.hide] before the user
responds to the dialog this signal will not be emitted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="response_id" transfer-ownership="none">
<doc xml:space="preserve">the response ID</doc>
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="NativeDialogClass" c:type="GtkNativeDialogClass" glib:is-gtype-struct-for="NativeDialog">
<doc xml:space="preserve">Class structure for `GtkNativeDialog`.</doc>
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="response">
<callback name="response">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</parameter>
<parameter name="response_id" transfer-ownership="none">
<type name="ResponseType" c:type="GtkResponseType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="show">
<callback name="show">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="hide">
<callback name="hide">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNativeDialog`</doc>
<type name="NativeDialog" c:type="GtkNativeDialog*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="NativeInterface" c:type="GtkNativeInterface" disguised="1" glib:is-gtype-struct-for="Native"/>
<enumeration name="NaturalWrapMode" version="4.6" glib:type-name="GtkNaturalWrapMode" glib:get-type="gtk_natural_wrap_mode_get_type" c:type="GtkNaturalWrapMode">
<doc xml:space="preserve">Options for selecting a different wrap mode for natural size
requests.
See for example the [property@Gtk.Label:natural-wrap-mode] property.</doc>
<member name="inherit" value="0" c:identifier="GTK_NATURAL_WRAP_INHERIT" glib:nick="inherit" glib:name="GTK_NATURAL_WRAP_INHERIT">
<doc xml:space="preserve">Inherit the minimum size request.
In particular, this should be used with %PANGO_WRAP_CHAR.</doc>
</member>
<member name="none" value="1" c:identifier="GTK_NATURAL_WRAP_NONE" glib:nick="none" glib:name="GTK_NATURAL_WRAP_NONE">
<doc xml:space="preserve">Try not to wrap the text. This mode is the
closest to GTK3's behavior but can lead to a wide label leaving
lots of empty space below the text.</doc>
</member>
<member name="word" value="2" c:identifier="GTK_NATURAL_WRAP_WORD" glib:nick="word" glib:name="GTK_NATURAL_WRAP_WORD">
<doc xml:space="preserve">Attempt to wrap at word boundaries. This
is useful in particular when using %PANGO_WRAP_WORD_CHAR as the
wrap mode.</doc>
</member>
</enumeration>
<class name="NeverTrigger" c:symbol-prefix="never_trigger" c:type="GtkNeverTrigger" parent="ShortcutTrigger" glib:type-name="GtkNeverTrigger" glib:get-type="gtk_never_trigger_get_type" glib:type-struct="NeverTriggerClass">
<doc xml:space="preserve">A `GtkShortcutTrigger` that never triggers.</doc>
<function name="get" c:identifier="gtk_never_trigger_get">
<doc xml:space="preserve">Gets the never trigger.
This is a singleton for a trigger that never triggers.
Use this trigger instead of %NULL because it implements
all virtual functions.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The never trigger</doc>
<type name="NeverTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
</function>
</class>
<record name="NeverTriggerClass" c:type="GtkNeverTriggerClass" disguised="1" glib:is-gtype-struct-for="NeverTrigger"/>
<class name="NoSelection" c:symbol-prefix="no_selection" c:type="GtkNoSelection" parent="GObject.Object" glib:type-name="GtkNoSelection" glib:get-type="gtk_no_selection_get_type" glib:type-struct="NoSelectionClass">
<doc xml:space="preserve">`GtkNoSelection` is a `GtkSelectionModel` that does not allow selecting
anything.
This model is meant to be used as a simple wrapper around a `GListModel`
when a `GtkSelectionModel` is required.</doc>
<implements name="Gio.ListModel"/>
<implements name="SelectionModel"/>
<constructor name="new" c:identifier="gtk_no_selection_new">
<doc xml:space="preserve">Creates a new selection to handle @model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkNoSelection`</doc>
<type name="NoSelection" c:type="GtkNoSelection*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GListModel` to manage</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_no_selection_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that @self is wrapping.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model being wrapped</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNoSelection`</doc>
<type name="NoSelection" c:type="GtkNoSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_no_selection_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model that @self should wrap.
If @model is %NULL, this model will be empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNoSelection`</doc>
<type name="NoSelection" c:type="GtkNoSelection*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GListModel` to wrap</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.property.get" value="gtk_no_selection_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_no_selection_set_model"/>
<doc xml:space="preserve">The model being managed.</doc>
<type name="Gio.ListModel"/>
</property>
</class>
<record name="NoSelectionClass" c:type="GtkNoSelectionClass" glib:is-gtype-struct-for="NoSelection">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="Notebook" c:symbol-prefix="notebook" c:type="GtkNotebook" parent="Widget" glib:type-name="GtkNotebook" glib:get-type="gtk_notebook_get_type">
<doc xml:space="preserve">`GtkNotebook` is a container whose children are pages switched
between using tabs.
![An example GtkNotebook](notebook.png)
There are many configuration options for `GtkNotebook`. Among
other things, you can choose on which edge the tabs appear
(see [method@Gtk.Notebook.set_tab_pos]), whether, if there are
too many tabs to fit the notebook should be made bigger or scrolling
arrows added (see [method@Gtk.Notebook.set_scrollable]), and whether
there will be a popup menu allowing the users to switch pages.
(see [method@Gtk.Notebook.popup_enable]).
# GtkNotebook as GtkBuildable
The `GtkNotebook` implementation of the `GtkBuildable` interface
supports placing children into tabs by specifying &#x201C;tab&#x201D; as the
&#x201C;type&#x201D; attribute of a &lt;child&gt; element. Note that the content
of the tab must be created before the tab can be filled.
A tab child can be specified without specifying a &lt;child&gt;
type attribute.
To add a child widget in the notebooks action area, specify
"action-start" or &#x201C;action-end&#x201D; as the &#x201C;type&#x201D; attribute of the
&lt;child&gt; element.
An example of a UI definition fragment with `GtkNotebook`:
```xml
&lt;object class="GtkNotebook"&gt;
&lt;child&gt;
&lt;object class="GtkLabel" id="notebook-content"&gt;
&lt;property name="label"&gt;Content&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child type="tab"&gt;
&lt;object class="GtkLabel" id="notebook-tab"&gt;
&lt;property name="label"&gt;Tab&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# CSS nodes
```
notebook
&#x251C;&#x2500;&#x2500; header.top
&#x2502; &#x251C;&#x2500;&#x2500; [&lt;action widget&gt;]
&#x2502; &#x251C;&#x2500;&#x2500; tabs
&#x2502; &#x2502; &#x251C;&#x2500;&#x2500; [arrow]
&#x2502; &#x2502; &#x251C;&#x2500;&#x2500; tab
&#x2502; &#x2502; &#x2502; &#x2570;&#x2500;&#x2500; &lt;tab label&gt;
&#x250A; &#x250A; &#x250A;
&#x2502; &#x2502; &#x251C;&#x2500;&#x2500; tab[.reorderable-page]
&#x2502; &#x2502; &#x2502; &#x2570;&#x2500;&#x2500; &lt;tab label&gt;
&#x2502; &#x2502; &#x2570;&#x2500;&#x2500; [arrow]
&#x2502; &#x2570;&#x2500;&#x2500; [&lt;action widget&gt;]
&#x2502;
&#x2570;&#x2500;&#x2500; stack
&#x251C;&#x2500;&#x2500; &lt;child&gt;
&#x250A;
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
`GtkNotebook` has a main CSS node with name `notebook`, a subnode
with name `header` and below that a subnode with name `tabs` which
contains one subnode per tab with name `tab`.
If action widgets are present, their CSS nodes are placed next
to the `tabs` node. If the notebook is scrollable, CSS nodes with
name `arrow` are placed as first and last child of the `tabs` node.
The main node gets the `.frame` style class when the notebook
has a border (see [method@Gtk.Notebook.set_show_border]).
The header node gets one of the style class `.top`, `.bottom`,
`.left` or `.right`, depending on where the tabs are placed. For
reorderable pages, the tab node gets the `.reorderable-page` class.
A `tab` node gets the `.dnd` style class while it is moved with drag-and-drop.
The nodes are always arranged from left-to-right, regardless of text direction.
# Accessibility
`GtkNotebook` uses the following roles:
- %GTK_ACCESSIBLE_ROLE_GROUP for the notebook widget
- %GTK_ACCESSIBLE_ROLE_TAB_LIST for the list of tabs
- %GTK_ACCESSIBLE_ROLE_TAB role for each tab
- %GTK_ACCESSIBLE_ROLE_TAB_PANEL for each page</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_notebook_new">
<doc xml:space="preserve">Creates a new `GtkNotebook` widget with no pages.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the newly created `GtkNotebook`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="append_page" c:identifier="gtk_notebook_append_page">
<doc xml:space="preserve">Appends a page to @notebook.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the appended
page in the notebook, or -1 if function fails</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="append_page_menu" c:identifier="gtk_notebook_append_page_menu">
<doc xml:space="preserve">Appends a page to @notebook, specifying the widget to use as the
label in the popup menu.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the appended
page in the notebook, or -1 if function fails</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="menu_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the widget to use as a label for the
page-switch menu, if that is enabled. If %NULL, and @tab_label
is a `GtkLabel` or %NULL, then the menu label will be a newly
created label with the same text as @tab_label; if @tab_label
is not a `GtkLabel`, @menu_label must be specified if the
page-switch menu is to be used.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="detach_tab" c:identifier="gtk_notebook_detach_tab">
<doc xml:space="preserve">Removes the child from the notebook.
This function is very similar to [method@Gtk.Notebook.remove_page],
but additionally informs the notebook that the removal
is happening as part of a tab DND operation, which should
not be cancelled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_action_widget" c:identifier="gtk_notebook_get_action_widget">
<doc xml:space="preserve">Gets one of the action widgets.
See [method@Gtk.Notebook.set_action_widget].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The action widget
with the given @pack_type or %NULL when this action
widget has not been set</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="pack_type" transfer-ownership="none">
<doc xml:space="preserve">pack type of the action widget to receive</doc>
<type name="PackType" c:type="GtkPackType"/>
</parameter>
</parameters>
</method>
<method name="get_current_page" c:identifier="gtk_notebook_get_current_page">
<attribute name="org.gtk.Method.get_property" value="page"/>
<doc xml:space="preserve">Returns the page number of the current page.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the current
page in the notebook. If the notebook has no pages,
then -1 will be returned.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_group_name" c:identifier="gtk_notebook_get_group_name" glib:get-property="group-name">
<attribute name="org.gtk.Method.get_property" value="group-name"/>
<doc xml:space="preserve">Gets the current group name for @notebook.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the group name,
or %NULL if none is set</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_menu_label" c:identifier="gtk_notebook_get_menu_label">
<doc xml:space="preserve">Retrieves the menu label widget of the page containing @child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu label, or %NULL
if the notebook page does not have a menu label other than
the default (the tab label).</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a widget contained in a page of @notebook</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_menu_label_text" c:identifier="gtk_notebook_get_menu_label_text">
<doc xml:space="preserve">Retrieves the text of the menu label for the page containing
@child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text of the tab label, or %NULL if
the widget does not have a menu label other than the default
menu label, or the menu label widget is not a `GtkLabel`.
The string is owned by the widget and must not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child widget of a page of the notebook.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_n_pages" c:identifier="gtk_notebook_get_n_pages">
<doc xml:space="preserve">Gets the number of pages in a notebook.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of pages in the notebook</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_nth_page" c:identifier="gtk_notebook_get_nth_page">
<doc xml:space="preserve">Returns the child widget contained in page number @page_num.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget, or %NULL if @page_num
is out of bounds</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the index of a page in the notebook, or -1
to get the last page</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_page" c:identifier="gtk_notebook_get_page" glib:get-property="page">
<doc xml:space="preserve">Returns the `GtkNotebookPage` for @child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkNotebookPage` for @child</doc>
<type name="NotebookPage" c:type="GtkNotebookPage*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @notebook</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_pages" c:identifier="gtk_notebook_get_pages" glib:get-property="pages">
<attribute name="org.gtk.Method.get_property" value="pages"/>
<doc xml:space="preserve">Returns a `GListModel` that contains the pages of the notebook.
This can be used to keep an up-to-date view. The model also
implements [iface@Gtk.SelectionModel] and can be used to track
and modify the visible page.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkNotebookPage"/>
<doc xml:space="preserve">a
`GListModel` for the notebook's children</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scrollable" c:identifier="gtk_notebook_get_scrollable" glib:get-property="scrollable">
<attribute name="or.gtk.Method.get_property" value="scrollable"/>
<doc xml:space="preserve">Returns whether the tab label area has arrows for scrolling.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if arrows for scrolling are present</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_border" c:identifier="gtk_notebook_get_show_border" glib:get-property="show-border">
<attribute name="org.gtk.Method.get_property" value="show-border"/>
<doc xml:space="preserve">Returns whether a bevel will be drawn around the notebook pages.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the bevel is drawn</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_tabs" c:identifier="gtk_notebook_get_show_tabs" glib:get-property="show-tabs">
<attribute name="org.gtk.Method.get_property" value="show-tabs"/>
<doc xml:space="preserve">Returns whether the tabs of the notebook are shown.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tabs are shown</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tab_detachable" c:identifier="gtk_notebook_get_tab_detachable">
<doc xml:space="preserve">Returns whether the tab contents can be detached from @notebook.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tab is detachable.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_tab_label" c:identifier="gtk_notebook_get_tab_label">
<doc xml:space="preserve">Returns the tab label widget for the page @child.
%NULL is returned if @child is not in @notebook or
if no tab label has specifically been set for @child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the tab label</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_tab_label_text" c:identifier="gtk_notebook_get_tab_label_text">
<doc xml:space="preserve">Retrieves the text of the tab label for the page containing
@child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text of the tab label, or %NULL if
the tab label idget is not a `GtkLabel`. The string is owned
by the widget and must not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a widget contained in a page of @notebook</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_tab_pos" c:identifier="gtk_notebook_get_tab_pos" glib:get-property="tab-pos">
<attribute name="org.gtk.Method.get_property" value="tab-pos"/>
<doc xml:space="preserve">Gets the edge at which the tabs are drawn.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the edge at which the tabs are drawn</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tab_reorderable" c:identifier="gtk_notebook_get_tab_reorderable">
<doc xml:space="preserve">Gets whether the tab can be reordered via drag and drop or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tab is reorderable.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="insert_page" c:identifier="gtk_notebook_insert_page">
<doc xml:space="preserve">Insert a page into @notebook at the given position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the inserted
page in the notebook, or -1 if function fails</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the index (starting at 0) at which to insert the page,
or -1 to append the page after all other pages</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_page_menu" c:identifier="gtk_notebook_insert_page_menu">
<doc xml:space="preserve">Insert a page into @notebook at the given position, specifying
the widget to use as the label in the popup menu.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the inserted
page in the notebook</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="menu_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the widget to use as a label for the
page-switch menu, if that is enabled. If %NULL, and @tab_label
is a `GtkLabel` or %NULL, then the menu label will be a newly
created label with the same text as @tab_label; if @tab_label
is not a `GtkLabel`, @menu_label must be specified if the
page-switch menu is to be used.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the index (starting at 0) at which to insert the page,
or -1 to append the page after all other pages.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="next_page" c:identifier="gtk_notebook_next_page">
<doc xml:space="preserve">Switches to the next page.
Nothing happens if the current page is the last page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="page_num" c:identifier="gtk_notebook_page_num">
<doc xml:space="preserve">Finds the index of the page which contains the given child
widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the page containing @child, or
-1 if @child is not in the notebook</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="popup_disable" c:identifier="gtk_notebook_popup_disable">
<doc xml:space="preserve">Disables the popup menu.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="popup_enable" c:identifier="gtk_notebook_popup_enable">
<doc xml:space="preserve">Enables the popup menu.
If the user clicks with the right mouse button on the tab labels,
a menu with all the pages will be popped up.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepend_page" c:identifier="gtk_notebook_prepend_page">
<doc xml:space="preserve">Prepends a page to @notebook.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the prepended
page in the notebook, or -1 if function fails</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="prepend_page_menu" c:identifier="gtk_notebook_prepend_page_menu">
<doc xml:space="preserve">Prepends a page to @notebook, specifying the widget to use as the
label in the popup menu.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index (starting from 0) of the prepended
page in the notebook, or -1 if function fails</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to use as the contents of the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWidget` to be used as the label
for the page, or %NULL to use the default label, &#x201C;page N&#x201D;</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="menu_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the widget to use as a label for the
page-switch menu, if that is enabled. If %NULL, and @tab_label
is a `GtkLabel` or %NULL, then the menu label will be a newly
created label with the same text as @tab_label; if @tab_label
is not a `GtkLabel`, @menu_label must be specified if the
page-switch menu is to be used.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="prev_page" c:identifier="gtk_notebook_prev_page">
<doc xml:space="preserve">Switches to the previous page.
Nothing happens if the current page is the first page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_page" c:identifier="gtk_notebook_remove_page">
<doc xml:space="preserve">Removes a page from the notebook given its index
in the notebook.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the index of a notebook page, starting
from 0. If -1, the last page will be removed.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="reorder_child" c:identifier="gtk_notebook_reorder_child">
<doc xml:space="preserve">Reorders the page containing @child, so that it appears in position
@position.
If @position is greater than or equal to the number of children in
the list or negative, @child will be moved to the end of the list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to move</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the new position, or -1 to move to the end</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_action_widget" c:identifier="gtk_notebook_set_action_widget">
<doc xml:space="preserve">Sets @widget as one of the action widgets.
Depending on the pack type the widget will be placed before
or after the tabs. You can use a `GtkBox` if you need to pack
more than one widget on the same side.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="pack_type" transfer-ownership="none">
<doc xml:space="preserve">pack type of the action widget</doc>
<type name="PackType" c:type="GtkPackType"/>
</parameter>
</parameters>
</method>
<method name="set_current_page" c:identifier="gtk_notebook_set_current_page">
<attribute name="org.gtk.Method.set_property" value="page"/>
<doc xml:space="preserve">Switches to the page number @page_num.
Note that due to historical reasons, GtkNotebook refuses
to switch to a page unless the child widget is visible.
Therefore, it is recommended to show child widgets before
adding them to a notebook.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">index of the page to switch to, starting from 0.
If negative, the last page will be used. If greater
than the number of pages in the notebook, nothing
will be done.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_group_name" c:identifier="gtk_notebook_set_group_name" glib:set-property="group-name">
<attribute name="org.gtk.Method.set_property" value="group-name"/>
<doc xml:space="preserve">Sets a group name for @notebook.
Notebooks with the same name will be able to exchange tabs
via drag and drop. A notebook with a %NULL group name will
not be able to exchange tabs with any other notebook.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the notebook group,
or %NULL to unset it</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_menu_label" c:identifier="gtk_notebook_set_menu_label">
<doc xml:space="preserve">Changes the menu label for the page containing @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="menu_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the menu label, or %NULL for default</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_menu_label_text" c:identifier="gtk_notebook_set_menu_label_text">
<doc xml:space="preserve">Creates a new label and sets it as the menu label of @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="menu_text" transfer-ownership="none">
<doc xml:space="preserve">the label text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_scrollable" c:identifier="gtk_notebook_set_scrollable" glib:set-property="scrollable">
<attribute name="org.gtk.Method.set_property" value="scrollable"/>
<doc xml:space="preserve">Sets whether the tab label area will have arrows for
scrolling if there are too many tabs to fit in the area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if scroll arrows should be added</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_border" c:identifier="gtk_notebook_set_show_border" glib:set-property="show-border">
<attribute name="org.gtk.Method.set_property" value="show-border"/>
<doc xml:space="preserve">Sets whether a bevel will be drawn around the notebook pages.
This only has a visual effect when the tabs are not shown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="show_border" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a bevel should be drawn around the notebook</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_tabs" c:identifier="gtk_notebook_set_show_tabs" glib:set-property="show-tabs">
<attribute name="org.gtk.Method.set_property" value="show-tabs"/>
<doc xml:space="preserve">Sets whether to show the tabs for the notebook or not.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="show_tabs" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tabs should be shown</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_tab_detachable" c:identifier="gtk_notebook_set_tab_detachable">
<doc xml:space="preserve">Sets whether the tab can be detached from @notebook to another
notebook or widget.
Note that two notebooks must share a common group identificator
(see [method@Gtk.Notebook.set_group_name]) to allow automatic tabs
interchange between them.
If you want a widget to interact with a notebook through DnD
(i.e.: accept dragged tabs from it) it must be set as a drop
destination and accept the target &#x201C;GTK_NOTEBOOK_TAB&#x201D;. The notebook
will fill the selection with a GtkWidget** pointing to the child
widget that corresponds to the dropped tab.
Note that you should use [method@Gtk.Notebook.detach_tab] instead
of [method@Gtk.Notebook.remove_page] if you want to remove the tab
from the source notebook as part of accepting a drop. Otherwise,
the source notebook will think that the dragged tab was removed
from underneath the ongoing drag operation, and will initiate a
drag cancel animation.
```c
static void
on_drag_data_received (GtkWidget *widget,
GdkDrop *drop,
GtkSelectionData *data,
guint time,
gpointer user_data)
{
GtkDrag *drag;
GtkWidget *notebook;
GtkWidget **child;
drag = gtk_drop_get_drag (drop);
notebook = g_object_get_data (drag, "gtk-notebook-drag-origin");
child = (void*) gtk_selection_data_get_data (data);
// process_widget (*child);
gtk_notebook_detach_tab (GTK_NOTEBOOK (notebook), *child);
}
```
If you want a notebook to accept drags from other widgets,
you will have to set your own DnD code to do it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="detachable" transfer-ownership="none">
<doc xml:space="preserve">whether the tab is detachable or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_tab_label" c:identifier="gtk_notebook_set_tab_label">
<doc xml:space="preserve">Changes the tab label for @child.
If %NULL is specified for @tab_label, then the page will
have the label &#x201C;page N&#x201D;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the tab label widget to use, or %NULL
for default tab label</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_tab_label_text" c:identifier="gtk_notebook_set_tab_label_text">
<doc xml:space="preserve">Creates a new label and sets it as the tab label for the page
containing @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the page</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_text" transfer-ownership="none">
<doc xml:space="preserve">the label text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_tab_pos" c:identifier="gtk_notebook_set_tab_pos" glib:set-property="tab-pos">
<attribute name="org.gtk.Method.set_property" value="tab-pos"/>
<doc xml:space="preserve">Sets the edge at which the tabs are drawn.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`.</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">the edge to draw the tabs at</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
</parameters>
</method>
<method name="set_tab_reorderable" c:identifier="gtk_notebook_set_tab_reorderable">
<doc xml:space="preserve">Sets whether the notebook tab can be reordered
via drag and drop or not.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="notebook" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebook`</doc>
<type name="Notebook" c:type="GtkNotebook*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="reorderable" transfer-ownership="none">
<doc xml:space="preserve">whether the tab is reorderable or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="enable-popup" writable="1" transfer-ownership="none">
<doc xml:space="preserve">If %TRUE, pressing the right mouse button on the notebook shows a page switching menu.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="group-name" writable="1" transfer-ownership="none" setter="set_group_name" getter="get_group_name">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_group_name"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_group_name"/>
<doc xml:space="preserve">Group name for tab drag and drop.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="page" writable="1" transfer-ownership="none" getter="get_page">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_current_page"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_current_page"/>
<doc xml:space="preserve">The index of the current page.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="pages" transfer-ownership="none" getter="get_pages">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_pages"/>
<doc xml:space="preserve">A selection model with the pages.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="scrollable" writable="1" transfer-ownership="none" setter="set_scrollable" getter="get_scrollable">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_scrollable"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_scrollable"/>
<doc xml:space="preserve">If %TRUE, scroll arrows are added if there are too many pages to fit.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-border" writable="1" transfer-ownership="none" setter="set_show_border" getter="get_show_border">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_show_border"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_show_border"/>
<doc xml:space="preserve">Whether the border should be shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-tabs" writable="1" transfer-ownership="none" setter="set_show_tabs" getter="get_show_tabs">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_show_tabs"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_show_tabs"/>
<doc xml:space="preserve">Whether tabs should be shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tab-pos" writable="1" transfer-ownership="none" setter="set_tab_pos" getter="get_tab_pos">
<attribute name="org.gtk.Property.get" value="gtk_notebook_get_tab_pos"/>
<attribute name="org.gtk.Property.set" value="gtk_notebook_set_tab_pos"/>
<doc xml:space="preserve">Which side of the notebook holds the tabs.</doc>
<type name="PositionType"/>
</property>
<glib:signal name="change-current-page" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="create-window" when="last">
<doc xml:space="preserve">The ::create-window signal is emitted when a detachable
tab is dropped on the root window.
A handler for this signal can create a window containing
a notebook where the tab will be attached. It is also
responsible for moving/resizing the window and adding the
necessary properties to the notebook (e.g. the
`GtkNotebook`:group-name ).</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkNotebook` that
@page should be added to</doc>
<type name="Notebook"/>
</return-value>
<parameters>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">the tab of @notebook that is being detached</doc>
<type name="Widget"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="focus-tab" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="NotebookTab"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-focus-out" when="last" action="1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="DirectionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="page-added" when="last">
<doc xml:space="preserve">the ::page-added signal is emitted in the notebook
right after a page is added to the notebook.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child `GtkWidget` affected</doc>
<type name="Widget"/>
</parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the new page number for @child</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="page-removed" when="last">
<doc xml:space="preserve">the ::page-removed signal is emitted in the notebook
right after a page is removed from the notebook.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child `GtkWidget` affected</doc>
<type name="Widget"/>
</parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the @child page number</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="page-reordered" when="last">
<doc xml:space="preserve">the ::page-reordered signal is emitted in the notebook
right after a page has been reordered.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child `GtkWidget` affected</doc>
<type name="Widget"/>
</parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the new page number for @child</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="reorder-tab" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="DirectionType"/>
</parameter>
<parameter name="p0" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-page" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="switch-page" when="last">
<doc xml:space="preserve">Emitted when the user or a function changes the current page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">the new current page</doc>
<type name="Widget"/>
</parameter>
<parameter name="page_num" transfer-ownership="none">
<doc xml:space="preserve">the index of the page</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="NotebookPage" c:symbol-prefix="notebook_page" c:type="GtkNotebookPage" parent="GObject.Object" glib:type-name="GtkNotebookPage" glib:get-type="gtk_notebook_page_get_type">
<doc xml:space="preserve">`GtkNotebookPage` is an auxiliary object used by `GtkNotebook`.</doc>
<method name="get_child" c:identifier="gtk_notebook_page_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Returns the notebook child to which @page belongs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the child to which @page belongs</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNotebookPage`</doc>
<type name="NotebookPage" c:type="GtkNotebookPage*"/>
</instance-parameter>
</parameters>
</method>
<property name="child" writable="1" construct-only="1" transfer-ownership="none" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_notebook_page_get_child"/>
<doc xml:space="preserve">The child for this page.</doc>
<type name="Widget"/>
</property>
<property name="detachable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the tab is detachable.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="menu" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The label widget displayed in the childs menu entry.</doc>
<type name="Widget"/>
</property>
<property name="menu-label" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text of the menu widget.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="position" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The index of the child in the parent.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="reorderable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the tab is reorderable by user action.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tab" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The tab widget for tihs page.</doc>
<type name="Widget"/>
</property>
<property name="tab-expand" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to expand the childs tab.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tab-fill" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the childs tab should fill the allocated area.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tab-label" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text of the tab widget.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<enumeration name="NotebookTab" glib:type-name="GtkNotebookTab" glib:get-type="gtk_notebook_tab_get_type" c:type="GtkNotebookTab">
<doc xml:space="preserve">The parameter used in the action signals of `GtkNotebook`.</doc>
<member name="first" value="0" c:identifier="GTK_NOTEBOOK_TAB_FIRST" glib:nick="first" glib:name="GTK_NOTEBOOK_TAB_FIRST">
<doc xml:space="preserve">the first tab in the notebook</doc>
</member>
<member name="last" value="1" c:identifier="GTK_NOTEBOOK_TAB_LAST" glib:nick="last" glib:name="GTK_NOTEBOOK_TAB_LAST">
<doc xml:space="preserve">the last tab in the notebook</doc>
</member>
</enumeration>
<class name="NothingAction" c:symbol-prefix="nothing_action" c:type="GtkNothingAction" parent="ShortcutAction" glib:type-name="GtkNothingAction" glib:get-type="gtk_nothing_action_get_type" glib:type-struct="NothingActionClass">
<doc xml:space="preserve">A `GtkShortcutAction` that does nothing.</doc>
<function name="get" c:identifier="gtk_nothing_action_get">
<doc xml:space="preserve">Gets the nothing action.
This is an action that does nothing and where
activating it always fails.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The nothing action</doc>
<type name="NothingAction" c:type="GtkShortcutAction*"/>
</return-value>
</function>
</class>
<record name="NothingActionClass" c:type="GtkNothingActionClass" disguised="1" glib:is-gtype-struct-for="NothingAction"/>
<enumeration name="NumberUpLayout" glib:type-name="GtkNumberUpLayout" glib:get-type="gtk_number_up_layout_get_type" c:type="GtkNumberUpLayout">
<doc xml:space="preserve">Used to determine the layout of pages on a sheet when printing
multiple pages per sheet.</doc>
<member name="lrtb" value="0" c:identifier="GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM" glib:nick="lrtb" glib:name="GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM">
<doc xml:space="preserve">![](layout-lrtb.png)</doc>
</member>
<member name="lrbt" value="1" c:identifier="GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP" glib:nick="lrbt" glib:name="GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP">
<doc xml:space="preserve">![](layout-lrbt.png)</doc>
</member>
<member name="rltb" value="2" c:identifier="GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM" glib:nick="rltb" glib:name="GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM">
<doc xml:space="preserve">![](layout-rltb.png)</doc>
</member>
<member name="rlbt" value="3" c:identifier="GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP" glib:nick="rlbt" glib:name="GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP">
<doc xml:space="preserve">![](layout-rlbt.png)</doc>
</member>
<member name="tblr" value="4" c:identifier="GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT" glib:nick="tblr" glib:name="GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT">
<doc xml:space="preserve">![](layout-tblr.png)</doc>
</member>
<member name="tbrl" value="5" c:identifier="GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT" glib:nick="tbrl" glib:name="GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT">
<doc xml:space="preserve">![](layout-tbrl.png)</doc>
</member>
<member name="btlr" value="6" c:identifier="GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT" glib:nick="btlr" glib:name="GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT">
<doc xml:space="preserve">![](layout-btlr.png)</doc>
</member>
<member name="btrl" value="7" c:identifier="GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT" glib:nick="btrl" glib:name="GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT">
<doc xml:space="preserve">![](layout-btrl.png)</doc>
</member>
</enumeration>
<class name="NumericSorter" c:symbol-prefix="numeric_sorter" c:type="GtkNumericSorter" parent="Sorter" glib:type-name="GtkNumericSorter" glib:get-type="gtk_numeric_sorter_get_type" glib:type-struct="NumericSorterClass">
<doc xml:space="preserve">`GtkNumericSorter` is a `GtkSorter` that compares numbers.
To obtain the numbers to compare, this sorter evaluates a
[class@Gtk.Expression].</doc>
<constructor name="new" c:identifier="gtk_numeric_sorter_new">
<doc xml:space="preserve">Creates a new numeric sorter using the given @expression.
Smaller numbers will be sorted first. You can call
[method@Gtk.NumericSorter.set_sort_order] to change this.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkNumericSorter`</doc>
<type name="NumericSorter" c:type="GtkNumericSorter*"/>
</return-value>
<parameters>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The expression to evaluate</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</constructor>
<method name="get_expression" c:identifier="gtk_numeric_sorter_get_expression" glib:get-property="expression">
<attribute name="org.gtk.Method.get_property" value="expression"/>
<doc xml:space="preserve">Gets the expression that is evaluated to obtain numbers from items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNumericSorter`</doc>
<type name="NumericSorter" c:type="GtkNumericSorter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sort_order" c:identifier="gtk_numeric_sorter_get_sort_order" glib:get-property="sort-order">
<attribute name="org.gtk.Method.get_property" value="sort-order"/>
<doc xml:space="preserve">Gets whether this sorter will sort smaller numbers first.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the order of the numbers</doc>
<type name="SortType" c:type="GtkSortType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNumericSorter`</doc>
<type name="NumericSorter" c:type="GtkNumericSorter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expression" c:identifier="gtk_numeric_sorter_set_expression" glib:set-property="expression">
<attribute name="org.gtk.Method.set_property" value="expression"/>
<doc xml:space="preserve">Sets the expression that is evaluated to obtain numbers from items.
Unless an expression is set on @self, the sorter will always
compare items as invalid.
The expression must have a return type that can be compared
numerically, such as %G_TYPE_INT or %G_TYPE_DOUBLE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNumericSorter`</doc>
<type name="NumericSorter" c:type="GtkNumericSorter*"/>
</instance-parameter>
<parameter name="expression" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</method>
<method name="set_sort_order" c:identifier="gtk_numeric_sorter_set_sort_order" glib:set-property="sort-order">
<attribute name="org.gtk.Method.set_property" value="sort-order"/>
<doc xml:space="preserve">Sets whether to sort smaller numbers before larger ones.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNumericSorter`</doc>
<type name="NumericSorter" c:type="GtkNumericSorter*"/>
</instance-parameter>
<parameter name="sort_order" transfer-ownership="none">
<doc xml:space="preserve">whether to sort smaller numbers first</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</method>
<property name="expression" writable="1" transfer-ownership="none" setter="set_expression" getter="get_expression">
<attribute name="org.gtk.Property.get" value="gtk_numeric_sorter_get_expression"/>
<attribute name="org.gtk.Property.set" value="gtk_numeric_sorter_set_expression"/>
<doc xml:space="preserve">The expression to evaluate on items to get a number to compare with.</doc>
<type name="Expression"/>
</property>
<property name="sort-order" writable="1" transfer-ownership="none" setter="set_sort_order" getter="get_sort_order">
<attribute name="org.gtk.Property.get" value="gtk_numeric_sorter_get_sort_order"/>
<attribute name="org.gtk.Property.set" value="gtk_numeric_sorter_set_sort_order"/>
<doc xml:space="preserve">Whether the sorter will sort smaller numbers first.</doc>
<type name="SortType"/>
</property>
</class>
<record name="NumericSorterClass" c:type="GtkNumericSorterClass" glib:is-gtype-struct-for="NumericSorter">
<field name="parent_class">
<type name="SorterClass" c:type="GtkSorterClass"/>
</field>
</record>
<function-macro name="ORIENTABLE" c:identifier="GTK_ORIENTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="ORIENTABLE_GET_IFACE" c:identifier="GTK_ORIENTABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="OVERLAY" c:identifier="GTK_OVERLAY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="ObjectExpression" c:symbol-prefix="object_expression" c:type="GtkObjectExpression" parent="Expression" glib:type-name="GtkObjectExpression" glib:get-type="gtk_object_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">A `GObject` value in a `GtkExpression`.</doc>
<constructor name="new" c:identifier="gtk_object_expression_new">
<doc xml:space="preserve">Creates an expression evaluating to the given `object` with a weak reference.
Once the `object` is disposed, it will fail to evaluate.
This expression is meant to break reference cycles.
If you want to keep a reference to `object`, use [ctor@Gtk.ConstantExpression.new].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="ObjectExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">object to watch</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
</parameters>
</constructor>
<method name="get_object" c:identifier="gtk_object_expression_get_object">
<doc xml:space="preserve">Gets the object that the expression evaluates to.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the object, or `NULL`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="expression" transfer-ownership="none">
<doc xml:space="preserve">an object `GtkExpression`</doc>
<type name="ObjectExpression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
</class>
<enumeration name="Ordering" glib:type-name="GtkOrdering" glib:get-type="gtk_ordering_get_type" c:type="GtkOrdering">
<doc xml:space="preserve">Describes the way two values can be compared.
These values can be used with a [callback@GLib.CompareFunc]. However,
a `GCompareFunc` is allowed to return any integer values.
For converting such a value to a `GtkOrdering` value, use
[func@Gtk.Ordering.from_cmpfunc].</doc>
<member name="smaller" value="-1" c:identifier="GTK_ORDERING_SMALLER" glib:nick="smaller" glib:name="GTK_ORDERING_SMALLER">
<doc xml:space="preserve">the first value is smaller than the second</doc>
</member>
<member name="equal" value="0" c:identifier="GTK_ORDERING_EQUAL" glib:nick="equal" glib:name="GTK_ORDERING_EQUAL">
<doc xml:space="preserve">the two values are equal</doc>
</member>
<member name="larger" value="1" c:identifier="GTK_ORDERING_LARGER" glib:nick="larger" glib:name="GTK_ORDERING_LARGER">
<doc xml:space="preserve">the first value is larger than the second</doc>
</member>
<function name="from_cmpfunc" c:identifier="gtk_ordering_from_cmpfunc" version="4.2">
<doc xml:space="preserve">Converts the result of a `GCompareFunc` like strcmp() to a
`GtkOrdering` value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the corresponding `GtkOrdering`</doc>
<type name="Ordering" c:type="GtkOrdering"/>
</return-value>
<parameters>
<parameter name="cmpfunc_result" transfer-ownership="none">
<doc xml:space="preserve">Result of a comparison function</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
</enumeration>
<interface name="Orientable" c:symbol-prefix="orientable" c:type="GtkOrientable" glib:type-name="GtkOrientable" glib:get-type="gtk_orientable_get_type" glib:type-struct="OrientableIface">
<doc xml:space="preserve">The `GtkOrientable` interface is implemented by all widgets that can be
oriented horizontally or vertically.
`GtkOrientable` is more flexible in that it allows the orientation to be
changed at runtime, allowing the widgets to &#x201C;flip&#x201D;.</doc>
<method name="get_orientation" c:identifier="gtk_orientable_get_orientation" glib:get-property="orientation">
<attribute name="org.gtk.Method.get_property" value="orientation"/>
<doc xml:space="preserve">Retrieves the orientation of the @orientable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the orientation of the @orientable</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</return-value>
<parameters>
<instance-parameter name="orientable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOrientable`</doc>
<type name="Orientable" c:type="GtkOrientable*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_orientation" c:identifier="gtk_orientable_set_orientation" glib:set-property="orientation">
<attribute name="org.gtk.Method.set_property" value="orientation"/>
<doc xml:space="preserve">Sets the orientation of the @orientable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="orientable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOrientable`</doc>
<type name="Orientable" c:type="GtkOrientable*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientable&#x2019;s new orientation</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<property name="orientation" writable="1" transfer-ownership="none" setter="set_orientation" getter="get_orientation">
<attribute name="org.gtk.Property.get" value="gtk_orientable_get_orientation"/>
<attribute name="org.gtk.Property.set" value="gtk_orientable_set_orientation"/>
<doc xml:space="preserve">The orientation of the orientable.</doc>
<type name="Orientation"/>
</property>
</interface>
<record name="OrientableIface" c:type="GtkOrientableIface" glib:is-gtype-struct-for="Orientable">
<field name="base_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
</record>
<enumeration name="Orientation" glib:type-name="GtkOrientation" glib:get-type="gtk_orientation_get_type" c:type="GtkOrientation">
<doc xml:space="preserve">Represents the orientation of widgets and other objects.
Typical examples are [class@Box] or [class@GesturePan].</doc>
<member name="horizontal" value="0" c:identifier="GTK_ORIENTATION_HORIZONTAL" glib:nick="horizontal" glib:name="GTK_ORIENTATION_HORIZONTAL">
<doc xml:space="preserve">The element is in horizontal orientation.</doc>
</member>
<member name="vertical" value="1" c:identifier="GTK_ORIENTATION_VERTICAL" glib:nick="vertical" glib:name="GTK_ORIENTATION_VERTICAL">
<doc xml:space="preserve">The element is in vertical orientation.</doc>
</member>
</enumeration>
<enumeration name="Overflow" glib:type-name="GtkOverflow" glib:get-type="gtk_overflow_get_type" c:type="GtkOverflow">
<doc xml:space="preserve">Defines how content overflowing a given area should be handled.
This is used in [method@Gtk.Widget.set_overflow]. The
[property@Gtk.Widget:overflow] property is modeled after the
CSS overflow property, but implements it only partially.</doc>
<member name="visible" value="0" c:identifier="GTK_OVERFLOW_VISIBLE" glib:nick="visible" glib:name="GTK_OVERFLOW_VISIBLE">
<doc xml:space="preserve">No change is applied. Content is drawn at the specified
position.</doc>
</member>
<member name="hidden" value="1" c:identifier="GTK_OVERFLOW_HIDDEN" glib:nick="hidden" glib:name="GTK_OVERFLOW_HIDDEN">
<doc xml:space="preserve">Content is clipped to the bounds of the area. Content
outside the area is not drawn and cannot be interacted with.</doc>
</member>
</enumeration>
<class name="Overlay" c:symbol-prefix="overlay" c:type="GtkOverlay" parent="Widget" glib:type-name="GtkOverlay" glib:get-type="gtk_overlay_get_type">
<doc xml:space="preserve">`GtkOverlay` is a container which contains a single main child, on top
of which it can place &#x201C;overlay&#x201D; widgets.
![An example GtkOverlay](overlay.png)
The position of each overlay widget is determined by its
[property@Gtk.Widget:halign] and [property@Gtk.Widget:valign]
properties. E.g. a widget with both alignments set to %GTK_ALIGN_START
will be placed at the top left corner of the `GtkOverlay` container,
whereas an overlay with halign set to %GTK_ALIGN_CENTER and valign set
to %GTK_ALIGN_END will be placed a the bottom edge of the `GtkOverlay`,
horizontally centered. The position can be adjusted by setting the margin
properties of the child to non-zero values.
More complicated placement of overlays is possible by connecting
to the [signal@Gtk.Overlay::get-child-position] signal.
An overlay&#x2019;s minimum and natural sizes are those of its main child.
The sizes of overlay children are not considered when measuring these
preferred sizes.
# GtkOverlay as GtkBuildable
The `GtkOverlay` implementation of the `GtkBuildable` interface
supports placing a child as an overlay by specifying &#x201C;overlay&#x201D; as
the &#x201C;type&#x201D; attribute of a `&lt;child&gt;` element.
# CSS nodes
`GtkOverlay` has a single CSS node with the name &#x201C;overlay&#x201D;. Overlay children
whose alignments cause them to be positioned at an edge get the style classes
&#x201C;.left&#x201D;, &#x201C;.right&#x201D;, &#x201C;.top&#x201D;, and/or &#x201C;.bottom&#x201D; according to their position.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_overlay_new">
<doc xml:space="preserve">Creates a new `GtkOverlay`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkOverlay` object.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="add_overlay" c:identifier="gtk_overlay_add_overlay">
<doc xml:space="preserve">Adds @widget to @overlay.
The widget will be stacked on top of the main widget
added with [method@Gtk.Overlay.set_child].
The position at which @widget is placed is determined
from its [property@Gtk.Widget:halign] and
[property@Gtk.Widget:valign] properties.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` to be added to the container</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_overlay_get_child" glib:get-property="child">
<doc xml:space="preserve">Gets the child widget of @overlay.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @overlay</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_clip_overlay" c:identifier="gtk_overlay_get_clip_overlay">
<doc xml:space="preserve">Gets whether @widget should be clipped within the parent.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the widget is clipped within the parent.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">an overlay child of `GtkOverlay`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_measure_overlay" c:identifier="gtk_overlay_get_measure_overlay">
<doc xml:space="preserve">Gets whether @widget's size is included in the measurement of
@overlay.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the widget is measured</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">an overlay child of `GtkOverlay`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove_overlay" c:identifier="gtk_overlay_remove_overlay">
<doc xml:space="preserve">Removes an overlay that was added with gtk_overlay_add_overlay().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` to be removed</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_overlay_set_child" glib:set-property="child">
<doc xml:space="preserve">Sets the child widget of @overlay.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_clip_overlay" c:identifier="gtk_overlay_set_clip_overlay">
<doc xml:space="preserve">Sets whether @widget should be clipped within the parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">an overlay child of `GtkOverlay`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="clip_overlay" transfer-ownership="none">
<doc xml:space="preserve">whether the child should be clipped</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_measure_overlay" c:identifier="gtk_overlay_set_measure_overlay">
<doc xml:space="preserve">Sets whether @widget is included in the measured size of @overlay.
The overlay will request the size of the largest child that has
this property set to %TRUE. Children who are not included may
be drawn outside of @overlay's allocation if they are too large.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="overlay" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlay`</doc>
<type name="Overlay" c:type="GtkOverlay*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">an overlay child of `GtkOverlay`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="measure" transfer-ownership="none">
<doc xml:space="preserve">whether the child should be measured</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<type name="Widget"/>
</property>
<glib:signal name="get-child-position" when="last">
<doc xml:space="preserve">Emitted to determine the position and size of any overlay
child widgets.
A handler for this signal should fill @allocation with
the desired position and size for @widget, relative to
the 'main' child of @overlay.
The default handler for this signal uses the @widget's
halign and valign properties to determine the position
and gives the widget its natural size (except that an
alignment of %GTK_ALIGN_FILL will cause the overlay to
be full-width/height). If the main child is a
`GtkScrolledWindow`, the overlays are placed relative
to its contents.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @allocation has been filled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the child widget to position</doc>
<type name="Widget"/>
</parameter>
<parameter name="allocation" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return
location for the allocation</doc>
<type name="Gdk.Rectangle"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="OverlayLayout" c:symbol-prefix="overlay_layout" c:type="GtkOverlayLayout" parent="LayoutManager" glib:type-name="GtkOverlayLayout" glib:get-type="gtk_overlay_layout_get_type" glib:type-struct="OverlayLayoutClass">
<doc xml:space="preserve">`GtkOverlayLayout` is the layout manager used by `GtkOverlay`.
It places widgets as overlays on top of the main child.
This is not a reusable layout manager, since it expects its widget
to be a `GtkOverlay`. It only listed here so that its layout
properties get documented.</doc>
<constructor name="new" c:identifier="gtk_overlay_layout_new">
<doc xml:space="preserve">Creates a new `GtkOverlayLayout` instance.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created instance</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
</constructor>
</class>
<class name="OverlayLayoutChild" c:symbol-prefix="overlay_layout_child" c:type="GtkOverlayLayoutChild" parent="LayoutChild" glib:type-name="GtkOverlayLayoutChild" glib:get-type="gtk_overlay_layout_child_get_type" glib:type-struct="OverlayLayoutChildClass">
<doc xml:space="preserve">`GtkLayoutChild` subclass for children in a `GtkOverlayLayout`.</doc>
<method name="get_clip_overlay" c:identifier="gtk_overlay_layout_child_get_clip_overlay" glib:get-property="clip-overlay">
<attribute name="org.gtk.Method.get_property" value="clip-overlay"/>
<doc xml:space="preserve">Retrieves whether the child is clipped.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the child is clipped</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlayLayoutChild`</doc>
<type name="OverlayLayoutChild" c:type="GtkOverlayLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_measure" c:identifier="gtk_overlay_layout_child_get_measure" glib:get-property="measure">
<attribute name="org.gtk.Method.get_property" value="measure"/>
<doc xml:space="preserve">Retrieves whether the child is measured.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the child is measured</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlayLayoutChild`</doc>
<type name="OverlayLayoutChild" c:type="GtkOverlayLayoutChild*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_clip_overlay" c:identifier="gtk_overlay_layout_child_set_clip_overlay" glib:set-property="clip-overlay">
<attribute name="org.gtk.Method.set_property" value="clip-overlay"/>
<doc xml:space="preserve">Sets whether to clip this child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlayLayoutChild`</doc>
<type name="OverlayLayoutChild" c:type="GtkOverlayLayoutChild*"/>
</instance-parameter>
<parameter name="clip_overlay" transfer-ownership="none">
<doc xml:space="preserve">whether to clip this child</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_measure" c:identifier="gtk_overlay_layout_child_set_measure" glib:set-property="measure">
<attribute name="org.gtk.Method.set_property" value="measure"/>
<doc xml:space="preserve">Sets whether to measure this child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkOverlayLayoutChild`</doc>
<type name="OverlayLayoutChild" c:type="GtkOverlayLayoutChild*"/>
</instance-parameter>
<parameter name="measure" transfer-ownership="none">
<doc xml:space="preserve">whether to measure this child</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="clip-overlay" writable="1" transfer-ownership="none" setter="set_clip_overlay" getter="get_clip_overlay">
<attribute name="org.gtk.Property.get" value="gtk_overlay_layout_child_get_clip_overlay"/>
<attribute name="org.gtk.Property.set" value="gtk_overlay_layout_child_set_clip_overlay"/>
<doc xml:space="preserve">Whether the child should be clipped to fit the parent's size.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="measure" writable="1" transfer-ownership="none" setter="set_measure" getter="get_measure">
<attribute name="org.gtk.Property.get" value="gtk_overlay_layout_child_get_measure"/>
<attribute name="org.gtk.Property.set" value="gtk_overlay_layout_child_set_measure"/>
<doc xml:space="preserve">Whether the child size should contribute to the `GtkOverlayLayout`'s
measurement.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="OverlayLayoutChildClass" c:type="GtkOverlayLayoutChildClass" glib:is-gtype-struct-for="OverlayLayoutChild">
<field name="parent_class">
<type name="LayoutChildClass" c:type="GtkLayoutChildClass"/>
</field>
</record>
<record name="OverlayLayoutClass" c:type="GtkOverlayLayoutClass" glib:is-gtype-struct-for="OverlayLayout">
<field name="parent_class">
<type name="LayoutManagerClass" c:type="GtkLayoutManagerClass"/>
</field>
</record>
<function-macro name="PAD_CONTROLLER" c:identifier="GTK_PAD_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="PAD_CONTROLLER_CLASS" c:identifier="GTK_PAD_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="PAD_CONTROLLER_GET_CLASS" c:identifier="GTK_PAD_CONTROLLER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="PAGE_SETUP" c:identifier="GTK_PAGE_SETUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PAGE_SETUP_UNIX_DIALOG" c:identifier="GTK_PAGE_SETUP_UNIX_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PANED" c:identifier="GTK_PANED" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="PAPER_NAME_A3" value="iso_a3" c:type="GTK_PAPER_NAME_A3">
<doc xml:space="preserve">Name for the A3 paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_A4" value="iso_a4" c:type="GTK_PAPER_NAME_A4">
<doc xml:space="preserve">Name for the A4 paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_A5" value="iso_a5" c:type="GTK_PAPER_NAME_A5">
<doc xml:space="preserve">Name for the A5 paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_B5" value="iso_b5" c:type="GTK_PAPER_NAME_B5">
<doc xml:space="preserve">Name for the B5 paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_EXECUTIVE" value="na_executive" c:type="GTK_PAPER_NAME_EXECUTIVE">
<doc xml:space="preserve">Name for the Executive paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_LEGAL" value="na_legal" c:type="GTK_PAPER_NAME_LEGAL">
<doc xml:space="preserve">Name for the Legal paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PAPER_NAME_LETTER" value="na_letter" c:type="GTK_PAPER_NAME_LETTER">
<doc xml:space="preserve">Name for the Letter paper size.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<function-macro name="PARAM_SPEC_EXPRESSION" c:identifier="GTK_PARAM_SPEC_EXPRESSION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PASSWORD_ENTRY" c:identifier="GTK_PASSWORD_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="POPOVER" c:identifier="GTK_POPOVER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="POPOVER_CLASS" c:identifier="GTK_POPOVER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="POPOVER_GET_CLASS" c:identifier="GTK_POPOVER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="POPOVER_MENU" c:identifier="GTK_POPOVER_MENU" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="POPOVER_MENU_BAR" c:identifier="GTK_POPOVER_MENU_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINTER" c:identifier="GTK_PRINTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_CONTEXT" c:identifier="GTK_PRINT_CONTEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_JOB" c:identifier="GTK_PRINT_JOB" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_OPERATION" c:identifier="GTK_PRINT_OPERATION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_OPERATION_CLASS" c:identifier="GTK_PRINT_OPERATION_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_OPERATION_GET_CLASS" c:identifier="GTK_PRINT_OPERATION_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_OPERATION_PREVIEW" c:identifier="GTK_PRINT_OPERATION_PREVIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_OPERATION_PREVIEW_GET_IFACE" c:identifier="GTK_PRINT_OPERATION_PREVIEW_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="PRINT_SETTINGS" c:identifier="GTK_PRINT_SETTINGS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="PRINT_SETTINGS_COLLATE" value="collate" c:type="GTK_PRINT_SETTINGS_COLLATE">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_DEFAULT_SOURCE" value="default-source" c:type="GTK_PRINT_SETTINGS_DEFAULT_SOURCE">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_DITHER" value="dither" c:type="GTK_PRINT_SETTINGS_DITHER">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_DUPLEX" value="duplex" c:type="GTK_PRINT_SETTINGS_DUPLEX">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_FINISHINGS" value="finishings" c:type="GTK_PRINT_SETTINGS_FINISHINGS">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_MEDIA_TYPE" value="media-type" c:type="GTK_PRINT_SETTINGS_MEDIA_TYPE">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_NUMBER_UP" value="number-up" c:type="GTK_PRINT_SETTINGS_NUMBER_UP">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_NUMBER_UP_LAYOUT" value="number-up-layout" c:type="GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_N_COPIES" value="n-copies" c:type="GTK_PRINT_SETTINGS_N_COPIES">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_ORIENTATION" value="orientation" c:type="GTK_PRINT_SETTINGS_ORIENTATION">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_OUTPUT_BASENAME" value="output-basename" c:type="GTK_PRINT_SETTINGS_OUTPUT_BASENAME">
<doc xml:space="preserve">The key used by the &#x201C;Print to file&#x201D; printer to store the file
name of the output without the path to the directory and the
file extension.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_OUTPUT_BIN" value="output-bin" c:type="GTK_PRINT_SETTINGS_OUTPUT_BIN">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_OUTPUT_DIR" value="output-dir" c:type="GTK_PRINT_SETTINGS_OUTPUT_DIR">
<doc xml:space="preserve">The key used by the &#x201C;Print to file&#x201D; printer to store the
directory to which the output should be written.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_OUTPUT_FILE_FORMAT" value="output-file-format" c:type="GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT">
<doc xml:space="preserve">The key used by the &#x201C;Print to file&#x201D; printer to store the format
of the output. The supported values are &#x201C;PS&#x201D; and &#x201C;PDF&#x201D;.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_OUTPUT_URI" value="output-uri" c:type="GTK_PRINT_SETTINGS_OUTPUT_URI">
<doc xml:space="preserve">The key used by the &#x201C;Print to file&#x201D; printer to store the URI
to which the output should be written. GTK itself supports
only &#x201C;file://&#x201D; URIs.</doc>
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PAGE_RANGES" value="page-ranges" c:type="GTK_PRINT_SETTINGS_PAGE_RANGES">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PAGE_SET" value="page-set" c:type="GTK_PRINT_SETTINGS_PAGE_SET">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PAPER_FORMAT" value="paper-format" c:type="GTK_PRINT_SETTINGS_PAPER_FORMAT">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PAPER_HEIGHT" value="paper-height" c:type="GTK_PRINT_SETTINGS_PAPER_HEIGHT">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PAPER_WIDTH" value="paper-width" c:type="GTK_PRINT_SETTINGS_PAPER_WIDTH">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PRINTER" value="printer" c:type="GTK_PRINT_SETTINGS_PRINTER">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PRINTER_LPI" value="printer-lpi" c:type="GTK_PRINT_SETTINGS_PRINTER_LPI">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_PRINT_PAGES" value="print-pages" c:type="GTK_PRINT_SETTINGS_PRINT_PAGES">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_QUALITY" value="quality" c:type="GTK_PRINT_SETTINGS_QUALITY">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_RESOLUTION" value="resolution" c:type="GTK_PRINT_SETTINGS_RESOLUTION">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_RESOLUTION_X" value="resolution-x" c:type="GTK_PRINT_SETTINGS_RESOLUTION_X">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_RESOLUTION_Y" value="resolution-y" c:type="GTK_PRINT_SETTINGS_RESOLUTION_Y">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_REVERSE" value="reverse" c:type="GTK_PRINT_SETTINGS_REVERSE">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_SCALE" value="scale" c:type="GTK_PRINT_SETTINGS_SCALE">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_USE_COLOR" value="use-color" c:type="GTK_PRINT_SETTINGS_USE_COLOR">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_WIN32_DRIVER_EXTRA" value="win32-driver-extra" c:type="GTK_PRINT_SETTINGS_WIN32_DRIVER_EXTRA">
<type name="utf8" c:type="gchar*"/>
</constant>
<constant name="PRINT_SETTINGS_WIN32_DRIVER_VERSION" value="win32-driver-version" c:type="GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION">
<type name="utf8" c:type="gchar*"/>
</constant>
<function-macro name="PRINT_UNIX_DIALOG" c:identifier="GTK_PRINT_UNIX_DIALOG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
<doc xml:space="preserve">Use this priority for functionality related to size allocation.
It is used internally by GTK+ to compute the sizes of widgets.
This priority is higher than %GDK_PRIORITY_REDRAW to avoid
resizing a widget which was just redrawn.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="PROGRESS_BAR" c:identifier="GTK_PROGRESS_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<enumeration name="PackType" glib:type-name="GtkPackType" glib:get-type="gtk_pack_type_get_type" c:type="GtkPackType">
<doc xml:space="preserve">Represents the packing location of a children in its parent.
See [class@WindowControls] for example.</doc>
<member name="start" value="0" c:identifier="GTK_PACK_START" glib:nick="start" glib:name="GTK_PACK_START">
<doc xml:space="preserve">The child is packed into the start of the widget</doc>
</member>
<member name="end" value="1" c:identifier="GTK_PACK_END" glib:nick="end" glib:name="GTK_PACK_END">
<doc xml:space="preserve">The child is packed into the end of the widget</doc>
</member>
</enumeration>
<record name="PadActionEntry" c:type="GtkPadActionEntry">
<doc xml:space="preserve">Struct defining a pad action entry.</doc>
<field name="type" writable="1">
<doc xml:space="preserve">the type of pad feature that will trigger this action entry.</doc>
<type name="PadActionType" c:type="GtkPadActionType"/>
</field>
<field name="index" writable="1">
<doc xml:space="preserve">the 0-indexed button/ring/strip number that will trigger this action
entry.</doc>
<type name="gint" c:type="int"/>
</field>
<field name="mode" writable="1">
<doc xml:space="preserve">the mode that will trigger this action entry, or -1 for all modes.</doc>
<type name="gint" c:type="int"/>
</field>
<field name="label" writable="1">
<doc xml:space="preserve">Human readable description of this action entry, this string should
be deemed user-visible.</doc>
<type name="utf8" c:type="const char*"/>
</field>
<field name="action_name" writable="1">
<doc xml:space="preserve">action name that will be activated in the `GActionGroup`.</doc>
<type name="utf8" c:type="const char*"/>
</field>
</record>
<enumeration name="PadActionType" glib:type-name="GtkPadActionType" glib:get-type="gtk_pad_action_type_get_type" c:type="GtkPadActionType">
<doc xml:space="preserve">The type of a pad action.</doc>
<member name="button" value="0" c:identifier="GTK_PAD_ACTION_BUTTON" glib:nick="button" glib:name="GTK_PAD_ACTION_BUTTON">
<doc xml:space="preserve">Action is triggered by a pad button</doc>
</member>
<member name="ring" value="1" c:identifier="GTK_PAD_ACTION_RING" glib:nick="ring" glib:name="GTK_PAD_ACTION_RING">
<doc xml:space="preserve">Action is triggered by a pad ring</doc>
</member>
<member name="strip" value="2" c:identifier="GTK_PAD_ACTION_STRIP" glib:nick="strip" glib:name="GTK_PAD_ACTION_STRIP">
<doc xml:space="preserve">Action is triggered by a pad strip</doc>
</member>
</enumeration>
<class name="PadController" c:symbol-prefix="pad_controller" c:type="GtkPadController" parent="EventController" glib:type-name="GtkPadController" glib:get-type="gtk_pad_controller_get_type" glib:type-struct="PadControllerClass">
<doc xml:space="preserve">`GtkPadController` is an event controller for the pads found in drawing
tablets.
Pads are the collection of buttons and tactile sensors often found around
the stylus-sensitive area.
These buttons and sensors have no implicit meaning, and by default they
perform no action. `GtkPadController` is provided to map those to
[iface@Gio.Action] objects, thus letting the application give them a more
semantic meaning.
Buttons and sensors are not constrained to triggering a single action,
some %GDK_SOURCE_TABLET_PAD devices feature multiple "modes". All these
input elements have one current mode, which may determine the final action
being triggered.
Pad devices often divide buttons and sensors into groups. All elements
in a group share the same current mode, but different groups may have
different modes. See [method@Gdk.DevicePad.get_n_groups] and
[method@Gdk.DevicePad.get_group_n_modes].
Each of the actions that a given button/strip/ring performs for a given mode
is defined by a [struct@Gtk.PadActionEntry]. It contains an action name that
will be looked up in the given [iface@Gio.ActionGroup] and activated whenever
the specified input element and mode are triggered.
A simple example of `GtkPadController` usage: Assigning button 1 in all
modes and pad devices to an "invert-selection" action:
```c
GtkPadActionEntry *pad_actions[] = {
{ GTK_PAD_ACTION_BUTTON, 1, -1, "Invert selection", "pad-actions.invert-selection" },
&#x2026;
};
&#x2026;
action_group = g_simple_action_group_new ();
action = g_simple_action_new ("pad-actions.invert-selection", NULL);
g_signal_connect (action, "activate", on_invert_selection_activated, NULL);
g_action_map_add_action (G_ACTION_MAP (action_group), action);
&#x2026;
pad_controller = gtk_pad_controller_new (action_group, NULL);
```
The actions belonging to rings/strips will be activated with a parameter
of type %G_VARIANT_TYPE_DOUBLE bearing the value of the given axis, it
is required that those are made stateful and accepting this `GVariantType`.</doc>
<constructor name="new" c:identifier="gtk_pad_controller_new">
<doc xml:space="preserve">Creates a new `GtkPadController` that will associate events from @pad to
actions.
A %NULL pad may be provided so the controller manages all pad devices
generically, it is discouraged to mix `GtkPadController` objects with
%NULL and non-%NULL @pad argument on the same toplevel window, as execution
order is not guaranteed.
The `GtkPadController` is created with no mapped actions. In order to
map pad events to actions, use [method@Gtk.PadController.set_action_entries]
or [method@Gtk.PadController.set_action].
Be aware that pad events will only be delivered to `GtkWindow`s, so adding
a pad controller to any other type of widget will not have an effect.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkPadController`</doc>
<type name="PadController" c:type="GtkPadController*"/>
</return-value>
<parameters>
<parameter name="group" transfer-ownership="none">
<doc xml:space="preserve">`GActionGroup` to trigger actions from</doc>
<type name="Gio.ActionGroup" c:type="GActionGroup*"/>
</parameter>
<parameter name="pad" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A %GDK_SOURCE_TABLET_PAD device, or %NULL to handle all pads</doc>
<type name="Gdk.Device" c:type="GdkDevice*"/>
</parameter>
</parameters>
</constructor>
<method name="set_action" c:identifier="gtk_pad_controller_set_action">
<doc xml:space="preserve">Adds an individual action to @controller.
This action will only be activated if the given button/ring/strip number
in @index is interacted while the current mode is @mode. -1 may be used
for simple cases, so the action is triggered on all modes.
The given @label should be considered user-visible, so internationalization
rules apply. Some windowing systems may be able to use those for user
feedback.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPadController`</doc>
<type name="PadController" c:type="GtkPadController*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the type of pad feature that will trigger this action</doc>
<type name="PadActionType" c:type="GtkPadActionType"/>
</parameter>
<parameter name="index" transfer-ownership="none">
<doc xml:space="preserve">the 0-indexed button/ring/strip number that will trigger this action</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">the mode that will trigger this action, or -1 for all modes.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">Human readable description of this action, this string should
be deemed user-visible.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">action name that will be activated in the `GActionGroup`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_action_entries" c:identifier="gtk_pad_controller_set_action_entries">
<doc xml:space="preserve">A convenience function to add a group of action entries on
@controller.
See [struct@Gtk.PadActionEntry] and [method@Gtk.PadController.set_action].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPadController`</doc>
<type name="PadController" c:type="GtkPadController*"/>
</instance-parameter>
<parameter name="entries" transfer-ownership="none">
<doc xml:space="preserve">the action entries to set on @controller</doc>
<array length="1" zero-terminated="0" c:type="const GtkPadActionEntry*">
<type name="PadActionEntry" c:type="GtkPadActionEntry"/>
</array>
</parameter>
<parameter name="n_entries" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @entries</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="action-group" writable="1" construct-only="1" transfer-ownership="none">
<type name="Gio.ActionGroup"/>
</property>
<property name="pad" writable="1" construct-only="1" transfer-ownership="none">
<type name="Gdk.Device"/>
</property>
</class>
<record name="PadControllerClass" c:type="GtkPadControllerClass" disguised="1" glib:is-gtype-struct-for="PadController"/>
<enumeration name="PageOrientation" glib:type-name="GtkPageOrientation" glib:get-type="gtk_page_orientation_get_type" c:type="GtkPageOrientation">
<doc xml:space="preserve">See also gtk_print_settings_set_orientation().</doc>
<member name="portrait" value="0" c:identifier="GTK_PAGE_ORIENTATION_PORTRAIT" glib:nick="portrait" glib:name="GTK_PAGE_ORIENTATION_PORTRAIT">
<doc xml:space="preserve">Portrait mode.</doc>
</member>
<member name="landscape" value="1" c:identifier="GTK_PAGE_ORIENTATION_LANDSCAPE" glib:nick="landscape" glib:name="GTK_PAGE_ORIENTATION_LANDSCAPE">
<doc xml:space="preserve">Landscape mode.</doc>
</member>
<member name="reverse_portrait" value="2" c:identifier="GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT" glib:nick="reverse-portrait" glib:name="GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT">
<doc xml:space="preserve">Reverse portrait mode.</doc>
</member>
<member name="reverse_landscape" value="3" c:identifier="GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE" glib:nick="reverse-landscape" glib:name="GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE">
<doc xml:space="preserve">Reverse landscape mode.</doc>
</member>
</enumeration>
<record name="PageRange" c:type="GtkPageRange">
<doc xml:space="preserve">A range of pages to print.
See also [method@Gtk.PrintSettings.set_page_ranges].</doc>
<field name="start" writable="1">
<doc xml:space="preserve">start of page range.</doc>
<type name="gint" c:type="int"/>
</field>
<field name="end" writable="1">
<doc xml:space="preserve">end of page range.</doc>
<type name="gint" c:type="int"/>
</field>
</record>
<enumeration name="PageSet" glib:type-name="GtkPageSet" glib:get-type="gtk_page_set_get_type" c:type="GtkPageSet">
<doc xml:space="preserve">See also gtk_print_job_set_page_set().</doc>
<member name="all" value="0" c:identifier="GTK_PAGE_SET_ALL" glib:nick="all" glib:name="GTK_PAGE_SET_ALL">
<doc xml:space="preserve">All pages.</doc>
</member>
<member name="even" value="1" c:identifier="GTK_PAGE_SET_EVEN" glib:nick="even" glib:name="GTK_PAGE_SET_EVEN">
<doc xml:space="preserve">Even pages.</doc>
</member>
<member name="odd" value="2" c:identifier="GTK_PAGE_SET_ODD" glib:nick="odd" glib:name="GTK_PAGE_SET_ODD">
<doc xml:space="preserve">Odd pages.</doc>
</member>
</enumeration>
<class name="PageSetup" c:symbol-prefix="page_setup" c:type="GtkPageSetup" parent="GObject.Object" glib:type-name="GtkPageSetup" glib:get-type="gtk_page_setup_get_type">
<doc xml:space="preserve">A `GtkPageSetup` object stores the page size, orientation and margins.
The idea is that you can get one of these from the page setup dialog
and then pass it to the `GtkPrintOperation` when printing.
The benefit of splitting this out of the `GtkPrintSettings` is that
these affect the actual layout of the page, and thus need to be set
long before user prints.
## Margins
The margins specified in this object are the &#x201C;print margins&#x201D;, i.e. the
parts of the page that the printer cannot print on. These are different
from the layout margins that a word processor uses; they are typically
used to determine the minimal size for the layout margins.
To obtain a `GtkPageSetup` use [ctor@Gtk.PageSetup.new] to get the defaults,
or use [func@Gtk.print_run_page_setup_dialog] to show the page setup dialog
and receive the resulting page setup.
## A page setup dialog
```c
static GtkPrintSettings *settings = NULL;
static GtkPageSetup *page_setup = NULL;
static void
do_page_setup (void)
{
GtkPageSetup *new_page_setup;
if (settings == NULL)
settings = gtk_print_settings_new ();
new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
page_setup, settings);
if (page_setup)
g_object_unref (page_setup);
page_setup = new_page_setup;
}
```</doc>
<constructor name="new" c:identifier="gtk_page_setup_new">
<doc xml:space="preserve">Creates a new `GtkPageSetup`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPageSetup`.</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
</constructor>
<constructor name="new_from_file" c:identifier="gtk_page_setup_new_from_file" throws="1">
<doc xml:space="preserve">Reads the page setup from the file @file_name.
Returns a new `GtkPageSetup` object with the restored
page setup, or %NULL if an error occurred.
See [method@Gtk.PageSetup.to_file].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the restored `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the filename to read the page setup from</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_gvariant" c:identifier="gtk_page_setup_new_from_gvariant">
<doc xml:space="preserve">Desrialize a page setup from an a{sv} variant.
The variant must be in the format produced by
[method@Gtk.PageSetup.to_gvariant].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPageSetup` object</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<parameter name="variant" transfer-ownership="none">
<doc xml:space="preserve">an a{sv} `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_key_file" c:identifier="gtk_page_setup_new_from_key_file" throws="1">
<doc xml:space="preserve">Reads the page setup from the group @group_name in the key file
@key_file.
Returns a new `GtkPageSetup` object with the restored
page setup, or %NULL if an error occurred.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the restored `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to retrieve the page_setup from</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the group in the key_file to read
to use the default name &#x201C;Page Setup&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="copy" c:identifier="gtk_page_setup_copy">
<doc xml:space="preserve">Copies a `GtkPageSetup`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of @other</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPageSetup` to copy</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_bottom_margin" c:identifier="gtk_page_setup_get_bottom_margin">
<doc xml:space="preserve">Gets the bottom margin in units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the bottom margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_left_margin" c:identifier="gtk_page_setup_get_left_margin">
<doc xml:space="preserve">Gets the left margin in units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the left margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_orientation" c:identifier="gtk_page_setup_get_orientation">
<doc xml:space="preserve">Gets the page orientation of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page orientation</doc>
<type name="PageOrientation" c:type="GtkPageOrientation"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_height" c:identifier="gtk_page_setup_get_page_height">
<doc xml:space="preserve">Returns the page height in units of @unit.
Note that this function takes orientation
and margins into consideration.
See [method@Gtk.PageSetup.get_paper_height].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page height.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_page_width" c:identifier="gtk_page_setup_get_page_width">
<doc xml:space="preserve">Returns the page width in units of @unit.
Note that this function takes orientation
and margins into consideration.
See [method@Gtk.PageSetup.get_paper_width].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page width.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_paper_height" c:identifier="gtk_page_setup_get_paper_height">
<doc xml:space="preserve">Returns the paper height in units of @unit.
Note that this function takes orientation,
but not margins into consideration.
See [method@Gtk.PageSetup.get_page_height].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper height.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_paper_size" c:identifier="gtk_page_setup_get_paper_size">
<doc xml:space="preserve">Gets the paper size of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper size</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paper_width" c:identifier="gtk_page_setup_get_paper_width">
<doc xml:space="preserve">Returns the paper width in units of @unit.
Note that this function takes orientation,
but not margins into consideration.
See [method@Gtk.PageSetup.get_page_width].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper width.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_right_margin" c:identifier="gtk_page_setup_get_right_margin">
<doc xml:space="preserve">Gets the right margin in units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the right margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_top_margin" c:identifier="gtk_page_setup_get_top_margin">
<doc xml:space="preserve">Gets the top margin in units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the top margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="load_file" c:identifier="gtk_page_setup_load_file" throws="1">
<doc xml:space="preserve">Reads the page setup from the file @file_name.
See [method@Gtk.PageSetup.to_file].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the filename to read the page setup from</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="load_key_file" c:identifier="gtk_page_setup_load_key_file" throws="1">
<doc xml:space="preserve">Reads the page setup from the group @group_name in the key file
@key_file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to retrieve the page_setup from</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the group in the key_file to read
to use the default name &#x201C;Page Setup&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_bottom_margin" c:identifier="gtk_page_setup_set_bottom_margin">
<doc xml:space="preserve">Sets the bottom margin of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the new bottom margin in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units for @margin</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_left_margin" c:identifier="gtk_page_setup_set_left_margin">
<doc xml:space="preserve">Sets the left margin of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the new left margin in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units for @margin</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_orientation" c:identifier="gtk_page_setup_set_orientation">
<doc xml:space="preserve">Sets the page orientation of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageOrientation` value</doc>
<type name="PageOrientation" c:type="GtkPageOrientation"/>
</parameter>
</parameters>
</method>
<method name="set_paper_size" c:identifier="gtk_page_setup_set_paper_size">
<doc xml:space="preserve">Sets the paper size of the `GtkPageSetup` without
changing the margins.
See [method@Gtk.PageSetup.set_paper_size_and_default_margins].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</parameter>
</parameters>
</method>
<method name="set_paper_size_and_default_margins" c:identifier="gtk_page_setup_set_paper_size_and_default_margins">
<doc xml:space="preserve">Sets the paper size of the `GtkPageSetup` and modifies
the margins according to the new paper size.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</parameter>
</parameters>
</method>
<method name="set_right_margin" c:identifier="gtk_page_setup_set_right_margin">
<doc xml:space="preserve">Sets the right margin of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the new right margin in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units for @margin</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_top_margin" c:identifier="gtk_page_setup_set_top_margin">
<doc xml:space="preserve">Sets the top margin of the `GtkPageSetup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the new top margin in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units for @margin</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="to_file" c:identifier="gtk_page_setup_to_file" throws="1">
<doc xml:space="preserve">This function saves the information from @setup to @file_name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the file to save to</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="to_gvariant" c:identifier="gtk_page_setup_to_gvariant">
<doc xml:space="preserve">Serialize page setup to an a{sv} variant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new, floating, `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_key_file" c:identifier="gtk_page_setup_to_key_file">
<doc xml:space="preserve">This function adds the page setup from @setup to @key_file.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</instance-parameter>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to save the page setup to</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the group to add the settings to in @key_file,
or %NULL to use the default name &#x201C;Page Setup&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
</class>
<callback name="PageSetupDoneFunc" c:type="GtkPageSetupDoneFunc">
<doc xml:space="preserve">The type of function that is passed to
gtk_print_run_page_setup_dialog_async().
This function will be called when the page setup dialog
is dismissed, and also serves as destroy notify for @data.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="page_setup" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPageSetup` that has been passed to
gtk_print_run_page_setup_dialog_async()</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data that has been passed to
gtk_print_run_page_setup_dialog_async()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="PageSetupUnixDialog" c:symbol-prefix="page_setup_unix_dialog" c:type="GtkPageSetupUnixDialog" parent="Dialog" glib:type-name="GtkPageSetupUnixDialog" glib:get-type="gtk_page_setup_unix_dialog_get_type">
<doc xml:space="preserve">`GtkPageSetupUnixDialog` implements a page setup dialog for platforms
which don&#x2019;t provide a native page setup dialog, like Unix.
![An example GtkPageSetupUnixDialog](pagesetupdialog.png)
It can be used very much like any other GTK dialog, at the
cost of the portability offered by the high-level printing
API in [class@Gtk.PrintOperation].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_page_setup_unix_dialog_new">
<doc xml:space="preserve">Creates a new page setup dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkPageSetupUnixDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</constructor>
<method name="get_page_setup" c:identifier="gtk_page_setup_unix_dialog_get_page_setup">
<doc xml:space="preserve">Gets the currently selected page setup from the dialog.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current page setup</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetupUnixDialog`</doc>
<type name="PageSetupUnixDialog" c:type="GtkPageSetupUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_print_settings" c:identifier="gtk_page_setup_unix_dialog_get_print_settings">
<doc xml:space="preserve">Gets the current print settings from the dialog.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current print settings</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetupUnixDialog`</doc>
<type name="PageSetupUnixDialog" c:type="GtkPageSetupUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_page_setup" c:identifier="gtk_page_setup_unix_dialog_set_page_setup">
<doc xml:space="preserve">Sets the `GtkPageSetup` from which the page setup
dialog takes its values.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetupUnixDialog`</doc>
<type name="PageSetupUnixDialog" c:type="GtkPageSetupUnixDialog*"/>
</instance-parameter>
<parameter name="page_setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</method>
<method name="set_print_settings" c:identifier="gtk_page_setup_unix_dialog_set_print_settings">
<doc xml:space="preserve">Sets the `GtkPrintSettings` from which the page setup dialog
takes its values.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetupUnixDialog`</doc>
<type name="PageSetupUnixDialog" c:type="GtkPageSetupUnixDialog*"/>
</instance-parameter>
<parameter name="print_settings" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</method>
</class>
<enumeration name="PanDirection" glib:type-name="GtkPanDirection" glib:get-type="gtk_pan_direction_get_type" c:type="GtkPanDirection">
<doc xml:space="preserve">Describes the panning direction of a [class@GesturePan].</doc>
<member name="left" value="0" c:identifier="GTK_PAN_DIRECTION_LEFT" glib:nick="left" glib:name="GTK_PAN_DIRECTION_LEFT">
<doc xml:space="preserve">panned towards the left</doc>
</member>
<member name="right" value="1" c:identifier="GTK_PAN_DIRECTION_RIGHT" glib:nick="right" glib:name="GTK_PAN_DIRECTION_RIGHT">
<doc xml:space="preserve">panned towards the right</doc>
</member>
<member name="up" value="2" c:identifier="GTK_PAN_DIRECTION_UP" glib:nick="up" glib:name="GTK_PAN_DIRECTION_UP">
<doc xml:space="preserve">panned upwards</doc>
</member>
<member name="down" value="3" c:identifier="GTK_PAN_DIRECTION_DOWN" glib:nick="down" glib:name="GTK_PAN_DIRECTION_DOWN">
<doc xml:space="preserve">panned downwards</doc>
</member>
</enumeration>
<class name="Paned" c:symbol-prefix="paned" c:type="GtkPaned" parent="Widget" glib:type-name="GtkPaned" glib:get-type="gtk_paned_get_type">
<doc xml:space="preserve">`GtkPaned` has two panes, arranged either horizontally or vertically.
![An example GtkPaned](panes.png)
The division between the two panes is adjustable by the user
by dragging a handle.
Child widgets are added to the panes of the widget with
[method@Gtk.Paned.set_start_child] and [method@Gtk.Paned.set_end_child].
The division between the two children is set by default from the size
requests of the children, but it can be adjusted by the user.
A paned widget draws a separator between the two child widgets and a
small handle that the user can drag to adjust the division. It does not
draw any relief around the children or around the separator. (The space
in which the separator is called the gutter.) Often, it is useful to put
each child inside a [class@Gtk.Frame] so that the gutter appears as a
ridge. No separator is drawn if one of the children is missing.
Each child has two options that can be set, @resize and @shrink. If
@resize is true, then when the `GtkPaned` is resized, that child will
expand or shrink along with the paned widget. If @shrink is true, then
that child can be made smaller than its requisition by the user.
Setting @shrink to %FALSE allows the application to set a minimum size.
If @resize is false for both children, then this is treated as if
@resize is true for both children.
The application can set the position of the slider as if it were set
by the user, by calling [method@Gtk.Paned.set_position].
# CSS nodes
```
paned
&#x251C;&#x2500;&#x2500; &lt;child&gt;
&#x251C;&#x2500;&#x2500; separator[.wide]
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
`GtkPaned` has a main CSS node with name paned, and a subnode for
the separator with name separator. The subnode gets a .wide style
class when the paned is supposed to be wide.
In horizontal orientation, the nodes are arranged based on the text
direction, so in left-to-right mode, :first-child will select the
leftmost child, while it will select the rightmost child in
RTL layouts.
## Creating a paned widget with minimum sizes.
```c
GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
GtkWidget *frame1 = gtk_frame_new (NULL);
GtkWidget *frame2 = gtk_frame_new (NULL);
gtk_widget_set_size_request (hpaned, 200, -1);
gtk_paned_set_start_child (GTK_PANED (hpaned), frame1);
gtk_paned_set_start_child_resize (GTK_PANED (hpaned), TRUE);
gtk_paned_set_start_child_shrink (GTK_PANED (hpaned), FALSE);
gtk_widget_set_size_request (frame1, 50, -1);
gtk_paned_set_end_child (GTK_PANED (hpaned), frame2);
gtk_paned_set_end_child_resize (GTK_PANED (hpaned), FALSE);
gtk_paned_set_end_child_shrink (GTK_PANED (hpaned), FALSE);
gtk_widget_set_size_request (frame2, 50, -1);
```</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_paned_new">
<doc xml:space="preserve">Creates a new `GtkPaned` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPaned`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the paned&#x2019;s orientation.</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</constructor>
<method name="get_end_child" c:identifier="gtk_paned_get_end_child" glib:get-property="end-child">
<attribute name="org.gtk.Method.get_property" value="end-child"/>
<doc xml:space="preserve">Retrieves the end child of the given `GtkPaned`.
See also: `GtkPaned`:end-child</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the end child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_paned_get_position" glib:get-property="position">
<attribute name="org.gtk.Method.get_property" value="position"/>
<doc xml:space="preserve">Obtains the position of the divider between the two panes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">position of the divider</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned` widget</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resize_end_child" c:identifier="gtk_paned_get_resize_end_child" glib:get-property="resize-end-child">
<attribute name="org.gtk.Method.get_property" value="resize-end-child"/>
<doc xml:space="preserve">Returns whether the end child can be resized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the end child is resizable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resize_start_child" c:identifier="gtk_paned_get_resize_start_child" glib:get-property="resize-start-child">
<attribute name="org.gtk.Method.get_property" value="resize-start-child"/>
<doc xml:space="preserve">Returns whether the start child can be resized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the start child is resizable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_shrink_end_child" c:identifier="gtk_paned_get_shrink_end_child" glib:get-property="shrink-end-child">
<attribute name="org.gtk.Method.get_property" value="shrink-end-child"/>
<doc xml:space="preserve">Returns whether the end child can be shrunk.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the end child is shrinkable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_shrink_start_child" c:identifier="gtk_paned_get_shrink_start_child" glib:get-property="shrink-start-child">
<attribute name="org.gtk.Method.get_property" value="shrink-start-child"/>
<doc xml:space="preserve">Returns whether the start child can be shrunk.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the start child is shrinkable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_start_child" c:identifier="gtk_paned_get_start_child" glib:get-property="start-child">
<attribute name="org.gtk.Method.get_property" value="start-child"/>
<doc xml:space="preserve">Retrieves the start child of the given `GtkPaned`.
See also: `GtkPaned`:start-child</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the start child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_wide_handle" c:identifier="gtk_paned_get_wide_handle" glib:get-property="wide-handle">
<attribute name="org.gtk.Method.get_property" value="wide-handle"/>
<doc xml:space="preserve">Gets whether the separator should be wide.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the paned should have a wide handle</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_end_child" c:identifier="gtk_paned_set_end_child" glib:set-property="end-child">
<attribute name="org.gtk.Method.set_property" value="end-child"/>
<doc xml:space="preserve">Sets the end child of @paned to @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_position" c:identifier="gtk_paned_set_position" glib:set-property="position">
<attribute name="org.gtk.Method.set_property" value="position"/>
<doc xml:space="preserve">Sets the position of the divider between the two panes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned` widget</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">pixel position of divider, a negative value means that the position
is unset</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_resize_end_child" c:identifier="gtk_paned_set_resize_end_child" glib:set-property="resize-end-child">
<attribute name="org.gtk.Method.set_property" value="resize-end-child"/>
<doc xml:space="preserve">Sets the `GtkPaned`:resize-end-child property</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="resize" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to let the end child be resized</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_resize_start_child" c:identifier="gtk_paned_set_resize_start_child" glib:set-property="resize-start-child">
<attribute name="org.gtk.Method.set_property" value="resize-start-child"/>
<doc xml:space="preserve">Sets the `GtkPaned`:resize-start-child property</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="resize" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to let the start child be resized</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_shrink_end_child" c:identifier="gtk_paned_set_shrink_end_child" glib:set-property="shrink-end-child">
<attribute name="org.gtk.Method.set_property" value="shrink-end-child"/>
<doc xml:space="preserve">Sets the `GtkPaned`:shrink-end-child property</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="resize" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to let the end child be shrunk</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_shrink_start_child" c:identifier="gtk_paned_set_shrink_start_child" glib:set-property="shrink-start-child">
<attribute name="org.gtk.Method.set_property" value="shrink-start-child"/>
<doc xml:space="preserve">Sets the `GtkPaned`:shrink-start-child property</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="resize" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to let the start child be shrunk</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_start_child" c:identifier="gtk_paned_set_start_child" glib:set-property="start-child">
<attribute name="org.gtk.Method.set_property" value="start-child"/>
<doc xml:space="preserve">Sets the start child of @paned to @child.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_wide_handle" c:identifier="gtk_paned_set_wide_handle" glib:set-property="wide-handle">
<attribute name="org.gtk.Method.set_propery" value="wide-handle"/>
<doc xml:space="preserve">Sets whether the separator should be wide.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paned" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaned`</doc>
<type name="Paned" c:type="GtkPaned*"/>
</instance-parameter>
<parameter name="wide" transfer-ownership="none">
<doc xml:space="preserve">the new value for the [property@Gtk.Paned:wide-handle] property</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="end-child" writable="1" transfer-ownership="none" setter="set_end_child" getter="get_end_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_end_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_end_child"/>
<doc xml:space="preserve">The second child.</doc>
<type name="Widget"/>
</property>
<property name="max-position" transfer-ownership="none">
<doc xml:space="preserve">The largest possible value for the position property.
This property is derived from the size and shrinkability
of the widget's children.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="min-position" transfer-ownership="none">
<doc xml:space="preserve">The smallest possible value for the position property.
This property is derived from the size and shrinkability
of the widget's children.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="position" writable="1" transfer-ownership="none" setter="set_position" getter="get_position">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_position"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_position"/>
<doc xml:space="preserve">Position of the separator in pixels, from the left/top.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="position-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the `position` property has been set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="resize-end-child" writable="1" transfer-ownership="none" setter="set_resize_end_child" getter="get_resize_end_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_resize_end_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_resize_end_child"/>
<doc xml:space="preserve">Determines whether the second child expands and shrinks
along with the paned widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="resize-start-child" writable="1" transfer-ownership="none" setter="set_resize_start_child" getter="get_resize_start_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_resize_start_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_resize_start_child"/>
<doc xml:space="preserve">Determines whether the first child expands and shrinks
along with the paned widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="shrink-end-child" writable="1" transfer-ownership="none" setter="set_shrink_end_child" getter="get_shrink_end_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_shrink_end_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_shrink_end_child"/>
<doc xml:space="preserve">Determines whether the second child can be made smaller
than its requisition.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="shrink-start-child" writable="1" transfer-ownership="none" setter="set_shrink_start_child" getter="get_shrink_start_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_shrink_start_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_shrink_start_child"/>
<doc xml:space="preserve">Determines whether the first child can be made smaller
than its requisition.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="start-child" writable="1" transfer-ownership="none" setter="set_start_child" getter="get_start_child">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_start_child"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_start_child"/>
<doc xml:space="preserve">The first child.</doc>
<type name="Widget"/>
</property>
<property name="wide-handle" writable="1" transfer-ownership="none" setter="set_wide_handle" getter="get_wide_handle">
<attribute name="org.gtk.Property.get" value="gtk_paned_get_wide_handle"/>
<attribute name="org.gtk.Property.set" value="gtk_paned_set_wide_handle"/>
<doc xml:space="preserve">Whether the `GtkPaned` should provide a stronger visual separation.
For example, this could be set when a paned contains two
[class@Gtk.Notebook]s, whose tab rows would otherwise merge visually.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="accept-position" when="last" action="1">
<doc xml:space="preserve">Emitted to accept the current position of the handle when
moving it using key bindings.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is Return or Space.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="cancel-position" when="last" action="1">
<doc xml:space="preserve">Emitted to cancel moving the position of the handle using key
bindings.
The position of the handle will be reset to the value prior to
moving it.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is Escape.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="cycle-child-focus" when="last" action="1">
<doc xml:space="preserve">Emitted to cycle the focus between the children of the paned.
This is a [keybinding signal](class.SignalAction.html).
The default binding is F6.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="reversed" transfer-ownership="none">
<doc xml:space="preserve">whether cycling backward or forward</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="cycle-handle-focus" when="last" action="1">
<doc xml:space="preserve">Emitted to cycle whether the paned should grab focus to allow
the user to change position of the handle by using key bindings.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is F8.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="reversed" transfer-ownership="none">
<doc xml:space="preserve">whether cycling backward or forward</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-handle" when="last" action="1">
<doc xml:space="preserve">Emitted to move the handle with key bindings.
This is a [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="scroll_type" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollType`</doc>
<type name="ScrollType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="toggle-handle-focus" when="last" action="1">
<doc xml:space="preserve">Emitted to accept the current position of the handle and then
move focus to the next widget in the focus chain.
This is a [keybinding signal](class.SignalAction.html).
The default binding is Tab.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
</class>
<record name="PaperSize" c:type="GtkPaperSize" glib:type-name="GtkPaperSize" glib:get-type="gtk_paper_size_get_type" c:symbol-prefix="paper_size">
<doc xml:space="preserve">`GtkPaperSize` handles paper sizes.
It uses the standard called
[PWG 5101.1-2002 PWG: Standard for Media Standardized Names](http://www.pwg.org/standards.html)
to name the paper sizes (and to get the data for the page sizes).
In addition to standard paper sizes, `GtkPaperSize` allows to
construct custom paper sizes with arbitrary dimensions.
The `GtkPaperSize` object stores not only the dimensions (width
and height) of a paper size and its name, it also provides
default print margins.</doc>
<constructor name="new" c:identifier="gtk_paper_size_new">
<doc xml:space="preserve">Creates a new `GtkPaperSize` object by parsing a
[PWG 5101.1-2002](ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf)
paper name.
If @name is %NULL, the default paper size is returned,
see [func@Gtk.PaperSize.get_default].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize`, use [method@Gtk.PaperSize.free]
to free it</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a paper size name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_custom" c:identifier="gtk_paper_size_new_custom">
<doc xml:space="preserve">Creates a new `GtkPaperSize` object with the
given parameters.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize` object, use [method@Gtk.PaperSize.free]
to free it</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the paper name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="display_name" transfer-ownership="none">
<doc xml:space="preserve">the human-readable name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the paper width, in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the paper height, in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for @width and @height. not %GTK_UNIT_NONE.</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_gvariant" c:identifier="gtk_paper_size_new_from_gvariant">
<doc xml:space="preserve">Deserialize a paper size from a `GVariant`.
The `GVariant must be in the format produced by
[method@Gtk.PaperSize.to_gvariant].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="variant" transfer-ownership="none">
<doc xml:space="preserve">an a{sv} `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_ipp" c:identifier="gtk_paper_size_new_from_ipp">
<doc xml:space="preserve">Creates a new `GtkPaperSize` object by using
IPP information.
If @ipp_name is not a recognized paper name,
@width and @height are used to
construct a custom `GtkPaperSize` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize`, use [method@Gtk.PaperSize.free]
to free it</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="ipp_name" transfer-ownership="none">
<doc xml:space="preserve">an IPP paper name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the paper width, in points</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the paper height in points</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_key_file" c:identifier="gtk_paper_size_new_from_key_file" throws="1">
<doc xml:space="preserve">Reads a paper size from the group @group_name in the key file
@key_file.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize` object with the restored paper size</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to retrieve the papersize from</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the group in the key file to read,
or %NULL to read the first group</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_ppd" c:identifier="gtk_paper_size_new_from_ppd">
<doc xml:space="preserve">Creates a new `GtkPaperSize` object by using
PPD information.
If @ppd_name is not a recognized PPD paper name,
@ppd_display_name, @width and @height are used to
construct a custom `GtkPaperSize` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPaperSize`, use [method@Gtk.PaperSize.free]
to free it</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<parameter name="ppd_name" transfer-ownership="none">
<doc xml:space="preserve">a PPD paper name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="ppd_display_name" transfer-ownership="none">
<doc xml:space="preserve">the corresponding human-readable name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the paper width, in points</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the paper height in points</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<method name="copy" c:identifier="gtk_paper_size_copy">
<doc xml:space="preserve">Copies an existing `GtkPaperSize`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of @other</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<instance-parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_paper_size_free">
<doc xml:space="preserve">Free the given `GtkPaperSize` object.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_default_bottom_margin" c:identifier="gtk_paper_size_get_default_bottom_margin">
<doc xml:space="preserve">Gets the default bottom margin for the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default bottom margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_default_left_margin" c:identifier="gtk_paper_size_get_default_left_margin">
<doc xml:space="preserve">Gets the default left margin for the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default left margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_default_right_margin" c:identifier="gtk_paper_size_get_default_right_margin">
<doc xml:space="preserve">Gets the default right margin for the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default right margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_default_top_margin" c:identifier="gtk_paper_size_get_default_top_margin">
<doc xml:space="preserve">Gets the default top margin for the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default top margin</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_display_name" c:identifier="gtk_paper_size_get_display_name">
<doc xml:space="preserve">Gets the human-readable name of the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the human-readable name of @size</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_height" c:identifier="gtk_paper_size_get_height">
<doc xml:space="preserve">Gets the paper height of the `GtkPaperSize`, in
units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper height</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_paper_size_get_name">
<doc xml:space="preserve">Gets the name of the `GtkPaperSize`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of @size</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ppd_name" c:identifier="gtk_paper_size_get_ppd_name">
<doc xml:space="preserve">Gets the PPD name of the `GtkPaperSize`, which
may be %NULL.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the PPD name of @size</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width" c:identifier="gtk_paper_size_get_width">
<doc xml:space="preserve">Gets the paper width of the `GtkPaperSize`, in
units of @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper width</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value, not %GTK_UNIT_NONE</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="is_custom" c:identifier="gtk_paper_size_is_custom">
<doc xml:space="preserve">Returns %TRUE if @size is not a standard paper size.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @size is a custom paper size.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_equal" c:identifier="gtk_paper_size_is_equal">
<doc xml:space="preserve">Compares two `GtkPaperSize` objects.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @size1 and @size2
represent the same paper size</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="size1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="size2" transfer-ownership="none">
<doc xml:space="preserve">another `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</parameter>
</parameters>
</method>
<method name="is_ipp" c:identifier="gtk_paper_size_is_ipp">
<doc xml:space="preserve">Returns %TRUE if @size is an IPP standard paper size.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @size is not an IPP custom paper size.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_size" c:identifier="gtk_paper_size_set_size">
<doc xml:space="preserve">Changes the dimensions of a @size to @width x @height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a custom `GtkPaperSize` object</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the new width in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the new height in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for @width and @height</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="to_gvariant" c:identifier="gtk_paper_size_to_gvariant">
<doc xml:space="preserve">Serialize a paper size to an `a{sv}` variant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new, floating, `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="paper_size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_key_file" c:identifier="gtk_paper_size_to_key_file">
<doc xml:space="preserve">This function adds the paper size from @size to @key_file.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</instance-parameter>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to save the paper size to</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none">
<doc xml:space="preserve">the group to add the settings to in @key_file</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<function name="get_default" c:identifier="gtk_paper_size_get_default">
<doc xml:space="preserve">Returns the name of the default paper size, which
depends on the current locale.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of the default paper size. The string
is owned by GTK and should not be modified.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
</function>
<function name="get_paper_sizes" c:identifier="gtk_paper_size_get_paper_sizes">
<doc xml:space="preserve">Creates a list of known paper sizes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated list of newly
allocated `GtkPaperSize` objects</doc>
<type name="GLib.List" c:type="GList*">
<type name="PaperSize"/>
</type>
</return-value>
<parameters>
<parameter name="include_custom" transfer-ownership="none">
<doc xml:space="preserve">whether to include custom paper sizes
as defined in the page setup dialog</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
</record>
<class name="ParamSpecExpression" c:symbol-prefix="param_expression" c:type="GtkParamSpecExpression" parent="GObject.ParamSpec" glib:type-name="GtkParamSpecExpression" glib:get-type="gtk_param_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">A `GParamSpec` for properties holding a `GtkExpression`.</doc>
<field name="parent_instance" readable="0" private="1">
<type name="GObject.ParamSpec" c:type="GParamSpec"/>
</field>
</class>
<class name="PasswordEntry" c:symbol-prefix="password_entry" c:type="GtkPasswordEntry" parent="Widget" glib:type-name="GtkPasswordEntry" glib:get-type="gtk_password_entry_get_type" glib:type-struct="PasswordEntryClass">
<doc xml:space="preserve">`GtkPasswordEntry` is an entry that has been tailored for entering secrets.
![An example GtkPasswordEntry](password-entry.png)
It does not show its contents in clear text, does not allow to copy it
to the clipboard, and it shows a warning when Caps Lock is engaged. If
the underlying platform allows it, `GtkPasswordEntry` will also place
the text in a non-pageable memory area, to avoid it being written out
to disk by the operating system.
Optionally, it can offer a way to reveal the contents in clear text.
`GtkPasswordEntry` provides only minimal API and should be used with
the [iface@Gtk.Editable] API.
# CSS Nodes
```
entry.password
&#x2570;&#x2500;&#x2500; text
&#x251C;&#x2500;&#x2500; image.caps-lock-indicator
&#x250A;
```
`GtkPasswordEntry` has a single CSS node with name entry that carries
a .passwordstyle class. The text Css node below it has a child with
name image and style class .caps-lock-indicator for the Caps Lock
icon, and possibly other children.
# Accessibility
`GtkPasswordEntry` uses the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<constructor name="new" c:identifier="gtk_password_entry_new">
<doc xml:space="preserve">Creates a `GtkPasswordEntry`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPasswordEntry`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_extra_menu" c:identifier="gtk_password_entry_get_extra_menu" glib:get-property="extra-menu">
<attribute name="org.gtk.Method.get_property" value="extra-menu"/>
<doc xml:space="preserve">Gets the menu model set with gtk_password_entry_set_extra_menu().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu model</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPasswordEntry`</doc>
<type name="PasswordEntry" c:type="GtkPasswordEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_peek_icon" c:identifier="gtk_password_entry_get_show_peek_icon" glib:get-property="show-peek-icon">
<attribute name="org.gtk.Method.get_property" value="show-peek-icon"/>
<doc xml:space="preserve">Returns whether the entry is showing an icon to
reveal the contents.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an icon is shown</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPasswordEntry`</doc>
<type name="PasswordEntry" c:type="GtkPasswordEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_extra_menu" c:identifier="gtk_password_entry_set_extra_menu" glib:set-property="extra-menu">
<attribute name="org.gtk.Method.set_property" value="extra-menu"/>
<doc xml:space="preserve">Sets a menu model to add when constructing
the context menu for @entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPasswordEntry`</doc>
<type name="PasswordEntry" c:type="GtkPasswordEntry*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_show_peek_icon" c:identifier="gtk_password_entry_set_show_peek_icon" glib:set-property="show-peek-icon">
<attribute name="org.gtk.Method.set_property" value="show-peek-icon"/>
<doc xml:space="preserve">Sets whether the entry should have a clickable icon
to reveal the contents.
Setting this to %FALSE also hides the text again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPasswordEntry`</doc>
<type name="PasswordEntry" c:type="GtkPasswordEntry*"/>
</instance-parameter>
<parameter name="show_peek_icon" transfer-ownership="none">
<doc xml:space="preserve">whether to show the peek icon</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="activates-default" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to activate the default widget when Enter is pressed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="extra-menu" writable="1" transfer-ownership="none" setter="set_extra_menu" getter="get_extra_menu">
<attribute name="org.gtk.Property.get" value="gtk_password_entry_get_extra_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_password_entry_set_extra_menu"/>
<doc xml:space="preserve">A menu model whose contents will be appended to
the context menu.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="placeholder-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text that will be displayed in the `GtkPasswordEntry`
when it is empty and unfocused.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="show-peek-icon" writable="1" transfer-ownership="none" setter="set_show_peek_icon" getter="get_show_peek_icon">
<attribute name="org.gtk.Property.get" value="gtk_password_entry_get_show_peek_icon"/>
<attribute name="org.gtk.Property.set" value="gtk_password_entry_set_show_peek_icon"/>
<doc xml:space="preserve">Whether to show an icon for revealing the content.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="last" action="1">
<doc xml:space="preserve">Emitted when the entry is activated.
The keybindings for this signal are all forms of the Enter key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="PasswordEntryBuffer" c:symbol-prefix="password_entry_buffer" c:type="GtkPasswordEntryBuffer" version="4.4" parent="EntryBuffer" glib:type-name="GtkPasswordEntryBuffer" glib:get-type="gtk_password_entry_buffer_get_type" glib:type-struct="PasswordEntryBufferClass">
<doc xml:space="preserve">A `GtkEntryBuffer` that locks the underlying memory to prevent it
from being swapped to disk.
`GtkPasswordEntry` uses a `GtkPasswordEntryBuffer`.</doc>
<constructor name="new" c:identifier="gtk_password_entry_buffer_new">
<doc xml:space="preserve">Creates a new `GtkEntryBuffer` using secure memory allocations.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the newly created instance</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</return-value>
</constructor>
</class>
<record name="PasswordEntryBufferClass" c:type="GtkPasswordEntryBufferClass" glib:is-gtype-struct-for="PasswordEntryBuffer">
<field name="parent_class">
<type name="EntryBufferClass" c:type="GtkEntryBufferClass"/>
</field>
</record>
<record name="PasswordEntryClass" c:type="GtkPasswordEntryClass" disguised="1" glib:is-gtype-struct-for="PasswordEntry"/>
<bitfield name="PickFlags" glib:type-name="GtkPickFlags" glib:get-type="gtk_pick_flags_get_type" c:type="GtkPickFlags">
<doc xml:space="preserve">Flags that influence the behavior of [method@Widget.pick].</doc>
<member name="default" value="0" c:identifier="GTK_PICK_DEFAULT" glib:nick="default" glib:name="GTK_PICK_DEFAULT">
<doc xml:space="preserve">The default behavior, include widgets that are receiving events</doc>
</member>
<member name="insensitive" value="1" c:identifier="GTK_PICK_INSENSITIVE" glib:nick="insensitive" glib:name="GTK_PICK_INSENSITIVE">
<doc xml:space="preserve">Include widgets that are insensitive</doc>
</member>
<member name="non_targetable" value="2" c:identifier="GTK_PICK_NON_TARGETABLE" glib:nick="non-targetable" glib:name="GTK_PICK_NON_TARGETABLE">
<doc xml:space="preserve">Include widgets that are marked as non-targetable. See [property@Widget:can-target]</doc>
</member>
</bitfield>
<class name="Picture" c:symbol-prefix="picture" c:type="GtkPicture" parent="Widget" glib:type-name="GtkPicture" glib:get-type="gtk_picture_get_type" glib:type-struct="PictureClass">
<doc xml:space="preserve">The `GtkPicture` widget displays a `GdkPaintable`.
![An example GtkPicture](picture.png)
Many convenience functions are provided to make pictures simple to use.
For example, if you want to load an image from a file, and then display
it, there&#x2019;s a convenience function to do this:
```c
GtkWidget *widget = gtk_picture_new_for_filename ("myfile.png");
```
If the file isn&#x2019;t loaded successfully, the picture will contain a
&#x201C;broken image&#x201D; icon similar to that used in many web browsers.
If you want to handle errors in loading the file yourself,
for example by displaying an error message, then load the image with
[ctor@Gdk.Texture.new_from_file], then create the `GtkPicture` with
[ctor@Gtk.Picture.new_for_paintable].
Sometimes an application will want to avoid depending on external data
files, such as image files. See the documentation of `GResource` for details.
In this case, [ctor@Gtk.Picture.new_for_resource] and
[method@Gtk.Picture.set_resource] should be used.
`GtkPicture` displays an image at its natural size. See [class@Gtk.Image]
if you want to display a fixed-size image, such as an icon.
## Sizing the paintable
You can influence how the paintable is displayed inside the `GtkPicture`.
By turning off [property@Gtk.Picture:keep-aspect-ratio] you can allow the
paintable to get stretched. [property@Gtk.Picture:can-shrink] can be unset
to make sure that paintables are never made smaller than their ideal size -
but be careful if you do not know the size of the paintable in use (like
when displaying user-loaded images). This can easily cause the picture to
grow larger than the screen. And [property@GtkWidget:halign] and
[property@GtkWidget:valign] can be used to make sure the paintable doesn't
fill all available space but is instead displayed at its original size.
## CSS nodes
`GtkPicture` has a single CSS node with the name `picture`.
## Accessibility
`GtkPicture` uses the `GTK_ACCESSIBLE_ROLE_IMG` role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_picture_new">
<doc xml:space="preserve">Creates a new empty `GtkPicture` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkPicture` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_for_file" c:identifier="gtk_picture_new_for_file">
<doc xml:space="preserve">Creates a new `GtkPicture` displaying the given @file.
If the file isn&#x2019;t found or can&#x2019;t be loaded, the resulting
`GtkPicture` is empty.
If you need to detect failures to load the file, use
[ctor@Gdk.Texture.new_from_file] to load the file yourself,
then create the `GtkPicture` from the texture.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPicture`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GFile`</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_filename" c:identifier="gtk_picture_new_for_filename">
<doc xml:space="preserve">Creates a new `GtkPicture` displaying the file @filename.
This is a utility function that calls [ctor@Gtk.Picture.new_for_file].
See that function for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPicture`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a filename</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_paintable" c:identifier="gtk_picture_new_for_paintable">
<doc xml:space="preserve">Creates a new `GtkPicture` displaying @paintable.
The `GtkPicture` will track changes to the @paintable and update
its size and contents in response to it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPicture`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_pixbuf" c:identifier="gtk_picture_new_for_pixbuf">
<doc xml:space="preserve">Creates a new `GtkPicture` displaying @pixbuf.
This is a utility function that calls [ctor@Gtk.Picture.new_for_paintable],
See that function for details.
The pixbuf must not be modified after passing it to this function.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPicture`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="pixbuf" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPixbuf`</doc>
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_resource" c:identifier="gtk_picture_new_for_resource">
<doc xml:space="preserve">Creates a new `GtkPicture` displaying the resource at @resource_path.
This is a utility function that calls [ctor@Gtk.Picture.new_for_file].
See that function for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPicture`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">resource path to play back</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_alternative_text" c:identifier="gtk_picture_get_alternative_text" glib:get-property="alternative-text">
<attribute name="org.gtk.Method.get_property" value="alternative-text"/>
<doc xml:space="preserve">Gets the alternative textual description of the picture.
The returned string will be %NULL if the picture cannot be described textually.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the alternative textual description of @self.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_can_shrink" c:identifier="gtk_picture_get_can_shrink" glib:get-property="can-shrink">
<attribute name="org.gtk.Method.get_property" value="can-shrink"/>
<doc xml:space="preserve">Returns whether the `GtkPicture` respects its contents size.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the picture can be made smaller than its contents</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_picture_get_file" glib:get-property="file">
<attribute name="org.gtk.Method.get_property" value="file"/>
<doc xml:space="preserve">Gets the `GFile` currently displayed if @self is displaying a file.
If @self is not displaying a file, for example when
[method@Gtk.Picture.set_paintable] was used, then %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The `GFile` displayed by @self.</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_keep_aspect_ratio" c:identifier="gtk_picture_get_keep_aspect_ratio" glib:get-property="keep-aspect-ratio">
<attribute name="org.gtk.Method.get_property" value="keep-aspect-ratio"/>
<doc xml:space="preserve">Returns whether the `GtkPicture` preserves its contents aspect ratio.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the self tries to keep the contents' aspect ratio</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paintable" c:identifier="gtk_picture_get_paintable" glib:get-property="paintable">
<attribute name="org.gtk.Method.get_property" value="paintable"/>
<doc xml:space="preserve">Gets the `GdkPaintable` being displayed by the `GtkPicture`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the displayed paintable</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_alternative_text" c:identifier="gtk_picture_set_alternative_text" glib:set-property="alternative-text">
<attribute name="org.gtk.Method.set_property" value="alternative-text"/>
<doc xml:space="preserve">Sets an alternative textual description for the picture contents.
It is equivalent to the "alt" attribute for images on websites.
This text will be made available to accessibility tools.
If the picture cannot be described textually, set this property to %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="alternative_text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a textual description of the contents</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_can_shrink" c:identifier="gtk_picture_set_can_shrink" glib:set-property="can-shrink">
<attribute name="org.gtk.Method.set_property" value="can-shrink"/>
<doc xml:space="preserve">If set to %TRUE, the @self can be made smaller than its contents.
The contents will then be scaled down when rendering.
If you want to still force a minimum size manually, consider using
[method@Gtk.Widget.set_size_request].
Also of note is that a similar function for growing does not exist
because the grow behavior can be controlled via
[method@Gtk.Widget.set_halign] and [method@Gtk.Widget.set_valign].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="can_shrink" transfer-ownership="none">
<doc xml:space="preserve">if @self can be made smaller than its contents</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_file" c:identifier="gtk_picture_set_file" glib:set-property="file">
<attribute name="org.gtk.Method.set_property" value="file"/>
<doc xml:space="preserve">Makes @self load and display @file.
See [ctor@Gtk.Picture.new_for_file] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GFile`</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_filename" c:identifier="gtk_picture_set_filename">
<doc xml:space="preserve">Makes @self load and display the given @filename.
This is a utility function that calls [method@Gtk.Picture.set_file].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the filename to play</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_keep_aspect_ratio" c:identifier="gtk_picture_set_keep_aspect_ratio" glib:set-property="keep-aspect-ratio">
<attribute name="org.gtk.Method.set_property" value="keep-aspect-ratio"/>
<doc xml:space="preserve">If set to %TRUE, the @self will render its contents according to
their aspect ratio.
That means that empty space may show up at the top/bottom or
left/right of @self.
If set to %FALSE or if the contents provide no aspect ratio,
the contents will be stretched over the picture's whole area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="keep_aspect_ratio" transfer-ownership="none">
<doc xml:space="preserve">whether to keep aspect ratio</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_paintable" c:identifier="gtk_picture_set_paintable" glib:set-property="paintable">
<attribute name="org.gtk.Method.set_property" value="paintable"/>
<doc xml:space="preserve">Makes @self display the given @paintable.
If @paintable is %NULL, nothing will be displayed.
See [ctor@Gtk.Picture.new_for_paintable] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="set_pixbuf" c:identifier="gtk_picture_set_pixbuf">
<doc xml:space="preserve">Sets a `GtkPicture` to show a `GdkPixbuf`.
See [ctor@Gtk.Picture.new_for_pixbuf] for details.
This is a utility function that calls [method@Gtk.Picture.set_paintable].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="pixbuf" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPixbuf`</doc>
<type name="GdkPixbuf.Pixbuf" c:type="GdkPixbuf*"/>
</parameter>
</parameters>
</method>
<method name="set_resource" c:identifier="gtk_picture_set_resource">
<doc xml:space="preserve">Makes @self load and display the resource at the given
@resource_path.
This is a utility function that calls [method@Gtk.Picture.set_file].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPicture`</doc>
<type name="Picture" c:type="GtkPicture*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the resource to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="alternative-text" writable="1" transfer-ownership="none" setter="set_alternative_text" getter="get_alternative_text">
<attribute name="org.gtk.Property.get" value="gtk_picture_get_alternative_text"/>
<attribute name="org.gtk.Property.set" value="gtk_picture_set_alternative_text"/>
<doc xml:space="preserve">The alternative textual description for the picture.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="can-shrink" writable="1" transfer-ownership="none" setter="set_can_shrink" getter="get_can_shrink">
<attribute name="org.gtk.Property.get" value="gtk_picture_get_can_shrink"/>
<attribute name="org.gtk.Property.set" value="gtk_picture_set_can_shrink"/>
<doc xml:space="preserve">If the `GtkPicture` can be made smaller than the natural size of its contents.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="file" writable="1" transfer-ownership="none" setter="set_file" getter="get_file">
<attribute name="org.gtk.Property.get" value="gtk_picture_get_file"/>
<attribute name="org.gtk.Property.set" value="gtk_picture_set_file"/>
<doc xml:space="preserve">The `GFile` that is displayed or %NULL if none.</doc>
<type name="Gio.File"/>
</property>
<property name="keep-aspect-ratio" writable="1" transfer-ownership="none" setter="set_keep_aspect_ratio" getter="get_keep_aspect_ratio">
<attribute name="org.gtk.Property.get" value="gtk_picture_get_keep_aspect_ratio"/>
<attribute name="org.gtk.Property.set" value="gtk_picture_set_keep_aspect_ratio"/>
<doc xml:space="preserve">Whether the GtkPicture will render its contents trying to preserve the aspect
ratio.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="paintable" writable="1" transfer-ownership="none" setter="set_paintable" getter="get_paintable">
<attribute name="org.gtk.Property.get" value="gtk_picture_get_paintable"/>
<attribute name="org.gtk.Property.set" value="gtk_picture_set_paintable"/>
<doc xml:space="preserve">The `GdkPaintable` to be displayed by this `GtkPicture`.</doc>
<type name="Gdk.Paintable"/>
</property>
</class>
<record name="PictureClass" c:type="GtkPictureClass" glib:is-gtype-struct-for="Picture">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<enumeration name="PolicyType" glib:type-name="GtkPolicyType" glib:get-type="gtk_policy_type_get_type" c:type="GtkPolicyType">
<doc xml:space="preserve">Determines how the size should be computed to achieve the one of the
visibility mode for the scrollbars.</doc>
<member name="always" value="0" c:identifier="GTK_POLICY_ALWAYS" glib:nick="always" glib:name="GTK_POLICY_ALWAYS">
<doc xml:space="preserve">The scrollbar is always visible. The view size is
independent of the content.</doc>
</member>
<member name="automatic" value="1" c:identifier="GTK_POLICY_AUTOMATIC" glib:nick="automatic" glib:name="GTK_POLICY_AUTOMATIC">
<doc xml:space="preserve">The scrollbar will appear and disappear as necessary.
For example, when all of a `GtkTreeView` can not be seen.</doc>
</member>
<member name="never" value="2" c:identifier="GTK_POLICY_NEVER" glib:nick="never" glib:name="GTK_POLICY_NEVER">
<doc xml:space="preserve">The scrollbar should never appear. In this mode the
content determines the size.</doc>
</member>
<member name="external" value="3" c:identifier="GTK_POLICY_EXTERNAL" glib:nick="external" glib:name="GTK_POLICY_EXTERNAL">
<doc xml:space="preserve">Don't show a scrollbar, but don't force the
size to follow the content. This can be used e.g. to make multiple
scrolled windows share a scrollbar.</doc>
</member>
</enumeration>
<class name="Popover" c:symbol-prefix="popover" c:type="GtkPopover" parent="Widget" glib:type-name="GtkPopover" glib:get-type="gtk_popover_get_type" glib:type-struct="PopoverClass">
<doc xml:space="preserve">`GtkPopover` is a bubble-like context popup.
![An example GtkPopover](popover.png)
It is primarily meant to provide context-dependent information
or options. Popovers are attached to a parent widget. By default,
they point to the whole widget area, although this behavior can be
changed with [method@Gtk.Popover.set_pointing_to].
The position of a popover relative to the widget it is attached to
can also be changed with [method@Gtk.Popover.set_position]
By default, `GtkPopover` performs a grab, in order to ensure input
events get redirected to it while it is shown, and also so the popover
is dismissed in the expected situations (clicks outside the popover,
or the Escape key being pressed). If no such modal behavior is desired
on a popover, [method@Gtk.Popover.set_autohide] may be called on it to
tweak its behavior.
## GtkPopover as menu replacement
`GtkPopover` is often used to replace menus. The best was to do this
is to use the [class@Gtk.PopoverMenu] subclass which supports being
populated from a `GMenuModel` with [ctor@Gtk.PopoverMenu.new_from_model].
```xml
&lt;section&gt;
&lt;attribute name="display-hint"&gt;horizontal-buttons&lt;/attribute&gt;
&lt;item&gt;
&lt;attribute name="label"&gt;Cut&lt;/attribute&gt;
&lt;attribute name="action"&gt;app.cut&lt;/attribute&gt;
&lt;attribute name="verb-icon"&gt;edit-cut-symbolic&lt;/attribute&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;attribute name="label"&gt;Copy&lt;/attribute&gt;
&lt;attribute name="action"&gt;app.copy&lt;/attribute&gt;
&lt;attribute name="verb-icon"&gt;edit-copy-symbolic&lt;/attribute&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;attribute name="label"&gt;Paste&lt;/attribute&gt;
&lt;attribute name="action"&gt;app.paste&lt;/attribute&gt;
&lt;attribute name="verb-icon"&gt;edit-paste-symbolic&lt;/attribute&gt;
&lt;/item&gt;
&lt;/section&gt;
```
# CSS nodes
```
popover[.menu]
&#x251C;&#x2500;&#x2500; arrow
&#x2570;&#x2500;&#x2500; contents.background
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
The contents child node always gets the .background style class
and the popover itself gets the .menu style class if the popover
is menu-like (i.e. `GtkPopoverMenu`).
Particular uses of `GtkPopover`, such as touch selection popups or
magnifiers in `GtkEntry` or `GtkTextView` get style classes like
.touch-selection or .magnifier to differentiate from plain popovers.
When styling a popover directly, the popover node should usually
not have any background. The visible part of the popover can have
a shadow. To specify it in CSS, set the box-shadow of the contents node.
Note that, in order to accomplish appropriate arrow visuals, `GtkPopover`
uses custom drawing for the arrow node. This makes it possible for the
arrow to change its shape dynamically, but it also limits the possibilities
of styling it using CSS. In particular, the arrow gets drawn over the
content node's border and shadow, so they look like one shape, which
means that the border width of the content node and the arrow node should
be the same. The arrow also does not support any border shape other than
solid, no border-radius, only one border width (border-bottom-width is
used) and no box-shadow.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_popover_new">
<doc xml:space="preserve">Creates a new `GtkPopover`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkPopover`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<virtual-method name="activate_default">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="closed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_autohide" c:identifier="gtk_popover_get_autohide" glib:get-property="autohide">
<attribute name="org.gtk.Method.get_property" value="autohide"/>
<doc xml:space="preserve">Returns whether the popover is modal.
See [method@Gtk.Popover.set_autohide] for the
implications of this.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @popover is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cascade_popdown" c:identifier="gtk_popover_get_cascade_popdown" glib:get-property="cascade-popdown">
<attribute name="org.gtk.Method.get_property" value="cascade-popdown"/>
<doc xml:space="preserve">Returns whether the popover will close after a modal child is closed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @popover will close after a modal child.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_popover_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @popover.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @popover</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_arrow" c:identifier="gtk_popover_get_has_arrow" glib:get-property="has-arrow">
<attribute name="org.gtk.Method.get_property" value="has-arrow"/>
<doc xml:space="preserve">Gets whether this popover is showing an arrow
pointing at the widget that it is relative to.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the popover has an arrow</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mnemonics_visible" c:identifier="gtk_popover_get_mnemonics_visible" glib:get-property="mnemonics-visible">
<attribute name="org.gtk.Method.get_property" value="mnemonics-visible"/>
<doc xml:space="preserve">Gets whether mnemonics are visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if mnemonics are supposed to be visible
in this popover</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_offset" c:identifier="gtk_popover_get_offset">
<doc xml:space="preserve">Gets the offset previous set with gtk_popover_set_offset().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="x_offset" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a location for the x_offset</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y_offset" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a location for the y_offset</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_pointing_to" c:identifier="gtk_popover_get_pointing_to" glib:get-property="pointing-to">
<attribute name="org.gtk.Method.get_property" value="pointing-to"/>
<doc xml:space="preserve">Gets the rectangle that the popover points to.
If a rectangle to point to has been set, this function will
return %TRUE and fill in @rect with such rectangle, otherwise
it will return %FALSE and fill in @rect with the parent
widget coordinates.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a rectangle to point to was set.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">location to store the rectangle</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_popover_get_position" glib:get-property="position">
<attribute name="org.gtk.Method.get_property" value="position"/>
<doc xml:space="preserve">Returns the preferred position of @popover.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The preferred position.</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="popdown" c:identifier="gtk_popover_popdown">
<doc xml:space="preserve">Pops @popover down.
This may have the side-effect of closing a parent popover
as well. See [property@Gtk.Popover:cascade-popdown].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="popup" c:identifier="gtk_popover_popup">
<doc xml:space="preserve">Pops @popover up.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="present" c:identifier="gtk_popover_present">
<doc xml:space="preserve">Presents the popover to the user.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_autohide" c:identifier="gtk_popover_set_autohide" glib:set-property="autohide">
<attribute name="org.gtk.Method.set_property" value="autohide"/>
<doc xml:space="preserve">Sets whether @popover is modal.
A modal popover will grab the keyboard focus on it when being
displayed. Focus will wrap around within the popover. Clicking
outside the popover area or pressing Esc will dismiss the popover.
Called this function on an already showing popup with a new
autohide value different from the current one, will cause the
popup to be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="autohide" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to dismiss the popover on outside clicks</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_cascade_popdown" c:identifier="gtk_popover_set_cascade_popdown" glib:set-property="cascade-popdown">
<attribute name="org.gtk.Method.set_property" value="cascade-popdown"/>
<doc xml:space="preserve">If @cascade_popdown is %TRUE, the popover will be
closed when a child modal popover is closed.
If %FALSE, @popover will stay visible.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">A `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="cascade_popdown" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the popover should follow a child closing</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_popover_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @popover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_default_widget" c:identifier="gtk_popover_set_default_widget" glib:set-property="default-widget">
<attribute name="org.gtk.Method.set_property" value="default-widget"/>
<doc xml:space="preserve">Sets the default widget of a `GtkPopover`.
The default widget is the widget that&#x2019;s activated when the user
presses Enter in a dialog (for example). This function sets or
unsets the default widget for a `GtkPopover`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a child widget of @popover to set as
the default, or %NULL to unset the default widget for the popover</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_has_arrow" c:identifier="gtk_popover_set_has_arrow" glib:set-property="has-arrow">
<attribute name="org.gtk.Method.set_property" value="has-arrow"/>
<doc xml:space="preserve">Sets whether this popover should draw an arrow
pointing at the widget it is relative to.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="has_arrow" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to draw an arrow</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_mnemonics_visible" c:identifier="gtk_popover_set_mnemonics_visible" glib:set-property="mnemonics-visible">
<attribute name="org.gtk.Method.set_property" value="mnemonics-visible"/>
<doc xml:space="preserve">Sets whether mnemonics should be visible.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="mnemonics_visible" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_offset" c:identifier="gtk_popover_set_offset">
<doc xml:space="preserve">Sets the offset to use when calculating the position
of the popover.
These values are used when preparing the [struct@Gdk.PopupLayout]
for positioning the popover.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="x_offset" transfer-ownership="none">
<doc xml:space="preserve">the x offset to adjust the position by</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y_offset" transfer-ownership="none">
<doc xml:space="preserve">the y offset to adjust the position by</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_pointing_to" c:identifier="gtk_popover_set_pointing_to" glib:set-property="pointing-to">
<attribute name="org.gtk.Method.set_property" value="pointing-to"/>
<doc xml:space="preserve">Sets the rectangle that @popover points to.
This is in the coordinate space of the @popover parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="rect" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">rectangle to point to</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="set_position" c:identifier="gtk_popover_set_position" glib:set-property="position">
<attribute name="org.gtk.Method.set_property" value="position"/>
<doc xml:space="preserve">Sets the preferred position for @popover to appear.
If the @popover is currently visible, it will be immediately
updated.
This preference will be respected where possible, although
on lack of space (eg. if close to the window edges), the
`GtkPopover` may choose to appear on the opposite side.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopover`</doc>
<type name="Popover" c:type="GtkPopover*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">preferred popover position</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
</parameters>
</method>
<property name="autohide" writable="1" transfer-ownership="none" setter="set_autohide" getter="get_autohide">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_autohide"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_autohide"/>
<doc xml:space="preserve">Whether to dismiss the popover on outside clicks.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="cascade-popdown" writable="1" transfer-ownership="none" setter="set_cascade_popdown" getter="get_cascade_popdown">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_cascade_popdown"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_cascade_popdown"/>
<doc xml:space="preserve">Whether the popover pops down after a child popover.
This is used to implement the expected behavior of submenus.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="default-widget" writable="1" transfer-ownership="none" setter="set_default_widget">
<attribute name="org.gtk.Popover.set" value="gtk_popover_set_default_widget"/>
<doc xml:space="preserve">The default widget inside the popover.</doc>
<type name="Widget"/>
</property>
<property name="has-arrow" writable="1" transfer-ownership="none" setter="set_has_arrow" getter="get_has_arrow">
<attribute name="org.gtk.Popover.get" value="gtk_popover_get_has_arrow"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_has_arrow"/>
<doc xml:space="preserve">Whether to draw an arrow.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="mnemonics-visible" writable="1" transfer-ownership="none" setter="set_mnemonics_visible" getter="get_mnemonics_visible">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_mnemonics_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_mnemonics_visible"/>
<doc xml:space="preserve">Whether mnemonics are currently visible in this popover.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pointing-to" writable="1" transfer-ownership="none" setter="set_pointing_to" getter="get_pointing_to">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_pointing_to"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_pointing_to"/>
<doc xml:space="preserve">Rectangle in the parent widget that the popover points to.</doc>
<type name="Gdk.Rectangle"/>
</property>
<property name="position" writable="1" transfer-ownership="none" setter="set_position" getter="get_position">
<attribute name="org.gtk.Property.get" value="gtk_popover_get_position"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_set_position"/>
<doc xml:space="preserve">How to place the popover, relative to its parent.</doc>
<type name="PositionType"/>
</property>
<field name="parent">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate-default" when="last" action="1">
<doc xml:space="preserve">Emitted whend the user activates the default widget.
This is a [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="closed" when="last">
<doc xml:space="preserve">Emitted when the popover is closed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="PopoverClass" c:type="GtkPopoverClass" glib:is-gtype-struct-for="Popover">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="closed">
<callback name="closed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="popover" transfer-ownership="none">
<type name="Popover" c:type="GtkPopover*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate_default">
<callback name="activate_default">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="popover" transfer-ownership="none">
<type name="Popover" c:type="GtkPopover*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="reserved" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="PopoverMenu" c:symbol-prefix="popover_menu" c:type="GtkPopoverMenu" parent="Popover" glib:type-name="GtkPopoverMenu" glib:get-type="gtk_popover_menu_get_type">
<doc xml:space="preserve">`GtkPopoverMenu` is a subclass of `GtkPopover` that implements menu
behavior.
![An example GtkPopoverMenu](menu.png)
`GtkPopoverMenu` treats its children like menus and allows switching
between them. It can open submenus as traditional, nested submenus,
or in a more touch-friendly sliding fashion.
`GtkPopoverMenu` is meant to be used primarily with menu models,
using [ctor@Gtk.PopoverMenu.new_from_model]. If you need to put
other widgets such as a `GtkSpinButton` or a `GtkSwitch` into a popover,
you can use [method@Gtk.PopoverMenu.add_child].
For more dialog-like behavior, use a plain `GtkPopover`.
## Menu models
The XML format understood by `GtkBuilder` for `GMenuModel` consists
of a toplevel `&lt;menu&gt;` element, which contains one or more `&lt;item&gt;`
elements. Each `&lt;item&gt;` element contains `&lt;attribute&gt;` and `&lt;link&gt;`
elements with a mandatory name attribute. `&lt;link&gt;` elements have the
same content model as `&lt;menu&gt;`. Instead of `&lt;link name="submenu"&gt;`
or `&lt;link name="section"&gt;`, you can use `&lt;submenu&gt;` or `&lt;section&gt;`
elements.
```xml
&lt;menu id='app-menu'&gt;
&lt;section&gt;
&lt;item&gt;
&lt;attribute name='label' translatable='yes'&gt;_New Window&lt;/attribute&gt;
&lt;attribute name='action'&gt;app.new&lt;/attribute&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;attribute name='label' translatable='yes'&gt;_About Sunny&lt;/attribute&gt;
&lt;attribute name='action'&gt;app.about&lt;/attribute&gt;
&lt;/item&gt;
&lt;item&gt;
&lt;attribute name='label' translatable='yes'&gt;_Quit&lt;/attribute&gt;
&lt;attribute name='action'&gt;app.quit&lt;/attribute&gt;
&lt;/item&gt;
&lt;/section&gt;
&lt;/menu&gt;
```
Attribute values can be translated using gettext, like other `GtkBuilder`
content. `&lt;attribute&gt;` elements can be marked for translation with a
`translatable="yes"` attribute. It is also possible to specify message
context and translator comments, using the context and comments attributes.
To make use of this, the `GtkBuilder` must have been given the gettext
domain to use.
The following attributes are used when constructing menu items:
- "label": a user-visible string to display
- "use-markup": whether the text in the menu item includes [Pango markup](https://docs.gtk.org/Pango/pango_markup.html)
- "action": the prefixed name of the action to trigger
- "target": the parameter to use when activating the action
- "icon" and "verb-icon": names of icons that may be displayed
- "submenu-action": name of an action that may be used to track
whether a submenu is open
- "hidden-when": a string used to determine when the item will be hidden.
Possible values include "action-disabled", "action-missing", "macos-menubar".
This is mainly useful for exported menus, see [method@Gtk.Application.set_menubar].
- "custom": a string used to match against the ID of a custom child added with
[method@Gtk.PopoverMenu.add_child], [method@Gtk.PopoverMenuBar.add_child],
or in the ui file with `&lt;child type="ID"&gt;`.
The following attributes are used when constructing sections:
- "label": a user-visible string to use as section heading
- "display-hint": a string used to determine special formatting for the section.
Possible values include "horizontal-buttons", "circular-buttons" and
"inline-buttons". They all indicate that section should be
displayed as a horizontal row of buttons.
- "text-direction": a string used to determine the `GtkTextDirection` to use
when "display-hint" is set to "horizontal-buttons". Possible values
include "rtl", "ltr", and "none".
The following attributes are used when constructing submenus:
- "label": a user-visible string to display
- "icon": icon name to display
Menu items will also show accelerators, which are usually associated
with actions via [method@Gtk.Application.set_accels_for_action],
[id@gtk_widget_class_add_binding_action] or
[method@Gtk.ShortcutController.add_shortcut].
# CSS Nodes
`GtkPopoverMenu` is just a subclass of `GtkPopover` that adds custom content
to it, therefore it has the same CSS nodes. It is one of the cases that add
a .menu style class to the popover's main node.
# Accessibility
`GtkPopoverMenu` uses the %GTK_ACCESSIBLE_ROLE_MENU role, and its
items use the %GTK_ACCESSIBLE_ROLE_MENU_ITEM,
%GTK_ACCESSIBLE_ROLE_MENU_ITEM_CHECKBOX or
%GTK_ACCESSIBLE_ROLE_MENU_ITEM_RADIO roles, depending on the
action they are connected to.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="ShortcutManager"/>
<constructor name="new_from_model" c:identifier="gtk_popover_menu_new_from_model">
<doc xml:space="preserve">Creates a `GtkPopoverMenu` and populates it according to @model.
The created buttons are connected to actions found in the
`GtkApplicationWindow` to which the popover belongs - typically
by means of being attached to a widget that is contained within
the `GtkApplicationWindow`s widget hierarchy.
Actions can also be added using [method@Gtk.Widget.insert_action_group]
on the menus attach widget or on any of its parent widgets.
This function creates menus with sliding submenus.
See [ctor@Gtk.PopoverMenu.new_from_model_full] for a way
to control this.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkPopoverMenu`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_model_full" c:identifier="gtk_popover_menu_new_from_model_full">
<doc xml:space="preserve">Creates a `GtkPopoverMenu` and populates it according to @model.
The created buttons are connected to actions found in the
action groups that are accessible from the parent widget.
This includes the `GtkApplicationWindow` to which the popover
belongs. Actions can also be added using [method@Gtk.Widget.insert_action_group]
on the parent widget or on any of its parent widgets.
The only flag that is supported currently is
%GTK_POPOVER_MENU_NESTED, which makes GTK create traditional,
nested submenus instead of the default sliding submenus.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `GtkPopoverMenu`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags that affect how the menu is created</doc>
<type name="PopoverMenuFlags" c:type="GtkPopoverMenuFlags"/>
</parameter>
</parameters>
</constructor>
<method name="add_child" c:identifier="gtk_popover_menu_add_child">
<doc xml:space="preserve">Adds a custom widget to a generated menu.
For this to work, the menu model of @popover must have
an item with a `custom` attribute that matches @id.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @id was found and the widget added</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenu`</doc>
<type name="PopoverMenu" c:type="GtkPopoverMenu*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the ID to insert @child at</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_menu_model" c:identifier="gtk_popover_menu_get_menu_model" glib:get-property="menu-model">
<attribute name="org.gtk.Method.get_property" value="menu-model"/>
<doc xml:space="preserve">Returns the menu model used to populate the popover.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu model of @popover</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenu`</doc>
<type name="PopoverMenu" c:type="GtkPopoverMenu*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_child" c:identifier="gtk_popover_menu_remove_child">
<doc xml:space="preserve">Removes a widget that has previously been added with
gtk_popover_menu_add_child().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget was removed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenu`</doc>
<type name="PopoverMenu" c:type="GtkPopoverMenu*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_menu_model" c:identifier="gtk_popover_menu_set_menu_model" glib:set-property="menu-model">
<attribute name="org.gtk.Method.set_property" value="menu-model"/>
<doc xml:space="preserve">Sets a new menu model on @popover.
The existing contents of @popover are removed, and
the @popover is populated with new contents according
to @model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="popover" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenu`</doc>
<type name="PopoverMenu" c:type="GtkPopoverMenu*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<property name="menu-model" writable="1" transfer-ownership="none" setter="set_menu_model" getter="get_menu_model">
<attribute name="org.gtk.Property.get" value="gtk_popover_menu_get_menu_model"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_menu_set_menu_model"/>
<doc xml:space="preserve">The model from which the menu is made.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="visible-submenu" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The name of the visible submenu.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="PopoverMenuBar" c:symbol-prefix="popover_menu_bar" c:type="GtkPopoverMenuBar" parent="Widget" glib:type-name="GtkPopoverMenuBar" glib:get-type="gtk_popover_menu_bar_get_type">
<doc xml:space="preserve">`GtkPopoverMenuBar` presents a horizontal bar of items that pop
up popover menus when clicked.
![An example GtkPopoverMenuBar](menubar.png)
The only way to create instances of `GtkPopoverMenuBar` is
from a `GMenuModel`.
# CSS nodes
```
menubar
&#x251C;&#x2500;&#x2500; item[.active]
&#x250A; &#x2570;&#x2500;&#x2500; popover
&#x2570;&#x2500;&#x2500; item
&#x2570;&#x2500;&#x2500; popover
```
`GtkPopoverMenuBar` has a single CSS node with name menubar, below which
each item has its CSS node, and below that the corresponding popover.
The item whose popover is currently open gets the .active
style class.
# Accessibility
`GtkPopoverMenuBar` uses the %GTK_ACCESSIBLE_ROLE_MENU_BAR role,
the menu items use the %GTK_ACCESSIBLE_ROLE_MENU_ITEM role and
the menus use the %GTK_ACCESSIBLE_ROLE_MENU role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new_from_model" c:identifier="gtk_popover_menu_bar_new_from_model">
<doc xml:space="preserve">Creates a `GtkPopoverMenuBar` from a `GMenuModel`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPopoverMenuBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</constructor>
<method name="add_child" c:identifier="gtk_popover_menu_bar_add_child">
<doc xml:space="preserve">Adds a custom widget to a generated menubar.
For this to work, the menu model of @bar must have an
item with a `custom` attribute that matches @id.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @id was found and the widget added</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenuBar`</doc>
<type name="PopoverMenuBar" c:type="GtkPopoverMenuBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">the ID to insert @child at</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_menu_model" c:identifier="gtk_popover_menu_bar_get_menu_model" glib:get-property="menu-model">
<attribute name="org.gtk.Method.get_property" value="menu-model"/>
<doc xml:space="preserve">Returns the model from which the contents of @bar are taken.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenuBar`</doc>
<type name="PopoverMenuBar" c:type="GtkPopoverMenuBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_child" c:identifier="gtk_popover_menu_bar_remove_child">
<doc xml:space="preserve">Removes a widget that has previously been added with
gtk_popover_menu_bar_add_child().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget was removed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenuBar`</doc>
<type name="PopoverMenuBar" c:type="GtkPopoverMenuBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_menu_model" c:identifier="gtk_popover_menu_bar_set_menu_model" glib:set-property="menu-model">
<attribute name="org.gtk.Method.set_property" value="menu-model"/>
<doc xml:space="preserve">Sets a menu model from which @bar should take
its contents.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPopoverMenuBar`</doc>
<type name="PopoverMenuBar" c:type="GtkPopoverMenuBar*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<property name="menu-model" writable="1" transfer-ownership="none" setter="set_menu_model" getter="get_menu_model">
<attribute name="org.gtk.Property.get" value="gtk_popover_menu_bar_get_menu_model"/>
<attribute name="org.gtk.Property.set" value="gtk_popover_menu_bar_set_menu_model"/>
<doc xml:space="preserve">The `GMenuModel` from which the menu bar is created.
The model should only contain submenus as toplevel elements.</doc>
<type name="Gio.MenuModel"/>
</property>
</class>
<bitfield name="PopoverMenuFlags" glib:type-name="GtkPopoverMenuFlags" glib:get-type="gtk_popover_menu_flags_get_type" c:type="GtkPopoverMenuFlags">
<doc xml:space="preserve">Flags that affect how popover menus are created from
a menu model.</doc>
<member name="nested" value="1" c:identifier="GTK_POPOVER_MENU_NESTED" glib:nick="nested" glib:name="GTK_POPOVER_MENU_NESTED">
<doc xml:space="preserve">Create submenus as nested
popovers. Without this flag, submenus are created as
sliding pages that replace the main menu.</doc>
</member>
</bitfield>
<enumeration name="PositionType" glib:type-name="GtkPositionType" glib:get-type="gtk_position_type_get_type" c:type="GtkPositionType">
<doc xml:space="preserve">Describes which edge of a widget a certain feature is positioned at.
For examples, see the tabs of a [class@Notebook], or the label
of a [class@Scale].</doc>
<member name="left" value="0" c:identifier="GTK_POS_LEFT" glib:nick="left" glib:name="GTK_POS_LEFT">
<doc xml:space="preserve">The feature is at the left edge.</doc>
</member>
<member name="right" value="1" c:identifier="GTK_POS_RIGHT" glib:nick="right" glib:name="GTK_POS_RIGHT">
<doc xml:space="preserve">The feature is at the right edge.</doc>
</member>
<member name="top" value="2" c:identifier="GTK_POS_TOP" glib:nick="top" glib:name="GTK_POS_TOP">
<doc xml:space="preserve">The feature is at the top edge.</doc>
</member>
<member name="bottom" value="3" c:identifier="GTK_POS_BOTTOM" glib:nick="bottom" glib:name="GTK_POS_BOTTOM">
<doc xml:space="preserve">The feature is at the bottom edge.</doc>
</member>
</enumeration>
<record name="PrintBackend" c:type="GtkPrintBackend" disguised="1"/>
<bitfield name="PrintCapabilities" glib:type-name="GtkPrintCapabilities" glib:get-type="gtk_print_capabilities_get_type" c:type="GtkPrintCapabilities">
<doc xml:space="preserve">Specifies which features the print dialog should offer.
If neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor
%GTK_PRINT_CAPABILITY_GENERATE_PS is specified, GTK assumes that all
formats are supported.</doc>
<member name="page_set" value="1" c:identifier="GTK_PRINT_CAPABILITY_PAGE_SET" glib:nick="page-set" glib:name="GTK_PRINT_CAPABILITY_PAGE_SET">
<doc xml:space="preserve">Print dialog will offer printing even/odd pages.</doc>
</member>
<member name="copies" value="2" c:identifier="GTK_PRINT_CAPABILITY_COPIES" glib:nick="copies" glib:name="GTK_PRINT_CAPABILITY_COPIES">
<doc xml:space="preserve">Print dialog will allow to print multiple copies.</doc>
</member>
<member name="collate" value="4" c:identifier="GTK_PRINT_CAPABILITY_COLLATE" glib:nick="collate" glib:name="GTK_PRINT_CAPABILITY_COLLATE">
<doc xml:space="preserve">Print dialog will allow to collate multiple copies.</doc>
</member>
<member name="reverse" value="8" c:identifier="GTK_PRINT_CAPABILITY_REVERSE" glib:nick="reverse" glib:name="GTK_PRINT_CAPABILITY_REVERSE">
<doc xml:space="preserve">Print dialog will allow to print pages in reverse order.</doc>
</member>
<member name="scale" value="16" c:identifier="GTK_PRINT_CAPABILITY_SCALE" glib:nick="scale" glib:name="GTK_PRINT_CAPABILITY_SCALE">
<doc xml:space="preserve">Print dialog will allow to scale the output.</doc>
</member>
<member name="generate_pdf" value="32" c:identifier="GTK_PRINT_CAPABILITY_GENERATE_PDF" glib:nick="generate-pdf" glib:name="GTK_PRINT_CAPABILITY_GENERATE_PDF">
<doc xml:space="preserve">The program will send the document to
the printer in PDF format</doc>
</member>
<member name="generate_ps" value="64" c:identifier="GTK_PRINT_CAPABILITY_GENERATE_PS" glib:nick="generate-ps" glib:name="GTK_PRINT_CAPABILITY_GENERATE_PS">
<doc xml:space="preserve">The program will send the document to
the printer in Postscript format</doc>
</member>
<member name="preview" value="128" c:identifier="GTK_PRINT_CAPABILITY_PREVIEW" glib:nick="preview" glib:name="GTK_PRINT_CAPABILITY_PREVIEW">
<doc xml:space="preserve">Print dialog will offer a preview</doc>
</member>
<member name="number_up" value="256" c:identifier="GTK_PRINT_CAPABILITY_NUMBER_UP" glib:nick="number-up" glib:name="GTK_PRINT_CAPABILITY_NUMBER_UP">
<doc xml:space="preserve">Print dialog will offer printing multiple
pages per sheet</doc>
</member>
<member name="number_up_layout" value="512" c:identifier="GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT" glib:nick="number-up-layout" glib:name="GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT">
<doc xml:space="preserve">Print dialog will allow to rearrange
pages when printing multiple pages per sheet</doc>
</member>
</bitfield>
<class name="PrintContext" c:symbol-prefix="print_context" c:type="GtkPrintContext" parent="GObject.Object" glib:type-name="GtkPrintContext" glib:get-type="gtk_print_context_get_type">
<doc xml:space="preserve">A `GtkPrintContext` encapsulates context information that is required when
drawing pages for printing.
This includes the cairo context and important parameters like page size
and resolution. It also lets you easily create [class@Pango.Layout] and
[class@Pango.Context] objects that match the font metrics of the cairo surface.
`GtkPrintContext` objects get passed to the
[signal@Gtk.PrintOperation::begin-print],
[signal@Gtk.PrintOperation::end-print],
[signal@Gtk.PrintOperation::request-page-setup] and
[signal@Gtk.PrintOperation::draw-page] signals on the
[class@Gtk.PrintOperation] object.
## Using GtkPrintContext in a ::draw-page callback
```c
static void
draw_page (GtkPrintOperation *operation,
GtkPrintContext *context,
int page_nr)
{
cairo_t *cr;
PangoLayout *layout;
PangoFontDescription *desc;
cr = gtk_print_context_get_cairo_context (context);
// Draw a red rectangle, as wide as the paper (inside the margins)
cairo_set_source_rgb (cr, 1.0, 0, 0);
cairo_rectangle (cr, 0, 0, gtk_print_context_get_width (context), 50);
cairo_fill (cr);
// Draw some lines
cairo_move_to (cr, 20, 10);
cairo_line_to (cr, 40, 20);
cairo_arc (cr, 60, 60, 20, 0, M_PI);
cairo_line_to (cr, 80, 20);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_set_line_width (cr, 5);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
cairo_stroke (cr);
// Draw some text
layout = gtk_print_context_create_pango_layout (context);
pango_layout_set_text (layout, "Hello World! Printing is easy", -1);
desc = pango_font_description_from_string ("sans 28");
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
cairo_move_to (cr, 30, 20);
pango_cairo_layout_path (cr, layout);
// Font Outline
cairo_set_source_rgb (cr, 0.93, 1.0, 0.47);
cairo_set_line_width (cr, 0.5);
cairo_stroke_preserve (cr);
// Font Fill
cairo_set_source_rgb (cr, 0, 0.0, 1.0);
cairo_fill (cr);
g_object_unref (layout);
}
```</doc>
<method name="create_pango_context" c:identifier="gtk_print_context_create_pango_context">
<doc xml:space="preserve">Creates a new `PangoContext` that can be used with the
`GtkPrintContext`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new Pango context for @context</doc>
<type name="Pango.Context" c:type="PangoContext*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="create_pango_layout" c:identifier="gtk_print_context_create_pango_layout">
<doc xml:space="preserve">Creates a new `PangoLayout` that is suitable for use
with the `GtkPrintContext`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new Pango layout for @context</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cairo_context" c:identifier="gtk_print_context_get_cairo_context">
<doc xml:space="preserve">Obtains the cairo context that is associated with the
`GtkPrintContext`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the cairo context of @context</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_dpi_x" c:identifier="gtk_print_context_get_dpi_x">
<doc xml:space="preserve">Obtains the horizontal resolution of the `GtkPrintContext`,
in dots per inch.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal resolution of @context</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_dpi_y" c:identifier="gtk_print_context_get_dpi_y">
<doc xml:space="preserve">Obtains the vertical resolution of the `GtkPrintContext`,
in dots per inch.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical resolution of @context</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hard_margins" c:identifier="gtk_print_context_get_hard_margins">
<doc xml:space="preserve">Obtains the hardware printer margins of the `GtkPrintContext`,
in units.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the hard margins were retrieved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
<parameter name="top" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">top hardware printer margin</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="bottom" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">bottom hardware printer margin</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="left" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">left hardware printer margin</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="right" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">right hardware printer margin</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_height" c:identifier="gtk_print_context_get_height">
<doc xml:space="preserve">Obtains the height of the `GtkPrintContext`, in pixels.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the height of @context</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_setup" c:identifier="gtk_print_context_get_page_setup">
<doc xml:space="preserve">Obtains the `GtkPageSetup` that determines the page
dimensions of the `GtkPrintContext`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page setup of @context</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pango_fontmap" c:identifier="gtk_print_context_get_pango_fontmap">
<doc xml:space="preserve">Returns a `PangoFontMap` that is suitable for use
with the `GtkPrintContext`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the font map of @context</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width" c:identifier="gtk_print_context_get_width">
<doc xml:space="preserve">Obtains the width of the `GtkPrintContext`, in pixels.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the width of @context</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_cairo_context" c:identifier="gtk_print_context_set_cairo_context">
<doc xml:space="preserve">Sets a new cairo context on a print context.
This function is intended to be used when implementing
an internal print preview, it is not needed for printing,
since GTK itself creates a suitable cairo context in that
case.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintContext`</doc>
<type name="PrintContext" c:type="GtkPrintContext*"/>
</instance-parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">the cairo context</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="dpi_x" transfer-ownership="none">
<doc xml:space="preserve">the horizontal resolution to use with @cr</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="dpi_y" transfer-ownership="none">
<doc xml:space="preserve">the vertical resolution to use with @cr</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
</class>
<enumeration name="PrintDuplex" glib:type-name="GtkPrintDuplex" glib:get-type="gtk_print_duplex_get_type" c:type="GtkPrintDuplex">
<doc xml:space="preserve">See also gtk_print_settings_set_duplex().</doc>
<member name="simplex" value="0" c:identifier="GTK_PRINT_DUPLEX_SIMPLEX" glib:nick="simplex" glib:name="GTK_PRINT_DUPLEX_SIMPLEX">
<doc xml:space="preserve">No duplex.</doc>
</member>
<member name="horizontal" value="1" c:identifier="GTK_PRINT_DUPLEX_HORIZONTAL" glib:nick="horizontal" glib:name="GTK_PRINT_DUPLEX_HORIZONTAL">
<doc xml:space="preserve">Horizontal duplex.</doc>
</member>
<member name="vertical" value="2" c:identifier="GTK_PRINT_DUPLEX_VERTICAL" glib:nick="vertical" glib:name="GTK_PRINT_DUPLEX_VERTICAL">
<doc xml:space="preserve">Vertical duplex.</doc>
</member>
</enumeration>
<enumeration name="PrintError" glib:type-name="GtkPrintError" glib:get-type="gtk_print_error_get_type" c:type="GtkPrintError" glib:error-domain="gtk-print-error-quark">
<doc xml:space="preserve">Error codes that identify various errors that can occur while
using the GTK printing support.</doc>
<member name="general" value="0" c:identifier="GTK_PRINT_ERROR_GENERAL" glib:nick="general" glib:name="GTK_PRINT_ERROR_GENERAL">
<doc xml:space="preserve">An unspecified error occurred.</doc>
</member>
<member name="internal_error" value="1" c:identifier="GTK_PRINT_ERROR_INTERNAL_ERROR" glib:nick="internal-error" glib:name="GTK_PRINT_ERROR_INTERNAL_ERROR">
<doc xml:space="preserve">An internal error occurred.</doc>
</member>
<member name="nomem" value="2" c:identifier="GTK_PRINT_ERROR_NOMEM" glib:nick="nomem" glib:name="GTK_PRINT_ERROR_NOMEM">
<doc xml:space="preserve">A memory allocation failed.</doc>
</member>
<member name="invalid_file" value="3" c:identifier="GTK_PRINT_ERROR_INVALID_FILE" glib:nick="invalid-file" glib:name="GTK_PRINT_ERROR_INVALID_FILE">
<doc xml:space="preserve">An error occurred while loading a page setup
or paper size from a key file.</doc>
</member>
<function name="quark" c:identifier="gtk_print_error_quark">
<doc xml:space="preserve">Registers an error quark for `GtkPrintOperation` if necessary.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The error quark used for `GtkPrintOperation` errors.</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<class name="PrintJob" c:symbol-prefix="print_job" c:type="GtkPrintJob" parent="GObject.Object" glib:type-name="GtkPrintJob" glib:get-type="gtk_print_job_get_type">
<doc xml:space="preserve">A `GtkPrintJob` object represents a job that is sent to a printer.
You only need to deal directly with print jobs if you use the
non-portable [class@Gtk.PrintUnixDialog] API.
Use [method@Gtk.PrintJob.get_surface] to obtain the cairo surface
onto which the pages must be drawn. Use [method@Gtk.PrintJob.send]
to send the finished job to the printer. If you don&#x2019;t use cairo
`GtkPrintJob` also supports printing of manually generated PostScript,
via [method@Gtk.PrintJob.set_source_file].</doc>
<constructor name="new" c:identifier="gtk_print_job_new">
<doc xml:space="preserve">Creates a new `GtkPrintJob`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">the job title</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</constructor>
<method name="get_collate" c:identifier="gtk_print_job_get_collate">
<doc xml:space="preserve">Gets whether this job is printed collated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the job is printed collated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_up" c:identifier="gtk_print_job_get_n_up">
<doc xml:space="preserve">Gets the n-up setting for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the n-up setting</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_up_layout" c:identifier="gtk_print_job_get_n_up_layout">
<doc xml:space="preserve">Gets the n-up layout setting for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the n-up layout</doc>
<type name="NumberUpLayout" c:type="GtkNumberUpLayout"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_num_copies" c:identifier="gtk_print_job_get_num_copies">
<doc xml:space="preserve">Gets the number of copies of this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of copies</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_ranges" c:identifier="gtk_print_job_get_page_ranges">
<doc xml:space="preserve">Gets the page ranges for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a pointer to an
array of `GtkPageRange` structs</doc>
<array length="0" zero-terminated="0" c:type="GtkPageRange*">
<type name="PageRange" c:type="GtkPageRange"/>
</array>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="n_ranges" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the number of ranges</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_page_set" c:identifier="gtk_print_job_get_page_set">
<doc xml:space="preserve">Gets the `GtkPageSet` setting for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkPageSet` setting</doc>
<type name="PageSet" c:type="GtkPageSet"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pages" c:identifier="gtk_print_job_get_pages">
<doc xml:space="preserve">Gets the `GtkPrintPages` setting for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintPages` setting</doc>
<type name="PrintPages" c:type="GtkPrintPages"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_printer" c:identifier="gtk_print_job_get_printer" glib:get-property="printer">
<attribute name="org.gtk.Method.get_property" value="printer"/>
<doc xml:space="preserve">Gets the `GtkPrinter` of the print job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the printer of @job</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reverse" c:identifier="gtk_print_job_get_reverse">
<doc xml:space="preserve">Gets whether this job is printed reversed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the job is printed reversed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_rotate" c:identifier="gtk_print_job_get_rotate">
<doc xml:space="preserve">Gets whether the job is printed rotated.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the job is printed rotated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scale" c:identifier="gtk_print_job_get_scale">
<doc xml:space="preserve">Gets the scale for this job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scale</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_settings" c:identifier="gtk_print_job_get_settings" glib:get-property="settings">
<attribute name="org.gtk.Method.get_property" value="settings"/>
<doc xml:space="preserve">Gets the `GtkPrintSettings` of the print job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the settings of @job</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_status" c:identifier="gtk_print_job_get_status">
<doc xml:space="preserve">Gets the status of the print job.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the status of @job</doc>
<type name="PrintStatus" c:type="GtkPrintStatus"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_surface" c:identifier="gtk_print_job_get_surface" throws="1">
<doc xml:space="preserve">Gets a cairo surface onto which the pages of
the print job should be rendered.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the cairo surface of @job</doc>
<type name="cairo.Surface" c:type="cairo_surface_t*"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_print_job_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Gets the job title.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the title of @job</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_track_print_status" c:identifier="gtk_print_job_get_track_print_status" glib:get-property="track-print-status">
<attribute name="org.gtk.Method.get_property" value="track-print-status"/>
<doc xml:space="preserve">Returns whether jobs will be tracked after printing.
For details, see [method@Gtk.PrintJob.set_track_print_status].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if print job status will be reported after printing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
</parameters>
</method>
<method name="send" c:identifier="gtk_print_job_send">
<doc xml:space="preserve">Sends the print job off to the printer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="callback" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to call when the job completes or an error occurs</doc>
<type name="PrintJobCompleteFunc" c:type="GtkPrintJobCompleteFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data that gets passed to @callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="dnotify" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notify for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_collate" c:identifier="gtk_print_job_set_collate">
<doc xml:space="preserve">Sets whether this job is printed collated.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="collate" transfer-ownership="none">
<doc xml:space="preserve">whether the job is printed collated</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_n_up" c:identifier="gtk_print_job_set_n_up">
<doc xml:space="preserve">Sets the n-up setting for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="n_up" transfer-ownership="none">
<doc xml:space="preserve">the n-up value</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_n_up_layout" c:identifier="gtk_print_job_set_n_up_layout">
<doc xml:space="preserve">Sets the n-up layout setting for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">the n-up layout setting</doc>
<type name="NumberUpLayout" c:type="GtkNumberUpLayout"/>
</parameter>
</parameters>
</method>
<method name="set_num_copies" c:identifier="gtk_print_job_set_num_copies">
<doc xml:space="preserve">Sets the number of copies for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="num_copies" transfer-ownership="none">
<doc xml:space="preserve">the number of copies</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_page_ranges" c:identifier="gtk_print_job_set_page_ranges">
<doc xml:space="preserve">Sets the page ranges for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="ranges" transfer-ownership="full">
<doc xml:space="preserve">pointer to an array of
`GtkPageRange` structs</doc>
<array length="1" zero-terminated="0" c:type="GtkPageRange*">
<type name="PageRange" c:type="GtkPageRange"/>
</array>
</parameter>
<parameter name="n_ranges" transfer-ownership="none">
<doc xml:space="preserve">the length of the @ranges array</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_page_set" c:identifier="gtk_print_job_set_page_set">
<doc xml:space="preserve">Sets the `GtkPageSet` setting for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="page_set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSet` setting</doc>
<type name="PageSet" c:type="GtkPageSet"/>
</parameter>
</parameters>
</method>
<method name="set_pages" c:identifier="gtk_print_job_set_pages">
<doc xml:space="preserve">Sets the `GtkPrintPages` setting for this job.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="pages" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintPages` setting</doc>
<type name="PrintPages" c:type="GtkPrintPages"/>
</parameter>
</parameters>
</method>
<method name="set_reverse" c:identifier="gtk_print_job_set_reverse">
<doc xml:space="preserve">Sets whether this job is printed reversed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="reverse" transfer-ownership="none">
<doc xml:space="preserve">whether the job is printed reversed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_rotate" c:identifier="gtk_print_job_set_rotate">
<doc xml:space="preserve">Sets whether this job is printed rotated.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="rotate" transfer-ownership="none">
<doc xml:space="preserve">whether to print rotated</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_scale" c:identifier="gtk_print_job_set_scale">
<doc xml:space="preserve">Sets the scale for this job.
1.0 means unscaled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">the scale</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_source_fd" c:identifier="gtk_print_job_set_source_fd" throws="1">
<doc xml:space="preserve">Make the `GtkPrintJob` send an existing document to the
printing system.
The file can be in any format understood by the platforms
printing system (typically PostScript, but on many platforms
PDF may work too). See [method@Gtk.Printer.accepts_pdf] and
[method@Gtk.Printer.accepts_ps].
This is similar to [method@Gtk.PrintJob.set_source_file],
but takes expects an open file descriptor for the file,
instead of a filename.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="fd" transfer-ownership="none">
<doc xml:space="preserve">a file descriptor</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_source_file" c:identifier="gtk_print_job_set_source_file" throws="1">
<doc xml:space="preserve">Make the `GtkPrintJob` send an existing document to the
printing system.
The file can be in any format understood by the platforms
printing system (typically PostScript, but on many platforms
PDF may work too). See [method@Gtk.Printer.accepts_pdf] and
[method@Gtk.Printer.accepts_ps].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if an error occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">the file to be printed</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_track_print_status" c:identifier="gtk_print_job_set_track_print_status" glib:set-property="track-print-status">
<attribute name="org.gtk.Method.set_property" value="track-print-status"/>
<doc xml:space="preserve">If track_status is %TRUE, the print job will try to continue report
on the status of the print job in the printer queues and printer.
This can allow your application to show things like &#x201C;out of paper&#x201D;
issues, and when the print job actually reaches the printer.
This function is often implemented using some form of polling,
so it should not be enabled unless needed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="job" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</instance-parameter>
<parameter name="track_status" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to track status after printing</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="page-setup" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">Page setup.</doc>
<type name="PageSetup"/>
</property>
<property name="printer" writable="1" construct-only="1" transfer-ownership="none" getter="get_printer">
<attribute name="org.gtk.Property.get" value="gtk_print_job_get_printer"/>
<doc xml:space="preserve">The printer to send the job to.</doc>
<type name="Printer"/>
</property>
<property name="settings" writable="1" construct-only="1" transfer-ownership="none" getter="get_settings">
<attribute name="org.gtk.Property.get" value="gtk_print_job_get_settings"/>
<doc xml:space="preserve">Printer settings.</doc>
<type name="PrintSettings"/>
</property>
<property name="title" writable="1" construct-only="1" transfer-ownership="none" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_print_job_get_title"/>
<doc xml:space="preserve">The title of the print job.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="track-print-status" writable="1" transfer-ownership="none" setter="set_track_print_status" getter="get_track_print_status">
<attribute name="org.gtk.Property.get" value="gtk_print_job_get_track_print_status"/>
<attribute name="org.gtk.Property.set" value="gtk_print_job_set_track_print_status"/>
<doc xml:space="preserve">%TRUE if the print job will continue to emit status-changed
signals after the print data has been setn to the printer.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="status-changed" when="last">
<doc xml:space="preserve">Emitted when the status of a job changes.
The signal handler can use [method@Gtk.PrintJob.get_status]
to obtain the new status.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="PrintJobCompleteFunc" c:type="GtkPrintJobCompleteFunc">
<doc xml:space="preserve">The type of callback that is passed to gtk_print_job_send().
It is called when the print job has been completely sent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="print_job" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintJob`</doc>
<type name="PrintJob" c:type="GtkPrintJob*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data that has been passed to gtk_print_job_send()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="error" transfer-ownership="none">
<doc xml:space="preserve">a `GError` that contains error information if the sending
of the print job failed, otherwise %NULL</doc>
<type name="GLib.Error" c:type="const GError*"/>
</parameter>
</parameters>
</callback>
<class name="PrintOperation" c:symbol-prefix="print_operation" c:type="GtkPrintOperation" parent="GObject.Object" glib:type-name="GtkPrintOperation" glib:get-type="gtk_print_operation_get_type" glib:type-struct="PrintOperationClass">
<doc xml:space="preserve">`GtkPrintOperation` is the high-level, portable printing API.
It looks a bit different than other GTK dialogs such as the
`GtkFileChooser`, since some platforms don&#x2019;t expose enough
infrastructure to implement a good print dialog. On such
platforms, `GtkPrintOperation` uses the native print dialog.
On platforms which do not provide a native print dialog, GTK
uses its own, see [class@Gtk.PrintUnixDialog].
The typical way to use the high-level printing API is to create
a `GtkPrintOperation` object with [ctor@Gtk.PrintOperation.new]
when the user selects to print. Then you set some properties on it,
e.g. the page size, any [class@Gtk.PrintSettings] from previous print
operations, the number of pages, the current page, etc.
Then you start the print operation by calling [method@Gtk.PrintOperation.run].
It will then show a dialog, let the user select a printer and options.
When the user finished the dialog, various signals will be emitted on
the `GtkPrintOperation`, the main one being
[signal@Gtk.PrintOperation::draw-page], which you are supposed to handle
and render the page on the provided [class@Gtk.PrintContext] using Cairo.
# The high-level printing API
```c
static GtkPrintSettings *settings = NULL;
static void
do_print (void)
{
GtkPrintOperation *print;
GtkPrintOperationResult res;
print = gtk_print_operation_new ();
if (settings != NULL)
gtk_print_operation_set_print_settings (print, settings);
g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
GTK_WINDOW (main_window), NULL);
if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
{
if (settings != NULL)
g_object_unref (settings);
settings = g_object_ref (gtk_print_operation_get_print_settings (print));
}
g_object_unref (print);
}
```
By default `GtkPrintOperation` uses an external application to do
print preview. To implement a custom print preview, an application
must connect to the preview signal. The functions
[method@Gtk.PrintOperationPreview.render_page],
[method@Gtk.PrintOperationPreview.end_preview] and
[method@Gtk.PrintOperationPreview.is_selected]
are useful when implementing a print preview.</doc>
<implements name="PrintOperationPreview"/>
<constructor name="new" c:identifier="gtk_print_operation_new">
<doc xml:space="preserve">Creates a new `GtkPrintOperation`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</return-value>
</constructor>
<virtual-method name="begin_print">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="create_custom_widget" introspectable="0">
<return-value>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="custom_widget_apply">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="done">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="result" transfer-ownership="none">
<type name="PrintOperationResult" c:type="GtkPrintOperationResult"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="draw_page">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="end_print">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="paginate">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="preview">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="parent" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="request_page_setup">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="status_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="update_custom_widget">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</virtual-method>
<method name="cancel" c:identifier="gtk_print_operation_cancel">
<doc xml:space="preserve">Cancels a running print operation.
This function may be called from a [signal@Gtk.PrintOperation::begin-print],
[signal@Gtk.PrintOperation::paginate] or [signal@Gtk.PrintOperation::draw-page]
signal handler to stop the currently running print operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="draw_page_finish" c:identifier="gtk_print_operation_draw_page_finish">
<doc xml:space="preserve">Signal that drawing of particular page is complete.
It is called after completion of page drawing (e.g. drawing
in another thread). If [method@Gtk.PrintOperation.set_defer_drawing]
was called before, then this function has to be called by application.
Otherwise it is called by GTK itself.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_default_page_setup" c:identifier="gtk_print_operation_get_default_page_setup" glib:get-property="default-page-setup">
<attribute name="org.gtk.Method.get_property" value="default-page-setup"/>
<doc xml:space="preserve">Returns the default page setup.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default page setup</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_embed_page_setup" c:identifier="gtk_print_operation_get_embed_page_setup" glib:get-property="embed-page-setup">
<attribute name="org.gtk.Method.get_property" value="embed-page-setup"/>
<doc xml:space="preserve">Gets whether page setup selection combos are embedded</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether page setup selection combos are embedded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_error" c:identifier="gtk_print_operation_get_error" throws="1">
<doc xml:space="preserve">Call this when the result of a print operation is
%GTK_PRINT_OPERATION_RESULT_ERROR.
It can be called either after [method@Gtk.PrintOperation.run]
returns, or in the [signal@Gtk.PrintOperation::done] signal
handler.
The returned `GError` will contain more details on what went wrong.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_selection" c:identifier="gtk_print_operation_get_has_selection" glib:get-property="has-selection">
<attribute name="org.gtk.Method.get_property" value="has-selection"/>
<doc xml:space="preserve">Gets whether there is a selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there is a selection</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_pages_to_print" c:identifier="gtk_print_operation_get_n_pages_to_print" glib:get-property="n-pages-to-print">
<attribute name="org.gtk.Method.get_property" value="n-pages-to-print"/>
<doc xml:space="preserve">Returns the number of pages that will be printed.
Note that this value is set during print preparation phase
(%GTK_PRINT_STATUS_PREPARING), so this function should never be
called before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA).
You can connect to the [signal@Gtk.PrintOperation::status-changed]
signal and call gtk_print_operation_get_n_pages_to_print() when
print status is %GTK_PRINT_STATUS_GENERATING_DATA.
This is typically used to track the progress of print operation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of pages that will be printed</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_print_settings" c:identifier="gtk_print_operation_get_print_settings" glib:get-property="print-settings">
<attribute name="org.gtk.Method.get_property" value="print-settings"/>
<doc xml:space="preserve">Returns the current print settings.
Note that the return value is %NULL until either
[method@Gtk.PrintOperation.set_print_settings] or
[method@Gtk.PrintOperation.run] have been called.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current print settings of @op.</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_status" c:identifier="gtk_print_operation_get_status" glib:get-property="status">
<attribute name="org.gtk.Method.get_property" value="status"/>
<doc xml:space="preserve">Returns the status of the print operation.
Also see [method@Gtk.PrintOperation.get_status_string].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the status of the print operation</doc>
<type name="PrintStatus" c:type="GtkPrintStatus"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_status_string" c:identifier="gtk_print_operation_get_status_string" glib:get-property="status-string">
<attribute name="org.gtk.Method.get_property" value="status-string"/>
<doc xml:space="preserve">Returns a string representation of the status of the
print operation.
The string is translated and suitable for displaying
the print status e.g. in a `GtkStatusbar`.
Use [method@Gtk.PrintOperation.get_status] to obtain
a status value that is suitable for programmatic use.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a string representation of the status
of the print operation</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_support_selection" c:identifier="gtk_print_operation_get_support_selection" glib:get-property="support-selection">
<attribute name="org.gtk.Method.get_property" value="support-selection"/>
<doc xml:space="preserve">Gets whether the application supports print of selection</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the application supports print of selection</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_finished" c:identifier="gtk_print_operation_is_finished">
<doc xml:space="preserve">A convenience function to find out if the print operation
is finished.
a print operation is finished if its status is either
%GTK_PRINT_STATUS_FINISHED or %GTK_PRINT_STATUS_FINISHED_ABORTED.
Note: when you enable print status tracking the print operation
can be in a non-finished state even after done has been called, as
the operation status then tracks the print job status on the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the print operation is finished.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="run" c:identifier="gtk_print_operation_run" throws="1">
<doc xml:space="preserve">Runs the print operation.
Normally that this function does not return until the rendering
of all pages is complete. You can connect to the
[signal@Gtk.PrintOperation::status-changed] signal on @op to obtain
some information about the progress of the print operation.
Furthermore, it may use a recursive mainloop to show the print dialog.
If you set the [Gtk.PrintOperation:allow-async] property, the operation
will run asynchronously if this is supported on the platform. The
[signal@Gtk.PrintOperation::done] signal will be emitted with the result
of the operation when the it is done (i.e. when the dialog is canceled,
or when the print succeeds or fails).
```c
if (settings != NULL)
gtk_print_operation_set_print_settings (print, settings);
if (page_setup != NULL)
gtk_print_operation_set_default_page_setup (print, page_setup);
g_signal_connect (print, "begin-print",
G_CALLBACK (begin_print), &amp;data);
g_signal_connect (print, "draw-page",
G_CALLBACK (draw_page), &amp;data);
res = gtk_print_operation_run (print,
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
parent,
&amp;error);
if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
{
error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error printing file:\n%s",
error-&gt;message);
g_signal_connect (error_dialog, "response",
G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (error_dialog);
g_error_free (error);
}
else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
{
if (settings != NULL)
g_object_unref (settings);
settings = g_object_ref (gtk_print_operation_get_print_settings (print));
}
```
Note that gtk_print_operation_run() can only be called once on a
given `GtkPrintOperation`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the result of the print operation. A return value of
%GTK_PRINT_OPERATION_RESULT_APPLY indicates that the printing was
completed successfully. In this case, it is a good idea to obtain
the used print settings with
[method@Gtk.PrintOperation.get_print_settings]
and store them for reuse with the next print operation. A value of
%GTK_PRINT_OPERATION_RESULT_IN_PROGRESS means the operation is running
asynchronously, and will emit the [signal@Gtk.PrintOperation::done]
signal when done.</doc>
<type name="PrintOperationResult" c:type="GtkPrintOperationResult"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="action" transfer-ownership="none">
<doc xml:space="preserve">the action to start</doc>
<type name="PrintOperationAction" c:type="GtkPrintOperationAction"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="set_allow_async" c:identifier="gtk_print_operation_set_allow_async" glib:set-property="allow-async">
<attribute name="org.gtk.Method.set_property" value="allow-async"/>
<doc xml:space="preserve">Sets whether gtk_print_operation_run() may return
before the print operation is completed.
Note that some platforms may not allow asynchronous
operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="allow_async" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to allow asynchronous operation</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_current_page" c:identifier="gtk_print_operation_set_current_page" glib:set-property="current-page">
<attribute name="org.gtk.Method.set_property" value="current-page"/>
<doc xml:space="preserve">Sets the current page.
If this is called before [method@Gtk.PrintOperation.run],
the user will be able to select to print only the current page.
Note that this only makes sense for pre-paginated documents.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="current_page" transfer-ownership="none">
<doc xml:space="preserve">the current page, 0-based</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_custom_tab_label" c:identifier="gtk_print_operation_set_custom_tab_label" glib:set-property="custom-tab-label">
<attribute name="org.gtk.Method.set_property" value="custom-tab-label"/>
<doc xml:space="preserve">Sets the label for the tab holding custom widgets.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the label to use, or %NULL to use the default label</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_default_page_setup" c:identifier="gtk_print_operation_set_default_page_setup" glib:set-property="default-page-setup">
<attribute name="org.gtk.Method.set_property" value="default-page-setup"/>
<doc xml:space="preserve">Makes @default_page_setup the default page setup for @op.
This page setup will be used by [method@Gtk.PrintOperation.run],
but it can be overridden on a per-page basis by connecting
to the [signal@Gtk.PrintOperation::request-page-setup] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="default_page_setup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</method>
<method name="set_defer_drawing" c:identifier="gtk_print_operation_set_defer_drawing">
<doc xml:space="preserve">Sets up the `GtkPrintOperation` to wait for calling of
[method@Gtk.PrintOperation.draw_page_finish from application.
This can be used for drawing page in another thread.
This function must be called in the callback of the
[signal@Gtk.PrintOperation::draw-page] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_embed_page_setup" c:identifier="gtk_print_operation_set_embed_page_setup" glib:set-property="embed-page-setup">
<attribute name="org.gtk.Method.set_property" value="embed-page-setup"/>
<doc xml:space="preserve">Embed page size combo box and orientation combo box into page setup page.
Selected page setup is stored as default page setup in `GtkPrintOperation`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="embed" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to embed page setup selection in the `GtkPrintUnixDialog`</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_export_filename" c:identifier="gtk_print_operation_set_export_filename" glib:set-property="export-filename">
<attribute name="org.gtk.Method.set_property" value="export-filename"/>
<doc xml:space="preserve">Sets up the `GtkPrintOperation` to generate a file instead
of showing the print dialog.
The intended use of this function is for implementing
&#x201C;Export to PDF&#x201D; actions. Currently, PDF is the only supported
format.
&#x201C;Print to PDF&#x201D; support is independent of this and is done
by letting the user pick the &#x201C;Print to PDF&#x201D; item from the list
of printers in the print dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none">
<doc xml:space="preserve">the filename for the exported file</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_has_selection" c:identifier="gtk_print_operation_set_has_selection" glib:set-property="has-selection">
<attribute name="org.gtk.Method.set_property" value="has-selection"/>
<doc xml:space="preserve">Sets whether there is a selection to print.
Application has to set number of pages to which the selection
will draw by [method@Gtk.PrintOperation.set_n_pages] in a handler
for the [signal@Gtk.PrintOperation::begin-print] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="has_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE indicates that a selection exists</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_job_name" c:identifier="gtk_print_operation_set_job_name" glib:set-property="job-name">
<attribute name="org.gtk.Method.set_property" value="job-name"/>
<doc xml:space="preserve">Sets the name of the print job.
The name is used to identify the job (e.g. in monitoring
applications like eggcups).
If you don&#x2019;t set a job name, GTK picks a default one by
numbering successive print jobs.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="job_name" transfer-ownership="none">
<doc xml:space="preserve">a string that identifies the print job</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_n_pages" c:identifier="gtk_print_operation_set_n_pages" glib:set-property="n-pages">
<attribute name="org.gtk.Method.set_property" value="n-pages"/>
<doc xml:space="preserve">Sets the number of pages in the document.
This must be set to a positive number before the rendering
starts. It may be set in a [signal@Gtk.PrintOperation::begin-print]
signal handler.
Note that the page numbers passed to the
[signal@Gtk.PrintOperation::request-page-setup]
and [signal@Gtk.PrintOperation::draw-page] signals are 0-based, i.e.
if the user chooses to print all pages, the last ::draw-page signal
will be for page @n_pages - 1.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="n_pages" transfer-ownership="none">
<doc xml:space="preserve">the number of pages</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_print_settings" c:identifier="gtk_print_operation_set_print_settings" glib:set-property="print-settings">
<attribute name="org.gtk.Method.set_property" value="print-settings"/>
<doc xml:space="preserve">Sets the print settings for @op.
This is typically used to re-establish print settings
from a previous print operation, see [method@Gtk.PrintOperation.run].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="print_settings" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">`GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</method>
<method name="set_show_progress" c:identifier="gtk_print_operation_set_show_progress" glib:set-property="show-progress">
<attribute name="org.gtk.Method.set_property" value="show-progress"/>
<doc xml:space="preserve">If @show_progress is %TRUE, the print operation will show
a progress dialog during the print operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="show_progress" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to show a progress dialog</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_support_selection" c:identifier="gtk_print_operation_set_support_selection" glib:set-property="support-selection">
<attribute name="org.gtk.Method.set_property" value="support-selection"/>
<doc xml:space="preserve">Sets whether selection is supported by `GtkPrintOperation`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="support_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to support selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_track_print_status" c:identifier="gtk_print_operation_set_track_print_status" glib:set-property="track-print-status">
<attribute name="org.gtk.Method.set_property" value="track-print-status"/>
<doc xml:space="preserve">If track_status is %TRUE, the print operation will try to continue
report on the status of the print job in the printer queues and printer.
This can allow your application to show things like &#x201C;out of paper&#x201D;
issues, and when the print job actually reaches the printer.
This function is often implemented using some form of polling,
so it should not be enabled unless needed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="track_status" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to track status after printing</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_unit" c:identifier="gtk_print_operation_set_unit" glib:set-property="unit">
<attribute name="org.gtk.Method.set_property" value="unit"/>
<doc xml:space="preserve">Sets up the transformation for the cairo context obtained from
`GtkPrintContext` in such a way that distances are measured in
units of @unit.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit to use</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_use_full_page" c:identifier="gtk_print_operation_set_use_full_page" glib:set-property="use-full-page">
<attribute name="org.gtk.Method.set_property" value="use-full-page"/>
<doc xml:space="preserve">If @full_page is %TRUE, the transformation for the cairo context
obtained from `GtkPrintContext` puts the origin at the top left
corner of the page.
This may not be the top left corner of the sheet, depending on page
orientation and the number of pages per sheet). Otherwise, the origin
is at the top left corner of the imageable area (i.e. inside the margins).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="op" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperation`</doc>
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</instance-parameter>
<parameter name="full_page" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to set up the `GtkPrintContext` for the full page</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="allow-async" writable="1" transfer-ownership="none" setter="set_allow_async">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_allow_async"/>
<doc xml:space="preserve">Determines whether the print operation may run asynchronously or not.
Some systems don't support asynchronous printing, but those that do
will return %GTK_PRINT_OPERATION_RESULT_IN_PROGRESS as the status, and
emit the [signal@Gtk.PrintOperation::done] signal when the operation
is actually done.
The Windows port does not support asynchronous operation at all (this
is unlikely to change). On other platforms, all actions except for
%GTK_PRINT_OPERATION_ACTION_EXPORT support asynchronous operation.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="current-page" writable="1" transfer-ownership="none" setter="set_current_page">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_current_page"/>
<doc xml:space="preserve">The current page in the document.
If this is set before [method@Gtk.PrintOperation.run],
the user will be able to select to print only the current page.
Note that this only makes sense for pre-paginated documents.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="custom-tab-label" writable="1" transfer-ownership="none" setter="set_custom_tab_label">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_custom_tab_label"/>
<doc xml:space="preserve">Used as the label of the tab containing custom widgets.
Note that this property may be ignored on some platforms.
If this is %NULL, GTK uses a default label.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="default-page-setup" writable="1" transfer-ownership="none" setter="set_default_page_setup" getter="get_default_page_setup">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_default_page_setup"/>
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_default_page_setup"/>
<doc xml:space="preserve">The `GtkPageSetup` used by default.
This page setup will be used by [method@Gtk.PrintOperation.run],
but it can be overridden on a per-page basis by connecting
to the [signal@Gtk.PrintOperation::request-page-setup] signal.</doc>
<type name="PageSetup"/>
</property>
<property name="embed-page-setup" writable="1" transfer-ownership="none" setter="set_embed_page_setup" getter="get_embed_page_setup">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_embed_page_setup"/>
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_embed_page_setup"/>
<doc xml:space="preserve">If %TRUE, page size combo box and orientation combo box
are embedded into page setup page.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="export-filename" writable="1" transfer-ownership="none" setter="set_export_filename">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_export_filename"/>
<doc xml:space="preserve">The name of a file to generate instead of showing the print dialog.
Currently, PDF is the only supported format.
The intended use of this property is for implementing
&#x201C;Export to PDF&#x201D; actions.
&#x201C;Print to PDF&#x201D; support is independent of this and is done
by letting the user pick the &#x201C;Print to PDF&#x201D; item from the
list of printers in the print dialog.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="has-selection" writable="1" transfer-ownership="none" setter="set_has_selection" getter="get_has_selection">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_has_selection"/>
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_has_selection"/>
<doc xml:space="preserve">Determines whether there is a selection in your application.
This can allow your application to print the selection.
This is typically used to make a "Selection" button sensitive.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="job-name" writable="1" transfer-ownership="none" setter="set_job_name">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_job_name"/>
<doc xml:space="preserve">A string used to identify the job (e.g. in monitoring
applications like eggcups).
If you don't set a job name, GTK picks a default one
by numbering successive print jobs.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="n-pages" writable="1" transfer-ownership="none" setter="set_n_pages">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_n_pages"/>
<doc xml:space="preserve">The number of pages in the document.
This must be set to a positive number before the rendering
starts. It may be set in a [signal@Gtk.PrintOperation::begin-print]
signal handler.
Note that the page numbers passed to the
[signal@Gtk.PrintOperation::request-page-setup] and
[signal@Gtk.PrintOperation::draw-page] signals are 0-based, i.e.
if the user chooses to print all pages, the last ::draw-page signal
will be for page @n_pages - 1.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="n-pages-to-print" transfer-ownership="none" getter="get_n_pages_to_print">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_n_pages_to_print"/>
<doc xml:space="preserve">The number of pages that will be printed.
Note that this value is set during print preparation phase
(%GTK_PRINT_STATUS_PREPARING), so this value should never be
get before the data generation phase (%GTK_PRINT_STATUS_GENERATING_DATA).
You can connect to the [signal@Gtk.PrintOperation::status-changed] signal
and call [method@Gtk.PrintOperation.get_n_pages_to_print] when
print status is %GTK_PRINT_STATUS_GENERATING_DATA.
This is typically used to track the progress of print operation.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="print-settings" writable="1" transfer-ownership="none" setter="set_print_settings" getter="get_print_settings">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_print_settings"/>
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_print_settings"/>
<doc xml:space="preserve">The `GtkPrintSettings` used for initializing the dialog.
Setting this property is typically used to re-establish
print settings from a previous print operation, see
[method@Gtk.PrintOperation.run].</doc>
<type name="PrintSettings"/>
</property>
<property name="show-progress" writable="1" transfer-ownership="none" setter="set_show_progress">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_show_progress"/>
<doc xml:space="preserve">Determines whether to show a progress dialog during the
print operation.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="status" transfer-ownership="none" getter="get_status">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_status"/>
<doc xml:space="preserve">The status of the print operation.</doc>
<type name="PrintStatus"/>
</property>
<property name="status-string" transfer-ownership="none" getter="get_status_string">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_status_string"/>
<doc xml:space="preserve">A string representation of the status of the print operation.
The string is translated and suitable for displaying the print
status e.g. in a `GtkStatusbar`.
See the [property@Gtk.PrintOperation:status] property for a status
value that is suitable for programmatic use.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="support-selection" writable="1" transfer-ownership="none" setter="set_support_selection" getter="get_support_selection">
<attribute name="org.gtk.Property.get" value="gtk_print_operation_get_support_selection"/>
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_support_selection"/>
<doc xml:space="preserve">If %TRUE, the print operation will support print of selection.
This allows the print dialog to show a "Selection" button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="track-print-status" writable="1" transfer-ownership="none" setter="set_track_print_status">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_track_print_status"/>
<doc xml:space="preserve">If %TRUE, the print operation will try to continue report on
the status of the print job in the printer queues and printer.
This can allow your application to show things like &#x201C;out of paper&#x201D;
issues, and when the print job actually reaches the printer.
However, this is often implemented using polling, and should
not be enabled unless needed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="unit" writable="1" transfer-ownership="none" setter="set_unit">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_unit"/>
<doc xml:space="preserve">The transformation for the cairo context obtained from
`GtkPrintContext` is set up in such a way that distances
are measured in units of @unit.</doc>
<type name="Unit"/>
</property>
<property name="use-full-page" writable="1" transfer-ownership="none" setter="set_use_full_page">
<attribute name="org.gtk.Property.set" value="gtk_print_operation_set_use_full_page"/>
<doc xml:space="preserve">If %TRUE, the transformation for the cairo context obtained
from `GtkPrintContext` puts the origin at the top left corner
of the page.
This may not be the top left corner of the sheet, depending on
page orientation and the number of pages per sheet. Otherwise,
the origin is at the top left corner of the imageable area (i.e.
inside the margins).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv" readable="0" private="1">
<type name="PrintOperationPrivate" c:type="GtkPrintOperationPrivate*"/>
</field>
<glib:signal name="begin-print" when="last">
<doc xml:space="preserve">Emitted after the user has finished changing print settings
in the dialog, before the actual rendering starts.
A typical use for ::begin-print is to use the parameters from the
[class@Gtk.PrintContext] and paginate the document accordingly,
and then set the number of pages with
[method@Gtk.PrintOperation.set_n_pages].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` for the current operation</doc>
<type name="PrintContext"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="create-custom-widget" when="last">
<doc xml:space="preserve">Emitted when displaying the print dialog.
If you return a widget in a handler for this signal it will be
added to a custom tab in the print dialog. You typically return a
container widget with multiple widgets in it.
The print dialog owns the returned widget, and its lifetime is not
controlled by the application. However, the widget is guaranteed
to stay around until the [signal@Gtk.PrintOperation::custom-widget-apply]
signal is emitted on the operation. Then you can read out any
information you need from the widgets.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A custom widget that gets embedded in
the print dialog</doc>
<type name="GObject.Object"/>
</return-value>
</glib:signal>
<glib:signal name="custom-widget-apply" when="last">
<doc xml:space="preserve">Emitted right before ::begin-print if you added
a custom widget in the ::create-custom-widget handler.
When you get this signal you should read the information from the
custom widgets, as the widgets are not guaranteed to be around at a
later time.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the custom widget added in ::create-custom-widget</doc>
<type name="Widget"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="done" when="last">
<doc xml:space="preserve">Emitted when the print operation run has finished doing
everything required for printing.
@result gives you information about what happened during the run.
If @result is %GTK_PRINT_OPERATION_RESULT_ERROR then you can call
[method@Gtk.PrintOperation.get_error] for more information.
If you enabled print status tracking then
[method@Gtk.PrintOperation.is_finished] may still return %FALSE
after the ::done signal was emitted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">the result of the print operation</doc>
<type name="PrintOperationResult"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="draw-page" when="last">
<doc xml:space="preserve">Emitted for every page that is printed.
The signal handler must render the @page_nr's page onto the cairo
context obtained from @context using
[method@Gtk.PrintContext.get_cairo_context].
```c
static void
draw_page (GtkPrintOperation *operation,
GtkPrintContext *context,
int page_nr,
gpointer user_data)
{
cairo_t *cr;
PangoLayout *layout;
double width, text_height;
int layout_height;
PangoFontDescription *desc;
cr = gtk_print_context_get_cairo_context (context);
width = gtk_print_context_get_width (context);
cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
cairo_fill (cr);
layout = gtk_print_context_create_pango_layout (context);
desc = pango_font_description_from_string ("sans 14");
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
pango_layout_set_text (layout, "some text", -1);
pango_layout_set_width (layout, width * PANGO_SCALE);
pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
pango_layout_get_size (layout, NULL, &amp;layout_height);
text_height = (double)layout_height / PANGO_SCALE;
cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2);
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
}
```
Use [method@Gtk.PrintOperation.set_use_full_page] and
[method@Gtk.PrintOperation.set_unit] before starting the print
operation to set up the transformation of the cairo context
according to your needs.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` for the current operation</doc>
<type name="PrintContext"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">the number of the currently printed page (0-based)</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="end-print" when="last">
<doc xml:space="preserve">Emitted after all pages have been rendered.
A handler for this signal can clean up any resources that have
been allocated in the [signal@Gtk.PrintOperation::begin-print] handler.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` for the current operation</doc>
<type name="PrintContext"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="paginate" when="last">
<doc xml:space="preserve">Emitted after the ::begin-print signal, but before the actual rendering
starts.
It keeps getting emitted until a connected signal handler returns %TRUE.
The ::paginate signal is intended to be used for paginating a document
in small chunks, to avoid blocking the user interface for a long
time. The signal handler should update the number of pages using
[method@Gtk.PrintOperation.set_n_pages], and return %TRUE if the document
has been completely paginated.
If you don't need to do pagination in chunks, you can simply do
it all in the ::begin-print handler, and set the number of pages
from there.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if pagination is complete</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` for the current operation</doc>
<type name="PrintContext"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="preview" when="last">
<doc xml:space="preserve">Gets emitted when a preview is requested from the native dialog.
The default handler for this signal uses an external viewer
application to preview.
To implement a custom print preview, an application must return
%TRUE from its handler for this signal. In order to use the
provided @context for the preview implementation, it must be
given a suitable cairo context with
[method@Gtk.PrintContext.set_cairo_context].
The custom preview implementation can use
[method@Gtk.PrintOperationPreview.is_selected] and
[method@Gtk.PrintOperationPreview.render_page] to find pages which
are selected for print and render them. The preview must be
finished by calling [method@Gtk.PrintOperationPreview.end_preview]
(typically in response to the user clicking a close button).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the listener wants to take over control of the preview</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintOperationPreview` for the current operation</doc>
<type name="PrintOperationPreview"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` that will be used</doc>
<type name="PrintContext"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkWindow` to use as window parent</doc>
<type name="Window"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="request-page-setup" when="last">
<doc xml:space="preserve">Emitted once for every page that is printed.
This gives the application a chance to modify the page setup.
Any changes done to @setup will be in force only for printing
this page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPrintContext` for the current operation</doc>
<type name="PrintContext"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">the number of the currently printed page (0-based)</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPageSetup`</doc>
<type name="PageSetup"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="status-changed" when="last">
<doc xml:space="preserve">Emitted at between the various phases of the print operation.
See [enum@Gtk.PrintStatus] for the phases that are being discriminated.
Use [method@Gtk.PrintOperation.get_status] to find out the current
status.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="update-custom-widget" when="last">
<doc xml:space="preserve">Emitted after change of selected printer.
The actual page setup and print settings are passed to the custom
widget, which can actualize itself according to this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the custom widget added in ::create-custom-widget</doc>
<type name="Widget"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<doc xml:space="preserve">actual page setup</doc>
<type name="PageSetup"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">actual print settings</doc>
<type name="PrintSettings"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="PrintOperationAction" glib:type-name="GtkPrintOperationAction" glib:get-type="gtk_print_operation_action_get_type" c:type="GtkPrintOperationAction">
<doc xml:space="preserve">Determines what action the print operation should perform.
A parameter of this typs is passed to [method@Gtk.PrintOperation.run].</doc>
<member name="print_dialog" value="0" c:identifier="GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG" glib:nick="print-dialog" glib:name="GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG">
<doc xml:space="preserve">Show the print dialog.</doc>
</member>
<member name="print" value="1" c:identifier="GTK_PRINT_OPERATION_ACTION_PRINT" glib:nick="print" glib:name="GTK_PRINT_OPERATION_ACTION_PRINT">
<doc xml:space="preserve">Start to print without showing
the print dialog, based on the current print settings.</doc>
</member>
<member name="preview" value="2" c:identifier="GTK_PRINT_OPERATION_ACTION_PREVIEW" glib:nick="preview" glib:name="GTK_PRINT_OPERATION_ACTION_PREVIEW">
<doc xml:space="preserve">Show the print preview.</doc>
</member>
<member name="export" value="3" c:identifier="GTK_PRINT_OPERATION_ACTION_EXPORT" glib:nick="export" glib:name="GTK_PRINT_OPERATION_ACTION_EXPORT">
<doc xml:space="preserve">Export to a file. This requires
the export-filename property to be set.</doc>
</member>
</enumeration>
<record name="PrintOperationClass" c:type="GtkPrintOperationClass" glib:is-gtype-struct-for="PrintOperation">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="done">
<callback name="done">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="result" transfer-ownership="none">
<type name="PrintOperationResult" c:type="GtkPrintOperationResult"/>
</parameter>
</parameters>
</callback>
</field>
<field name="begin_print">
<callback name="begin_print">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="paginate">
<callback name="paginate">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="request_page_setup">
<callback name="request_page_setup">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="draw_page">
<callback name="draw_page">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="end_print">
<callback name="end_print">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="status_changed">
<callback name="status_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="create_custom_widget" introspectable="0">
<callback name="create_custom_widget" introspectable="0">
<return-value>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="custom_widget_apply">
<callback name="custom_widget_apply">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="preview">
<callback name="preview">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="parent" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="update_custom_widget">
<callback name="update_custom_widget">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="operation" transfer-ownership="none">
<type name="PrintOperation" c:type="GtkPrintOperation*"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<interface name="PrintOperationPreview" c:symbol-prefix="print_operation_preview" c:type="GtkPrintOperationPreview" glib:type-name="GtkPrintOperationPreview" glib:get-type="gtk_print_operation_preview_get_type" glib:type-struct="PrintOperationPreviewIface">
<doc xml:space="preserve">`GtkPrintOperationPreview` is the interface that is used to
implement print preview.
A `GtkPrintOperationPreview` object is passed to the
[signal@Gtk.PrintOperation::preview] signal by
[class@Gtk.PrintOperation].</doc>
<virtual-method name="end_preview" invoker="end_preview">
<doc xml:space="preserve">Ends a preview.
This function must be called to finish a custom print preview.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="got_page_size">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="is_selected" invoker="is_selected">
<doc xml:space="preserve">Returns whether the given page is included in the set of pages that
have been selected for printing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the page has been selected for printing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">a page number</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="ready">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="render_page" invoker="render_page">
<doc xml:space="preserve">Renders a page to the preview.
This is using the print context that was passed to the
[signal@Gtk.PrintOperation::preview] handler together
with @preview.
A custom print preview should use this function to render
the currently selected page.
Note that this function requires a suitable cairo context to
be associated with the print context.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">the page to render</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<method name="end_preview" c:identifier="gtk_print_operation_preview_end_preview">
<doc xml:space="preserve">Ends a preview.
This function must be called to finish a custom print preview.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_selected" c:identifier="gtk_print_operation_preview_is_selected">
<doc xml:space="preserve">Returns whether the given page is included in the set of pages that
have been selected for printing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the page has been selected for printing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">a page number</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="render_page" c:identifier="gtk_print_operation_preview_render_page">
<doc xml:space="preserve">Renders a page to the preview.
This is using the print context that was passed to the
[signal@Gtk.PrintOperation::preview] handler together
with @preview.
A custom print preview should use this function to render
the currently selected page.
Note that this function requires a suitable cairo context to
be associated with the print context.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</instance-parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">the page to render</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<glib:signal name="got-page-size" when="last">
<doc xml:space="preserve">Emitted once for each page that gets rendered to the preview.
A handler for this signal should update the @context
according to @page_setup and set up a suitable cairo
context, using [method@Gtk.PrintContext.set_cairo_context].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the current `GtkPrintContext`</doc>
<type name="PrintContext"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none">
<doc xml:space="preserve">the `GtkPageSetup` for the current page</doc>
<type name="PageSetup"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="ready" when="last">
<doc xml:space="preserve">The ::ready signal gets emitted once per preview operation,
before the first page is rendered.
A handler for this signal can be used for setup tasks.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the current `GtkPrintContext`</doc>
<type name="PrintContext"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<record name="PrintOperationPreviewIface" c:type="GtkPrintOperationPreviewIface" glib:is-gtype-struct-for="PrintOperationPreview">
<field name="g_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="ready">
<callback name="ready">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="got_page_size">
<callback name="got_page_size">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="context" transfer-ownership="none">
<type name="PrintContext" c:type="GtkPrintContext*"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none">
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="render_page">
<callback name="render_page">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">the page to render</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="is_selected">
<callback name="is_selected">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the page has been selected for printing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
<parameter name="page_nr" transfer-ownership="none">
<doc xml:space="preserve">a page number</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="end_preview">
<callback name="end_preview">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preview" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintOperationPreview`</doc>
<type name="PrintOperationPreview" c:type="GtkPrintOperationPreview*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved6" introspectable="0">
<callback name="_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved7" introspectable="0">
<callback name="_gtk_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved8" introspectable="0">
<callback name="_gtk_reserved8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="PrintOperationPrivate" c:type="GtkPrintOperationPrivate" disguised="1"/>
<enumeration name="PrintOperationResult" glib:type-name="GtkPrintOperationResult" glib:get-type="gtk_print_operation_result_get_type" c:type="GtkPrintOperationResult">
<doc xml:space="preserve">The result of a print operation.
A value of this type is returned by [method@Gtk.PrintOperation.run].</doc>
<member name="error" value="0" c:identifier="GTK_PRINT_OPERATION_RESULT_ERROR" glib:nick="error" glib:name="GTK_PRINT_OPERATION_RESULT_ERROR">
<doc xml:space="preserve">An error has occurred.</doc>
</member>
<member name="apply" value="1" c:identifier="GTK_PRINT_OPERATION_RESULT_APPLY" glib:nick="apply" glib:name="GTK_PRINT_OPERATION_RESULT_APPLY">
<doc xml:space="preserve">The print settings should be stored.</doc>
</member>
<member name="cancel" value="2" c:identifier="GTK_PRINT_OPERATION_RESULT_CANCEL" glib:nick="cancel" glib:name="GTK_PRINT_OPERATION_RESULT_CANCEL">
<doc xml:space="preserve">The print operation has been canceled,
the print settings should not be stored.</doc>
</member>
<member name="in_progress" value="3" c:identifier="GTK_PRINT_OPERATION_RESULT_IN_PROGRESS" glib:nick="in-progress" glib:name="GTK_PRINT_OPERATION_RESULT_IN_PROGRESS">
<doc xml:space="preserve">The print operation is not complete
yet. This value will only be returned when running asynchronously.</doc>
</member>
</enumeration>
<enumeration name="PrintPages" glib:type-name="GtkPrintPages" glib:get-type="gtk_print_pages_get_type" c:type="GtkPrintPages">
<doc xml:space="preserve">See also gtk_print_job_set_pages()</doc>
<member name="all" value="0" c:identifier="GTK_PRINT_PAGES_ALL" glib:nick="all" glib:name="GTK_PRINT_PAGES_ALL">
<doc xml:space="preserve">All pages.</doc>
</member>
<member name="current" value="1" c:identifier="GTK_PRINT_PAGES_CURRENT" glib:nick="current" glib:name="GTK_PRINT_PAGES_CURRENT">
<doc xml:space="preserve">Current page.</doc>
</member>
<member name="ranges" value="2" c:identifier="GTK_PRINT_PAGES_RANGES" glib:nick="ranges" glib:name="GTK_PRINT_PAGES_RANGES">
<doc xml:space="preserve">Range of pages.</doc>
</member>
<member name="selection" value="3" c:identifier="GTK_PRINT_PAGES_SELECTION" glib:nick="selection" glib:name="GTK_PRINT_PAGES_SELECTION">
<doc xml:space="preserve">Selected pages.</doc>
</member>
</enumeration>
<enumeration name="PrintQuality" glib:type-name="GtkPrintQuality" glib:get-type="gtk_print_quality_get_type" c:type="GtkPrintQuality">
<doc xml:space="preserve">See also gtk_print_settings_set_quality().</doc>
<member name="low" value="0" c:identifier="GTK_PRINT_QUALITY_LOW" glib:nick="low" glib:name="GTK_PRINT_QUALITY_LOW">
<doc xml:space="preserve">Low quality.</doc>
</member>
<member name="normal" value="1" c:identifier="GTK_PRINT_QUALITY_NORMAL" glib:nick="normal" glib:name="GTK_PRINT_QUALITY_NORMAL">
<doc xml:space="preserve">Normal quality.</doc>
</member>
<member name="high" value="2" c:identifier="GTK_PRINT_QUALITY_HIGH" glib:nick="high" glib:name="GTK_PRINT_QUALITY_HIGH">
<doc xml:space="preserve">High quality.</doc>
</member>
<member name="draft" value="3" c:identifier="GTK_PRINT_QUALITY_DRAFT" glib:nick="draft" glib:name="GTK_PRINT_QUALITY_DRAFT">
<doc xml:space="preserve">Draft quality.</doc>
</member>
</enumeration>
<class name="PrintSettings" c:symbol-prefix="print_settings" c:type="GtkPrintSettings" parent="GObject.Object" glib:type-name="GtkPrintSettings" glib:get-type="gtk_print_settings_get_type">
<doc xml:space="preserve">A `GtkPrintSettings` object represents the settings of a print dialog in
a system-independent way.
The main use for this object is that once you&#x2019;ve printed you can get a
settings object that represents the settings the user chose, and the next
time you print you can pass that object in so that the user doesn&#x2019;t have
to re-set all his settings.
Its also possible to enumerate the settings so that you can easily save
the settings for the next time your app runs, or even store them in a
document. The predefined keys try to use shared values as much as possible
so that moving such a document between systems still works.</doc>
<constructor name="new" c:identifier="gtk_print_settings_new">
<doc xml:space="preserve">Creates a new `GtkPrintSettings` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrintSettings` object</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
</constructor>
<constructor name="new_from_file" c:identifier="gtk_print_settings_new_from_file" throws="1">
<doc xml:space="preserve">Reads the print settings from @file_name.
Returns a new `GtkPrintSettings` object with the restored settings,
or %NULL if an error occurred. If the file could not be loaded then
error is set to either a `GFileError` or `GKeyFileError`.
See [method@Gtk.PrintSettings.to_file].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the restored `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the filename to read the settings from</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_gvariant" c:identifier="gtk_print_settings_new_from_gvariant">
<doc xml:space="preserve">Deserialize print settings from an a{sv} variant.
The variant must be in the format produced by
[method@Gtk.PrintSettings.to_gvariant].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrintSettings` object</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<parameter name="variant" transfer-ownership="none">
<doc xml:space="preserve">an a{sv} `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_key_file" c:identifier="gtk_print_settings_new_from_key_file" throws="1">
<doc xml:space="preserve">Reads the print settings from the group @group_name in @key_file.
Returns a new `GtkPrintSettings` object with the restored settings,
or %NULL if an error occurred. If the file could not be loaded then
error is set to either `GFileError` or `GKeyFileError`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the restored `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to retrieve the settings from</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the group to use, or %NULL to use
the default &#x201C;Print Settings&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="copy" c:identifier="gtk_print_settings_copy">
<doc xml:space="preserve">Copies a `GtkPrintSettings` object.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated copy of @other</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<instance-parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="foreach" c:identifier="gtk_print_settings_foreach">
<doc xml:space="preserve">Calls @func for each key-value pair of @settings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">the function to call</doc>
<type name="PrintSettingsFunc" c:type="GtkPrintSettingsFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get" c:identifier="gtk_print_settings_get">
<doc xml:space="preserve">Looks up the string value associated with @key.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the string value for @key</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_bool" c:identifier="gtk_print_settings_get_bool">
<doc xml:space="preserve">Returns the boolean represented by the value
that is associated with @key.
The string &#x201C;true&#x201D; represents %TRUE, any other
string %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @key maps to a true value.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_collate" c:identifier="gtk_print_settings_get_collate">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_COLLATE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to collate the printed pages</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_default_source" c:identifier="gtk_print_settings_get_default_source">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the default source</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_dither" c:identifier="gtk_print_settings_get_dither">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_DITHER.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the dithering that is used</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_double" c:identifier="gtk_print_settings_get_double">
<doc xml:space="preserve">Returns the double value associated with @key, or 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the double value of @key</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_double_with_default" c:identifier="gtk_print_settings_get_double_with_default">
<doc xml:space="preserve">Returns the floating point number represented by
the value that is associated with @key, or @default_val
if the value does not represent a floating point number.
Floating point numbers are parsed with g_ascii_strtod().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the floating point number associated with @key</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="def" transfer-ownership="none">
<doc xml:space="preserve">the default value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="get_duplex" c:identifier="gtk_print_settings_get_duplex">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to print the output in duplex.</doc>
<type name="PrintDuplex" c:type="GtkPrintDuplex"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_finishings" c:identifier="gtk_print_settings_get_finishings">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the finishings</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_int" c:identifier="gtk_print_settings_get_int">
<doc xml:space="preserve">Returns the integer value of @key, or 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the integer value of @key</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_int_with_default" c:identifier="gtk_print_settings_get_int_with_default">
<doc xml:space="preserve">Returns the value of @key, interpreted as
an integer, or the default value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the integer value of @key</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="def" transfer-ownership="none">
<doc xml:space="preserve">the default value</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_length" c:identifier="gtk_print_settings_get_length">
<doc xml:space="preserve">Returns the value associated with @key, interpreted
as a length.
The returned value is converted to @units.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the length value of @key, converted to @unit</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit of the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_media_type" c:identifier="gtk_print_settings_get_media_type">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
The set of media types is defined in PWG 5101.1-2002 PWG.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the media type</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_copies" c:identifier="gtk_print_settings_get_n_copies">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of copies to print</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_number_up" c:identifier="gtk_print_settings_get_number_up">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of pages per sheet</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_number_up_layout" c:identifier="gtk_print_settings_get_number_up_layout">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">layout of page in number-up mode</doc>
<type name="NumberUpLayout" c:type="GtkNumberUpLayout"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_orientation" c:identifier="gtk_print_settings_get_orientation">
<doc xml:space="preserve">Get the value of %GTK_PRINT_SETTINGS_ORIENTATION,
converted to a `GtkPageOrientation`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the orientation</doc>
<type name="PageOrientation" c:type="GtkPageOrientation"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_output_bin" c:identifier="gtk_print_settings_get_output_bin">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the output bin</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_ranges" c:identifier="gtk_print_settings_get_page_ranges">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">an array
of `GtkPageRange`s. Use g_free() to free the array when
it is no longer needed.</doc>
<array length="0" zero-terminated="0" c:type="GtkPageRange*">
<type name="PageRange" c:type="GtkPageRange"/>
</array>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="num_ranges" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the length of the returned array</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_page_set" c:identifier="gtk_print_settings_get_page_set">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the set of pages to print</doc>
<type name="PageSet" c:type="GtkPageSet"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paper_height" c:identifier="gtk_print_settings_get_paper_height">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT,
converted to @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper height, in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_paper_size" c:identifier="gtk_print_settings_get_paper_size">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
converted to a `GtkPaperSize`.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the paper size</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paper_width" c:identifier="gtk_print_settings_get_paper_width">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH,
converted to @unit.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the paper width, in units of @unit</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit for the return value</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="get_print_pages" c:identifier="gtk_print_settings_get_print_pages">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">which pages to print</doc>
<type name="PrintPages" c:type="GtkPrintPages"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_printer" c:identifier="gtk_print_settings_get_printer">
<doc xml:space="preserve">Convenience function to obtain the value of
%GTK_PRINT_SETTINGS_PRINTER.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the printer name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_printer_lpi" c:identifier="gtk_print_settings_get_printer_lpi">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the resolution in lpi (lines per inch)</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_quality" c:identifier="gtk_print_settings_get_quality">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_QUALITY.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the print quality</doc>
<type name="PrintQuality" c:type="GtkPrintQuality"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resolution" c:identifier="gtk_print_settings_get_resolution">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the resolution in dpi</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resolution_x" c:identifier="gtk_print_settings_get_resolution_x">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal resolution in dpi</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resolution_y" c:identifier="gtk_print_settings_get_resolution_y">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical resolution in dpi</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reverse" c:identifier="gtk_print_settings_get_reverse">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_REVERSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to reverse the order of the printed pages</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scale" c:identifier="gtk_print_settings_get_scale">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_SCALE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scale in percent</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_color" c:identifier="gtk_print_settings_get_use_color">
<doc xml:space="preserve">Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to use color</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_key" c:identifier="gtk_print_settings_has_key">
<doc xml:space="preserve">Returns %TRUE, if a value is associated with @key.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @key has a value</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="load_file" c:identifier="gtk_print_settings_load_file" throws="1">
<doc xml:space="preserve">Reads the print settings from @file_name.
If the file could not be loaded then error is set to either
a `GFileError` or `GKeyFileError`.
See [method@Gtk.PrintSettings.to_file].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the filename to read the settings from</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="load_key_file" c:identifier="gtk_print_settings_load_key_file" throws="1">
<doc xml:space="preserve">Reads the print settings from the group @group_name in @key_file.
If the file could not be loaded then error is set to either a
`GFileError` or `GKeyFileError`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to retrieve the settings from</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the group to use, or %NULL
to use the default &#x201C;Print Settings&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set" c:identifier="gtk_print_settings_set">
<doc xml:space="preserve">Associates @value with @key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string value</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_bool" c:identifier="gtk_print_settings_set_bool">
<doc xml:space="preserve">Sets @key to a boolean value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a boolean</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_collate" c:identifier="gtk_print_settings_set_collate">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_COLLATE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="collate" transfer-ownership="none">
<doc xml:space="preserve">whether to collate the output</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_default_source" c:identifier="gtk_print_settings_set_default_source">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="default_source" transfer-ownership="none">
<doc xml:space="preserve">the default source</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_dither" c:identifier="gtk_print_settings_set_dither">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_DITHER.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="dither" transfer-ownership="none">
<doc xml:space="preserve">the dithering that is used</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_double" c:identifier="gtk_print_settings_set_double">
<doc xml:space="preserve">Sets @key to a double value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a double value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_duplex" c:identifier="gtk_print_settings_set_duplex">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="duplex" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintDuplex` value</doc>
<type name="PrintDuplex" c:type="GtkPrintDuplex"/>
</parameter>
</parameters>
</method>
<method name="set_finishings" c:identifier="gtk_print_settings_set_finishings">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="finishings" transfer-ownership="none">
<doc xml:space="preserve">the finishings</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_int" c:identifier="gtk_print_settings_set_int">
<doc xml:space="preserve">Sets @key to an integer value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">an integer</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_length" c:identifier="gtk_print_settings_set_length">
<doc xml:space="preserve">Associates a length in units of @unit with @key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a length</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the unit of @length</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_media_type" c:identifier="gtk_print_settings_set_media_type">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.
The set of media types is defined in PWG 5101.1-2002 PWG.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="media_type" transfer-ownership="none">
<doc xml:space="preserve">the media type</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_n_copies" c:identifier="gtk_print_settings_set_n_copies">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="num_copies" transfer-ownership="none">
<doc xml:space="preserve">the number of copies</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_number_up" c:identifier="gtk_print_settings_set_number_up">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="number_up" transfer-ownership="none">
<doc xml:space="preserve">the number of pages per sheet</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_number_up_layout" c:identifier="gtk_print_settings_set_number_up_layout">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="number_up_layout" transfer-ownership="none">
<doc xml:space="preserve">a `GtkNumberUpLayout` value</doc>
<type name="NumberUpLayout" c:type="GtkNumberUpLayout"/>
</parameter>
</parameters>
</method>
<method name="set_orientation" c:identifier="gtk_print_settings_set_orientation">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">a page orientation</doc>
<type name="PageOrientation" c:type="GtkPageOrientation"/>
</parameter>
</parameters>
</method>
<method name="set_output_bin" c:identifier="gtk_print_settings_set_output_bin">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="output_bin" transfer-ownership="none">
<doc xml:space="preserve">the output bin</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_page_ranges" c:identifier="gtk_print_settings_set_page_ranges">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="page_ranges" transfer-ownership="none">
<doc xml:space="preserve">an array of `GtkPageRange`s</doc>
<array length="1" zero-terminated="0" c:type="GtkPageRange*">
<type name="PageRange" c:type="GtkPageRange"/>
</array>
</parameter>
<parameter name="num_ranges" transfer-ownership="none">
<doc xml:space="preserve">the length of @page_ranges</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_page_set" c:identifier="gtk_print_settings_set_page_set">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="page_set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSet` value</doc>
<type name="PageSet" c:type="GtkPageSet"/>
</parameter>
</parameters>
</method>
<method name="set_paper_height" c:identifier="gtk_print_settings_set_paper_height">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the paper height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units of @height</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_paper_size" c:identifier="gtk_print_settings_set_paper_size">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
%GTK_PRINT_SETTINGS_PAPER_WIDTH and
%GTK_PRINT_SETTINGS_PAPER_HEIGHT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="paper_size" transfer-ownership="none">
<doc xml:space="preserve">a paper size</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</parameter>
</parameters>
</method>
<method name="set_paper_width" c:identifier="gtk_print_settings_set_paper_width">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the paper width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="unit" transfer-ownership="none">
<doc xml:space="preserve">the units of @width</doc>
<type name="Unit" c:type="GtkUnit"/>
</parameter>
</parameters>
</method>
<method name="set_print_pages" c:identifier="gtk_print_settings_set_print_pages">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="pages" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintPages` value</doc>
<type name="PrintPages" c:type="GtkPrintPages"/>
</parameter>
</parameters>
</method>
<method name="set_printer" c:identifier="gtk_print_settings_set_printer">
<doc xml:space="preserve">Convenience function to set %GTK_PRINT_SETTINGS_PRINTER
to @printer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">the printer name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_printer_lpi" c:identifier="gtk_print_settings_set_printer_lpi">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="lpi" transfer-ownership="none">
<doc xml:space="preserve">the resolution in lpi (lines per inch)</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_quality" c:identifier="gtk_print_settings_set_quality">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_QUALITY.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="quality" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintQuality` value</doc>
<type name="PrintQuality" c:type="GtkPrintQuality"/>
</parameter>
</parameters>
</method>
<method name="set_resolution" c:identifier="gtk_print_settings_set_resolution">
<doc xml:space="preserve">Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
%GTK_PRINT_SETTINGS_RESOLUTION_X and
%GTK_PRINT_SETTINGS_RESOLUTION_Y.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="resolution" transfer-ownership="none">
<doc xml:space="preserve">the resolution in dpi</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_resolution_xy" c:identifier="gtk_print_settings_set_resolution_xy">
<doc xml:space="preserve">Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION,
%GTK_PRINT_SETTINGS_RESOLUTION_X and
%GTK_PRINT_SETTINGS_RESOLUTION_Y.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="resolution_x" transfer-ownership="none">
<doc xml:space="preserve">the horizontal resolution in dpi</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="resolution_y" transfer-ownership="none">
<doc xml:space="preserve">the vertical resolution in dpi</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_reverse" c:identifier="gtk_print_settings_set_reverse">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_REVERSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="reverse" transfer-ownership="none">
<doc xml:space="preserve">whether to reverse the output</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_scale" c:identifier="gtk_print_settings_set_scale">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_SCALE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">the scale in percent</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_use_color" c:identifier="gtk_print_settings_set_use_color">
<doc xml:space="preserve">Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="use_color" transfer-ownership="none">
<doc xml:space="preserve">whether to use color</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="to_file" c:identifier="gtk_print_settings_to_file" throws="1">
<doc xml:space="preserve">This function saves the print settings from @settings to @file_name.
If the file could not be written then error is set to either a
`GFileError` or `GKeyFileError`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="file_name" transfer-ownership="none">
<doc xml:space="preserve">the file to save to</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="to_gvariant" c:identifier="gtk_print_settings_to_gvariant">
<doc xml:space="preserve">Serialize print settings to an a{sv} variant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new, floating, `GVariant`</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_key_file" c:identifier="gtk_print_settings_to_key_file">
<doc xml:space="preserve">This function adds the print settings from @settings to @key_file.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key_file" transfer-ownership="none">
<doc xml:space="preserve">the `GKeyFile` to save the print settings to</doc>
<type name="GLib.KeyFile" c:type="GKeyFile*"/>
</parameter>
<parameter name="group_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the group to add the settings to in @key_file, or
%NULL to use the default &#x201C;Print Settings&#x201D;</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="unset" c:identifier="gtk_print_settings_unset">
<doc xml:space="preserve">Removes any value associated with @key.
This has the same effect as setting the value to %NULL.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</instance-parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">a key</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
</class>
<callback name="PrintSettingsFunc" c:type="GtkPrintSettingsFunc">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="key" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="PrintStatus" glib:type-name="GtkPrintStatus" glib:get-type="gtk_print_status_get_type" c:type="GtkPrintStatus">
<doc xml:space="preserve">The status gives a rough indication of the completion of a running
print operation.</doc>
<member name="initial" value="0" c:identifier="GTK_PRINT_STATUS_INITIAL" glib:nick="initial" glib:name="GTK_PRINT_STATUS_INITIAL">
<doc xml:space="preserve">The printing has not started yet; this
status is set initially, and while the print dialog is shown.</doc>
</member>
<member name="preparing" value="1" c:identifier="GTK_PRINT_STATUS_PREPARING" glib:nick="preparing" glib:name="GTK_PRINT_STATUS_PREPARING">
<doc xml:space="preserve">This status is set while the begin-print
signal is emitted and during pagination.</doc>
</member>
<member name="generating_data" value="2" c:identifier="GTK_PRINT_STATUS_GENERATING_DATA" glib:nick="generating-data" glib:name="GTK_PRINT_STATUS_GENERATING_DATA">
<doc xml:space="preserve">This status is set while the
pages are being rendered.</doc>
</member>
<member name="sending_data" value="3" c:identifier="GTK_PRINT_STATUS_SENDING_DATA" glib:nick="sending-data" glib:name="GTK_PRINT_STATUS_SENDING_DATA">
<doc xml:space="preserve">The print job is being sent off to the
printer.</doc>
</member>
<member name="pending" value="4" c:identifier="GTK_PRINT_STATUS_PENDING" glib:nick="pending" glib:name="GTK_PRINT_STATUS_PENDING">
<doc xml:space="preserve">The print job has been sent to the printer,
but is not printed for some reason, e.g. the printer may be stopped.</doc>
</member>
<member name="pending_issue" value="5" c:identifier="GTK_PRINT_STATUS_PENDING_ISSUE" glib:nick="pending-issue" glib:name="GTK_PRINT_STATUS_PENDING_ISSUE">
<doc xml:space="preserve">Some problem has occurred during
printing, e.g. a paper jam.</doc>
</member>
<member name="printing" value="6" c:identifier="GTK_PRINT_STATUS_PRINTING" glib:nick="printing" glib:name="GTK_PRINT_STATUS_PRINTING">
<doc xml:space="preserve">The printer is processing the print job.</doc>
</member>
<member name="finished" value="7" c:identifier="GTK_PRINT_STATUS_FINISHED" glib:nick="finished" glib:name="GTK_PRINT_STATUS_FINISHED">
<doc xml:space="preserve">The printing has been completed successfully.</doc>
</member>
<member name="finished_aborted" value="8" c:identifier="GTK_PRINT_STATUS_FINISHED_ABORTED" glib:nick="finished-aborted" glib:name="GTK_PRINT_STATUS_FINISHED_ABORTED">
<doc xml:space="preserve">The printing has been aborted.</doc>
</member>
</enumeration>
<class name="PrintUnixDialog" c:symbol-prefix="print_unix_dialog" c:type="GtkPrintUnixDialog" parent="Dialog" glib:type-name="GtkPrintUnixDialog" glib:get-type="gtk_print_unix_dialog_get_type">
<doc xml:space="preserve">`GtkPrintUnixDialog` implements a print dialog for platforms
which don&#x2019;t provide a native print dialog, like Unix.
![An example GtkPrintUnixDialog](printdialog.png)
It can be used very much like any other GTK dialog, at the cost of
the portability offered by the high-level printing API with
[class@Gtk.PrintOperation].
In order to print something with `GtkPrintUnixDialog`, you need to
use [method@Gtk.PrintUnixDialog.get_selected_printer] to obtain a
[class@Gtk.Printer] object and use it to construct a [class@Gtk.PrintJob]
using [ctor@Gtk.PrintJob.new].
`GtkPrintUnixDialog` uses the following response values:
- %GTK_RESPONSE_OK: for the &#x201C;Print&#x201D; button
- %GTK_RESPONSE_APPLY: for the &#x201C;Preview&#x201D; button
- %GTK_RESPONSE_CANCEL: for the &#x201C;Cancel&#x201D; button
# GtkPrintUnixDialog as GtkBuildable
The `GtkPrintUnixDialog` implementation of the `GtkBuildable` interface
exposes its @notebook internal children with the name &#x201C;notebook&#x201D;.
An example of a `GtkPrintUnixDialog` UI definition fragment:
```xml
&lt;object class="GtkPrintUnixDialog" id="dialog1"&gt;
&lt;child internal-child="notebook"&gt;
&lt;object class="GtkNotebook" id="notebook"&gt;
&lt;child&gt;
&lt;object type="GtkNotebookPage"&gt;
&lt;property name="tab_expand"&gt;False&lt;/property&gt;
&lt;property name="tab_fill"&gt;False&lt;/property&gt;
&lt;property name="tab"&gt;
&lt;object class="GtkLabel" id="tablabel"&gt;
&lt;property name="label"&gt;Tab label&lt;/property&gt;
&lt;/object&gt;
&lt;/property&gt;
&lt;property name="child"&gt;
&lt;object class="GtkLabel" id="tabcontent"&gt;
&lt;property name="label"&gt;Content on notebook tab&lt;/property&gt;
&lt;/object&gt;
&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# CSS nodes
`GtkPrintUnixDialog` has a single CSS node with name window. The style classes
dialog and print are added.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_print_unix_dialog_new">
<doc xml:space="preserve">Creates a new `GtkPrintUnixDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkPrintUnixDialog`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Title of the dialog</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Transient parent of the dialog</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</constructor>
<method name="add_custom_tab" c:identifier="gtk_print_unix_dialog_add_custom_tab">
<doc xml:space="preserve">Adds a custom tab to the print dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to put in the custom tab</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="tab_label" transfer-ownership="none">
<doc xml:space="preserve">the widget to use as tab label</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_current_page" c:identifier="gtk_print_unix_dialog_get_current_page" glib:get-property="current-page">
<attribute name="org.gtk.Method.get_property" value="current-page"/>
<doc xml:space="preserve">Gets the current page of the `GtkPrintUnixDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current page of @dialog</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_embed_page_setup" c:identifier="gtk_print_unix_dialog_get_embed_page_setup" glib:get-property="embed-page-setup">
<attribute name="org.gtk.Method.get_property" value="embed-page-setup"/>
<doc xml:space="preserve">Gets whether to embed the page setup.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether to embed the page setup</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_selection" c:identifier="gtk_print_unix_dialog_get_has_selection" glib:get-property="has-selection">
<attribute name="org.gtk.Method.get_property" value="has-selection"/>
<doc xml:space="preserve">Gets whether there is a selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there is a selection</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_manual_capabilities" c:identifier="gtk_print_unix_dialog_get_manual_capabilities" glib:get-property="manual-capabilities">
<attribute name="org.gtk.Method.get_property" value="manual-capabilities"/>
<doc xml:space="preserve">Gets the capabilities that have been set on this `GtkPrintUnixDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the printing capabilities</doc>
<type name="PrintCapabilities" c:type="GtkPrintCapabilities"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_setup" c:identifier="gtk_print_unix_dialog_get_page_setup" glib:get-property="page-setup">
<attribute name="org.gtk.Method.get_property" value="page-setup"/>
<doc xml:space="preserve">Gets the page setup that is used by the `GtkPrintUnixDialog`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the page setup of @dialog.</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page_setup_set" c:identifier="gtk_print_unix_dialog_get_page_setup_set">
<doc xml:space="preserve">Gets whether a page setup was set by the user.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a page setup was set by user.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_printer" c:identifier="gtk_print_unix_dialog_get_selected_printer" glib:get-property="selected-printer">
<attribute name="org.gtk.Method.get_property" value="selected-printer"/>
<doc xml:space="preserve">Gets the currently selected printer.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the currently selected printer</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_settings" c:identifier="gtk_print_unix_dialog_get_settings">
<attribute name="org.gtk.Method.set_property" value="print-settings"/>
<doc xml:space="preserve">Gets a new `GtkPrintSettings` object that represents the
current values in the print dialog.
Note that this creates a new object, and you need to unref
it if don&#x2019;t want to keep it.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrintSettings` object with the values from @dialog</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_support_selection" c:identifier="gtk_print_unix_dialog_get_support_selection" glib:get-property="support-selection">
<attribute name="org.gtk.Method.get_property" value="support-selection"/>
<doc xml:space="preserve">Gets whether the print dialog allows user to print a selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the application supports print of selection</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_current_page" c:identifier="gtk_print_unix_dialog_set_current_page" glib:set-property="current-page">
<attribute name="org.gtk.Method.set_property" value="current-page"/>
<doc xml:space="preserve">Sets the current page number.
If @current_page is not -1, this enables the current page choice
for the range of pages to print.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="current_page" transfer-ownership="none">
<doc xml:space="preserve">the current page number.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_embed_page_setup" c:identifier="gtk_print_unix_dialog_set_embed_page_setup" glib:set-property="embed-page-setup">
<attribute name="org.gtk.Method.set_property" value="embed-page-setup"/>
<doc xml:space="preserve">Embed page size combo box and orientation combo box into page setup page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="embed" transfer-ownership="none">
<doc xml:space="preserve">embed page setup selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_has_selection" c:identifier="gtk_print_unix_dialog_set_has_selection" glib:set-property="has-selection">
<attribute name="org.gtk.Method.set_property" value="has-selection"/>
<doc xml:space="preserve">Sets whether a selection exists.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="has_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE indicates that a selection exists</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_manual_capabilities" c:identifier="gtk_print_unix_dialog_set_manual_capabilities" glib:set-property="manual-capabilities">
<attribute name="org.gtk.Method.set_property" value="manual-capabilities"/>
<doc xml:space="preserve">This lets you specify the printing capabilities your application
supports.
For instance, if you can handle scaling the output then you pass
%GTK_PRINT_CAPABILITY_SCALE. If you don&#x2019;t pass that, then the dialog
will only let you select the scale if the printing system automatically
handles scaling.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="capabilities" transfer-ownership="none">
<doc xml:space="preserve">the printing capabilities of your application</doc>
<type name="PrintCapabilities" c:type="GtkPrintCapabilities"/>
</parameter>
</parameters>
</method>
<method name="set_page_setup" c:identifier="gtk_print_unix_dialog_set_page_setup" glib:set-property="page-setup">
<attribute name="org.gtk.Method.set_property" value="page-setup"/>
<doc xml:space="preserve">Sets the page setup of the `GtkPrintUnixDialog`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="page_setup" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
</parameters>
</method>
<method name="set_settings" c:identifier="gtk_print_unix_dialog_set_settings">
<attribute name="org.gtk.Method.set_property" value="print-settings"/>
<doc xml:space="preserve">Sets the `GtkPrintSettings` for the `GtkPrintUnixDialog`.
Typically, this is used to restore saved print settings
from a previous print operation before the print dialog
is shown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="settings" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</method>
<method name="set_support_selection" c:identifier="gtk_print_unix_dialog_set_support_selection" glib:set-property="support-selection">
<attribute name="org.gtk.Method.set_property" value="support-selection"/>
<doc xml:space="preserve">Sets whether the print dialog allows user to print a selection.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="dialog" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintUnixDialog`</doc>
<type name="PrintUnixDialog" c:type="GtkPrintUnixDialog*"/>
</instance-parameter>
<parameter name="support_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to allow print selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="current-page" writable="1" transfer-ownership="none" setter="set_current_page" getter="get_current_page">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_current_page"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_current_page"/>
<doc xml:space="preserve">The current page in the document.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="embed-page-setup" writable="1" transfer-ownership="none" setter="set_embed_page_setup" getter="get_embed_page_setup">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_embed_page_setup"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_embed_page_setup"/>
<doc xml:space="preserve">%TRUE if the page setup controls are embedded.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-selection" writable="1" transfer-ownership="none" setter="set_has_selection" getter="get_has_selection">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_has_selection"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_has_selection"/>
<doc xml:space="preserve">Whether the application has a selection.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="manual-capabilities" writable="1" transfer-ownership="none" setter="set_manual_capabilities" getter="get_manual_capabilities">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_manual_capabilities"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_manual_capabilities"/>
<doc xml:space="preserve">Capabilities the application can handle.</doc>
<type name="PrintCapabilities"/>
</property>
<property name="page-setup" writable="1" transfer-ownership="none" setter="set_page_setup" getter="get_page_setup">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_page_setup"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_page_setup"/>
<doc xml:space="preserve">The `GtkPageSetup` object to use.</doc>
<type name="PageSetup"/>
</property>
<property name="print-settings" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_settings"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_settings"/>
<doc xml:space="preserve">The `GtkPrintSettings` object used for this dialog.</doc>
<type name="PrintSettings"/>
</property>
<property name="selected-printer" transfer-ownership="none" getter="get_selected_printer">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_selected_printer"/>
<doc xml:space="preserve">The `GtkPrinter` which is selected.</doc>
<type name="Printer"/>
</property>
<property name="support-selection" writable="1" transfer-ownership="none" setter="set_support_selection" getter="get_support_selection">
<attribute name="org.gtk.Property.get" value="gtk_print_unix_dialog_get_support_selection"/>
<attribute name="org.gtk.Property.set" value="gtk_print_unix_dialog_set_support_selection"/>
<doc xml:space="preserve">Whether the dialog supports selection.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="Printer" c:symbol-prefix="printer" c:type="GtkPrinter" parent="GObject.Object" glib:type-name="GtkPrinter" glib:get-type="gtk_printer_get_type">
<doc xml:space="preserve">A `GtkPrinter` object represents a printer.
You only need to deal directly with printers if you use the
non-portable [class@Gtk.PrintUnixDialog] API.
A `GtkPrinter` allows to get status information about the printer,
such as its description, its location, the number of queued jobs,
etc. Most importantly, a `GtkPrinter` object can be used to create
a [class@Gtk.PrintJob] object, which lets you print to the printer.</doc>
<constructor name="new" c:identifier="gtk_printer_new">
<doc xml:space="preserve">Creates a new `GtkPrinter`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the printer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="backend" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintBackend`</doc>
<type name="PrintBackend" c:type="GtkPrintBackend*"/>
</parameter>
<parameter name="virtual_" transfer-ownership="none">
<doc xml:space="preserve">whether the printer is virtual</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="accepts_pdf" c:identifier="gtk_printer_accepts_pdf">
<attribute name="org.gtk.Method.get_property" value="accepts-pdf"/>
<doc xml:space="preserve">Returns whether the printer accepts input in
PDF format.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer accepts PDF</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="accepts_ps" c:identifier="gtk_printer_accepts_ps">
<attribute name="org.gtk.Method.get_property" value="accepts-ps"/>
<doc xml:space="preserve">Returns whether the printer accepts input in
PostScript format.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer accepts PostScript</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="compare" c:identifier="gtk_printer_compare">
<doc xml:space="preserve">Compares two printers.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">0 if the printer match, a negative value if @a &lt; @b,
or a positive value if @a &gt; @b</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="a" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">another `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</parameter>
</parameters>
</method>
<method name="get_backend" c:identifier="gtk_printer_get_backend">
<attribute name="org.gtk.Method.get_property" value="backend"/>
<doc xml:space="preserve">Returns the backend of the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the backend of @printer</doc>
<type name="PrintBackend" c:type="GtkPrintBackend*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_capabilities" c:identifier="gtk_printer_get_capabilities">
<doc xml:space="preserve">Returns the printer&#x2019;s capabilities.
This is useful when you&#x2019;re using `GtkPrintUnixDialog`&#x2019;s
manual-capabilities setting and need to know which settings
the printer can handle and which you must handle yourself.
This will return 0 unless the printer&#x2019;s details are
available, see [method@Gtk.Printer.has_details] and
[method@Gtk.Printer.request_details].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the printer&#x2019;s capabilities</doc>
<type name="PrintCapabilities" c:type="GtkPrintCapabilities"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_default_page_size" c:identifier="gtk_printer_get_default_page_size">
<doc xml:space="preserve">Returns default page size of @printer.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated `GtkPageSetup` with default page size
of the printer.</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_description" c:identifier="gtk_printer_get_description">
<doc xml:space="preserve">Gets the description of the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the description of @printer</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hard_margins" c:identifier="gtk_printer_get_hard_margins">
<doc xml:space="preserve">Retrieve the hard margins of @printer.
These are the margins that define the area at the borders
of the paper that the printer cannot print to.
Note: This will not succeed unless the printer&#x2019;s details are
available, see [method@Gtk.Printer.has_details] and
[method@Gtk.Printer.request_details].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE iff the hard margins were retrieved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
<parameter name="top" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the top margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="bottom" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the bottom margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="left" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the left margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="right" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the right margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_hard_margins_for_paper_size" c:identifier="gtk_printer_get_hard_margins_for_paper_size">
<doc xml:space="preserve">Retrieve the hard margins of @printer for @paper_size.
These are the margins that define the area at the borders
of the paper that the printer cannot print to.
Note: This will not succeed unless the printer&#x2019;s details are
available, see [method@Gtk.Printer.has_details] and
[method@Gtk.Printer.request_details].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE iff the hard margins were retrieved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
<parameter name="paper_size" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPaperSize`</doc>
<type name="PaperSize" c:type="GtkPaperSize*"/>
</parameter>
<parameter name="top" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the top margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="bottom" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the bottom margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="left" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the left margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="right" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">a location to store the right margin in</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_printer_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Gets the name of the icon to use for the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the icon name for @printer</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_job_count" c:identifier="gtk_printer_get_job_count" glib:get-property="job-count">
<attribute name="org.gtk.Method.get_property" value="job-count"/>
<doc xml:space="preserve">Gets the number of jobs currently queued on the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of jobs on @printer</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_location" c:identifier="gtk_printer_get_location" glib:get-property="location">
<attribute name="org.gtk.Method.get_property" value="location"/>
<doc xml:space="preserve">Returns a description of the location of the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the location of @printer</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_printer_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Returns the name of the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of @printer</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_state_message" c:identifier="gtk_printer_get_state_message" glib:get-property="state-message">
<attribute name="org.gtk.Method.get_property" value="state-message"/>
<doc xml:space="preserve">Returns the state message describing the current state
of the printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the state message of @printer</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_details" c:identifier="gtk_printer_has_details">
<doc xml:space="preserve">Returns whether the printer details are available.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer details are available</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_accepting_jobs" c:identifier="gtk_printer_is_accepting_jobs">
<attribute name="org.gtk.Method.get_property" value="accepting-jobs"/>
<doc xml:space="preserve">Returns whether the printer is accepting jobs</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer is accepting jobs</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_active" c:identifier="gtk_printer_is_active">
<doc xml:space="preserve">Returns whether the printer is currently active (i.e.
accepts new jobs).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_default" c:identifier="gtk_printer_is_default">
<doc xml:space="preserve">Returns whether the printer is the default printer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer is the default</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_paused" c:identifier="gtk_printer_is_paused">
<attribute name="org.gtk.Method.get_property" value="paused"/>
<doc xml:space="preserve">Returns whether the printer is currently paused.
A paused printer still accepts jobs, but it is not
printing them.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer is paused</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_virtual" c:identifier="gtk_printer_is_virtual">
<attribute name="org.gtk.Method.get_property" value="is-virtual"/>
<doc xml:space="preserve">Returns whether the printer is virtual (i.e. does not
represent actual printer hardware, but something like
a CUPS class).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @printer is virtual</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="list_papers" c:identifier="gtk_printer_list_papers">
<doc xml:space="preserve">Lists all the paper sizes @printer supports.
This will return and empty list unless the printer&#x2019;s details
are available, see [method@Gtk.Printer.has_details] and
[method@Gtk.Printer.request_details].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly
allocated list of newly allocated `GtkPageSetup`s.</doc>
<type name="GLib.List" c:type="GList*">
<type name="PageSetup"/>
</type>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<method name="request_details" c:identifier="gtk_printer_request_details">
<doc xml:space="preserve">Requests the printer details.
When the details are available, the
[signal@Gtk.Printer::details-acquired] signal
will be emitted on @printer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</instance-parameter>
</parameters>
</method>
<property name="accepting-jobs" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_is_accepting_jobs"/>
<doc xml:space="preserve">%TRUE if the printer is accepting jobs.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="accepts-pdf" writable="1" construct-only="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_accepts_pdf"/>
<doc xml:space="preserve">%TRUE if this printer can accept PDF.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="accepts-ps" writable="1" construct-only="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_accepts_ps"/>
<doc xml:space="preserve">%TRUE if this printer can accept PostScript.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="backend" introspectable="0" writable="1" construct-only="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_backend"/>
<doc xml:space="preserve">The backend for the printer.</doc>
<type/>
</property>
<property name="icon-name" transfer-ownership="none" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_icon_name"/>
<doc xml:space="preserve">Icon name to use for the printer.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="is-virtual" writable="1" construct-only="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_is_virtual"/>
<doc xml:space="preserve">%FALSE if this represents a real hardware device.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="job-count" transfer-ownership="none" getter="get_job_count">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_job_count"/>
<doc xml:space="preserve">Number of jobs queued in the printer.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="location" transfer-ownership="none" getter="get_location">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_location"/>
<doc xml:space="preserve">Information about the location of the printer.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="name" writable="1" construct-only="1" transfer-ownership="none" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_name"/>
<doc xml:space="preserve">The name of the printer.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="paused" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_printer_is_paused"/>
<doc xml:space="preserve">%TRUE if this printer is paused.
A paused printer still accepts jobs, but it does
not print them.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="state-message" transfer-ownership="none" getter="get_state_message">
<attribute name="org.gtk.Property.get" value="gtk_printer_get_state_message"/>
<doc xml:space="preserve">String giving the current status of the printer.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="details-acquired" when="last">
<doc xml:space="preserve">Emitted in response to a request for detailed information
about a printer from the print backend.
The @success parameter indicates if the information was
actually obtained.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="success" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the details were successfully acquired</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
</class>
<callback name="PrinterFunc" c:type="GtkPrinterFunc">
<doc xml:space="preserve">The type of function passed to gtk_enumerate_printers().
Note that you need to ref @printer, if you want to keep
a reference to it after the function has returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop the enumeration, %FALSE to continue</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="printer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrinter`</doc>
<type name="Printer" c:type="GtkPrinter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">user data passed to gtk_enumerate_printers()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="ProgressBar" c:symbol-prefix="progress_bar" c:type="GtkProgressBar" parent="Widget" glib:type-name="GtkProgressBar" glib:get-type="gtk_progress_bar_get_type">
<doc xml:space="preserve">`GtkProgressBar` is typically used to display the progress of a long
running operation.
It provides a visual clue that processing is underway. `GtkProgressBar`
can be used in two different modes: percentage mode and activity mode.
![An example GtkProgressBar](progressbar.png)
When an application can determine how much work needs to take place
(e.g. read a fixed number of bytes from a file) and can monitor its
progress, it can use the `GtkProgressBar` in percentage mode and the
user sees a growing bar indicating the percentage of the work that
has been completed. In this mode, the application is required to call
[method@Gtk.ProgressBar.set_fraction] periodically to update the progress bar.
When an application has no accurate way of knowing the amount of work
to do, it can use the `GtkProgressBar` in activity mode, which shows
activity by a block moving back and forth within the progress area. In
this mode, the application is required to call [method@Gtk.ProgressBar.pulse]
periodically to update the progress bar.
There is quite a bit of flexibility provided to control the appearance
of the `GtkProgressBar`. Functions are provided to control the orientation
of the bar, optional text can be displayed along with the bar, and the
step size used in activity mode can be set.
# CSS nodes
```
progressbar[.osd]
&#x251C;&#x2500;&#x2500; [text]
&#x2570;&#x2500;&#x2500; trough[.empty][.full]
&#x2570;&#x2500;&#x2500; progress[.pulse]
```
`GtkProgressBar` has a main CSS node with name progressbar and subnodes with
names text and trough, of which the latter has a subnode named progress. The
text subnode is only present if text is shown. The progress subnode has the
style class .pulse when in activity mode. It gets the style classes .left,
.right, .top or .bottom added when the progress 'touches' the corresponding
end of the GtkProgressBar. The .osd class on the progressbar node is for use
in overlays like the one Epiphany has for page loading progress.
# Accessibility
`GtkProgressBar` uses the %GTK_ACCESSIBLE_ROLE_PROGRESS_BAR role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_progress_bar_new">
<doc xml:space="preserve">Creates a new `GtkProgressBar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_ellipsize" c:identifier="gtk_progress_bar_get_ellipsize" glib:get-property="ellipsize">
<attribute name="org.gtk.Method.get_property" value="ellipsize"/>
<doc xml:space="preserve">Returns the ellipsizing position of the progress bar.
See [method@Gtk.ProgressBar.set_ellipsize].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">`PangoEllipsizeMode`</doc>
<type name="Pango.EllipsizeMode" c:type="PangoEllipsizeMode"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fraction" c:identifier="gtk_progress_bar_get_fraction" glib:get-property="fraction">
<attribute name="org.gtk.Method.get_property" value="fraction"/>
<doc xml:space="preserve">Returns the current fraction of the task that&#x2019;s been completed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a fraction from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_inverted" c:identifier="gtk_progress_bar_get_inverted" glib:get-property="inverted">
<attribute name="org.gtk.Method.get_property" value="inverted"/>
<doc xml:space="preserve">Returns whether the progress bar is inverted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the progress bar is inverted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pulse_step" c:identifier="gtk_progress_bar_get_pulse_step" glib:get-property="pulse-step">
<attribute name="org.gtk.Method.get_property" value="pulse-step"/>
<doc xml:space="preserve">Retrieves the pulse step.
See [method@Gtk.ProgressBar.set_pulse_step].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a fraction from 0.0 to 1.0</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_text" c:identifier="gtk_progress_bar_get_show_text" glib:get-property="show-text">
<attribute name="org.gtk.Method.get_property" value="show-text"/>
<doc xml:space="preserve">Returns whether the `GtkProgressBar` shows text.
See [method@Gtk.ProgressBar.set_show_text].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if text is shown in the progress bar</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_progress_bar_get_text" glib:get-property="text">
<attribute name="org.gtk.Method.get_property" value="text"/>
<doc xml:space="preserve">Retrieves the text that is displayed with the progress bar.
The return value is a reference to the text, not a copy of it,
so will become invalid if you change the text in the progress bar.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the text</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="pulse" c:identifier="gtk_progress_bar_pulse">
<doc xml:space="preserve">Indicates that some progress has been made, but you don&#x2019;t know how much.
Causes the progress bar to enter &#x201C;activity mode,&#x201D; where a block
bounces back and forth. Each call to [method@Gtk.ProgressBar.pulse]
causes the block to move by a little bit (the amount of movement
per pulse is determined by [method@Gtk.ProgressBar.set_pulse_step]).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_ellipsize" c:identifier="gtk_progress_bar_set_ellipsize" glib:set-property="ellipsize">
<attribute name="org.gtk.Method.set_property" value="ellipsize"/>
<doc xml:space="preserve">Sets the mode used to ellipsize the text.
The text is ellipsized if there is not enough space
to render the entire string.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">a `PangoEllipsizeMode`</doc>
<type name="Pango.EllipsizeMode" c:type="PangoEllipsizeMode"/>
</parameter>
</parameters>
</method>
<method name="set_fraction" c:identifier="gtk_progress_bar_set_fraction" glib:set-property="fraction">
<attribute name="org.gtk.Method.set_property" value="fraction"/>
<doc xml:space="preserve">Causes the progress bar to &#x201C;fill in&#x201D; the given fraction
of the bar.
The fraction should be between 0.0 and 1.0, inclusive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="fraction" transfer-ownership="none">
<doc xml:space="preserve">fraction of the task that&#x2019;s been completed</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_inverted" c:identifier="gtk_progress_bar_set_inverted" glib:set-property="inverted">
<attribute name="org.gtk.Method.set_property" value="inverted"/>
<doc xml:space="preserve">Sets whether the progress bar is inverted.
Progress bars normally grow from top to bottom or left to right.
Inverted progress bars grow in the opposite direction.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="inverted" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to invert the progress bar</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_pulse_step" c:identifier="gtk_progress_bar_set_pulse_step" glib:set-property="pulse-step">
<attribute name="org.gtk.Method.set_property" value="pulse-step"/>
<doc xml:space="preserve">Sets the fraction of total progress bar length to move the
bouncing block.
The bouncing block is moved when [method@Gtk.ProgressBar.pulse]
is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="fraction" transfer-ownership="none">
<doc xml:space="preserve">fraction between 0.0 and 1.0</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_show_text" c:identifier="gtk_progress_bar_set_show_text" glib:set-property="show-text">
<attribute name="org.gtk.Method.set_property" value="show-text"/>
<doc xml:space="preserve">Sets whether the progress bar will show text next to the bar.
The shown text is either the value of the [property@Gtk.ProgressBar:text]
property or, if that is %NULL, the [property@Gtk.ProgressBar:fraction] value,
as a percentage.
To make a progress bar that is styled and sized suitably for containing
text (even if the actual text is blank), set [property@Gtk.ProgressBar:show-text]
to %TRUE and [property@Gtk.ProgressBar:text] to the empty string (not %NULL).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="show_text" transfer-ownership="none">
<doc xml:space="preserve">whether to show text</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_progress_bar_set_text" glib:set-property="text">
<attribute name="org.gtk.Method.set_property" value="text"/>
<doc xml:space="preserve">Causes the given @text to appear next to the progress bar.
If @text is %NULL and [property@Gtk.ProgressBar:show-text] is %TRUE,
the current value of [property@Gtk.ProgressBar:fraction] will be displayed
as a percentage.
If @text is non-%NULL and [property@Gtk.ProgressBar:show-text] is %TRUE,
the text will be displayed. In this case, it will not display the progress
percentage. If @text is the empty string, the progress bar will still
be styled and sized suitably for containing text, as long as
[property@Gtk.ProgressBar:show-text] is %TRUE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="pbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkProgressBar`</doc>
<type name="ProgressBar" c:type="GtkProgressBar*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a UTF-8 string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="ellipsize" writable="1" transfer-ownership="none" setter="set_ellipsize" getter="get_ellipsize">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_ellipsize"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_ellipsize"/>
<doc xml:space="preserve">The preferred place to ellipsize the string.
The text will be ellipsized if the progress bar does not have enough room
to display the entire string, specified as a `PangoEllipsizeMode`.
Note that setting this property to a value other than
%PANGO_ELLIPSIZE_NONE has the side-effect that the progress bar requests
only enough space to display the ellipsis ("..."). Another means to set a
progress bar's width is [method@Gtk.Widget.set_size_request].</doc>
<type name="Pango.EllipsizeMode"/>
</property>
<property name="fraction" writable="1" transfer-ownership="none" setter="set_fraction" getter="get_fraction">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_fraction"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_fraction"/>
<doc xml:space="preserve">The fraction of total work that has been completed.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="inverted" writable="1" transfer-ownership="none" setter="set_inverted" getter="get_inverted">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_inverted"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_inverted"/>
<doc xml:space="preserve">Invert the direction in which the progress bar grows.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pulse-step" writable="1" transfer-ownership="none" setter="set_pulse_step" getter="get_pulse_step">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_pulse_step"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_pulse_step"/>
<doc xml:space="preserve">The fraction of total progress to move the bounding block when pulsed.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="show-text" writable="1" transfer-ownership="none" setter="set_show_text" getter="get_show_text">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_show_text"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_show_text"/>
<doc xml:space="preserve">Sets whether the progress bar will show a text in addition
to the bar itself.
The shown text is either the value of the [property@Gtk.ProgressBar:text]
property or, if that is %NULL, the [property@Gtk.ProgressBar:fraction]
value, as a percentage.
To make a progress bar that is styled and sized suitably for showing text
(even if the actual text is blank), set [property@Gtk.ProgressBar:show-text]
to %TRUE and [property@Gtk.ProgressBar:text] to the empty string (not %NULL).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="text" writable="1" transfer-ownership="none" setter="set_text" getter="get_text">
<attribute name="org.gtk.Property.get" value="gtk_progress_bar_get_text"/>
<attribute name="org.gtk.Property.set" value="gtk_progress_bar_set_text"/>
<doc xml:space="preserve">Text to be displayed in the progress bar.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<enumeration name="PropagationLimit" glib:type-name="GtkPropagationLimit" glib:get-type="gtk_propagation_limit_get_type" c:type="GtkPropagationLimit">
<doc xml:space="preserve">Describes limits of a [class@EventController] for handling events
targeting other widgets.</doc>
<member name="none" value="0" c:identifier="GTK_LIMIT_NONE" glib:nick="none" glib:name="GTK_LIMIT_NONE">
<doc xml:space="preserve">Events are handled regardless of what their
target is.</doc>
</member>
<member name="same_native" value="1" c:identifier="GTK_LIMIT_SAME_NATIVE" glib:nick="same-native" glib:name="GTK_LIMIT_SAME_NATIVE">
<doc xml:space="preserve">Events are only handled if their target
is in the same [iface@Native] as the event controllers widget. Note
that some event types have two targets (origin and destination).</doc>
</member>
</enumeration>
<enumeration name="PropagationPhase" glib:type-name="GtkPropagationPhase" glib:get-type="gtk_propagation_phase_get_type" c:type="GtkPropagationPhase">
<doc xml:space="preserve">Describes the stage at which events are fed into a [class@EventController].</doc>
<member name="none" value="0" c:identifier="GTK_PHASE_NONE" glib:nick="none" glib:name="GTK_PHASE_NONE">
<doc xml:space="preserve">Events are not delivered.</doc>
</member>
<member name="capture" value="1" c:identifier="GTK_PHASE_CAPTURE" glib:nick="capture" glib:name="GTK_PHASE_CAPTURE">
<doc xml:space="preserve">Events are delivered in the capture phase. The
capture phase happens before the bubble phase, runs from the toplevel down
to the event widget. This option should only be used on containers that
might possibly handle events before their children do.</doc>
</member>
<member name="bubble" value="2" c:identifier="GTK_PHASE_BUBBLE" glib:nick="bubble" glib:name="GTK_PHASE_BUBBLE">
<doc xml:space="preserve">Events are delivered in the bubble phase. The bubble
phase happens after the capture phase, and before the default handlers
are run. This phase runs from the event widget, up to the toplevel.</doc>
</member>
<member name="target" value="3" c:identifier="GTK_PHASE_TARGET" glib:nick="target" glib:name="GTK_PHASE_TARGET">
<doc xml:space="preserve">Events are delivered in the default widget event handlers,
note that widget implementations must chain up on button, motion, touch and
grab broken handlers for controllers in this phase to be run.</doc>
</member>
</enumeration>
<class name="PropertyExpression" c:symbol-prefix="property_expression" c:type="GtkPropertyExpression" parent="Expression" glib:type-name="GtkPropertyExpression" glib:get-type="gtk_property_expression_get_type" glib:fundamental="1">
<doc xml:space="preserve">A `GObject` property value in a `GtkExpression`.</doc>
<constructor name="new" c:identifier="gtk_property_expression_new">
<doc xml:space="preserve">Creates an expression that looks up a property.
The object to use is found by evaluating the `expression`,
or using the `this` argument when `expression` is `NULL`.
If the resulting object conforms to `this_type`, its property named
`property_name` will be queried. Otherwise, this expression's
evaluation will fail.
The given `this_type` must have a property with `property_name`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="PropertyExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="this_type" transfer-ownership="none">
<doc xml:space="preserve">The type to expect for the this type</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">Expression to
evaluate to get the object to query or `NULL` to
query the `this` object</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
<parameter name="property_name" transfer-ownership="none">
<doc xml:space="preserve">name of the property</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_pspec" c:identifier="gtk_property_expression_new_for_pspec">
<doc xml:space="preserve">Creates an expression that looks up a property.
The object to use is found by evaluating the `expression`,
or using the `this` argument when `expression` is `NULL`.
If the resulting object conforms to `this_type`, its
property specified by `pspec` will be queried.
Otherwise, this expression's evaluation will fail.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkExpression`</doc>
<type name="PropertyExpression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">Expression to
evaluate to get the object to query or `NULL` to
query the `this` object</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property to query</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</constructor>
<method name="get_expression" c:identifier="gtk_property_expression_get_expression">
<doc xml:space="preserve">Gets the expression specifying the object of
a property expression.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the object expression</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="expression" transfer-ownership="none">
<doc xml:space="preserve">a property `GtkExpression`</doc>
<type name="PropertyExpression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pspec" c:identifier="gtk_property_expression_get_pspec">
<doc xml:space="preserve">Gets the `GParamSpec` specifying the property of
a property expression.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</return-value>
<parameters>
<instance-parameter name="expression" transfer-ownership="none">
<doc xml:space="preserve">a property `GtkExpression`</doc>
<type name="PropertyExpression" c:type="GtkExpression*"/>
</instance-parameter>
</parameters>
</method>
</class>
<function-macro name="RANGE" c:identifier="GTK_RANGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="RANGE_CLASS" c:identifier="GTK_RANGE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="RANGE_GET_CLASS" c:identifier="GTK_RANGE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="RECENT_MANAGER" c:identifier="GTK_RECENT_MANAGER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="RECENT_MANAGER_CLASS" c:identifier="GTK_RECENT_MANAGER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="RECENT_MANAGER_GET_CLASS" c:identifier="GTK_RECENT_MANAGER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="REVEALER" c:identifier="GTK_REVEALER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="Range" c:symbol-prefix="range" c:type="GtkRange" parent="Widget" glib:type-name="GtkRange" glib:get-type="gtk_range_get_type" glib:type-struct="RangeClass">
<doc xml:space="preserve">`GtkRange` is the common base class for widgets which visualize an
adjustment.
Widgets that are derived from `GtkRange` include
[class@Gtk.Scale] and [class@Gtk.Scrollbar].
Apart from signals for monitoring the parameters of the adjustment,
`GtkRange` provides properties and methods for setting a
&#x201C;fill level&#x201D; on range widgets. See [method@Gtk.Range.set_fill_level].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<virtual-method name="adjust_bounds">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="new_value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="change_value">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="scroll" transfer-ownership="none">
<type name="ScrollType" c:type="GtkScrollType"/>
</parameter>
<parameter name="new_value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_range_border">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="border_" transfer-ownership="none">
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="move_slider">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="scroll" transfer-ownership="none">
<type name="ScrollType" c:type="GtkScrollType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_adjustment" c:identifier="gtk_range_get_adjustment" glib:get-property="adjustment">
<attribute name="org.gtk.Method.get_property" value="adjustment"/>
<doc xml:space="preserve">Get the adjustment which is the &#x201C;model&#x201D; object for `GtkRange`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fill_level" c:identifier="gtk_range_get_fill_level" glib:get-property="fill-level">
<attribute name="org.gtk.Method.get_property" value="fill-level"/>
<doc xml:space="preserve">Gets the current position of the fill level indicator.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current fill level</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">A `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_flippable" c:identifier="gtk_range_get_flippable">
<doc xml:space="preserve">Gets whether the `GtkRange` respects text direction.
See [method@Gtk.Range.set_flippable].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the range is flippable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_inverted" c:identifier="gtk_range_get_inverted" glib:get-property="inverted">
<attribute name="org.gtk.Method.get_property" value="inverted"/>
<doc xml:space="preserve">Gets whether the range is inverted.
See [method@Gtk.Range.set_inverted].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the range is inverted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_range_rect" c:identifier="gtk_range_get_range_rect">
<doc xml:space="preserve">This function returns the area that contains the range&#x2019;s trough,
in coordinates relative to @range's origin.
This function is useful mainly for `GtkRange` subclasses.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="range_rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return location for the range rectangle</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_restrict_to_fill_level" c:identifier="gtk_range_get_restrict_to_fill_level" glib:get-property="restrict-to-fill-level">
<attribute name="org.gtk.Method.get_property" value="restrict-to-fill-level"/>
<doc xml:space="preserve">Gets whether the range is restricted to the fill level.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @range is restricted to the fill level.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">A `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_round_digits" c:identifier="gtk_range_get_round_digits" glib:get-property="round-digits">
<attribute name="org.gtk.Method.get_property" value="round-digits"/>
<doc xml:space="preserve">Gets the number of digits to round the value to when
it changes.
See [signal@Gtk.Range::change-value].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of digits to round to</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_fill_level" c:identifier="gtk_range_get_show_fill_level" glib:get-property="show-fill-level">
<attribute name="org.gtk.Method.get_property" value="show-fill-level"/>
<doc xml:space="preserve">Gets whether the range displays the fill level graphically.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @range shows the fill level.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">A `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_slider_range" c:identifier="gtk_range_get_slider_range">
<doc xml:space="preserve">This function returns sliders range along the long dimension,
in widget-&gt;window coordinates.
This function is useful mainly for `GtkRange` subclasses.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="slider_start" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the slider's start</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="slider_end" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the slider's end</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_slider_size_fixed" c:identifier="gtk_range_get_slider_size_fixed">
<doc xml:space="preserve">This function is useful mainly for `GtkRange` subclasses.
See [method@Gtk.Range.set_slider_size_fixed].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the range&#x2019;s slider has a fixed size.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_range_get_value">
<doc xml:space="preserve">Gets the current value of the range.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">current value of the range.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_adjustment" c:identifier="gtk_range_set_adjustment" glib:set-property="adjustment">
<attribute name="org.gtk.Method.set_property" value="adjustment"/>
<doc xml:space="preserve">Sets the adjustment to be used as the &#x201C;model&#x201D; object for the `GtkRange`
The adjustment indicates the current range value, the minimum and
maximum range values, the step/page increments used for keybindings
and scrolling, and the page size.
The page size is normally 0 for `GtkScale` and nonzero for `GtkScrollbar`,
and indicates the size of the visible area of the widget being scrolled.
The page size affects the size of the scrollbar slider.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_fill_level" c:identifier="gtk_range_set_fill_level" glib:set-property="fill-level">
<attribute name="org.gtk.Method.set_property" value="fill-level"/>
<doc xml:space="preserve">Set the new position of the fill level indicator.
The &#x201C;fill level&#x201D; is probably best described by its most prominent
use case, which is an indicator for the amount of pre-buffering in
a streaming media player. In that use case, the value of the range
would indicate the current play position, and the fill level would
be the position up to which the file/stream has been downloaded.
This amount of prebuffering can be displayed on the range&#x2019;s trough
and is themeable separately from the trough. To enable fill level
display, use [method@Gtk.Range.set_show_fill_level]. The range defaults
to not showing the fill level.
Additionally, it&#x2019;s possible to restrict the range&#x2019;s slider position
to values which are smaller than the fill level. This is controlled
by [method@Gtk.Range.set_restrict_to_fill_level] and is by default
enabled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="fill_level" transfer-ownership="none">
<doc xml:space="preserve">the new position of the fill level indicator</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_flippable" c:identifier="gtk_range_set_flippable">
<doc xml:space="preserve">Sets whether the `GtkRange` respects text direction.
If a range is flippable, it will switch its direction
if it is horizontal and its direction is %GTK_TEXT_DIR_RTL.
See [method@Gtk.Widget.get_direction].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="flippable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the range flippable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_increments" c:identifier="gtk_range_set_increments">
<doc xml:space="preserve">Sets the step and page sizes for the range.
The step size is used when the user clicks the `GtkScrollbar`
arrows or moves a `GtkScale` via arrow keys. The page size
is used for example when moving via Page Up or Page Down keys.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">step size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">page size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_inverted" c:identifier="gtk_range_set_inverted" glib:set-property="inverted">
<attribute name="org.gtk.Method.set_property" value="inverted"/>
<doc xml:space="preserve">Sets whether to invert the range.
Ranges normally move from lower to higher values as the
slider moves from top to bottom or left to right. Inverted
ranges have higher values at the top or on the right rather
than on the bottom or left.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to invert the range</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_range" c:identifier="gtk_range_set_range">
<doc xml:space="preserve">Sets the allowable values in the `GtkRange`.
The range value is clamped to be between @min and @max.
(If the range has a non-zero page size, it is clamped
between @min and @max - page-size.)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="min" transfer-ownership="none">
<doc xml:space="preserve">minimum range value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">maximum range value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_restrict_to_fill_level" c:identifier="gtk_range_set_restrict_to_fill_level" glib:set-property="restrict-to-fill-level">
<attribute name="org.gtk.Method.set_property" value="restrict-to-fill-level"/>
<doc xml:space="preserve">Sets whether the slider is restricted to the fill level.
See [method@Gtk.Range.set_fill_level] for a general description
of the fill level concept.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">A `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="restrict_to_fill_level" transfer-ownership="none">
<doc xml:space="preserve">Whether the fill level restricts slider movement.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_round_digits" c:identifier="gtk_range_set_round_digits" glib:set-property="round-digits">
<attribute name="org.gtk.Method.set_property" value="round-digits"/>
<doc xml:space="preserve">Sets the number of digits to round the value to when
it changes.
See [signal@Gtk.Range::change-value].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="round_digits" transfer-ownership="none">
<doc xml:space="preserve">the precision in digits, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_show_fill_level" c:identifier="gtk_range_set_show_fill_level" glib:set-property="show-fill-level">
<attribute name="org.gtk.Method.set_property" value="show-fill-level"/>
<doc xml:space="preserve">Sets whether a graphical fill level is show on the trough.
See [method@Gtk.Range.set_fill_level] for a general description
of the fill level concept.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">A `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="show_fill_level" transfer-ownership="none">
<doc xml:space="preserve">Whether a fill level indicator graphics is shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_slider_size_fixed" c:identifier="gtk_range_set_slider_size_fixed">
<doc xml:space="preserve">Sets whether the range&#x2019;s slider has a fixed size, or a size that
depends on its adjustment&#x2019;s page size.
This function is useful mainly for `GtkRange` subclasses.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="size_fixed" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the slider size constant</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_range_set_value">
<doc xml:space="preserve">Sets the current value of the range.
If the value is outside the minimum or maximum range values,
it will be clamped to fit inside them. The range emits the
[signal@Gtk.Range::value-changed] signal if the value changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="range" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRange`</doc>
<type name="Range" c:type="GtkRange*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">new value of the range</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<property name="adjustment" writable="1" construct="1" transfer-ownership="none" setter="set_adjustment" getter="get_adjustment">
<attribute name="org.gtk.Property.get" value="gtk_range_get_adjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_adjustment"/>
<doc xml:space="preserve">The adjustment that is controlled by the range.</doc>
<type name="Adjustment"/>
</property>
<property name="fill-level" writable="1" transfer-ownership="none" setter="set_fill_level" getter="get_fill_level">
<attribute name="org.gtk.Property.get" value="gtk_range_get_fill_level"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_fill_level"/>
<doc xml:space="preserve">The fill level (e.g. prebuffering of a network stream).</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="inverted" writable="1" transfer-ownership="none" setter="set_inverted" getter="get_inverted">
<attribute name="org.gtk.Property.get" value="gtk_range_get_inverted"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_inverted"/>
<doc xml:space="preserve">If %TRUE, the direction in which the slider moves is inverted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="restrict-to-fill-level" writable="1" transfer-ownership="none" setter="set_restrict_to_fill_level" getter="get_restrict_to_fill_level">
<attribute name="org.gtk.Property.get" value="gtk_range_get_restrict_to_fill_level"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_restrict_to_fill_level"/>
<doc xml:space="preserve">Controls whether slider movement is restricted to an
upper boundary set by the fill level.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="round-digits" writable="1" transfer-ownership="none" setter="set_round_digits" getter="get_round_digits">
<attribute name="org.gtk.Property.get" value="gtk_range_get_round_digits"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_round_digits"/>
<doc xml:space="preserve">The number of digits to round the value to when
it changes.
See [signal@Gtk.Range::change-value].</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="show-fill-level" writable="1" transfer-ownership="none" setter="set_show_fill_level" getter="get_show_fill_level">
<attribute name="org.gtk.Property.get" value="gtk_range_get_show_fill_level"/>
<attribute name="org.gtk.Property.set" value="gtk_range_set_show_fill_level"/>
<doc xml:space="preserve">Controls whether fill level indicator graphics are displayed
on the trough.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="adjust-bounds" when="last">
<doc xml:space="preserve">Emitted before clamping a value, to give the application a
chance to adjust the bounds.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the value before we clamp</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="change-value" when="last">
<doc xml:space="preserve">Emitted when a scroll action is performed on a range.
It allows an application to determine the type of scroll event
that occurred and the resultant new value. The application can
handle the event itself and return %TRUE to prevent further
processing. Or, by returning %FALSE, it can pass the event to
other handlers until the default GTK handler is reached.
The value parameter is unrounded. An application that overrides
the ::change-value signal is responsible for clamping the value
to the desired number of decimal digits; the default GTK
handler clamps the value based on [property@Gtk.Range:round-digits].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to prevent other handlers from being invoked for
the signal, %FALSE to propagate the signal further</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="scroll" transfer-ownership="none">
<doc xml:space="preserve">the type of scroll action that was performed</doc>
<type name="ScrollType"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the new value resulting from the scroll action</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-slider" when="last" action="1">
<doc xml:space="preserve">Virtual function that moves the slider.
Used for keybindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">how to move the slider</doc>
<type name="ScrollType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="value-changed" when="last">
<doc xml:space="preserve">Emitted when the range value changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="RangeClass" c:type="GtkRangeClass" glib:is-gtype-struct-for="Range">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="value_changed">
<callback name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="adjust_bounds">
<callback name="adjust_bounds">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</parameter>
<parameter name="new_value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</callback>
</field>
<field name="move_slider">
<callback name="move_slider">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</parameter>
<parameter name="scroll" transfer-ownership="none">
<type name="ScrollType" c:type="GtkScrollType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_range_border">
<callback name="get_range_border">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</parameter>
<parameter name="border_" transfer-ownership="none">
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="change_value">
<callback name="change_value">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="range" transfer-ownership="none">
<type name="Range" c:type="GtkRange*"/>
</parameter>
<parameter name="scroll" transfer-ownership="none">
<type name="ScrollType" c:type="GtkScrollType"/>
</parameter>
<parameter name="new_value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="RecentData" c:type="GtkRecentData">
<doc xml:space="preserve">Meta-data to be passed to gtk_recent_manager_add_full() when
registering a recently used resource.</doc>
<field name="display_name" writable="1">
<doc xml:space="preserve">a UTF-8 encoded string, containing the name of the recently
used resource to be displayed, or %NULL;</doc>
<type name="utf8" c:type="char*"/>
</field>
<field name="description" writable="1">
<doc xml:space="preserve">a UTF-8 encoded string, containing a short description of
the resource, or %NULL;</doc>
<type name="utf8" c:type="char*"/>
</field>
<field name="mime_type" writable="1">
<doc xml:space="preserve">the MIME type of the resource;</doc>
<type name="utf8" c:type="char*"/>
</field>
<field name="app_name" writable="1">
<doc xml:space="preserve">the name of the application that is registering this recently
used resource;</doc>
<type name="utf8" c:type="char*"/>
</field>
<field name="app_exec" writable="1">
<doc xml:space="preserve">command line used to launch this resource; may contain the
&#x201C;\%f&#x201D; and &#x201C;\%u&#x201D; escape characters which will be expanded
to the resource file path and URI respectively when the command line
is retrieved;</doc>
<type name="utf8" c:type="char*"/>
</field>
<field name="groups" writable="1">
<doc xml:space="preserve">a vector of strings containing
groups names;</doc>
<array c:type="char**">
<type name="utf8" c:type="char*"/>
</array>
</field>
<field name="is_private" writable="1">
<doc xml:space="preserve">whether this resource should be displayed only by the
applications that have registered it or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</field>
</record>
<record name="RecentInfo" c:type="GtkRecentInfo" glib:type-name="GtkRecentInfo" glib:get-type="gtk_recent_info_get_type" c:symbol-prefix="recent_info">
<doc xml:space="preserve">`GtkRecentInfo` contains the metadata associated with an item in the
recently used files list.</doc>
<method name="create_app_info" c:identifier="gtk_recent_info_create_app_info" throws="1">
<doc xml:space="preserve">Creates a `GAppInfo` for the specified `GtkRecentInfo`
In case of error, @error will be set either with a
%GTK_RECENT_MANAGER_ERROR or a %G_IO_ERROR</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the newly created `GAppInfo`</doc>
<type name="Gio.AppInfo" c:type="GAppInfo*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="app_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the application that should
be mapped to a `GAppInfo`; if %NULL is used then the default
application for the MIME type is used</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="exists" c:identifier="gtk_recent_info_exists">
<doc xml:space="preserve">Checks whether the resource pointed by @info still exists.
At the moment this check is done only on resources pointing
to local files.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the resource exists</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_added" c:identifier="gtk_recent_info_get_added">
<doc xml:space="preserve">Gets the time when the resource
was added to the recently used resources list.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GDateTime` for the time
when the resource was added</doc>
<type name="GLib.DateTime" c:type="GDateTime*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_age" c:identifier="gtk_recent_info_get_age">
<doc xml:space="preserve">Gets the number of days elapsed since the last update
of the resource pointed by @info.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a positive integer containing the number of days
elapsed since the time this resource was last modified</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_application_info" c:identifier="gtk_recent_info_get_application_info">
<doc xml:space="preserve">Gets the data regarding the application that has registered the resource
pointed by @info.
If the command line contains any escape characters defined inside the
storage specification, they will be expanded.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an application with @app_name has registered this
resource inside the recently used list, or %FALSE otherwise. The
@app_exec string is owned by the `GtkRecentInfo` and should not be
modified or freed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="app_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the application that has registered this item</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="app_exec" direction="out" caller-allocates="0" transfer-ownership="none">
<doc xml:space="preserve">return location for the string containing
the command line</doc>
<type name="utf8" c:type="const char**"/>
</parameter>
<parameter name="count" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the number of times this item was registered</doc>
<type name="guint" c:type="guint*"/>
</parameter>
<parameter name="stamp" direction="out" caller-allocates="0" transfer-ownership="none">
<doc xml:space="preserve">return location for the time this item was last
registered for this application</doc>
<type name="GLib.DateTime" c:type="GDateTime**"/>
</parameter>
</parameters>
</method>
<method name="get_applications" c:identifier="gtk_recent_info_get_applications">
<doc xml:space="preserve">Retrieves the list of applications that have registered this resource.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly
allocated %NULL-terminated array of strings. Use g_strfreev() to free it.</doc>
<array length="0" zero-terminated="1" c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="length" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the length of the returned list</doc>
<type name="gsize" c:type="gsize*"/>
</parameter>
</parameters>
</method>
<method name="get_description" c:identifier="gtk_recent_info_get_description">
<doc xml:space="preserve">Gets the (short) description of the resource.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the description of the resource. The returned string
is owned by the recent manager, and should not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_display_name" c:identifier="gtk_recent_info_get_display_name">
<doc xml:space="preserve">Gets the name of the resource.
If none has been defined, the basename
of the resource is obtained.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the display name of the resource. The returned string
is owned by the recent manager, and should not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_gicon" c:identifier="gtk_recent_info_get_gicon">
<doc xml:space="preserve">Retrieves the icon associated to the resource MIME type.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GIcon` containing the icon</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_groups" c:identifier="gtk_recent_info_get_groups">
<doc xml:space="preserve">Returns all groups registered for the recently used item @info.
The array of returned group names will be %NULL terminated, so
length might optionally be %NULL.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">
a newly allocated %NULL terminated array of strings.
Use g_strfreev() to free it.</doc>
<array length="0" zero-terminated="1" c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="length" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the number of groups returned</doc>
<type name="gsize" c:type="gsize*"/>
</parameter>
</parameters>
</method>
<method name="get_mime_type" c:identifier="gtk_recent_info_get_mime_type">
<doc xml:space="preserve">Gets the MIME type of the resource.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the MIME type of the resource. The returned string
is owned by the recent manager, and should not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modified" c:identifier="gtk_recent_info_get_modified">
<doc xml:space="preserve">Gets the time when the meta-data
for the resource was last modified.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GDateTime` for the time
when the resource was last modified</doc>
<type name="GLib.DateTime" c:type="GDateTime*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_private_hint" c:identifier="gtk_recent_info_get_private_hint">
<doc xml:space="preserve">Gets the value of the &#x201C;private&#x201D; flag.
Resources in the recently used list that have this flag
set to %TRUE should only be displayed by the applications
that have registered them.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the private flag was found, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_short_name" c:identifier="gtk_recent_info_get_short_name">
<doc xml:space="preserve">Computes a valid UTF-8 string that can be used as the
name of the item in a menu or list.
For example, calling this function on an item that refers
to &#x201C;file:///foo/bar.txt&#x201D; will yield &#x201C;bar.txt&#x201D;.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly-allocated string in UTF-8 encoding
free it with g_free()</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">an `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_uri" c:identifier="gtk_recent_info_get_uri">
<doc xml:space="preserve">Gets the URI of the resource.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the URI of the resource. The returned string is
owned by the recent manager, and should not be freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `tkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_uri_display" c:identifier="gtk_recent_info_get_uri_display">
<doc xml:space="preserve">Gets a displayable version of the resource&#x2019;s URI.
If the resource is local, it returns a local path; if the
resource is not local, it returns the UTF-8 encoded content
of [method@Gtk.RecentInfo.get_uri].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly allocated UTF-8 string containing the
resource&#x2019;s URI or %NULL. Use g_free() when done using it.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visited" c:identifier="gtk_recent_info_get_visited">
<doc xml:space="preserve">Gets the time when the meta-data
for the resource was last visited.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GDateTime` for the time
when the resource was last visited</doc>
<type name="GLib.DateTime" c:type="GDateTime*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_application" c:identifier="gtk_recent_info_has_application">
<doc xml:space="preserve">Checks whether an application registered this resource using @app_name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an application with name @app_name was found,
%FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="app_name" transfer-ownership="none">
<doc xml:space="preserve">a string containing an application name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="has_group" c:identifier="gtk_recent_info_has_group">
<doc xml:space="preserve">Checks whether @group_name appears inside the groups
registered for the recently used item @info.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the group was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="group_name" transfer-ownership="none">
<doc xml:space="preserve">name of a group</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="is_local" c:identifier="gtk_recent_info_is_local">
<doc xml:space="preserve">Checks whether the resource is local or not by looking at the
scheme of its URI.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the resource is local</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="last_application" c:identifier="gtk_recent_info_last_application">
<doc xml:space="preserve">Gets the name of the last application that have registered the
recently used resource represented by @info.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">an application name. Use g_free() to free it.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="match" c:identifier="gtk_recent_info_match">
<doc xml:space="preserve">Checks whether two `GtkRecentInfo` point to the same resource.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if both `GtkRecentInfo` point to the same
resource, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="info_a" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
<parameter name="info_b" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</parameter>
</parameters>
</method>
<method name="ref" c:identifier="gtk_recent_info_ref">
<doc xml:space="preserve">Increases the reference count of @recent_info by one.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the recent info object with its reference count
increased by one</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
<method name="unref" c:identifier="gtk_recent_info_unref">
<doc xml:space="preserve">Decreases the reference count of @info by one.
If the reference count reaches zero, @info is
deallocated, and the memory freed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="info" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentInfo`</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</instance-parameter>
</parameters>
</method>
</record>
<class name="RecentManager" c:symbol-prefix="recent_manager" c:type="GtkRecentManager" parent="GObject.Object" glib:type-name="GtkRecentManager" glib:get-type="gtk_recent_manager_get_type" glib:type-struct="RecentManagerClass">
<doc xml:space="preserve">`GtkRecentManager` manages and looks up recently used files.
Each recently used file is identified by its URI, and has meta-data
associated to it, like the names and command lines of the applications
that have registered it, the number of time each application has
registered the same file, the mime type of the file and whether
the file should be displayed only by the applications that have
registered it.
The recently used files list is per user.
`GtkRecentManager` acts like a database of all the recently
used files. You can create new `GtkRecentManager` objects, but
it is more efficient to use the default manager created by GTK.
Adding a new recently used file is as simple as:
```c
GtkRecentManager *manager;
manager = gtk_recent_manager_get_default ();
gtk_recent_manager_add_item (manager, file_uri);
```
The `GtkRecentManager` will try to gather all the needed information
from the file itself through GIO.
Looking up the meta-data associated with a recently used file
given its URI requires calling [method@Gtk.RecentManager.lookup_item]:
```c
GtkRecentManager *manager;
GtkRecentInfo *info;
GError *error = NULL;
manager = gtk_recent_manager_get_default ();
info = gtk_recent_manager_lookup_item (manager, file_uri, &amp;error);
if (error)
{
g_warning ("Could not find the file: %s", error-&gt;message);
g_error_free (error);
}
else
{
// Use the info object
gtk_recent_info_unref (info);
}
```
In order to retrieve the list of recently used files, you can use
[method@Gtk.RecentManager.get_items], which returns a list of
[struct@Gtk.RecentInfo].
Note that the maximum age of the recently used files list is
controllable through the [property@Gtk.Settings:gtk-recent-files-max-age]
property.</doc>
<constructor name="new" c:identifier="gtk_recent_manager_new">
<doc xml:space="preserve">Creates a new recent manager object.
Recent manager objects are used to handle the list of recently used
resources. A `GtkRecentManager` object monitors the recently used
resources list, and emits the [signal@Gtk.RecentManager::changed]
signal each time something inside the list changes.
`GtkRecentManager` objects are expensive: be sure to create them
only when needed. You should use [func@Gtk.RecentManager.get_default]
instead.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkRecentManager` object</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</return-value>
</constructor>
<function name="get_default" c:identifier="gtk_recent_manager_get_default">
<doc xml:space="preserve">Gets a unique instance of `GtkRecentManager` that you can share
in your application without caring about memory management.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A unique `GtkRecentManager`. Do not ref or
unref it.</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</return-value>
</function>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="add_full" c:identifier="gtk_recent_manager_add_full">
<doc xml:space="preserve">Adds a new resource, pointed by @uri, into the recently used
resources list, using the metadata specified inside the
`GtkRecentData` passed in @recent_data.
The passed URI will be used to identify this resource inside the
list.
In order to register the new recently used resource, metadata about
the resource must be passed as well as the URI; the metadata is
stored in a `GtkRecentData`, which must contain the MIME
type of the resource pointed by the URI; the name of the application
that is registering the item, and a command line to be used when
launching the item.
Optionally, a `GtkRecentData` might contain a UTF-8 string
to be used when viewing the item instead of the last component of
the URI; a short description of the item; whether the item should
be considered private - that is, should be displayed only by the
applications that have registered it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the new item was successfully added to the
recently used resources list, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a valid URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="recent_data" transfer-ownership="none">
<doc xml:space="preserve">metadata of the resource</doc>
<type name="RecentData" c:type="const GtkRecentData*"/>
</parameter>
</parameters>
</method>
<method name="add_item" c:identifier="gtk_recent_manager_add_item">
<doc xml:space="preserve">Adds a new resource, pointed by @uri, into the recently used
resources list.
This function automatically retrieves some of the needed
metadata and setting other metadata to common default values;
it then feeds the data to [method@Gtk.RecentManager.add_full].
See [method@Gtk.RecentManager.add_full] if you want to explicitly
define the metadata for the resource pointed by @uri.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the new item was successfully added
to the recently used resources list</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a valid URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_items" c:identifier="gtk_recent_manager_get_items">
<doc xml:space="preserve">Gets the list of recently used resources.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a list of
newly allocated `GtkRecentInfo objects`. Use
[method@Gtk.RecentInfo.unref] on each item inside the list, and then
free the list itself using g_list_free().</doc>
<type name="GLib.List" c:type="GList*">
<type name="RecentInfo"/>
</type>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_item" c:identifier="gtk_recent_manager_has_item">
<doc xml:space="preserve">Checks whether there is a recently used resource registered
with @uri inside the recent manager.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the resource was found, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="lookup_item" c:identifier="gtk_recent_manager_lookup_item" throws="1">
<doc xml:space="preserve">Searches for a URI inside the recently used resources list, and
returns a `GtkRecentInfo` containing information about the resource
like its MIME type, or its display name.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GtkRecentInfo` containing information
about the resource pointed by @uri, or %NULL if the URI was
not registered in the recently used resources list. Free with
[method@Gtk.RecentInfo.unref].</doc>
<type name="RecentInfo" c:type="GtkRecentInfo*"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">a URI</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="move_item" c:identifier="gtk_recent_manager_move_item" throws="1">
<doc xml:space="preserve">Changes the location of a recently used resource from @uri to @new_uri.
Please note that this function will not affect the resource pointed
by the URIs, but only the URI used in the recently used resources list.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the URI of a recently used resource</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="new_uri" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new URI of the recently used resource, or
%NULL to remove the item pointed by @uri in the list</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="purge_items" c:identifier="gtk_recent_manager_purge_items" throws="1">
<doc xml:space="preserve">Purges every item from the recently used resources list.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of items that have been removed from the
recently used resources list</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_item" c:identifier="gtk_recent_manager_remove_item" throws="1">
<doc xml:space="preserve">Removes a resource pointed by @uri from the recently used resources
list handled by a recent manager.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item pointed by @uri has been successfully
removed by the recently used resources list, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="manager" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRecentManager`</doc>
<type name="RecentManager" c:type="GtkRecentManager*"/>
</instance-parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the URI of the item you wish to remove</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="filename" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The full path to the file to be used to store and read the
recently used resources list</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="size" transfer-ownership="none">
<doc xml:space="preserve">The size of the recently used resources list.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv" readable="0" private="1">
<type name="RecentManagerPrivate" c:type="GtkRecentManagerPrivate*"/>
</field>
<glib:signal name="changed" when="first">
<doc xml:space="preserve">Emitted when the current recently used resources manager changes
its contents.
This can happen either by calling [method@Gtk.RecentManager.add_item]
or by another application.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="RecentManagerClass" c:type="GtkRecentManagerClass" glib:is-gtype-struct-for="RecentManager">
<doc xml:space="preserve">`GtkRecentManagerClass` contains only private data.</doc>
<field name="parent_class" readable="0" private="1">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="manager" transfer-ownership="none">
<type name="RecentManager" c:type="GtkRecentManager*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_recent1" introspectable="0">
<callback name="_gtk_recent1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_recent2" introspectable="0">
<callback name="_gtk_recent2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_recent3" introspectable="0">
<callback name="_gtk_recent3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_recent4" introspectable="0">
<callback name="_gtk_recent4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<enumeration name="RecentManagerError" glib:type-name="GtkRecentManagerError" glib:get-type="gtk_recent_manager_error_get_type" c:type="GtkRecentManagerError" glib:error-domain="gtk-recent-manager-error-quark">
<doc xml:space="preserve">Error codes for `GtkRecentManager` operations</doc>
<member name="not_found" value="0" c:identifier="GTK_RECENT_MANAGER_ERROR_NOT_FOUND" glib:nick="not-found" glib:name="GTK_RECENT_MANAGER_ERROR_NOT_FOUND">
<doc xml:space="preserve">the URI specified does not exists in
the recently used resources list.</doc>
</member>
<member name="invalid_uri" value="1" c:identifier="GTK_RECENT_MANAGER_ERROR_INVALID_URI" glib:nick="invalid-uri" glib:name="GTK_RECENT_MANAGER_ERROR_INVALID_URI">
<doc xml:space="preserve">the URI specified is not valid.</doc>
</member>
<member name="invalid_encoding" value="2" c:identifier="GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING" glib:nick="invalid-encoding" glib:name="GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING">
<doc xml:space="preserve">the supplied string is not
UTF-8 encoded.</doc>
</member>
<member name="not_registered" value="3" c:identifier="GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED" glib:nick="not-registered" glib:name="GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED">
<doc xml:space="preserve">no application has registered
the specified item.</doc>
</member>
<member name="read" value="4" c:identifier="GTK_RECENT_MANAGER_ERROR_READ" glib:nick="read" glib:name="GTK_RECENT_MANAGER_ERROR_READ">
<doc xml:space="preserve">failure while reading the recently used
resources file.</doc>
</member>
<member name="write" value="5" c:identifier="GTK_RECENT_MANAGER_ERROR_WRITE" glib:nick="write" glib:name="GTK_RECENT_MANAGER_ERROR_WRITE">
<doc xml:space="preserve">failure while writing the recently used
resources file.</doc>
</member>
<member name="unknown" value="6" c:identifier="GTK_RECENT_MANAGER_ERROR_UNKNOWN" glib:nick="unknown" glib:name="GTK_RECENT_MANAGER_ERROR_UNKNOWN">
<doc xml:space="preserve">unspecified error.</doc>
</member>
<function name="quark" c:identifier="gtk_recent_manager_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
</enumeration>
<record name="RecentManagerPrivate" c:type="GtkRecentManagerPrivate" disguised="1"/>
<record name="RequestedSize" c:type="GtkRequestedSize">
<doc xml:space="preserve">Represents a request of a screen object in a given orientation. These
are primarily used in container implementations when allocating a natural
size for children calling. See [func@distribute_natural_allocation].</doc>
<field name="data" writable="1">
<doc xml:space="preserve">A client pointer</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="minimum_size" writable="1">
<doc xml:space="preserve">The minimum size needed for allocation in a given orientation</doc>
<type name="gint" c:type="int"/>
</field>
<field name="natural_size" writable="1">
<doc xml:space="preserve">The natural size for allocation in a given orientation</doc>
<type name="gint" c:type="int"/>
</field>
</record>
<record name="Requisition" c:type="GtkRequisition" glib:type-name="GtkRequisition" glib:get-type="gtk_requisition_get_type" c:symbol-prefix="requisition">
<doc xml:space="preserve">A `GtkRequisition` represents the desired size of a widget. See
[GtkWidget&#x2019;s geometry management section](class.Widget.html#height-for-width-geometry-management) for
more information.</doc>
<field name="width" writable="1">
<doc xml:space="preserve">the widget&#x2019;s desired width</doc>
<type name="gint" c:type="int"/>
</field>
<field name="height" writable="1">
<doc xml:space="preserve">the widget&#x2019;s desired height</doc>
<type name="gint" c:type="int"/>
</field>
<constructor name="new" c:identifier="gtk_requisition_new">
<doc xml:space="preserve">Allocates a new `GtkRequisition`.
The struct is initialized to zero.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new empty `GtkRequisition`. The newly
allocated `GtkRequisition` should be freed with
[method@Gtk.Requisition.free]</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</return-value>
</constructor>
<method name="copy" c:identifier="gtk_requisition_copy">
<doc xml:space="preserve">Copies a `GtkRequisition`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of @requisition</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</return-value>
<parameters>
<instance-parameter name="requisition" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRequisition`</doc>
<type name="Requisition" c:type="const GtkRequisition*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_requisition_free">
<doc xml:space="preserve">Frees a `GtkRequisition`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="requisition" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRequisition`</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</instance-parameter>
</parameters>
</method>
</record>
<enumeration name="ResponseType" glib:type-name="GtkResponseType" glib:get-type="gtk_response_type_get_type" c:type="GtkResponseType">
<doc xml:space="preserve">Predefined values for use as response ids in gtk_dialog_add_button().
All predefined values are negative; GTK leaves values of 0 or greater for
application-defined response ids.</doc>
<member name="none" value="-1" c:identifier="GTK_RESPONSE_NONE" glib:nick="none" glib:name="GTK_RESPONSE_NONE">
<doc xml:space="preserve">Returned if an action widget has no response id,
or if the dialog gets programmatically hidden or destroyed</doc>
</member>
<member name="reject" value="-2" c:identifier="GTK_RESPONSE_REJECT" glib:nick="reject" glib:name="GTK_RESPONSE_REJECT">
<doc xml:space="preserve">Generic response id, not used by GTK dialogs</doc>
</member>
<member name="accept" value="-3" c:identifier="GTK_RESPONSE_ACCEPT" glib:nick="accept" glib:name="GTK_RESPONSE_ACCEPT">
<doc xml:space="preserve">Generic response id, not used by GTK dialogs</doc>
</member>
<member name="delete_event" value="-4" c:identifier="GTK_RESPONSE_DELETE_EVENT" glib:nick="delete-event" glib:name="GTK_RESPONSE_DELETE_EVENT">
<doc xml:space="preserve">Returned if the dialog is deleted</doc>
</member>
<member name="ok" value="-5" c:identifier="GTK_RESPONSE_OK" glib:nick="ok" glib:name="GTK_RESPONSE_OK">
<doc xml:space="preserve">Returned by OK buttons in GTK dialogs</doc>
</member>
<member name="cancel" value="-6" c:identifier="GTK_RESPONSE_CANCEL" glib:nick="cancel" glib:name="GTK_RESPONSE_CANCEL">
<doc xml:space="preserve">Returned by Cancel buttons in GTK dialogs</doc>
</member>
<member name="close" value="-7" c:identifier="GTK_RESPONSE_CLOSE" glib:nick="close" glib:name="GTK_RESPONSE_CLOSE">
<doc xml:space="preserve">Returned by Close buttons in GTK dialogs</doc>
</member>
<member name="yes" value="-8" c:identifier="GTK_RESPONSE_YES" glib:nick="yes" glib:name="GTK_RESPONSE_YES">
<doc xml:space="preserve">Returned by Yes buttons in GTK dialogs</doc>
</member>
<member name="no" value="-9" c:identifier="GTK_RESPONSE_NO" glib:nick="no" glib:name="GTK_RESPONSE_NO">
<doc xml:space="preserve">Returned by No buttons in GTK dialogs</doc>
</member>
<member name="apply" value="-10" c:identifier="GTK_RESPONSE_APPLY" glib:nick="apply" glib:name="GTK_RESPONSE_APPLY">
<doc xml:space="preserve">Returned by Apply buttons in GTK dialogs</doc>
</member>
<member name="help" value="-11" c:identifier="GTK_RESPONSE_HELP" glib:nick="help" glib:name="GTK_RESPONSE_HELP">
<doc xml:space="preserve">Returned by Help buttons in GTK dialogs</doc>
</member>
</enumeration>
<class name="Revealer" c:symbol-prefix="revealer" c:type="GtkRevealer" parent="Widget" glib:type-name="GtkRevealer" glib:get-type="gtk_revealer_get_type">
<doc xml:space="preserve">A `GtkRevealer` animates the transition of its child from invisible to visible.
The style of transition can be controlled with
[method@Gtk.Revealer.set_transition_type].
These animations respect the [property@Gtk.Settings:gtk-enable-animations]
setting.
# CSS nodes
`GtkRevealer` has a single CSS node with name revealer.
When styling `GtkRevealer` using CSS, remember that it only hides its contents,
not itself. That means applied margin, padding and borders will be visible even
when the [property@Gtk.Revealer:reveal-child] property is set to %FALSE.
# Accessibility
`GtkRevealer` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.
The child of `GtkRevealer`, if set, is always available in the accessibility
tree, regardless of the state of the revealer widget.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_revealer_new">
<doc xml:space="preserve">Creates a new `GtkRevealer`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly created `GtkRevealer`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_child" c:identifier="gtk_revealer_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @revealer.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @revealer</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_revealed" c:identifier="gtk_revealer_get_child_revealed" glib:get-property="child-revealed">
<attribute name="org.gtk.Method.get_property" value="child-revealed"/>
<doc xml:space="preserve">Returns whether the child is fully revealed.
In other words, this returns whether the transition
to the revealed state is completed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the child is fully revealed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reveal_child" c:identifier="gtk_revealer_get_reveal_child" glib:get-property="reveal-child">
<attribute name="org.gtk.Method.get_property" value="reveal-child"/>
<doc xml:space="preserve">Returns whether the child is currently revealed.
This function returns %TRUE as soon as the transition
is to the revealed state is started. To learn whether
the child is fully revealed (ie the transition is completed),
use [method@Gtk.Revealer.get_child_revealed].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the child is revealed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transition_duration" c:identifier="gtk_revealer_get_transition_duration" glib:get-property="transition-duration">
<attribute name="org.gtk.Method.get_property" value="transition-duration"/>
<doc xml:space="preserve">Returns the amount of time (in milliseconds) that
transitions will take.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the transition duration</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transition_type" c:identifier="gtk_revealer_get_transition_type" glib:get-property="transition-type">
<attribute name="org.gtk.Method.get_property" value="transition-type"/>
<doc xml:space="preserve">Gets the type of animation that will be used
for transitions in @revealer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current transition type of @revealer</doc>
<type name="RevealerTransitionType" c:type="GtkRevealerTransitionType"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_revealer_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @revealer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_reveal_child" c:identifier="gtk_revealer_set_reveal_child" glib:set-property="reveal-child">
<attribute name="org.gtk.Method.set_property" value="reveal-child"/>
<doc xml:space="preserve">Tells the `GtkRevealer` to reveal or conceal its child.
The transition will be animated with the current
transition type of @revealer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
<parameter name="reveal_child" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to reveal the child</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_transition_duration" c:identifier="gtk_revealer_set_transition_duration" glib:set-property="transition-duration">
<attribute name="org.gtk.Method.set_property" value="transition-duration"/>
<doc xml:space="preserve">Sets the duration that transitions will take.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
<parameter name="duration" transfer-ownership="none">
<doc xml:space="preserve">the new duration, in milliseconds</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_transition_type" c:identifier="gtk_revealer_set_transition_type" glib:set-property="transition-type">
<attribute name="org.gtk.Method.set_property" value="transition-type"/>
<doc xml:space="preserve">Sets the type of animation that will be used for
transitions in @revealer.
Available types include various kinds of fades and slides.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="revealer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRevealer`</doc>
<type name="Revealer" c:type="GtkRevealer*"/>
</instance-parameter>
<parameter name="transition" transfer-ownership="none">
<doc xml:space="preserve">the new transition type</doc>
<type name="RevealerTransitionType" c:type="GtkRevealerTransitionType"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_revealer_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_revealer_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="child-revealed" transfer-ownership="none" getter="get_child_revealed">
<attribute name="org.gtk.Property.get" value="gtk_revealer_get_child_revealed"/>
<doc xml:space="preserve">Whether the child is revealed and the animation target reached.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="reveal-child" writable="1" construct="1" transfer-ownership="none" setter="set_reveal_child" getter="get_reveal_child">
<attribute name="org.gtk.Proeprty.get" value="gtk_revealer_get_reveal_child"/>
<attribute name="org.gtk.Property.set" value="gtk_revealer_set_reveal_child"/>
<doc xml:space="preserve">Whether the revealer should reveal the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="transition-duration" writable="1" construct="1" transfer-ownership="none" setter="set_transition_duration" getter="get_transition_duration">
<attribute name="org.gtk.Property.get" value="gtk_revealer_get_transition_duration"/>
<attribute name="org.gtk.Property.set" value="gtk_revealer_set_transition_duration"/>
<doc xml:space="preserve">The animation duration, in milliseconds.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="transition-type" writable="1" construct="1" transfer-ownership="none" setter="set_transition_type" getter="get_transition_type">
<attribute name="org.gtk.Property.get" value="gtk_revealer_get_transition_type"/>
<attribute name="org.gtk.Property.set" value="gtk_revealer_set_transition_type"/>
<doc xml:space="preserve">The type of animation used to transition.</doc>
<type name="RevealerTransitionType"/>
</property>
</class>
<enumeration name="RevealerTransitionType" glib:type-name="GtkRevealerTransitionType" glib:get-type="gtk_revealer_transition_type_get_type" c:type="GtkRevealerTransitionType">
<doc xml:space="preserve">These enumeration values describe the possible transitions
when the child of a `GtkRevealer` widget is shown or hidden.</doc>
<member name="none" value="0" c:identifier="GTK_REVEALER_TRANSITION_TYPE_NONE" glib:nick="none" glib:name="GTK_REVEALER_TRANSITION_TYPE_NONE">
<doc xml:space="preserve">No transition</doc>
</member>
<member name="crossfade" value="1" c:identifier="GTK_REVEALER_TRANSITION_TYPE_CROSSFADE" glib:nick="crossfade" glib:name="GTK_REVEALER_TRANSITION_TYPE_CROSSFADE">
<doc xml:space="preserve">Fade in</doc>
</member>
<member name="slide_right" value="2" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT" glib:nick="slide-right" glib:name="GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT">
<doc xml:space="preserve">Slide in from the left</doc>
</member>
<member name="slide_left" value="3" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT" glib:nick="slide-left" glib:name="GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT">
<doc xml:space="preserve">Slide in from the right</doc>
</member>
<member name="slide_up" value="4" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP" glib:nick="slide-up" glib:name="GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP">
<doc xml:space="preserve">Slide in from the bottom</doc>
</member>
<member name="slide_down" value="5" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN" glib:nick="slide-down" glib:name="GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN">
<doc xml:space="preserve">Slide in from the top</doc>
</member>
<member name="swing_right" value="6" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT" glib:nick="swing-right" glib:name="GTK_REVEALER_TRANSITION_TYPE_SWING_RIGHT">
<doc xml:space="preserve">Floop in from the left</doc>
</member>
<member name="swing_left" value="7" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT" glib:nick="swing-left" glib:name="GTK_REVEALER_TRANSITION_TYPE_SWING_LEFT">
<doc xml:space="preserve">Floop in from the right</doc>
</member>
<member name="swing_up" value="8" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SWING_UP" glib:nick="swing-up" glib:name="GTK_REVEALER_TRANSITION_TYPE_SWING_UP">
<doc xml:space="preserve">Floop in from the bottom</doc>
</member>
<member name="swing_down" value="9" c:identifier="GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN" glib:nick="swing-down" glib:name="GTK_REVEALER_TRANSITION_TYPE_SWING_DOWN">
<doc xml:space="preserve">Floop in from the top</doc>
</member>
</enumeration>
<interface name="Root" c:symbol-prefix="root" c:type="GtkRoot" glib:type-name="GtkRoot" glib:get-type="gtk_root_get_type" glib:type-struct="RootInterface">
<doc xml:space="preserve">`GtkRoot` is the interface implemented by all widgets that can act as a toplevel
widget.
The root widget takes care of providing the connection to the windowing system
and manages layout, drawing and event delivery for its widget hierarchy.
The obvious example of a `GtkRoot` is `GtkWindow`.
To get the display to which a `GtkRoot` belongs, use
[method@Gtk.Root.get_display].
`GtkRoot` also maintains the location of keyboard focus inside its widget
hierarchy, with [method@Gtk.Root.set_focus] and [method@Gtk.Root.get_focus].</doc>
<prerequisite name="Native"/>
<prerequisite name="Widget"/>
<method name="get_display" c:identifier="gtk_root_get_display">
<doc xml:space="preserve">Returns the display that this `GtkRoot` is on.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the display of @root</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRoot`</doc>
<type name="Root" c:type="GtkRoot*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus" c:identifier="gtk_root_get_focus">
<doc xml:space="preserve">Retrieves the current focused widget within the root.
Note that this is the widget that would have the focus
if the root is active; if the root is not focused then
`gtk_widget_has_focus (widget)` will be %FALSE for the
widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the currently focused widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRoot`</doc>
<type name="Root" c:type="GtkRoot*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_focus" c:identifier="gtk_root_set_focus">
<doc xml:space="preserve">If @focus is not the current focus widget, and is focusable, sets
it as the focus widget for the root.
If @focus is %NULL, unsets the focus widget for the root.
To set the focus to a particular widget in the root, it is usually
more convenient to use [method@Gtk.Widget.grab_focus] instead of
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkRoot`</doc>
<type name="Root" c:type="GtkRoot*"/>
</instance-parameter>
<parameter name="focus" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">widget to be the new focus widget, or %NULL
to unset the focus widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
</interface>
<record name="RootInterface" c:type="GtkRootInterface" disguised="1" glib:is-gtype-struct-for="Root"/>
<function-macro name="SCALE" c:identifier="GTK_SCALE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCALE_BUTTON" c:identifier="GTK_SCALE_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCALE_BUTTON_CLASS" c:identifier="GTK_SCALE_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCALE_BUTTON_GET_CLASS" c:identifier="GTK_SCALE_BUTTON_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCALE_CLASS" c:identifier="GTK_SCALE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCALE_GET_CLASS" c:identifier="GTK_SCALE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCROLLABLE" c:identifier="GTK_SCROLLABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCROLLABLE_GET_IFACE" c:identifier="GTK_SCROLLABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="inst">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCROLLBAR" c:identifier="GTK_SCROLLBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SCROLLED_WINDOW" c:identifier="GTK_SCROLLED_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SEARCH_BAR" c:identifier="GTK_SEARCH_BAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SEARCH_ENTRY" c:identifier="GTK_SEARCH_ENTRY" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SEPARATOR" c:identifier="GTK_SEPARATOR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SETTINGS" c:identifier="GTK_SETTINGS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUTS_GROUP" c:identifier="GTK_SHORTCUTS_GROUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUTS_SECTION" c:identifier="GTK_SHORTCUTS_SECTION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUTS_SHORTCUT" c:identifier="GTK_SHORTCUTS_SHORTCUT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUTS_WINDOW" c:identifier="GTK_SHORTCUTS_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUT_CONTROLLER" c:identifier="GTK_SHORTCUT_CONTROLLER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUT_CONTROLLER_CLASS" c:identifier="GTK_SHORTCUT_CONTROLLER_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUT_CONTROLLER_GET_CLASS" c:identifier="GTK_SHORTCUT_CONTROLLER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="SHORTCUT_LABEL" c:identifier="GTK_SHORTCUT_LABEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SIGNAL_LIST_ITEM_FACTORY" c:identifier="GTK_SIGNAL_LIST_ITEM_FACTORY" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="SIGNAL_LIST_ITEM_FACTORY_CLASS" c:identifier="GTK_SIGNAL_LIST_ITEM_FACTORY_CLASS" introspectable="0">
<parameters>
<parameter name="k">
</parameter>
</parameters>
</function-macro>
<function-macro name="SIGNAL_LIST_ITEM_FACTORY_GET_CLASS" c:identifier="GTK_SIGNAL_LIST_ITEM_FACTORY_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="SIZE_GROUP" c:identifier="GTK_SIZE_GROUP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SNAPSHOT" c:identifier="GTK_SNAPSHOT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SPINNER" c:identifier="GTK_SPINNER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="SPIN_BUTTON" c:identifier="GTK_SPIN_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STACK" c:identifier="GTK_STACK" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STACK_PAGE" c:identifier="GTK_STACK_PAGE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STACK_SIDEBAR" c:identifier="GTK_STACK_SIDEBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STACK_SWITCHER" c:identifier="GTK_STACK_SWITCHER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STATUSBAR" c:identifier="GTK_STATUSBAR" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="STYLE_CONTEXT" c:identifier="GTK_STYLE_CONTEXT" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="STYLE_CONTEXT_CLASS" c:identifier="GTK_STYLE_CONTEXT_CLASS" introspectable="0">
<parameters>
<parameter name="c">
</parameter>
</parameters>
</function-macro>
<function-macro name="STYLE_CONTEXT_GET_CLASS" c:identifier="GTK_STYLE_CONTEXT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<function-macro name="STYLE_PROVIDER" c:identifier="GTK_STYLE_PROVIDER" introspectable="0">
<parameters>
<parameter name="o">
</parameter>
</parameters>
</function-macro>
<constant name="STYLE_PROVIDER_PRIORITY_APPLICATION" value="600" c:type="GTK_STYLE_PROVIDER_PRIORITY_APPLICATION">
<doc xml:space="preserve">A priority that can be used when adding a `GtkStyleProvider`
for application-specific style information.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="STYLE_PROVIDER_PRIORITY_FALLBACK" value="1" c:type="GTK_STYLE_PROVIDER_PRIORITY_FALLBACK">
<doc xml:space="preserve">The priority used for default style information
that is used in the absence of themes.
Note that this is not very useful for providing default
styling for custom style classes - themes are likely to
override styling provided at this priority with
catch-all `* {...}` rules.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="STYLE_PROVIDER_PRIORITY_SETTINGS" value="400" c:type="GTK_STYLE_PROVIDER_PRIORITY_SETTINGS">
<doc xml:space="preserve">The priority used for style information provided
via `GtkSettings`.
This priority is higher than %GTK_STYLE_PROVIDER_PRIORITY_THEME
to let settings override themes.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="STYLE_PROVIDER_PRIORITY_THEME" value="200" c:type="GTK_STYLE_PROVIDER_PRIORITY_THEME">
<doc xml:space="preserve">The priority used for style information provided
by themes.</doc>
<type name="gint" c:type="gint"/>
</constant>
<constant name="STYLE_PROVIDER_PRIORITY_USER" value="800" c:type="GTK_STYLE_PROVIDER_PRIORITY_USER">
<doc xml:space="preserve">The priority used for the style information from
`$XDG_CONFIG_HOME/gtk-4.0/gtk.css`.
You should not use priorities higher than this, to
give the user the last word.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="SWITCH" c:identifier="GTK_SWITCH" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="Scale" c:symbol-prefix="scale" c:type="GtkScale" parent="Range" glib:type-name="GtkScale" glib:get-type="gtk_scale_get_type" glib:type-struct="ScaleClass">
<doc xml:space="preserve">A `GtkScale` is a slider control used to select a numeric value.
![An example GtkScale](scales.png)
To use it, you&#x2019;ll probably want to investigate the methods on its base
class, [class@GtkRange], in addition to the methods for `GtkScale` itself.
To set the value of a scale, you would normally use [method@Gtk.Range.set_value].
To detect changes to the value, you would normally use the
[signal@Gtk.Range::value-changed] signal.
Note that using the same upper and lower bounds for the `GtkScale` (through
the `GtkRange` methods) will hide the slider itself. This is useful for
applications that want to show an undeterminate value on the scale, without
changing the layout of the application (such as movie or music players).
# GtkScale as GtkBuildable
`GtkScale` supports a custom &lt;marks&gt; element, which can contain multiple
&lt;mark\&gt; elements. The &#x201C;value&#x201D; and &#x201C;position&#x201D; attributes have the same
meaning as [method@Gtk.Scale.add_mark] parameters of the same name. If
the element is not empty, its content is taken as the markup to show at
the mark. It can be translated with the usual &#x201D;translatable&#x201D; and
&#x201C;context&#x201D; attributes.
# CSS nodes
```
scale[.fine-tune][.marks-before][.marks-after]
&#x251C;&#x2500;&#x2500; [value][.top][.right][.bottom][.left]
&#x251C;&#x2500;&#x2500; marks.top
&#x2502; &#x251C;&#x2500;&#x2500; mark
&#x2502; &#x250A; &#x251C;&#x2500;&#x2500; [label]
&#x2502; &#x250A; &#x2570;&#x2500;&#x2500; indicator
&#x250A; &#x250A;
&#x2502; &#x2570;&#x2500;&#x2500; mark
&#x251C;&#x2500;&#x2500; marks.bottom
&#x2502; &#x251C;&#x2500;&#x2500; mark
&#x2502; &#x250A; &#x251C;&#x2500;&#x2500; indicator
&#x2502; &#x250A; &#x2570;&#x2500;&#x2500; [label]
&#x250A; &#x250A;
&#x2502; &#x2570;&#x2500;&#x2500; mark
&#x2570;&#x2500;&#x2500; trough
&#x251C;&#x2500;&#x2500; [fill]
&#x251C;&#x2500;&#x2500; [highlight]
&#x2570;&#x2500;&#x2500; slider
```
`GtkScale` has a main CSS node with name scale and a subnode for its contents,
with subnodes named trough and slider.
The main node gets the style class .fine-tune added when the scale is in
'fine-tuning' mode.
If the scale has an origin (see [method@Gtk.Scale.set_has_origin]), there is
a subnode with name highlight below the trough node that is used for rendering
the highlighted part of the trough.
If the scale is showing a fill level (see [method@Gtk.Range.set_show_fill_level]),
there is a subnode with name fill below the trough node that is used for
rendering the filled in part of the trough.
If marks are present, there is a marks subnode before or after the trough
node, below which each mark gets a node with name mark. The marks nodes get
either the .top or .bottom style class.
The mark node has a subnode named indicator. If the mark has text, it also
has a subnode named label. When the mark is either above or left of the
scale, the label subnode is the first when present. Otherwise, the indicator
subnode is the first.
The main CSS node gets the 'marks-before' and/or 'marks-after' style classes
added depending on what marks are present.
If the scale is displaying the value (see [property@Gtk.Scale:draw-value]),
there is subnode with name value. This node will get the .top or .bottom style
classes similar to the marks node.
# Accessibility
`GtkScale` uses the %GTK_ACCESSIBLE_ROLE_SLIDER role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_scale_new">
<doc xml:space="preserve">Creates a new `GtkScale`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkScale`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the scale&#x2019;s orientation.</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the [class@Gtk.Adjustment] which sets
the range of the scale, or %NULL to create a new adjustment.</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_range" c:identifier="gtk_scale_new_with_range">
<doc xml:space="preserve">Creates a new scale widget with a range from @min to @max.
The returns scale will have the given orientation and will let the
user input a number between @min and @max (including @min and @max)
with the increment @step. @step must be nonzero; it&#x2019;s the distance
the slider moves when using the arrow keys to adjust the scale
value.
Note that the way in which the precision is derived works best if
@step is a power of ten. If the resulting precision is not suitable
for your needs, use [method@Gtk.Scale.set_digits] to correct it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkScale`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the scale&#x2019;s orientation.</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="min" transfer-ownership="none">
<doc xml:space="preserve">minimum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">maximum value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">step increment (tick size) used with keyboard shortcuts</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="get_layout_offsets" invoker="get_layout_offsets">
<doc xml:space="preserve">Obtains the coordinates where the scale will draw the
`PangoLayout` representing the text in the scale.
Remember when using the `PangoLayout` function you need to
convert to and from pixels using `PANGO_PIXELS()` or `PANGO_SCALE`.
If the [property@GtkScale:draw-value] property is %FALSE, the return
values are undefined.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store X offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store Y offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<method name="add_mark" c:identifier="gtk_scale_add_mark">
<doc xml:space="preserve">Adds a mark at @value.
A mark is indicated visually by drawing a tick mark next to the scale,
and GTK makes it easy for the user to position the scale exactly at the
marks value.
If @markup is not %NULL, text is shown next to the tick mark.
To remove marks from a scale, use [method@Gtk.Scale.clear_marks].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the value at which the mark is placed, must be between
the lower and upper limits of the scales&#x2019; adjustment</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">where to draw the mark. For a horizontal scale, %GTK_POS_TOP
and %GTK_POS_LEFT are drawn above the scale, anything else below.
For a vertical scale, %GTK_POS_LEFT and %GTK_POS_TOP are drawn to
the left of the scale, anything else to the right.</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
<parameter name="markup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Text to be shown at the mark, using Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="clear_marks" c:identifier="gtk_scale_clear_marks">
<doc xml:space="preserve">Removes any marks that have been added.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_digits" c:identifier="gtk_scale_get_digits" glib:get-property="digits">
<attribute name="org.gtk.Method.get_property" value="digits"/>
<doc xml:space="preserve">Gets the number of decimal places that are displayed in the value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of decimal places that are displayed</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_draw_value" c:identifier="gtk_scale_get_draw_value" glib:get-property="draw-value">
<attribute name="org.gtk.Method.get_property" value="draw-value"/>
<doc xml:space="preserve">Returns whether the current value is displayed as a string
next to the slider.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the current value is displayed as a string</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_origin" c:identifier="gtk_scale_get_has_origin" glib:get-property="has-origin">
<attribute name="org.gtk.Method.get_property" value="has-origin"/>
<doc xml:space="preserve">Returns whether the scale has an origin.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the scale has an origin.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout" c:identifier="gtk_scale_get_layout">
<doc xml:space="preserve">Gets the `PangoLayout` used to display the scale.
The returned object is owned by the scale so does not need
to be freed by the caller.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the [class@Pango.Layout]
for this scale, or %NULL if the [property@GtkScale:draw-value]
property is %FALSE.</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">A `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout_offsets" c:identifier="gtk_scale_get_layout_offsets">
<doc xml:space="preserve">Obtains the coordinates where the scale will draw the
`PangoLayout` representing the text in the scale.
Remember when using the `PangoLayout` function you need to
convert to and from pixels using `PANGO_PIXELS()` or `PANGO_SCALE`.
If the [property@GtkScale:draw-value] property is %FALSE, the return
values are undefined.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store X offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store Y offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_value_pos" c:identifier="gtk_scale_get_value_pos" glib:get-property="value-pos">
<attribute name="org.gtk.Method.get_property" value="value-pos"/>
<doc xml:space="preserve">Gets the position in which the current value is displayed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the position in which the current value is displayed</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_digits" c:identifier="gtk_scale_set_digits" glib:set-property="digits">
<attribute name="org.gtk.Method.set_property" value="digits"/>
<doc xml:space="preserve">Sets the number of decimal places that are displayed in the value.
Also causes the value of the adjustment to be rounded to this number
of digits, so the retrieved value matches the displayed one, if
[property@GtkScale:draw-value] is %TRUE when the value changes. If
you want to enforce rounding the value when [property@GtkScale:draw-value]
is %FALSE, you can set [property@GtkRange:round-digits] instead.
Note that rounding to a small number of digits can interfere with
the smooth autoscrolling that is built into `GtkScale`. As an alternative,
you can use [method@Gtk.Scale.set_format_value_func] to format the displayed
value yourself.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="digits" transfer-ownership="none">
<doc xml:space="preserve">the number of decimal places to display,
e.g. use 1 to display 1.0, 2 to display 1.00, etc</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_draw_value" c:identifier="gtk_scale_set_draw_value" glib:set-property="draw-value">
<attribute name="org.gtk.Method.set_property" value="draw-value"/>
<doc xml:space="preserve">Specifies whether the current value is displayed as a string next
to the slider.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="draw_value" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to draw the value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_format_value_func" c:identifier="gtk_scale_set_format_value_func">
<doc xml:space="preserve">@func allows you to change how the scale value is displayed.
The given function will return an allocated string representing
@value. That string will then be used to display the scale's value.
If #NULL is passed as @func, the value will be displayed on
its own, rounded according to the value of the
[property@GtkScale:digits] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function that formats the value</doc>
<type name="ScaleFormatValueFunc" c:type="GtkScaleFormatValueFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy_notify" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">destroy function for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_has_origin" c:identifier="gtk_scale_set_has_origin" glib:set-property="has-origin">
<attribute name="org.gtk.Method.set_property" value="has-origin"/>
<doc xml:space="preserve">Sets whether the scale has an origin.
If [property@GtkScale:has-origin] is set to %TRUE (the default),
the scale will highlight the part of the trough between the origin
(bottom or left side) and the current value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="has_origin" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the scale has an origin</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_value_pos" c:identifier="gtk_scale_set_value_pos" glib:set-property="value-pos">
<attribute name="org.gtk.Method.set_property" value="value-pos"/>
<doc xml:space="preserve">Sets the position in which the current value is displayed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</instance-parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">the position in which the current value is displayed</doc>
<type name="PositionType" c:type="GtkPositionType"/>
</parameter>
</parameters>
</method>
<property name="digits" writable="1" transfer-ownership="none" setter="set_digits" getter="get_digits">
<attribute name="org.gtk.Method.get" value="gtk_scale_get_digits"/>
<attribute name="org.gtk.Method.set" value="gtk_scale_set_digits"/>
<doc xml:space="preserve">The number of decimal places that are displayed in the value.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="draw-value" writable="1" transfer-ownership="none" setter="set_draw_value" getter="get_draw_value">
<attribute name="org.gtk.Method.get" value="gtk_scale_get_draw_value"/>
<attribute name="org.gtk.Method.set" value="gtk_scale_set_draw_value"/>
<doc xml:space="preserve">Whether the current value is displayed as a string next to the slider.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-origin" writable="1" transfer-ownership="none" setter="set_has_origin" getter="get_has_origin">
<attribute name="org.gtk.Method.get" value="gtk_scale_get_has_origin"/>
<attribute name="org.gtk.Method.set" value="gtk_scale_set_has_origin"/>
<doc xml:space="preserve">Whether the scale has an origin.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="value-pos" writable="1" transfer-ownership="none" setter="set_value_pos" getter="get_value_pos">
<attribute name="org.gtk.Method.get" value="gtk_scale_get_value_pos"/>
<attribute name="org.gtk.Method.set" value="gtk_scale_set_value_pos"/>
<doc xml:space="preserve">The position in which the current value is displayed.</doc>
<type name="PositionType"/>
</property>
<field name="parent_instance">
<type name="Range" c:type="GtkRange"/>
</field>
</class>
<class name="ScaleButton" c:symbol-prefix="scale_button" c:type="GtkScaleButton" parent="Widget" glib:type-name="GtkScaleButton" glib:get-type="gtk_scale_button_get_type" glib:type-struct="ScaleButtonClass">
<doc xml:space="preserve">`GtkScaleButton` provides a button which pops up a scale widget.
This kind of widget is commonly used for volume controls in multimedia
applications, and GTK provides a [class@Gtk.VolumeButton] subclass that
is tailored for this use case.
# CSS nodes
`GtkScaleButton` has a single CSS node with name button. To differentiate
it from a plain `GtkButton`, it gets the .scale style class.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_scale_button_new">
<doc xml:space="preserve">Creates a `GtkScaleButton`.
The new scale button has a range between @min and @max,
with a stepping of @step.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkScaleButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="min" transfer-ownership="none">
<doc xml:space="preserve">the minimum value of the scale (usually 0)</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">the maximum value of the scale (usually 100)</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the stepping of value when a scroll-wheel event,
or up/down arrow event occurs (usually 2)</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="icons" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a %NULL-terminated
array of icon names, or %NULL if you want to set the list
later with gtk_scale_button_set_icons()</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</constructor>
<virtual-method name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_adjustment" c:identifier="gtk_scale_button_get_adjustment" glib:get-property="adjustment">
<attribute name="org.gtk.Method.get_property" value="adjustment"/>
<doc xml:space="preserve">Gets the `GtkAdjustment` associated with the `GtkScaleButton`&#x2019;s scale.
See [method@Gtk.Range.get_adjustment] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the adjustment associated with the scale</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_minus_button" c:identifier="gtk_scale_button_get_minus_button">
<doc xml:space="preserve">Retrieves the minus button of the `GtkScaleButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minus button
of the `GtkScaleButton`</doc>
<type name="Button" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_plus_button" c:identifier="gtk_scale_button_get_plus_button">
<doc xml:space="preserve">Retrieves the plus button of the `GtkScaleButton.`</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the plus button
of the `GtkScaleButton`</doc>
<type name="Button" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_popup" c:identifier="gtk_scale_button_get_popup">
<doc xml:space="preserve">Retrieves the popup of the `GtkScaleButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the popup of the `GtkScaleButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_scale_button_get_value" glib:get-property="value">
<attribute name="org.gtk.Method.get_property" value="value"/>
<doc xml:space="preserve">Gets the current value of the scale button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">current value of the scale button</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_adjustment" c:identifier="gtk_scale_button_set_adjustment" glib:set-property="adjustment">
<attribute name="org.gtk.Method.set_property" value="adjustment"/>
<doc xml:space="preserve">Sets the `GtkAdjustment` to be used as a model
for the `GtkScaleButton`&#x2019;s scale.
See [method@Gtk.Range.set_adjustment] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_icons" c:identifier="gtk_scale_button_set_icons" glib:set-property="icons">
<attribute name="org.gtk.Method.set_property" value="icons"/>
<doc xml:space="preserve">Sets the icons to be used by the scale button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
<parameter name="icons" transfer-ownership="none">
<doc xml:space="preserve">a %NULL-terminated array of icon names</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_scale_button_set_value" glib:set-property="value">
<attribute name="org.gtk.Method.set_property" value="value"/>
<doc xml:space="preserve">Sets the current value of the scale.
If the value is outside the minimum or maximum range values,
it will be clamped to fit inside them.
The scale button emits the [signal@Gtk.ScaleButton::value-changed]
signal if the value changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScaleButton`</doc>
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">new value of the scale button</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<property name="adjustment" writable="1" transfer-ownership="none" setter="set_adjustment" getter="get_adjustment">
<attribute name="org.gtk.Property.get" value="gtk_scale_button_get_adjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_scale_button_set_adjustment"/>
<doc xml:space="preserve">The `GtkAdjustment` that is used as the model.</doc>
<type name="Adjustment"/>
</property>
<property name="icons" writable="1" transfer-ownership="none" setter="set_icons">
<attribute name="org.gtk.Property.set" value="gtk_scale_button_set_icons"/>
<doc xml:space="preserve">The names of the icons to be used by the scale button.
The first item in the array will be used in the button
when the current value is the lowest value, the second
item for the highest value. All the subsequent icons will
be used for all the other values, spread evenly over the
range of values.
If there's only one icon name in the @icons array, it will
be used for all the values. If only two icon names are in
the @icons array, the first one will be used for the bottom
50% of the scale, and the second one for the top 50%.
It is recommended to use at least 3 icons so that the
`GtkScaleButton` reflects the current value of the scale
better for the users.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="value" writable="1" transfer-ownership="none" setter="set_value" getter="get_value">
<attribute name="org.gtk.Property.get" value="gtk_scale_button_get_value"/>
<attribute name="org.gtk.Property.set" value="gtk_scale_button_set_value"/>
<doc xml:space="preserve">The value of the scale.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="popdown" when="last" action="1">
<doc xml:space="preserve">Emitted to dismiss the popup.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is &lt;kbd&gt;Escape&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="popup" when="last" action="1">
<doc xml:space="preserve">Emitted to popup the scale widget.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are &lt;kbd&gt;Space&lt;/kbd&gt;,
&lt;kbd&gt;Enter&lt;/kbd&gt; and &lt;kbd&gt;Return&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="value-changed" when="last">
<doc xml:space="preserve">Emitted when the value field has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="ScaleButtonClass" c:type="GtkScaleButtonClass" glib:is-gtype-struct-for="ScaleButton">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="value_changed">
<callback name="value_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="button" transfer-ownership="none">
<type name="ScaleButton" c:type="GtkScaleButton*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="ScaleClass" c:type="GtkScaleClass" glib:is-gtype-struct-for="Scale">
<field name="parent_class">
<type name="RangeClass" c:type="GtkRangeClass"/>
</field>
<field name="get_layout_offsets">
<callback name="get_layout_offsets">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</parameter>
<parameter name="x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store X offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store Y offset of layout</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<callback name="ScaleFormatValueFunc" c:type="GtkScaleFormatValueFunc">
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly allocated string describing a textual representation
of the given numerical value.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">The `GtkScale`</doc>
<type name="Scale" c:type="GtkScale*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">The numeric value to format</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="ScrollStep" glib:type-name="GtkScrollStep" glib:get-type="gtk_scroll_step_get_type" c:type="GtkScrollStep">
<doc xml:space="preserve">Passed as argument to various keybinding signals.</doc>
<member name="steps" value="0" c:identifier="GTK_SCROLL_STEPS" glib:nick="steps" glib:name="GTK_SCROLL_STEPS">
<doc xml:space="preserve">Scroll in steps.</doc>
</member>
<member name="pages" value="1" c:identifier="GTK_SCROLL_PAGES" glib:nick="pages" glib:name="GTK_SCROLL_PAGES">
<doc xml:space="preserve">Scroll by pages.</doc>
</member>
<member name="ends" value="2" c:identifier="GTK_SCROLL_ENDS" glib:nick="ends" glib:name="GTK_SCROLL_ENDS">
<doc xml:space="preserve">Scroll to ends.</doc>
</member>
<member name="horizontal_steps" value="3" c:identifier="GTK_SCROLL_HORIZONTAL_STEPS" glib:nick="horizontal-steps" glib:name="GTK_SCROLL_HORIZONTAL_STEPS">
<doc xml:space="preserve">Scroll in horizontal steps.</doc>
</member>
<member name="horizontal_pages" value="4" c:identifier="GTK_SCROLL_HORIZONTAL_PAGES" glib:nick="horizontal-pages" glib:name="GTK_SCROLL_HORIZONTAL_PAGES">
<doc xml:space="preserve">Scroll by horizontal pages.</doc>
</member>
<member name="horizontal_ends" value="5" c:identifier="GTK_SCROLL_HORIZONTAL_ENDS" glib:nick="horizontal-ends" glib:name="GTK_SCROLL_HORIZONTAL_ENDS">
<doc xml:space="preserve">Scroll to the horizontal ends.</doc>
</member>
</enumeration>
<enumeration name="ScrollType" glib:type-name="GtkScrollType" glib:get-type="gtk_scroll_type_get_type" c:type="GtkScrollType">
<doc xml:space="preserve">Scrolling types.</doc>
<member name="none" value="0" c:identifier="GTK_SCROLL_NONE" glib:nick="none" glib:name="GTK_SCROLL_NONE">
<doc xml:space="preserve">No scrolling.</doc>
</member>
<member name="jump" value="1" c:identifier="GTK_SCROLL_JUMP" glib:nick="jump" glib:name="GTK_SCROLL_JUMP">
<doc xml:space="preserve">Jump to new location.</doc>
</member>
<member name="step_backward" value="2" c:identifier="GTK_SCROLL_STEP_BACKWARD" glib:nick="step-backward" glib:name="GTK_SCROLL_STEP_BACKWARD">
<doc xml:space="preserve">Step backward.</doc>
</member>
<member name="step_forward" value="3" c:identifier="GTK_SCROLL_STEP_FORWARD" glib:nick="step-forward" glib:name="GTK_SCROLL_STEP_FORWARD">
<doc xml:space="preserve">Step forward.</doc>
</member>
<member name="page_backward" value="4" c:identifier="GTK_SCROLL_PAGE_BACKWARD" glib:nick="page-backward" glib:name="GTK_SCROLL_PAGE_BACKWARD">
<doc xml:space="preserve">Page backward.</doc>
</member>
<member name="page_forward" value="5" c:identifier="GTK_SCROLL_PAGE_FORWARD" glib:nick="page-forward" glib:name="GTK_SCROLL_PAGE_FORWARD">
<doc xml:space="preserve">Page forward.</doc>
</member>
<member name="step_up" value="6" c:identifier="GTK_SCROLL_STEP_UP" glib:nick="step-up" glib:name="GTK_SCROLL_STEP_UP">
<doc xml:space="preserve">Step up.</doc>
</member>
<member name="step_down" value="7" c:identifier="GTK_SCROLL_STEP_DOWN" glib:nick="step-down" glib:name="GTK_SCROLL_STEP_DOWN">
<doc xml:space="preserve">Step down.</doc>
</member>
<member name="page_up" value="8" c:identifier="GTK_SCROLL_PAGE_UP" glib:nick="page-up" glib:name="GTK_SCROLL_PAGE_UP">
<doc xml:space="preserve">Page up.</doc>
</member>
<member name="page_down" value="9" c:identifier="GTK_SCROLL_PAGE_DOWN" glib:nick="page-down" glib:name="GTK_SCROLL_PAGE_DOWN">
<doc xml:space="preserve">Page down.</doc>
</member>
<member name="step_left" value="10" c:identifier="GTK_SCROLL_STEP_LEFT" glib:nick="step-left" glib:name="GTK_SCROLL_STEP_LEFT">
<doc xml:space="preserve">Step to the left.</doc>
</member>
<member name="step_right" value="11" c:identifier="GTK_SCROLL_STEP_RIGHT" glib:nick="step-right" glib:name="GTK_SCROLL_STEP_RIGHT">
<doc xml:space="preserve">Step to the right.</doc>
</member>
<member name="page_left" value="12" c:identifier="GTK_SCROLL_PAGE_LEFT" glib:nick="page-left" glib:name="GTK_SCROLL_PAGE_LEFT">
<doc xml:space="preserve">Page to the left.</doc>
</member>
<member name="page_right" value="13" c:identifier="GTK_SCROLL_PAGE_RIGHT" glib:nick="page-right" glib:name="GTK_SCROLL_PAGE_RIGHT">
<doc xml:space="preserve">Page to the right.</doc>
</member>
<member name="start" value="14" c:identifier="GTK_SCROLL_START" glib:nick="start" glib:name="GTK_SCROLL_START">
<doc xml:space="preserve">Scroll to start.</doc>
</member>
<member name="end" value="15" c:identifier="GTK_SCROLL_END" glib:nick="end" glib:name="GTK_SCROLL_END">
<doc xml:space="preserve">Scroll to end.</doc>
</member>
</enumeration>
<interface name="Scrollable" c:symbol-prefix="scrollable" c:type="GtkScrollable" glib:type-name="GtkScrollable" glib:get-type="gtk_scrollable_get_type" glib:type-struct="ScrollableInterface">
<doc xml:space="preserve">`GtkScrollable` is an interface for widgets with native scrolling ability.
To implement this interface you should override the
[property@Gtk.Scrollable:hadjustment] and
[property@Gtk.Scrollable:vadjustment] properties.
## Creating a scrollable widget
All scrollable widgets should do the following.
- When a parent widget sets the scrollable child widget&#x2019;s adjustments,
the widget should populate the adjustments&#x2019;
[property@Gtk.Adjustment:lower],
[property@Gtk.Adjustment:upper],
[property@Gtk.Adjustment:step-increment],
[property@Gtk.Adjustment:page-increment] and
[property@Gtk.Adjustment:page-size] properties and connect to the
[signal@Gtk.Adjustment::value-changed] signal.
- Because its preferred size is the size for a fully expanded widget,
the scrollable widget must be able to cope with underallocations.
This means that it must accept any value passed to its
[vfunc@Gtk.Widget.size_allocate] implementation.
- When the parent allocates space to the scrollable child widget,
the widget should update the adjustments&#x2019; properties with new values.
- When any of the adjustments emits the [signal@Gtk.Adjustment::value-changed]
signal, the scrollable widget should scroll its contents.</doc>
<virtual-method name="get_border" invoker="get_border">
<doc xml:space="preserve">Returns the size of a non-scrolling border around the
outside of the scrollable.
An example for this would be treeview headers. GTK can use
this information to display overlaid graphics, like the
overshoot indication, at the right position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @border has been set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="border" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return location for the results</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_border" c:identifier="gtk_scrollable_get_border">
<doc xml:space="preserve">Returns the size of a non-scrolling border around the
outside of the scrollable.
An example for this would be treeview headers. GTK can use
this information to display overlaid graphics, like the
overshoot indication, at the right position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @border has been set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="border" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return location for the results</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</method>
<method name="get_hadjustment" c:identifier="gtk_scrollable_get_hadjustment" glib:get-property="hadjustment">
<attribute name="org.gtk.Method.get_property" value="hadjustment"/>
<doc xml:space="preserve">Retrieves the `GtkAdjustment` used for horizontal scrolling.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">horizontal `GtkAdjustment`.</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hscroll_policy" c:identifier="gtk_scrollable_get_hscroll_policy" glib:get-property="hscroll-policy">
<attribute name="org.gtk.Method.get_property" value="hscroll-policy"/>
<doc xml:space="preserve">Gets the horizontal `GtkScrollablePolicy`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The horizontal `GtkScrollablePolicy`.</doc>
<type name="ScrollablePolicy" c:type="GtkScrollablePolicy"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vadjustment" c:identifier="gtk_scrollable_get_vadjustment" glib:get-property="vadjustment">
<attribute name="org.gtk.Method.get_property" value="vadjustment"/>
<doc xml:space="preserve">Retrieves the `GtkAdjustment` used for vertical scrolling.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">vertical `GtkAdjustment`.</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vscroll_policy" c:identifier="gtk_scrollable_get_vscroll_policy" glib:get-property="vscroll-policy">
<attribute name="org.gtk.Method.get_property" value="vscroll-policy"/>
<doc xml:space="preserve">Gets the vertical `GtkScrollablePolicy`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The vertical `GtkScrollablePolicy`.</doc>
<type name="ScrollablePolicy" c:type="GtkScrollablePolicy"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_hadjustment" c:identifier="gtk_scrollable_set_hadjustment" glib:set-property="hadjustment">
<attribute name="org.gtk.Method.set_property" value="hadjustment"/>
<doc xml:space="preserve">Sets the horizontal adjustment of the `GtkScrollable`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="hadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_hscroll_policy" c:identifier="gtk_scrollable_set_hscroll_policy" glib:set-property="hscroll-policy">
<attribute name="org.gtk.Method.set_property" value="hscroll-policy"/>
<doc xml:space="preserve">Sets the `GtkScrollablePolicy`.
The policy determines whether horizontal scrolling should start
below the minimum width or below the natural width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="policy" transfer-ownership="none">
<doc xml:space="preserve">the horizontal `GtkScrollablePolicy`</doc>
<type name="ScrollablePolicy" c:type="GtkScrollablePolicy"/>
</parameter>
</parameters>
</method>
<method name="set_vadjustment" c:identifier="gtk_scrollable_set_vadjustment" glib:set-property="vadjustment">
<attribute name="org.gtk.Method.set_property" value="vadjustment"/>
<doc xml:space="preserve">Sets the vertical adjustment of the `GtkScrollable`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="vadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_vscroll_policy" c:identifier="gtk_scrollable_set_vscroll_policy" glib:set-property="vscroll-policy">
<attribute name="org.gtk.Method.set_property" value="vscroll-policy"/>
<doc xml:space="preserve">Sets the `GtkScrollablePolicy`.
The policy determines whether vertical scrolling should start
below the minimum height or below the natural height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</instance-parameter>
<parameter name="policy" transfer-ownership="none">
<doc xml:space="preserve">the vertical `GtkScrollablePolicy`</doc>
<type name="ScrollablePolicy" c:type="GtkScrollablePolicy"/>
</parameter>
</parameters>
</method>
<property name="hadjustment" writable="1" construct="1" transfer-ownership="none" setter="set_hadjustment" getter="get_hadjustment">
<attribute name="org.gtk.Property.get" value="gtk_scrollable_get_hadjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_scrollable_set_hadjustment"/>
<doc xml:space="preserve">Horizontal `GtkAdjustment` of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.</doc>
<type name="Adjustment"/>
</property>
<property name="hscroll-policy" writable="1" transfer-ownership="none" setter="set_hscroll_policy" getter="get_hscroll_policy">
<attribute name="org.gtk.Property.get" value="gtk_scrollable_get_hscroll_policy"/>
<attribute name="org.gtk.Property.set" value="gtk_scrollable_set_hscroll_policy"/>
<doc xml:space="preserve">Determines when horizontal scrolling should start.</doc>
<type name="ScrollablePolicy"/>
</property>
<property name="vadjustment" writable="1" construct="1" transfer-ownership="none" setter="set_vadjustment" getter="get_vadjustment">
<attribute name="org.gtk.Property.get" value="gtk_scrollable_get_vadjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_scrollable_set_vadjustment"/>
<doc xml:space="preserve">Vertical `GtkAdjustment` of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.</doc>
<type name="Adjustment"/>
</property>
<property name="vscroll-policy" writable="1" transfer-ownership="none" setter="set_vscroll_policy" getter="get_vscroll_policy">
<attribute name="org.gtk.Property.get" value="gtk_scrollable_get_vscroll_policy"/>
<attribute name="org.gtk.Property.set" value="gtk_scrollable_set_vscroll_policy"/>
<doc xml:space="preserve">Determines when vertical scrolling should start.</doc>
<type name="ScrollablePolicy"/>
</property>
</interface>
<record name="ScrollableInterface" c:type="GtkScrollableInterface" glib:is-gtype-struct-for="Scrollable">
<field name="base_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="get_border">
<callback name="get_border">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @border has been set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="scrollable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollable`</doc>
<type name="Scrollable" c:type="GtkScrollable*"/>
</parameter>
<parameter name="border" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return location for the results</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<enumeration name="ScrollablePolicy" glib:type-name="GtkScrollablePolicy" glib:get-type="gtk_scrollable_policy_get_type" c:type="GtkScrollablePolicy">
<doc xml:space="preserve">Defines the policy to be used in a scrollable widget when updating
the scrolled window adjustments in a given orientation.</doc>
<member name="minimum" value="0" c:identifier="GTK_SCROLL_MINIMUM" glib:nick="minimum" glib:name="GTK_SCROLL_MINIMUM">
<doc xml:space="preserve">Scrollable adjustments are based on the minimum size</doc>
</member>
<member name="natural" value="1" c:identifier="GTK_SCROLL_NATURAL" glib:nick="natural" glib:name="GTK_SCROLL_NATURAL">
<doc xml:space="preserve">Scrollable adjustments are based on the natural size</doc>
</member>
</enumeration>
<class name="Scrollbar" c:symbol-prefix="scrollbar" c:type="GtkScrollbar" parent="Widget" glib:type-name="GtkScrollbar" glib:get-type="gtk_scrollbar_get_type">
<doc xml:space="preserve">The `GtkScrollbar` widget is a horizontal or vertical scrollbar.
![An example GtkScrollbar](scrollbar.png)
Its position and movement are controlled by the adjustment that is passed to
or created by [ctor@Gtk.Scrollbar.new]. See [class@Gtk.Adjustment] for more
details. The [property@Gtk.Adjustment:value] field sets the position of the
thumb and must be between [property@Gtk.Adjustment:lower] and
[property@Gtk.Adjustment:upper] - [property@Gtk.Adjustment:page-size].
The [property@Gtk.Adjustment:page-size] represents the size of the visible
scrollable area.
The fields [property@Gtk.Adjustment:step-increment] and
[property@Gtk.Adjustment:page-increment] fields are added to or subtracted
from the [property@Gtk.Adjustment:value] when the user asks to move by a step
(using e.g. the cursor arrow keys) or by a page (using e.g. the Page Down/Up
keys).
# CSS nodes
```
scrollbar
&#x2570;&#x2500;&#x2500; range[.fine-tune]
&#x2570;&#x2500;&#x2500; trough
&#x2570;&#x2500;&#x2500; slider
```
`GtkScrollbar` has a main CSS node with name scrollbar and a subnode for its
contents. The main node gets the .horizontal or .vertical style classes applied,
depending on the scrollbar's orientation.
The range node gets the style class .fine-tune added when the scrollbar is
in 'fine-tuning' mode.
Other style classes that may be added to scrollbars inside
[class@Gtk.ScrolledWindow] include the positional classes (.left, .right,
.top, .bottom) and style classes related to overlay scrolling (.overlay-indicator,
.dragging, .hovering).
# Accessibility
`GtkScrollbar` uses the %GTK_ACCESSIBLE_ROLE_SCROLLBAR role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_scrollbar_new">
<doc xml:space="preserve">Creates a new scrollbar with the given orientation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkScrollbar`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the scrollbar&#x2019;s orientation.</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the [class@Gtk.Adjustment] to use, or %NULL
to create a new adjustment.</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</constructor>
<method name="get_adjustment" c:identifier="gtk_scrollbar_get_adjustment" glib:get-property="adjustment">
<attribute name="org.gtk.Method.get_property" value="adjustment"/>
<doc xml:space="preserve">Returns the scrollbar's adjustment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scrollbar's adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollbar`</doc>
<type name="Scrollbar" c:type="GtkScrollbar*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_adjustment" c:identifier="gtk_scrollbar_set_adjustment" glib:set-property="adjustment">
<attribute name="org.gtk.Method.set_property" value="adjustment"/>
<doc xml:space="preserve">Makes the scrollbar use the given adjustment.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollbar`</doc>
<type name="Scrollbar" c:type="GtkScrollbar*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the adjustment to set</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<property name="adjustment" writable="1" construct="1" transfer-ownership="none" setter="set_adjustment" getter="get_adjustment">
<attribute name="org.gtk.Property.get" value="gtk_scrollbar_get_adjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_scrollbar_set_adjustment"/>
<doc xml:space="preserve">The `GtkAdjustment` controlled by this scrollbar.</doc>
<type name="Adjustment"/>
</property>
</class>
<class name="ScrolledWindow" c:symbol-prefix="scrolled_window" c:type="GtkScrolledWindow" parent="Widget" glib:type-name="GtkScrolledWindow" glib:get-type="gtk_scrolled_window_get_type">
<doc xml:space="preserve">`GtkScrolledWindow` is a container that makes its child scrollable.
It does so using either internally added scrollbars or externally
associated adjustments, and optionally draws a frame around the child.
Widgets with native scrolling support, i.e. those whose classes implement
the [iface@Gtk.Scrollable] interface, are added directly. For other types
of widget, the class [class@Gtk.Viewport] acts as an adaptor, giving
scrollability to other widgets. [method@Gtk.ScrolledWindow.set_child]
intelligently accounts for whether or not the added child is a `GtkScrollable`.
If it isn&#x2019;t, then it wraps the child in a `GtkViewport`. Therefore, you can
just add any child widget and not worry about the details.
If [method@Gtk.ScrolledWindow.set_child] has added a `GtkViewport` for you,
you can remove both your added child widget from the `GtkViewport`, and the
`GtkViewport` from the `GtkScrolledWindow`, like this:
```c
GtkWidget *scrolled_window = gtk_scrolled_window_new ();
GtkWidget *child_widget = gtk_button_new ();
// GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
// add a GtkViewport.
gtk_box_append (GTK_BOX (scrolled_window), child_widget);
// Either of these will result in child_widget being unparented:
gtk_box_remove (GTK_BOX (scrolled_window), child_widget);
// or
gtk_box_remove (GTK_BOX (scrolled_window),
gtk_bin_get_child (GTK_BIN (scrolled_window)));
```
Unless [property@Gtk.ScrolledWindow:hscrollbar-policy] and
[property@Gtk.ScrolledWindow:vscrollbar-policy] are %GTK_POLICY_NEVER or
%GTK_POLICY_EXTERNAL, `GtkScrolledWindow` adds internal `GtkScrollbar` widgets
around its child. The scroll position of the child, and if applicable the
scrollbars, is controlled by the [property@Gtk.ScrolledWindow:hadjustment]
and [property@Gtk.ScrolledWindow:vadjustment] that are associated with the
`GtkScrolledWindow`. See the docs on [class@Gtk.Scrollbar] for the details,
but note that the &#x201C;step_increment&#x201D; and &#x201C;page_increment&#x201D; fields are only
effective if the policy causes scrollbars to be present.
If a `GtkScrolledWindow` doesn&#x2019;t behave quite as you would like, or
doesn&#x2019;t have exactly the right layout, it&#x2019;s very possible to set up
your own scrolling with `GtkScrollbar` and for example a `GtkGrid`.
# Touch support
`GtkScrolledWindow` has built-in support for touch devices. When a
touchscreen is used, swiping will move the scrolled window, and will
expose 'kinetic' behavior. This can be turned off with the
[property@Gtk.ScrolledWindow:kinetic-scrolling] property if it is undesired.
`GtkScrolledWindow` also displays visual 'overshoot' indication when
the content is pulled beyond the end, and this situation can be
captured with the [signal@Gtk.ScrolledWindow::edge-overshot] signal.
If no mouse device is present, the scrollbars will overlaid as
narrow, auto-hiding indicators over the content. If traditional
scrollbars are desired although no mouse is present, this behaviour
can be turned off with the [property@Gtk.ScrolledWindow:overlay-scrolling]
property.
# CSS nodes
`GtkScrolledWindow` has a main CSS node with name scrolledwindow.
It gets a .frame style class added when [property@Gtk.ScrolledWindow:has-frame]
is %TRUE.
It uses subnodes with names overshoot and undershoot to draw the overflow
and underflow indications. These nodes get the .left, .right, .top or .bottom
style class added depending on where the indication is drawn.
`GtkScrolledWindow` also sets the positional style classes (.left, .right,
.top, .bottom) and style classes related to overlay scrolling
(.overlay-indicator, .dragging, .hovering) on its scrollbars.
If both scrollbars are visible, the area where they meet is drawn
with a subnode named junction.
# Accessibility
`GtkScrolledWindow` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_scrolled_window_new">
<doc xml:space="preserve">Creates a new scrolled window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new scrolled window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_child" c:identifier="gtk_scrolled_window_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @scrolled_window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @scrolled_window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hadjustment" c:identifier="gtk_scrolled_window_get_hadjustment" glib:get-property="hadjustment">
<attribute name="org.gtk.Method.get_property" value="hadjustment"/>
<doc xml:space="preserve">Returns the horizontal scrollbar&#x2019;s adjustment.
This is the adjustment used to connect the horizontal scrollbar
to the child widget&#x2019;s horizontal scroll functionality.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_frame" c:identifier="gtk_scrolled_window_get_has_frame" glib:get-property="has-frame">
<attribute name="org.gtk.Method.get_property" value="has-frame"/>
<doc xml:space="preserve">Gets whether the scrolled window draws a frame.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @scrolled_window has a frame</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hscrollbar" c:identifier="gtk_scrolled_window_get_hscrollbar">
<doc xml:space="preserve">Returns the horizontal scrollbar of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal scrollbar of the scrolled window.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_kinetic_scrolling" c:identifier="gtk_scrolled_window_get_kinetic_scrolling" glib:get-property="kinetic-scrolling">
<attribute name="org.gtk.Method.get_property" value="kinetic-scrolling"/>
<doc xml:space="preserve">Returns the specified kinetic scrolling behavior.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scrolling behavior flags.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_content_height" c:identifier="gtk_scrolled_window_get_max_content_height" glib:get-property="max-content-height">
<attribute name="org.gtk.Method.get_property" value="max-content-height"/>
<doc xml:space="preserve">Returns the maximum content height set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum content height, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_content_width" c:identifier="gtk_scrolled_window_get_max_content_width" glib:get-property="max-content-width">
<attribute name="org.gtk.Method.get_property" value="max-content-width"/>
<doc xml:space="preserve">Returns the maximum content width set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum content width, or -1</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_content_height" c:identifier="gtk_scrolled_window_get_min_content_height" glib:get-property="min-content-height">
<attribute name="org.gtk.Method.get_property" value="min-content-height"/>
<doc xml:space="preserve">Gets the minimal content height of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minimal content height</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_content_width" c:identifier="gtk_scrolled_window_get_min_content_width" glib:get-property="min-content-width">
<attribute name="org.gtk.Method.get_property" value="min-content-width"/>
<doc xml:space="preserve">Gets the minimum content width of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minimum content width</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_overlay_scrolling" c:identifier="gtk_scrolled_window_get_overlay_scrolling" glib:get-property="overlay-scrolling">
<attribute name="org.gtk.Method.get_property" value="overlay-scrolling"/>
<doc xml:space="preserve">Returns whether overlay scrolling is enabled for this scrolled window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if overlay scrolling is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_placement" c:identifier="gtk_scrolled_window_get_placement">
<attribute name="org.gtk.Method.get_property" value="window-placement"/>
<doc xml:space="preserve">Gets the placement of the contents with respect to the scrollbars.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current placement value.</doc>
<type name="CornerType" c:type="GtkCornerType"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_policy" c:identifier="gtk_scrolled_window_get_policy">
<doc xml:space="preserve">Retrieves the current policy values for the horizontal and vertical
scrollbars.
See [method@Gtk.ScrolledWindow.set_policy].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="hscrollbar_policy" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the policy
for the horizontal scrollbar</doc>
<type name="PolicyType" c:type="GtkPolicyType*"/>
</parameter>
<parameter name="vscrollbar_policy" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the policy
for the vertical scrollbar</doc>
<type name="PolicyType" c:type="GtkPolicyType*"/>
</parameter>
</parameters>
</method>
<method name="get_propagate_natural_height" c:identifier="gtk_scrolled_window_get_propagate_natural_height" glib:get-property="propagate-natural-height">
<attribute name="org.gtk.Method.get_property" value="propagate-natural-height"/>
<doc xml:space="preserve">Reports whether the natural height of the child will be calculated
and propagated through the scrolled window&#x2019;s requested natural height.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether natural height propagation is enabled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_propagate_natural_width" c:identifier="gtk_scrolled_window_get_propagate_natural_width" glib:get-property="propagate-natural-width">
<attribute name="org.gtk.Method.get_property" value="propagate-natural-width"/>
<doc xml:space="preserve">Reports whether the natural width of the child will be calculated
and propagated through the scrolled window&#x2019;s requested natural width.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether natural width propagation is enabled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vadjustment" c:identifier="gtk_scrolled_window_get_vadjustment" glib:get-property="vadjustment">
<attribute name="org.gtk.Method.get_property" value="vadjustment"/>
<doc xml:space="preserve">Returns the vertical scrollbar&#x2019;s adjustment.
This is the adjustment used to connect the vertical
scrollbar to the child widget&#x2019;s vertical scroll functionality.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical `GtkAdjustment`</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vscrollbar" c:identifier="gtk_scrolled_window_get_vscrollbar">
<doc xml:space="preserve">Returns the vertical scrollbar of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical scrollbar of the scrolled window.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_scrolled_window_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_hadjustment" c:identifier="gtk_scrolled_window_set_hadjustment" glib:set-property="hadjustment">
<attribute name="org.gtk.Method.set_property" value="hadjustment"/>
<doc xml:space="preserve">Sets the `GtkAdjustment` for the horizontal scrollbar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="hadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkAdjustment` to use, or %NULL to create a new one</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_has_frame" c:identifier="gtk_scrolled_window_set_has_frame" glib:set-property="has-frame">
<attribute name="org.gtk.Method.set_property" value="has-frame"/>
<doc xml:space="preserve">Changes the frame drawn around the contents of @scrolled_window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="has_frame" transfer-ownership="none">
<doc xml:space="preserve">whether to draw a frame around scrolled window contents</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_kinetic_scrolling" c:identifier="gtk_scrolled_window_set_kinetic_scrolling" glib:set-property="kinetic-scrolling">
<attribute name="org.gtk.Method.set_property" value="kinetic-scrolling"/>
<doc xml:space="preserve">Turns kinetic scrolling on or off.
Kinetic scrolling only applies to devices with source
%GDK_SOURCE_TOUCHSCREEN.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="kinetic_scrolling" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable kinetic scrolling</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_max_content_height" c:identifier="gtk_scrolled_window_set_max_content_height" glib:set-property="max-content-height">
<attribute name="org.gtk.Method.set_property" value="max-content-height"/>
<doc xml:space="preserve">Sets the maximum height that @scrolled_window should keep visible.
The @scrolled_window will grow up to this height before it starts
scrolling the content.
It is a programming error to set the maximum content height to a value
smaller than [property@Gtk.ScrolledWindow:min-content-height].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the maximum content height</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_max_content_width" c:identifier="gtk_scrolled_window_set_max_content_width" glib:set-property="max-content-width">
<attribute name="org.gtk.Method.set_property" value="max-content-width"/>
<doc xml:space="preserve">Sets the maximum width that @scrolled_window should keep visible.
The @scrolled_window will grow up to this width before it starts
scrolling the content.
It is a programming error to set the maximum content width to a
value smaller than [property@Gtk.ScrolledWindow:min-content-width].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the maximum content width</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_min_content_height" c:identifier="gtk_scrolled_window_set_min_content_height" glib:set-property="min-content-height">
<attribute name="org.gtk.Method.set_property" value="min-content-height"/>
<doc xml:space="preserve">Sets the minimum height that @scrolled_window should keep visible.
Note that this can and (usually will) be smaller than the minimum
size of the content.
It is a programming error to set the minimum content height to a
value greater than [property@Gtk.ScrolledWindow:max-content-height].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the minimal content height</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_min_content_width" c:identifier="gtk_scrolled_window_set_min_content_width" glib:set-property="min-content-width">
<attribute name="org.gtk.Method.set_property" value="min-content-width"/>
<doc xml:space="preserve">Sets the minimum width that @scrolled_window should keep visible.
Note that this can and (usually will) be smaller than the minimum
size of the content.
It is a programming error to set the minimum content width to a
value greater than [property@Gtk.ScrolledWindow:max-content-width].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the minimal content width</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_overlay_scrolling" c:identifier="gtk_scrolled_window_set_overlay_scrolling" glib:set-property="overlay-scrolling">
<attribute name="org.gtk.Method.set_property" value="overlay-scrolling"/>
<doc xml:space="preserve">Enables or disables overlay scrolling for this scrolled window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="overlay_scrolling" transfer-ownership="none">
<doc xml:space="preserve">whether to enable overlay scrolling</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_placement" c:identifier="gtk_scrolled_window_set_placement">
<attribute name="org.gtk.Method.set_property" value="window-placement"/>
<doc xml:space="preserve">Sets the placement of the contents with respect to the scrollbars
for the scrolled window.
The default is %GTK_CORNER_TOP_LEFT, meaning the child is
in the top left, with the scrollbars underneath and to the right.
Other values in [enum@Gtk.CornerType] are %GTK_CORNER_TOP_RIGHT,
%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
See also [method@Gtk.ScrolledWindow.get_placement] and
[method@Gtk.ScrolledWindow.unset_placement].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="window_placement" transfer-ownership="none">
<doc xml:space="preserve">position of the child window</doc>
<type name="CornerType" c:type="GtkCornerType"/>
</parameter>
</parameters>
</method>
<method name="set_policy" c:identifier="gtk_scrolled_window_set_policy">
<doc xml:space="preserve">Sets the scrollbar policy for the horizontal and vertical scrollbars.
The policy determines when the scrollbar should appear; it is a value
from the [enum@Gtk.PolicyType] enumeration. If %GTK_POLICY_ALWAYS, the
scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
if needed (that is, if the slider part of the bar would be smaller
than the trough &#x2014; the display is larger than the page size).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="hscrollbar_policy" transfer-ownership="none">
<doc xml:space="preserve">policy for horizontal bar</doc>
<type name="PolicyType" c:type="GtkPolicyType"/>
</parameter>
<parameter name="vscrollbar_policy" transfer-ownership="none">
<doc xml:space="preserve">policy for vertical bar</doc>
<type name="PolicyType" c:type="GtkPolicyType"/>
</parameter>
</parameters>
</method>
<method name="set_propagate_natural_height" c:identifier="gtk_scrolled_window_set_propagate_natural_height" glib:set-property="propagate-natural-height">
<attribute name="org.gtk.Method.set_property" value="propagate-natural-height"/>
<doc xml:space="preserve">Sets whether the natural height of the child should be calculated
and propagated through the scrolled window&#x2019;s requested natural height.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="propagate" transfer-ownership="none">
<doc xml:space="preserve">whether to propagate natural height</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_propagate_natural_width" c:identifier="gtk_scrolled_window_set_propagate_natural_width" glib:set-property="propagate-natural-width">
<attribute name="org.gtk.Method.set_property" value="propagate-natural-width"/>
<doc xml:space="preserve">Sets whether the natural width of the child should be calculated
and propagated through the scrolled window&#x2019;s requested natural width.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="propagate" transfer-ownership="none">
<doc xml:space="preserve">whether to propagate natural width</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_vadjustment" c:identifier="gtk_scrolled_window_set_vadjustment" glib:set-property="vadjustment">
<attribute name="org.gtk.Method.set_property" value="vadjustment"/>
<doc xml:space="preserve">Sets the `GtkAdjustment` for the vertical scrollbar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
<parameter name="vadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkAdjustment` to use, or %NULL to create a new one</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="unset_placement" c:identifier="gtk_scrolled_window_unset_placement">
<doc xml:space="preserve">Unsets the placement of the contents with respect to the scrollbars.
If no window placement is set for a scrolled window,
it defaults to %GTK_CORNER_TOP_LEFT.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="scrolled_window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrolledWindow`</doc>
<type name="ScrolledWindow" c:type="GtkScrolledWindow*"/>
</instance-parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="hadjustment" writable="1" construct="1" transfer-ownership="none" setter="set_hadjustment" getter="get_hadjustment">
<type name="Adjustment"/>
</property>
<property name="has-frame" writable="1" transfer-ownership="none" setter="set_has_frame" getter="get_has_frame">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_has_frame"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_has_frame"/>
<doc xml:space="preserve">Whether to draw a frame around the contents.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="hscrollbar-policy" writable="1" transfer-ownership="none">
<doc xml:space="preserve">When the horizontal scrollbar is displayed.
Use [method@Gtk.ScrolledWindow.set_policy] to set
this property.</doc>
<type name="PolicyType"/>
</property>
<property name="kinetic-scrolling" writable="1" transfer-ownership="none" setter="set_kinetic_scrolling" getter="get_kinetic_scrolling">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_kinetic_scrolling"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_overlay_scrolling"/>
<doc xml:space="preserve">Whether kinetic scrolling is enabled or not.
Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-content-height" writable="1" transfer-ownership="none" setter="set_max_content_height" getter="get_max_content_height">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_max_content_height"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_max_content_height"/>
<doc xml:space="preserve">The maximum content height of @scrolled_window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="max-content-width" writable="1" transfer-ownership="none" setter="set_max_content_width" getter="get_max_content_width">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_max_content_width"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_max_content_width"/>
<doc xml:space="preserve">The maximum content width of @scrolled_window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="min-content-height" writable="1" transfer-ownership="none" setter="set_min_content_height" getter="get_min_content_height">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_min_content_height"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_min_content_height"/>
<doc xml:space="preserve">The minimum content height of @scrolled_window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="min-content-width" writable="1" transfer-ownership="none" setter="set_min_content_width" getter="get_min_content_width">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_min_content_width"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_min_content_width"/>
<doc xml:space="preserve">The minimum content width of @scrolled_window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="overlay-scrolling" writable="1" transfer-ownership="none" setter="set_overlay_scrolling" getter="get_overlay_scrolling">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_overlay_scrolling"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_overlay_scrolling"/>
<doc xml:space="preserve">Whether overlay scrolling is enabled or not.
If it is, the scrollbars are only added as traditional widgets
when a mouse is present. Otherwise, they are overlaid on top of
the content, as narrow indicators.
Note that overlay scrolling can also be globally disabled, with
the [property@Gtk.Settings:gtk-overlay-scrolling] setting.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="propagate-natural-height" writable="1" transfer-ownership="none" setter="set_propagate_natural_height" getter="get_propagate_natural_height">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_propagate_natural_height"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_propagate_natural_height"/>
<doc xml:space="preserve">Whether the natural height of the child should be calculated and propagated
through the scrolled window&#x2019;s requested natural height.
This is useful in cases where an attempt should be made to allocate exactly
enough space for the natural size of the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="propagate-natural-width" writable="1" transfer-ownership="none" setter="set_propagate_natural_width" getter="get_propagate_natural_width">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_propagate_natural_width"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_propagate_natural_width"/>
<doc xml:space="preserve">Whether the natural width of the child should be calculated and propagated
through the scrolled window&#x2019;s requested natural width.
This is useful in cases where an attempt should be made to allocate exactly
enough space for the natural size of the child.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="vadjustment" writable="1" construct="1" transfer-ownership="none" setter="set_vadjustment" getter="get_vadjustment">
<type name="Adjustment"/>
</property>
<property name="vscrollbar-policy" writable="1" transfer-ownership="none">
<doc xml:space="preserve">When the vertical scrollbar is displayed.
Use [method@Gtk.ScrolledWindow.set_policy] to set
this property.</doc>
<type name="PolicyType"/>
</property>
<property name="window-placement" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_scrolled_window_get_placement"/>
<attribute name="org.gtk.Property.set" value="gtk_scrolled_window_set_placement"/>
<doc xml:space="preserve">Where the contents are located with respect to the scrollbars.</doc>
<type name="CornerType"/>
</property>
<glib:signal name="edge-overshot" when="last">
<doc xml:space="preserve">Emitted whenever user initiated scrolling makes the scrolled
window firmly surpass the limits defined by the adjustment
in that orientation.
A similar behavior without edge resistance is provided by the
[signal@Gtk.ScrolledWindow::edge-reached] signal.
Note: The @pos argument is LTR/RTL aware, so callers should be
aware too if intending to provide behavior on horizontal edges.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">edge side that was hit</doc>
<type name="PositionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="edge-reached" when="last">
<doc xml:space="preserve">Emitted whenever user-initiated scrolling makes the scrolled
window exactly reach the lower or upper limits defined by the
adjustment in that orientation.
A similar behavior with edge resistance is provided by the
[signal@Gtk.ScrolledWindow::edge-overshot] signal.
Note: The @pos argument is LTR/RTL aware, so callers should be
aware too if intending to provide behavior on horizontal edges.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">edge side that was reached</doc>
<type name="PositionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-focus-out" when="last" action="1">
<doc xml:space="preserve">Emitted when focus is moved away from the scrolled window by a
keybinding.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
`Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to
move backward.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="direction_type" transfer-ownership="none">
<doc xml:space="preserve">either %GTK_DIR_TAB_FORWARD or
%GTK_DIR_TAB_BACKWARD</doc>
<type name="DirectionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="scroll-child" when="last" action="1">
<doc xml:space="preserve">Emitted when a keybinding that scrolls is pressed.
This is a [keybinding signal](class.SignalAction.html).
The horizontal or vertical adjustment is updated which triggers a
signal that the scrolled window&#x2019;s child may listen to and scroll itself.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="scroll" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollType` describing how much to scroll</doc>
<type name="ScrollType"/>
</parameter>
<parameter name="horizontal" transfer-ownership="none">
<doc xml:space="preserve">whether the keybinding scrolls the child
horizontally or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="SearchBar" c:symbol-prefix="search_bar" c:type="GtkSearchBar" parent="Widget" glib:type-name="GtkSearchBar" glib:get-type="gtk_search_bar_get_type">
<doc xml:space="preserve">`GtkSearchBar` is a container made to have a search entry.
![An example GtkSearchBar](search-bar.png)
It can also contain additional widgets, such as drop-down menus,
or buttons. The search bar would appear when a search is started
through typing on the keyboard, or the application&#x2019;s search mode
is toggled on.
For keyboard presses to start a search, the search bar must be told
of a widget to capture key events from through
[method@Gtk.SearchBar.set_key_capture_widget]. This widget will
typically be the top-level window, or a parent container of the
search bar. Common shortcuts such as Ctrl+F should be handled as an
application action, or through the menu items.
You will also need to tell the search bar about which entry you
are using as your search entry using [method@Gtk.SearchBar.connect_entry].
## Creating a search bar
The following example shows you how to create a more complex search
entry.
[A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/main/examples/search-bar.c)
# CSS nodes
```
searchbar
&#x2570;&#x2500;&#x2500; revealer
&#x2570;&#x2500;&#x2500; box
&#x251C;&#x2500;&#x2500; [child]
&#x2570;&#x2500;&#x2500; [button.close]
```
`GtkSearchBar` has a main CSS node with name searchbar. It has a child
node with name revealer that contains a node with name box. The box node
contains both the CSS node of the child widget as well as an optional button
node which gets the .close style class applied.
# Accessibility
`GtkSearchBar` uses the %GTK_ACCESSIBLE_ROLE_SEARCH role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_search_bar_new">
<doc xml:space="preserve">Creates a `GtkSearchBar`.
You will need to tell it about which widget is going to be your text
entry using [method@Gtk.SearchBar.connect_entry].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkSearchBar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="connect_entry" c:identifier="gtk_search_bar_connect_entry">
<doc xml:space="preserve">Connects the `GtkEditable widget passed as the one to be used in
this search bar.
The entry should be a descendant of the search bar. Calling this
function manually is only required if the entry isn&#x2019;t the direct
child of the search bar (as in our main example).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
<parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEditable`</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_search_bar_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @bar.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @bar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_key_capture_widget" c:identifier="gtk_search_bar_get_key_capture_widget" glib:get-property="key-capture-widget">
<attribute name="org.gtk.Method.get_property" value="key-capture-widget"/>
<doc xml:space="preserve">Gets the widget that @bar is capturing key events from.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The key capture widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search_mode" c:identifier="gtk_search_bar_get_search_mode">
<attribute name="org.gtk.Method.get_property" value="search-mode-enabled"/>
<doc xml:space="preserve">Returns whether the search mode is on or off.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether search mode is toggled on</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_close_button" c:identifier="gtk_search_bar_get_show_close_button" glib:get-property="show-close-button">
<attribute name="org.gtk.Method.get_property" value="show-close-button"/>
<doc xml:space="preserve">Returns whether the close button is shown.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the close button is shown</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_search_bar_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @bar.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_key_capture_widget" c:identifier="gtk_search_bar_set_key_capture_widget" glib:set-property="key-capture-widget">
<attribute name="org.gtk.Method.set_property" value="key-capture-widget"/>
<doc xml:space="preserve">Sets @widget as the widget that @bar will capture key events
from.
If key events are handled by the search bar, the bar will
be shown, and the entry populated with the entered text.
Note that despite the name of this function, the events
are only 'captured' in the bubble phase, which means that
editable child widgets of @widget will receive text input
before it gets captured. If that is not desired, you can
capture and forward the events yourself with
[method@Gtk.EventControllerKey.forward].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_search_mode" c:identifier="gtk_search_bar_set_search_mode">
<attribute name="org.gtk.Method.set_property" value="search-mode-enabled"/>
<doc xml:space="preserve">Switches the search mode on or off.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
<parameter name="search_mode" transfer-ownership="none">
<doc xml:space="preserve">the new state of the search mode</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_show_close_button" c:identifier="gtk_search_bar_set_show_close_button" glib:set-property="show-close-button">
<attribute name="org.gtk.Method.set_property" value="show-close-button"/>
<doc xml:space="preserve">Shows or hides the close button.
Applications that already have a &#x201C;search&#x201D; toggle button should not
show a close button in their search bar, as it duplicates the role
of the toggle button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="bar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchBar`</doc>
<type name="SearchBar" c:type="GtkSearchBar*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">whether the close button will be shown or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" construct="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_search_bar_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_search_bar_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="key-capture-widget" writable="1" construct="1" transfer-ownership="none" setter="set_key_capture_widget" getter="get_key_capture_widget">
<attribute name="org.gtk.Property.get" value="gtk_search_bar_get_key_capture_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_search_bar_set_key_capture_widget"/>
<doc xml:space="preserve">The key capture widget.</doc>
<type name="Widget"/>
</property>
<property name="search-mode-enabled" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_search_bar_get_search_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_search_bar_set_search_mode"/>
<doc xml:space="preserve">Whether the search mode is on and the search bar shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-close-button" writable="1" construct="1" transfer-ownership="none" setter="set_show_close_button" getter="get_show_close_button">
<attribute name="org.gtk.Property.get" value="gtk_search_bar_get_show_close_button"/>
<attribute name="org.gtk.Property.set" value="gtk_search_bar_set_show_close_button"/>
<doc xml:space="preserve">Whether to show the close button in the search bar.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="SearchEntry" c:symbol-prefix="search_entry" c:type="GtkSearchEntry" parent="Widget" glib:type-name="GtkSearchEntry" glib:get-type="gtk_search_entry_get_type">
<doc xml:space="preserve">`GtkSearchEntry` is an entry widget that has been tailored for use
as a search entry.
The main API for interacting with a `GtkSearchEntry` as entry
is the `GtkEditable` interface.
![An example GtkSearchEntry](search-entry.png)
It will show an inactive symbolic &#x201C;find&#x201D; icon when the search
entry is empty, and a symbolic &#x201C;clear&#x201D; icon when there is text.
Clicking on the &#x201C;clear&#x201D; icon will empty the search entry.
To make filtering appear more reactive, it is a good idea to
not react to every change in the entry text immediately, but
only after a short delay. To support this, `GtkSearchEntry`
emits the [signal@Gtk.SearchEntry::search-changed] signal which
can be used instead of the [signal@Gtk.Editable::changed] signal.
The [signal@Gtk.SearchEntry::previous-match],
[signal@Gtk.SearchEntry::next-match] and
[signal@Gtk.SearchEntry::stop-search] signals can be used to
implement moving between search results and ending the search.
Often, `GtkSearchEntry` will be fed events by means of being
placed inside a [class@Gtk.SearchBar]. If that is not the case,
you can use [method@Gtk.SearchEntry.set_key_capture_widget] to
let it capture key input from another widget.
`GtkSearchEntry` provides only minimal API and should be used with
the [iface@Gtk.Editable] API.
## CSS Nodes
```
entry.search
&#x2570;&#x2500;&#x2500; text
```
`GtkSearchEntry` has a single CSS node with name entry that carries
a `.search` style class, and the text node is a child of that.
## Accessibility
`GtkSearchEntry` uses the %GTK_ACCESSIBLE_ROLE_SEARCH_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<constructor name="new" c:identifier="gtk_search_entry_new">
<doc xml:space="preserve">Creates a `GtkSearchEntry`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkSearchEntry`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_key_capture_widget" c:identifier="gtk_search_entry_get_key_capture_widget">
<doc xml:space="preserve">Gets the widget that @entry is capturing key events from.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The key capture widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchEntry`</doc>
<type name="SearchEntry" c:type="GtkSearchEntry*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_key_capture_widget" c:identifier="gtk_search_entry_set_key_capture_widget">
<doc xml:space="preserve">Sets @widget as the widget that @entry will capture key
events from.
Key events are consumed by the search entry to start or
continue a search.
If the entry is part of a `GtkSearchBar`, it is preferable
to call [method@Gtk.SearchBar.set_key_capture_widget] instead,
which will reveal the entry in addition to triggering the
search entry.
Note that despite the name of this function, the events
are only 'captured' in the bubble phase, which means that
editable child widgets of @widget will receive text input
before it gets captured. If that is not desired, you can
capture and forward the events yourself with
[method@Gtk.EventControllerKey.forward].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="entry" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSearchEntry`</doc>
<type name="SearchEntry" c:type="GtkSearchEntry*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="activates-default" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to activate the default widget when Enter is pressed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="placeholder-text" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text that will be displayed in the `GtkSearchEntry`
when it is empty and unfocused.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="activate" when="last" action="1">
<doc xml:space="preserve">Emitted when the entry is activated.
The keybindings for this signal are all forms of the Enter key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="next-match" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a move to the next match
for the current search string.
This is a [keybinding signal](class.SignalAction.html).
Applications should connect to it, to implement moving
between matches.
The default bindings for this signal is Ctrl-g.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="previous-match" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a move to the previous match
for the current search string.
This is a [keybinding signal](class.SignalAction.html).
Applications should connect to it, to implement moving
between matches.
The default bindings for this signal is Ctrl-Shift-g.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="search-changed" when="last">
<doc xml:space="preserve">Emitted with a short delay of 150 milliseconds after the
last change to the entry text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="search-started" when="last">
<doc xml:space="preserve">Emitted when the user initiated a search on the entry.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="stop-search" when="last" action="1">
<doc xml:space="preserve">Emitted when the user stops a search via keyboard input.
This is a [keybinding signal](class.SignalAction.html).
Applications should connect to it, to implement hiding
the search entry in this case.
The default bindings for this signal is Escape.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="SelectionFilterModel" c:symbol-prefix="selection_filter_model" c:type="GtkSelectionFilterModel" parent="GObject.Object" glib:type-name="GtkSelectionFilterModel" glib:get-type="gtk_selection_filter_model_get_type" glib:type-struct="SelectionFilterModelClass">
<doc xml:space="preserve">`GtkSelectionFilterModel` is a list model that presents the selection from
a `GtkSelectionModel`.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_selection_filter_model_new">
<doc xml:space="preserve">Creates a new `GtkSelectionFilterModel` that will include the
selected items from the underlying selection model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkSelectionFilterModel`</doc>
<type name="SelectionFilterModel" c:type="GtkSelectionFilterModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the selection model to filter</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_selection_filter_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model currently filtered or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model that gets filtered</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionFilterModel`</doc>
<type name="SelectionFilterModel" c:type="GtkSelectionFilterModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_selection_filter_model_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to be filtered.
Note that GTK makes no effort to ensure that @model conforms to
the item type of @self. It assumes that the caller knows what they
are doing and have set up an appropriate filter to ensure that item
types match.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionFilterModel`</doc>
<type name="SelectionFilterModel" c:type="GtkSelectionFilterModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to be filtered</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</method>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_selection_filter_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_selection_filter_model_set_model"/>
<doc xml:space="preserve">The model being filtered.</doc>
<type name="SelectionModel"/>
</property>
</class>
<record name="SelectionFilterModelClass" c:type="GtkSelectionFilterModelClass" glib:is-gtype-struct-for="SelectionFilterModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<enumeration name="SelectionMode" glib:type-name="GtkSelectionMode" glib:get-type="gtk_selection_mode_get_type" c:type="GtkSelectionMode">
<doc xml:space="preserve">Used to control what selections users are allowed to make.</doc>
<member name="none" value="0" c:identifier="GTK_SELECTION_NONE" glib:nick="none" glib:name="GTK_SELECTION_NONE">
<doc xml:space="preserve">No selection is possible.</doc>
</member>
<member name="single" value="1" c:identifier="GTK_SELECTION_SINGLE" glib:nick="single" glib:name="GTK_SELECTION_SINGLE">
<doc xml:space="preserve">Zero or one element may be selected.</doc>
</member>
<member name="browse" value="2" c:identifier="GTK_SELECTION_BROWSE" glib:nick="browse" glib:name="GTK_SELECTION_BROWSE">
<doc xml:space="preserve">Exactly one element is selected.
In some circumstances, such as initially or during a search
operation, it&#x2019;s possible for no element to be selected with
%GTK_SELECTION_BROWSE. What is really enforced is that the user
can&#x2019;t deselect a currently selected element except by selecting
another element.</doc>
</member>
<member name="multiple" value="3" c:identifier="GTK_SELECTION_MULTIPLE" glib:nick="multiple" glib:name="GTK_SELECTION_MULTIPLE">
<doc xml:space="preserve">Any number of elements may be selected.
The Ctrl key may be used to enlarge the selection, and Shift
key to select between the focus and the child pointed to.
Some widgets may also allow Click-drag to select a range of elements.</doc>
</member>
</enumeration>
<interface name="SelectionModel" c:symbol-prefix="selection_model" c:type="GtkSelectionModel" glib:type-name="GtkSelectionModel" glib:get-type="gtk_selection_model_get_type" glib:type-struct="SelectionModelInterface">
<doc xml:space="preserve">`GtkSelectionModel` is an interface that add support for selection to list models.
This support is then used by widgets using list models to add the ability
to select and unselect various items.
GTK provides default implementations of the most common selection modes such
as [class@Gtk.SingleSelection], so you will only need to implement this
interface if you want detailed control about how selections should be handled.
A `GtkSelectionModel` supports a single boolean per item indicating if an item is
selected or not. This can be queried via [method@Gtk.SelectionModel.is_selected].
When the selected state of one or more items changes, the model will emit the
[signal@Gtk.SelectionModel::selection-changed] signal by calling the
[method@Gtk.SelectionModel.selection_changed] function. The positions given
in that signal may have their selection state changed, though that is not a
requirement. If new items added to the model via the ::items-changed signal
are selected or not is up to the implementation.
Note that items added via ::items-changed may already be selected and no
[Gtk.SelectionModel::selection-changed] will be emitted for them. So to
track which items are selected, it is necessary to listen to both signals.
Additionally, the interface can expose functionality to select and unselect
items. If these functions are implemented, GTK's list widgets will allow users
to select and unselect items. However, `GtkSelectionModel`s are free to only
implement them partially or not at all. In that case the widgets will not
support the unimplemented operations.
When selecting or unselecting is supported by a model, the return values of
the selection functions do *not* indicate if selection or unselection happened.
They are only meant to indicate complete failure, like when this mode of
selecting is not supported by the model.
Selections may happen asynchronously, so the only reliable way to find out
when an item was selected is to listen to the signals that indicate selection.</doc>
<prerequisite name="Gio.ListModel"/>
<virtual-method name="get_selection_in_range" invoker="get_selection_in_range">
<doc xml:space="preserve">Gets the set of selected items in a range.
This function is an optimization for
[method@Gtk.SelectionModel.get_selection] when you are only
interested in part of the model's selected state. A common use
case is in response to the [signal@Gtk.SelectionModel::selection-changed]
signal.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A `GtkBitset` that matches the selection state
for the given range with all other values being undefined.
The bitset must not be modified.</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">start of the queired range</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of items in the queried range</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="is_selected" invoker="is_selected">
<doc xml:space="preserve">Checks if the given item is selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to query</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="select_all" invoker="select_all">
<doc xml:space="preserve">Requests to select all items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="select_item" invoker="select_item">
<doc xml:space="preserve">Requests to select an item in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="select_range" invoker="select_range">
<doc xml:space="preserve">Requests to select a range of items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_selection" invoker="set_selection">
<doc xml:space="preserve">Make selection changes.
This is the most advanced selection updating method that allows
the most fine-grained control over selection changes. If you can,
you should try the simpler versions, as implementations are more
likely to implement support for those.
Requests that the selection state of all positions set in @mask
be updated to the respective value in the @selected bitmask.
In pseudocode, it would look something like this:
```c
for (i = 0; i &lt; n_items; i++)
{
// don't change values not in the mask
if (!gtk_bitset_contains (mask, i))
continue;
if (gtk_bitset_contains (selected, i))
select_item (i);
else
unselect_item (i);
}
gtk_selection_model_selection_changed (model,
first_changed_item,
n_changed_items);
```
@mask and @selected must not be modified. They may refer to the
same bitset, which would mean that every item in the set should
be selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items were updated according
to the inputs.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="selected" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying if items should be selected or unselected</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
<parameter name="mask" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying which items should be updated</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unselect_all" invoker="unselect_all">
<doc xml:space="preserve">Requests to unselect all items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="unselect_item" invoker="unselect_item">
<doc xml:space="preserve">Requests to unselect an item in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unselect_range" invoker="unselect_range">
<doc xml:space="preserve">Requests to unselect a range of items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</virtual-method>
<method name="get_selection" c:identifier="gtk_selection_model_get_selection">
<doc xml:space="preserve">Gets the set containing all currently selected items in the model.
This function may be slow, so if you are only interested in single item,
consider using [method@Gtk.SelectionModel.is_selected] or if you are only
interested in a few, consider [method@Gtk.SelectionModel.get_selection_in_range].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkBitset` containing all the values currently
selected in @model. If no items are selected, the bitset is empty.
The bitset must not be modified.</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_in_range" c:identifier="gtk_selection_model_get_selection_in_range">
<doc xml:space="preserve">Gets the set of selected items in a range.
This function is an optimization for
[method@Gtk.SelectionModel.get_selection] when you are only
interested in part of the model's selected state. A common use
case is in response to the [signal@Gtk.SelectionModel::selection-changed]
signal.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A `GtkBitset` that matches the selection state
for the given range with all other values being undefined.
The bitset must not be modified.</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">start of the queired range</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of items in the queried range</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="is_selected" c:identifier="gtk_selection_model_is_selected">
<doc xml:space="preserve">Checks if the given item is selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to query</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="select_all" c:identifier="gtk_selection_model_select_all">
<doc xml:space="preserve">Requests to select all items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_item" c:identifier="gtk_selection_model_select_item">
<doc xml:space="preserve">Requests to select an item in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="select_range" c:identifier="gtk_selection_model_select_range">
<doc xml:space="preserve">Requests to select a range of items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="selection_changed" c:identifier="gtk_selection_model_selection_changed">
<doc xml:space="preserve">Helper function for implementations of `GtkSelectionModel`.
Call this when a the selection changes to emit the
[signal@Gtk.SelectionModel::selection-changed] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first changed item</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of changed items</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_selection" c:identifier="gtk_selection_model_set_selection">
<doc xml:space="preserve">Make selection changes.
This is the most advanced selection updating method that allows
the most fine-grained control over selection changes. If you can,
you should try the simpler versions, as implementations are more
likely to implement support for those.
Requests that the selection state of all positions set in @mask
be updated to the respective value in the @selected bitmask.
In pseudocode, it would look something like this:
```c
for (i = 0; i &lt; n_items; i++)
{
// don't change values not in the mask
if (!gtk_bitset_contains (mask, i))
continue;
if (gtk_bitset_contains (selected, i))
select_item (i);
else
unselect_item (i);
}
gtk_selection_model_selection_changed (model,
first_changed_item,
n_changed_items);
```
@mask and @selected must not be modified. They may refer to the
same bitset, which would mean that every item in the set should
be selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items were updated according
to the inputs.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="selected" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying if items should be selected or unselected</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
<parameter name="mask" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying which items should be updated</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
</parameters>
</method>
<method name="unselect_all" c:identifier="gtk_selection_model_unselect_all">
<doc xml:space="preserve">Requests to unselect all items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="unselect_item" c:identifier="gtk_selection_model_unselect_item">
<doc xml:space="preserve">Requests to unselect an item in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="unselect_range" c:identifier="gtk_selection_model_unselect_range">
<doc xml:space="preserve">Requests to unselect a range of items in the model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<glib:signal name="selection-changed" when="last">
<doc xml:space="preserve">Emitted when the selection state of some of the items in @model changes.
Note that this signal does not specify the new selection state of the
items, they need to be queried manually. It is also not necessary for
a model to change the selection state of any of the items in the selection
model, though it would be rather useless to emit such a signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">The first item that may have changed</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of items with changes</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<record name="SelectionModelInterface" c:type="GtkSelectionModelInterface" glib:is-gtype-struct-for="SelectionModel">
<doc xml:space="preserve">The list of virtual functions for the `GtkSelectionModel` interface.
No function must be implemented, but unless `GtkSelectionModel::is_selected()`
is implemented, it will not be possible to select items in the set.
The model does not need to implement any functions to support either
selecting or unselecting items. Of course, if the model does not do that,
it means that users cannot select or unselect items in a list widget
using the model.
All selection functions fall back to `GtkSelectionModel::set_selection()`
so it is sufficient to implement just that function for full selection
support.</doc>
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="is_selected">
<callback name="is_selected">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the item is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to query</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_selection_in_range">
<callback name="get_selection_in_range">
<return-value transfer-ownership="full">
<doc xml:space="preserve">A `GtkBitset` that matches the selection state
for the given range with all other values being undefined.
The bitset must not be modified.</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">start of the queired range</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">number of items in the queried range</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_item">
<callback name="select_item">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unselect_item">
<callback name="unselect_item">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the item was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_range">
<callback name="select_range">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to select</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="unselect_rest" transfer-ownership="none">
<doc xml:space="preserve">whether previously selected items should be unselected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unselect_range">
<callback name="unselect_range">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean the range was unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the first item to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_items" transfer-ownership="none">
<doc xml:space="preserve">the number of items to unselect</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_all">
<callback name="select_all">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unselect_all">
<callback name="unselect_all">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items are now unselected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_selection">
<callback name="set_selection">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was supported and no fallback should be
tried. This does not mean that all items were updated according
to the inputs.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSelectionModel`</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</parameter>
<parameter name="selected" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying if items should be selected or unselected</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
<parameter name="mask" transfer-ownership="none">
<doc xml:space="preserve">bitmask specifying which items should be updated</doc>
<type name="Bitset" c:type="GtkBitset*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<enumeration name="SensitivityType" glib:type-name="GtkSensitivityType" glib:get-type="gtk_sensitivity_type_get_type" c:type="GtkSensitivityType">
<doc xml:space="preserve">Determines how GTK handles the sensitivity of various controls,
such as combo box buttons.</doc>
<member name="auto" value="0" c:identifier="GTK_SENSITIVITY_AUTO" glib:nick="auto" glib:name="GTK_SENSITIVITY_AUTO">
<doc xml:space="preserve">The control is made insensitive if no
action can be triggered</doc>
</member>
<member name="on" value="1" c:identifier="GTK_SENSITIVITY_ON" glib:nick="on" glib:name="GTK_SENSITIVITY_ON">
<doc xml:space="preserve">The control is always sensitive</doc>
</member>
<member name="off" value="2" c:identifier="GTK_SENSITIVITY_OFF" glib:nick="off" glib:name="GTK_SENSITIVITY_OFF">
<doc xml:space="preserve">The control is always insensitive</doc>
</member>
</enumeration>
<class name="Separator" c:symbol-prefix="separator" c:type="GtkSeparator" parent="Widget" glib:type-name="GtkSeparator" glib:get-type="gtk_separator_get_type">
<doc xml:space="preserve">`GtkSeparator` is a horizontal or vertical separator widget.
![An example GtkSeparator](separators.png)
A `GtkSeparator` can be used to group the widgets within a window.
It displays a line with a shadow to make it appear sunken into the
interface.
# CSS nodes
`GtkSeparator` has a single CSS node with name separator. The node
gets one of the .horizontal or .vertical style classes.
# Accessibility
`GtkSeparator` uses the %GTK_ACCESSIBLE_ROLE_SEPARATOR role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_separator_new">
<doc xml:space="preserve">Creates a new `GtkSeparator` with the given orientation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkSeparator`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the separator&#x2019;s orientation.</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</constructor>
</class>
<class name="Settings" c:symbol-prefix="settings" c:type="GtkSettings" parent="GObject.Object" glib:type-name="GtkSettings" glib:get-type="gtk_settings_get_type">
<doc xml:space="preserve">`GtkSettings` provides a mechanism to share global settings between
applications.
On the X window system, this sharing is realized by an
[XSettings](http://www.freedesktop.org/wiki/Specifications/xsettings-spec)
manager that is usually part of the desktop environment, along with
utilities that let the user change these settings.
On Wayland, the settings are obtained either via a settings portal,
or by reading desktop settings from DConf.
In the absence of these sharing mechanisms, GTK reads default values for
settings from `settings.ini` files in `/etc/gtk-4.0`, `$XDG_CONFIG_DIRS/gtk-4.0`
and `$XDG_CONFIG_HOME/gtk-4.0`. These files must be valid key files (see
`GKeyFile`), and have a section called Settings. Themes can also provide
default values for settings by installing a `settings.ini` file
next to their `gtk.css` file.
Applications can override system-wide settings by setting the property
of the `GtkSettings` object with g_object_set(). This should be restricted
to special cases though; `GtkSettings` are not meant as an application
configuration facility.
There is one `GtkSettings` instance per display. It can be obtained with
[func@Gtk.Settings.get_for_display], but in many cases, it is more
convenient to use [method@Gtk.Widget.get_settings].</doc>
<implements name="StyleProvider"/>
<function name="get_default" c:identifier="gtk_settings_get_default">
<doc xml:space="preserve">Gets the `GtkSettings` object for the default display, creating
it if necessary.
See [func@Gtk.Settings.get_for_display].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkSettings` object. If there is
no default display, then returns %NULL.</doc>
<type name="Settings" c:type="GtkSettings*"/>
</return-value>
</function>
<function name="get_for_display" c:identifier="gtk_settings_get_for_display">
<doc xml:space="preserve">Gets the `GtkSettings` object for @display, creating it if necessary.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkSettings` object</doc>
<type name="Settings" c:type="GtkSettings*"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</function>
<method name="reset_property" c:identifier="gtk_settings_reset_property">
<doc xml:space="preserve">Undoes the effect of calling g_object_set() to install an
application-specific value for a setting.
After this call, the setting will again follow the session-wide
value for this setting.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSettings` object</doc>
<type name="Settings" c:type="GtkSettings*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the setting to reset</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="gtk-alternative-button-order" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether buttons in dialogs should use the alternative button order.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-alternative-sort-arrows" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Controls the direction of the sort indicators in sorted list and tree
views.
By default an arrow pointing down means the column is sorted
in ascending order. When set to %TRUE, this order will be inverted.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-application-prefer-dark-theme" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the application prefers to use a dark theme.
If a GTK theme includes a dark variant, it will be used
instead of the configured theme.
Some applications benefit from minimizing the amount of light
pollution that interferes with the content. Good candidates for
dark themes are photo and video editors that make the actual
content get all the attention and minimize the distraction of
the chrome.
Dark themes should not be used for documents, where large spaces
are white/light and the dark chrome creates too much contrast
(web browser, text editor...).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-cursor-aspect-ratio" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The aspect ratio of the text caret.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="gtk-cursor-blink" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the cursor should blink.
Also see the [property@Gtk.Settings:gtk-cursor-blink-timeout] setting,
which allows more flexible control over cursor blinking.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-cursor-blink-time" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Length of the cursor blink cycle, in milliseconds.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-cursor-blink-timeout" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Time after which the cursor stops blinking, in seconds.
The timer is reset after each user interaction.
Setting this to zero has the same effect as setting
[property@Gtk.Settings:gtk-cursor-blink] to %FALSE.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-cursor-theme-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Name of the cursor theme to use.
Use %NULL to use the default theme.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-cursor-theme-size" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The size to use for cursors.
0 means to use the default size.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-decoration-layout" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Determines which buttons should be put in the
titlebar of client-side decorated windows, and whether they
should be placed at the left of right.
The format of the string is button names, separated by commas.
A colon separates the buttons that should appear on the left
from those on the right. Recognized button names are minimize,
maximize, close, icon (the window icon) and menu (a menu button
for the fallback app menu).
For example, "menu:minimize,maximize,close" specifies a menu
on the left, and minimize, maximize and close buttons on the right.
Note that buttons will only be shown when they are meaningful.
E.g. a menu button only appears when the desktop shell does not
show the app menu, and a close button only appears on a window
that can be closed.
Also note that the setting can be overridden with the
[property@Gtk.HeaderBar:decoration-layout] property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-dialogs-use-header" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether builtin GTK dialogs such as the file chooser, the
color chooser or the font chooser will use a header bar at
the top to show action widgets, or an action area at the bottom.
This setting does not affect custom dialogs using `GtkDialog`
directly, or message dialogs.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-dnd-drag-threshold" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The number of pixels the cursor can move before dragging.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-double-click-distance" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum distance allowed between two clicks for them to be considered
a double click, in pixels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-double-click-time" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum time to allow between two clicks for them to be considered
a double click, in milliseconds.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-enable-accels" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether menu items should have visible accelerators which can be
activated.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-enable-animations" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to enable toolkit-wide animations.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-enable-event-sounds" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to play any event sounds at all.
See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
for more information on event sounds and sound themes.
GTK itself does not support event sounds, you have to use a loadable
module like the one that comes with libcanberra.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-enable-input-feedback-sounds" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to play event sounds as feedback to user input.
See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
for more information on event sounds and sound themes.
GTK itself does not support event sounds, you have to use a loadable
module like the one that comes with libcanberra.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-enable-primary-paste" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether a middle click on a mouse should paste the
'PRIMARY' clipboard content at the cursor location.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-entry-password-hint-timeout" writable="1" transfer-ownership="none">
<doc xml:space="preserve">How long to show the last input character in hidden
entries.
This value is in milliseconds. 0 disables showing the
last char. 600 is a good value for enabling it.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="gtk-entry-select-on-focus" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-error-bell" writable="1" transfer-ownership="none">
<doc xml:space="preserve">When %TRUE, keyboard navigation and other input-related errors
will cause a beep.
Since the error bell is implemented using gdk_surface_beep(), the
windowing system may offer ways to configure the error bell in many
ways, such as flashing the window or similar visual effects.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-font-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The default font to use.
GTK uses the family name and size from this string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-fontconfig-timestamp" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Timestamp of the curent fontconfig configuration.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="gtk-hint-font-metrics" version="4.6" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether hinting should be applied to font metrics.
Note that this also turns off subpixel positioning of glyphs,
since it conflicts with metrics hinting.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-icon-theme-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Name of the icon theme to use.
See [class@Gtk.IconTheme] for details about how
GTK handles icon themes.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-im-module" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Which IM (input method) module should be used by default.
This is the input method that will be used if the user has not
explicitly chosen another input method from the IM context menu.
This also can be a colon-separated list of input methods, which GTK
will try in turn until it finds one available on the system.
See [class@Gtk.IMContext].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-keynav-use-caret" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether GTK should make sure that text can be navigated with
a caret, even if it is not editable.
This is useful when using a screen reader.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-label-select-on-focus" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to select the contents of a selectable
label when it is focused.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-long-press-time" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The time for a button or touch press to be considered a &#x201C;long press&#x201D;.
See [class@Gtk.GestureLongPress].</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="gtk-overlay-scrolling" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether scrolled windows may use overlaid scrolling indicators.
If this is set to %FALSE, scrolled windows will have permanent
scrollbars.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-primary-button-warps-slider" writable="1" transfer-ownership="none">
<doc xml:space="preserve">If the value of this setting is %TRUE, clicking the primary button in a
`GtkRange` trough will move the slider, and hence set the range&#x2019;s value, to
the point that you clicked.
If it is %FALSE, a primary click will cause the slider/value to move
by the range&#x2019;s page-size towards the point clicked.
Whichever action you choose for the primary button, the other action will
be available by holding Shift and primary-clicking, or clicking the middle
mouse button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-print-backends" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A comma-separated list of print backends to use in the print
dialog.
Available print backends depend on the GTK installation,
and may include "file", "cups", "lpr" or "papi".</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-print-preview-command" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A command to run for displaying the print preview.
The command should contain a `%f` placeholder, which will get
replaced by the path to the pdf file. The command may also
contain a `%s` placeholder, which will get replaced by the
path to a file containing the print settings in the format
produced by [method@Gtk.PrintSettings.to_file].
The preview application is responsible for removing the pdf
file and the print settings file when it is done.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-recent-files-enabled" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether GTK should keep track of items inside the recently used
resources list.
If set to %FALSE, the list will always be empty.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-recent-files-max-age" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum age, in days, of the items inside the recently used
resources list.
Items older than this setting will be excised from the list.
If set to 0, the list will always be empty; if set to -1, no
item will be removed.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-shell-shows-app-menu" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Set to %TRUE if the desktop environment is displaying
the app menu, %FALSE if the app should display it itself.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-shell-shows-desktop" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Set to %TRUE if the desktop environment is displaying
the desktop folder, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-shell-shows-menubar" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Set to %TRUE if the desktop environment is displaying
the menubar, %FALSE if the app should display it itself.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-sound-theme-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The XDG sound theme to use for event sounds.
See the [Sound Theme Specifications](http://www.freedesktop.org/wiki/Specifications/sound-theme-spec)
for more information on event sounds and sound themes.
GTK itself does not support event sounds, you have to use
a loadable module like the one that comes with libcanberra.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-split-cursor" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether two cursors should be displayed for mixed left-to-right and
right-to-left text.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="gtk-theme-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Name of the theme to load.
See [class@Gtk.CssProvider] for details about how
GTK finds the CSS stylesheet for a theme.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-titlebar-double-click" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Determines the action to take when a double-click
occurs on the titlebar of client-side decorated windows.
Recognized actions are minimize, toggle-maximize, menu, lower
or none.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-titlebar-middle-click" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Determines the action to take when a middle-click
occurs on the titlebar of client-side decorated windows.
Recognized actions are minimize, toggle-maximize, menu, lower
or none.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-titlebar-right-click" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Determines the action to take when a right-click
occurs on the titlebar of client-side decorated windows.
Recognized actions are minimize, toggle-maximize, menu, lower
or none.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-xft-antialias" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to antialias fonts.
The values are 0 for no, 1 for yes, or -1 for the system default.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-xft-dpi" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The font resolution, in 1024 * dots/inch.
-1 to use the default value.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-xft-hinting" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to enable font hinting.
The values are 0 for no, 1 for yes, or -1 for the system default.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="gtk-xft-hintstyle" writable="1" transfer-ownership="none">
<doc xml:space="preserve">What degree of font hinting to use.
The possible vaues are hintnone, hintslight,
hintmedium, hintfull.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="gtk-xft-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The type of subpixel antialiasing to use.
The possible values are none, rgb, bgr, vrgb, vbgr.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="Shortcut" c:symbol-prefix="shortcut" c:type="GtkShortcut" parent="GObject.Object" glib:type-name="GtkShortcut" glib:get-type="gtk_shortcut_get_type" glib:type-struct="ShortcutClass">
<doc xml:space="preserve">A `GtkShortcut` describes a keyboard shortcut.
It contains a description of how to trigger the shortcut via a
[class@Gtk.ShortcutTrigger] and a way to activate the shortcut
on a widget via a [class@Gtk.ShortcutAction].
The actual work is usually done via [class@Gtk.ShortcutController],
which decides if and when to activate a shortcut. Using that controller
directly however is rarely necessary as various higher level
convenience APIs exist on `GtkWidget`s that make it easier to use
shortcuts in GTK.
`GtkShortcut` does provide functionality to make it easy for users
to work with shortcuts, either by providing informational strings
for display purposes or by allowing shortcuts to be configured.</doc>
<constructor name="new" c:identifier="gtk_shortcut_new">
<doc xml:space="preserve">Creates a new `GtkShortcut` that is triggered by
@trigger and then activates @action.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</return-value>
<parameters>
<parameter name="trigger" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The trigger that will trigger the shortcut</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</parameter>
<parameter name="action" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The action that will be activated upon
triggering</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_arguments" c:identifier="gtk_shortcut_new_with_arguments" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkShortcut` that is triggered by @trigger and then activates
@action with arguments given by @format_string.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</return-value>
<parameters>
<parameter name="trigger" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The trigger that will trigger the shortcut</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</parameter>
<parameter name="action" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The action that will be activated upon
triggering</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</parameter>
<parameter name="format_string" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">GVariant format string for arguments or %NULL for
no arguments</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments, as given by format string.</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<method name="get_action" c:identifier="gtk_shortcut_get_action" glib:get-property="action">
<attribute name="org.gtk.Method.get_property" value="action"/>
<doc xml:space="preserve">Gets the action that is activated by this shortcut.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the action</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_arguments" c:identifier="gtk_shortcut_get_arguments" glib:get-property="arguments">
<attribute name="org.gtk.Method.get_property" value="arguments"/>
<doc xml:space="preserve">Gets the arguments that are passed when activating the shortcut.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the arguments</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_trigger" c:identifier="gtk_shortcut_get_trigger" glib:get-property="trigger">
<attribute name="org.gtk.Method.get_property" value="trigger"/>
<doc xml:space="preserve">Gets the trigger used to trigger @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the trigger used</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_action" c:identifier="gtk_shortcut_set_action" glib:set-property="action">
<attribute name="org.gtk.Method.set_property" value="action"/>
<doc xml:space="preserve">Sets the new action for @self to be @action.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
<parameter name="action" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The new action.
If the @action is %NULL, the nothing action will be used.</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</parameter>
</parameters>
</method>
<method name="set_arguments" c:identifier="gtk_shortcut_set_arguments" glib:set-property="arguments">
<attribute name="org.gtk.Method.set_property" value="arguments"/>
<doc xml:space="preserve">Sets the arguments to pass when activating the shortcut.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
<parameter name="args" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">arguments to pass when activating @self</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="set_trigger" c:identifier="gtk_shortcut_set_trigger" glib:set-property="trigger">
<attribute name="org.gtk.Method.set_property" value="trigger"/>
<doc xml:space="preserve">Sets the new trigger for @self to be @trigger.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</instance-parameter>
<parameter name="trigger" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The new trigger.
If the @trigger is %NULL, the never trigger will be used.</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</parameter>
</parameters>
</method>
<property name="action" writable="1" transfer-ownership="none" setter="set_action" getter="get_action">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_get_action"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_set_action"/>
<doc xml:space="preserve">The action that gets activated by this shortcut.</doc>
<type name="ShortcutAction"/>
</property>
<property name="arguments" writable="1" transfer-ownership="none" setter="set_arguments" getter="get_arguments">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_get_arguments"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_set_arguments"/>
<doc xml:space="preserve">Arguments passed to activation.</doc>
<type name="GLib.Variant"/>
</property>
<property name="trigger" writable="1" transfer-ownership="none" setter="set_trigger" getter="get_trigger">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_get_trigger"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_set_trigger"/>
<doc xml:space="preserve">The trigger that triggers this shortcut.</doc>
<type name="ShortcutTrigger"/>
</property>
</class>
<class name="ShortcutAction" c:symbol-prefix="shortcut_action" c:type="GtkShortcutAction" parent="GObject.Object" abstract="1" glib:type-name="GtkShortcutAction" glib:get-type="gtk_shortcut_action_get_type" glib:type-struct="ShortcutActionClass">
<doc xml:space="preserve">`GtkShortcutAction` encodes an action that can be triggered by a
keyboard shortcut.
`GtkShortcutActions` contain functions that allow easy presentation
to end users as well as being printed for debugging.
All `GtkShortcutActions` are immutable, you can only specify their
properties during construction. If you want to change a action, you
have to replace it with a new one. If you need to pass arguments to
an action, these are specified by the higher-level `GtkShortcut` object.
To activate a `GtkShortcutAction` manually, [method@Gtk.ShortcutAction.activate]
can be called.
GTK provides various actions:
- [class@Gtk.MnemonicAction]: a shortcut action that calls
gtk_widget_mnemonic_activate()
- [class@Gtk.CallbackAction]: a shortcut action that invokes
a given callback
- [class@Gtk.SignalAction]: a shortcut action that emits a
given signal
- [class@Gtk.ActivateAction]: a shortcut action that calls
gtk_widget_activate()
- [class@Gtk.NamedAction]: a shortcut action that calls
gtk_widget_activate_action()
- [class@Gtk.NothingAction]: a shortcut action that does nothing</doc>
<constructor name="parse_string" c:identifier="gtk_shortcut_action_parse_string">
<doc xml:space="preserve">Tries to parse the given string into an action.
On success, the parsed action is returned. When parsing
failed, %NULL is returned.
The accepted strings are:
- `nothing`, for `GtkNothingAction`
- `activate`, for `GtkActivateAction`
- `mnemonic-activate`, for `GtkMnemonicAction`
- `action(NAME)`, for a `GtkNamedAction` for the action named `NAME`
- `signal(NAME)`, for a `GtkSignalAction` for the signal `NAME`</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a new `GtkShortcutAction`</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="activate" c:identifier="gtk_shortcut_action_activate">
<doc xml:space="preserve">Activates the action on the @widget with the given @args.
Note that some actions ignore the passed in @flags, @widget or @args.
Activation of an action can fail for various reasons. If the action
is not supported by the @widget, if the @args don't match the action
or if the activation otherwise had no effect, %FALSE will be returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if this action was activated successfully</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutAction`</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags to activate with</doc>
<type name="ShortcutActionFlags" c:type="GtkShortcutActionFlags"/>
</parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">Target of the activation</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="args" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">arguments to pass</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="print" c:identifier="gtk_shortcut_action_print">
<doc xml:space="preserve">Prints the given action into a string for the developer.
This is meant for debugging and logging.
The form of the representation may change at any time and is
not guaranteed to stay identical.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutAction`</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</instance-parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">a `GString` to print into</doc>
<type name="GLib.String" c:type="GString*"/>
</parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_shortcut_action_to_string">
<doc xml:space="preserve">Prints the given action into a human-readable string.
This is a small wrapper around [method@Gtk.ShortcutAction.print]
to help when debugging.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutAction`</doc>
<type name="ShortcutAction" c:type="GtkShortcutAction*"/>
</instance-parameter>
</parameters>
</method>
</class>
<record name="ShortcutActionClass" c:type="GtkShortcutActionClass" disguised="1" glib:is-gtype-struct-for="ShortcutAction"/>
<bitfield name="ShortcutActionFlags" glib:type-name="GtkShortcutActionFlags" glib:get-type="gtk_shortcut_action_flags_get_type" c:type="GtkShortcutActionFlags">
<doc xml:space="preserve">List of flags that can be passed to action activation.
More flags may be added in the future.</doc>
<member name="exclusive" value="1" c:identifier="GTK_SHORTCUT_ACTION_EXCLUSIVE" glib:nick="exclusive" glib:name="GTK_SHORTCUT_ACTION_EXCLUSIVE">
<doc xml:space="preserve">The action is the only
action that can be activated. If this flag is not set,
a future activation may select a different action.</doc>
</member>
</bitfield>
<record name="ShortcutClass" c:type="GtkShortcutClass" glib:is-gtype-struct-for="Shortcut">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="ShortcutController" c:symbol-prefix="shortcut_controller" c:type="GtkShortcutController" parent="EventController" glib:type-name="GtkShortcutController" glib:get-type="gtk_shortcut_controller_get_type" glib:type-struct="ShortcutControllerClass">
<doc xml:space="preserve">`GtkShortcutController` is an event controller that manages shortcuts.
Most common shortcuts are using this controller implicitly, e.g. by
adding a mnemonic underline to a `GtkLabel`, or by installing a key
binding using [method@Gtk.WidgetClass.add_binding], or by adding accelerators
to global actions using [method@Gtk.Application.set_accels_for_action].
But it is possible to create your own shortcut controller, and add
shortcuts to it.
`GtkShortcutController` implements `GListModel` for querying the
shortcuts that have been added to it.
# GtkShortcutController as a GtkBuildable
`GtkShortcutControllers` can be creates in ui files to set up
shortcuts in the same place as the widgets.
An example of a UI definition fragment with `GtkShortcutController`:
```xml
&lt;object class='GtkButton'&gt;
&lt;child&gt;
&lt;object class='GtkShortcutController'&gt;
&lt;property name='scope'&gt;managed&lt;/property&gt;
&lt;child&gt;
&lt;object class='GtkShortcut'&gt;
&lt;property name='trigger'&gt;&amp;lt;Control&amp;gt;k&lt;/property&gt;
&lt;property name='action'&gt;activate&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
This example creates a [class@Gtk.ActivateAction] for triggering the
`activate` signal of the `GtkButton`. See [ctor@Gtk.ShortcutAction.parse_string]
for the syntax for other kinds of `GtkShortcutAction`. See
[ctor@Gtk.ShortcutTrigger.parse_string] to learn more about the syntax
for triggers.</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_shortcut_controller_new">
<doc xml:space="preserve">Creates a new shortcut controller.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created shortcut controller</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
</constructor>
<constructor name="new_for_model" c:identifier="gtk_shortcut_controller_new_for_model">
<doc xml:space="preserve">Creates a new shortcut controller that takes its shortcuts from
the given list model.
A controller created by this function does not let you add or
remove individual shortcuts using the shortcut controller api,
but you can change the contents of the model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created shortcut controller</doc>
<type name="EventController" c:type="GtkEventController*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GListModel` containing shortcuts</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</constructor>
<method name="add_shortcut" c:identifier="gtk_shortcut_controller_add_shortcut">
<doc xml:space="preserve">Adds @shortcut to the list of shortcuts handled by @self.
If this controller uses an external shortcut list, this
function does nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">the controller</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
<parameter name="shortcut" transfer-ownership="full">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</parameter>
</parameters>
</method>
<method name="get_mnemonics_modifiers" c:identifier="gtk_shortcut_controller_get_mnemonics_modifiers">
<attribute name="org.gtk.Method.get_property" value="mnemonic-modifiers"/>
<doc xml:space="preserve">Gets the mnemonics modifiers for when this controller activates its shortcuts.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the controller's mnemonics modifiers</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutController`</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scope" c:identifier="gtk_shortcut_controller_get_scope" glib:get-property="scope">
<attribute name="org.gtk.Method.get_property" value="scope"/>
<doc xml:space="preserve">Gets the scope for when this controller activates its shortcuts.
See [method@Gtk.ShortcutController.set_scope] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the controller's scope</doc>
<type name="ShortcutScope" c:type="GtkShortcutScope"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutController`</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_shortcut" c:identifier="gtk_shortcut_controller_remove_shortcut">
<doc xml:space="preserve">Removes @shortcut from the list of shortcuts handled by @self.
If @shortcut had not been added to @controller or this controller
uses an external shortcut list, this function does nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">the controller</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
<parameter name="shortcut" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcut`</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</parameter>
</parameters>
</method>
<method name="set_mnemonics_modifiers" c:identifier="gtk_shortcut_controller_set_mnemonics_modifiers">
<attribute name="org.gtk.MEthod.set_property" value="mnemonic-modifiers"/>
<doc xml:space="preserve">Sets the controller to use the given modifier for mnemonics.
The mnemonics modifiers determines which modifiers need to be pressed to allow
activation of shortcuts with mnemonics triggers.
GTK normally uses the Alt modifier for mnemonics, except in `GtkPopoverMenu`s,
where mnemonics can be triggered without any modifiers. It should be very
rarely necessary to change this, and doing so is likely to interfere with
other shortcuts.
This value is only relevant for local shortcut controllers. Global and managed
shortcut controllers will have their shortcuts activated from other places which
have their own modifiers for activating mnemonics.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutController`</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
<parameter name="modifiers" transfer-ownership="none">
<doc xml:space="preserve">the new mnemonics_modifiers to use</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</method>
<method name="set_scope" c:identifier="gtk_shortcut_controller_set_scope" glib:set-property="scope">
<attribute name="org.gtk.Method.set_property" value="scope"/>
<doc xml:space="preserve">Sets the controller to have the given @scope.
The scope allows shortcuts to be activated outside of the normal
event propagation. In particular, it allows installing global
keyboard shortcuts that can be activated even when a widget does
not have focus.
With %GTK_SHORTCUT_SCOPE_LOCAL, shortcuts will only be activated
when the widget has focus.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutController`</doc>
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</instance-parameter>
<parameter name="scope" transfer-ownership="none">
<doc xml:space="preserve">the new scope to use</doc>
<type name="ShortcutScope" c:type="GtkShortcutScope"/>
</parameter>
</parameters>
</method>
<property name="mnemonic-modifiers" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_controller_get_mnemonics_modifiers"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_controller_set_mnemonics_modifiers"/>
<doc xml:space="preserve">The modifiers that need to be pressed to allow mnemonics activation.</doc>
<type name="Gdk.ModifierType"/>
</property>
<property name="model" readable="0" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">A list model to take shortcuts from.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="scope" writable="1" transfer-ownership="none" setter="set_scope" getter="get_scope">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_controller_get_scope"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_controller_set_scope"/>
<doc xml:space="preserve">What scope the shortcuts will be handled in.</doc>
<type name="ShortcutScope"/>
</property>
</class>
<record name="ShortcutControllerClass" c:type="GtkShortcutControllerClass" disguised="1" glib:is-gtype-struct-for="ShortcutController"/>
<callback name="ShortcutFunc" c:type="GtkShortcutFunc">
<doc xml:space="preserve">Prototype for shortcuts based on user callbacks.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action was successful.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">The widget passed to the activation</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="args" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The arguments passed to the activation</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">The user data provided when activating the action</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="ShortcutLabel" c:symbol-prefix="shortcut_label" c:type="GtkShortcutLabel" parent="Widget" glib:type-name="GtkShortcutLabel" glib:get-type="gtk_shortcut_label_get_type" glib:type-struct="ShortcutLabelClass">
<doc xml:space="preserve">`GtkShortcutLabel` displays a single keyboard shortcut or gesture.
The main use case for `GtkShortcutLabel` is inside a [class@Gtk.ShortcutsWindow].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_shortcut_label_new">
<doc xml:space="preserve">Creates a new `GtkShortcutLabel` with @accelerator set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a newly-allocated `GtkShortcutLabel`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="accelerator" transfer-ownership="none">
<doc xml:space="preserve">the initial accelerator</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_accelerator" c:identifier="gtk_shortcut_label_get_accelerator" glib:get-property="accelerator">
<attribute name="org.gtk.Method.get_property" value="accelerator"/>
<doc xml:space="preserve">Retrieves the current accelerator of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current accelerator.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutLabel`</doc>
<type name="ShortcutLabel" c:type="GtkShortcutLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_disabled_text" c:identifier="gtk_shortcut_label_get_disabled_text" glib:get-property="disabled-text">
<attribute name="org.gtk.Method.get_property" value="disabled-text"/>
<doc xml:space="preserve">Retrieves the text that is displayed when no accelerator is set.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the current text displayed when no
accelerator is set.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutLabel`</doc>
<type name="ShortcutLabel" c:type="GtkShortcutLabel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_accelerator" c:identifier="gtk_shortcut_label_set_accelerator" glib:set-property="accelerator">
<attribute name="org.gtk.Method.set_property" value="accelerator"/>
<doc xml:space="preserve">Sets the accelerator to be displayed by @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutLabel`</doc>
<type name="ShortcutLabel" c:type="GtkShortcutLabel*"/>
</instance-parameter>
<parameter name="accelerator" transfer-ownership="none">
<doc xml:space="preserve">the new accelerator</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_disabled_text" c:identifier="gtk_shortcut_label_set_disabled_text" glib:set-property="disabled-text">
<attribute name="org.gtk.Method.set_property" value="disabled-text"/>
<doc xml:space="preserve">Sets the text to be displayed by @self when no accelerator is set.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutLabel`</doc>
<type name="ShortcutLabel" c:type="GtkShortcutLabel*"/>
</instance-parameter>
<parameter name="disabled_text" transfer-ownership="none">
<doc xml:space="preserve">the text to be displayed when no accelerator is set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="accelerator" writable="1" transfer-ownership="none" setter="set_accelerator" getter="get_accelerator">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_label_get_accelerator"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_label_set_accelerator"/>
<doc xml:space="preserve">The accelerator that @self displays.
See [property@Gtk.ShortcutsShortcut:accelerator]
for the accepted syntax.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="disabled-text" writable="1" transfer-ownership="none" setter="set_disabled_text" getter="get_disabled_text">
<attribute name="org.gtk.Property.get" value="gtk_shortcut_label_get_disabled_text"/>
<attribute name="org.gtk.Property.set" value="gtk_shortcut_label_set_disabled_text"/>
<doc xml:space="preserve">The text that is displayed when no accelerator is set.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="ShortcutLabelClass" c:type="GtkShortcutLabelClass" disguised="1" glib:is-gtype-struct-for="ShortcutLabel"/>
<interface name="ShortcutManager" c:symbol-prefix="shortcut_manager" c:type="GtkShortcutManager" glib:type-name="GtkShortcutManager" glib:get-type="gtk_shortcut_manager_get_type" glib:type-struct="ShortcutManagerInterface">
<doc xml:space="preserve">The `GtkShortcutManager` interface is used to implement
shortcut scopes.
This is important for [iface@Gtk.Native] widgets that have their
own surface, since the event controllers that are used to implement
managed and global scopes are limited to the same native.
Examples for widgets implementing `GtkShortcutManager` are
[class@Gtk.Window] and [class@Gtk.Popover].
Every widget that implements `GtkShortcutManager` will be used as a
%GTK_SHORTCUT_SCOPE_MANAGED.</doc>
<virtual-method name="add_controller">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="ShortcutManager" c:type="GtkShortcutManager*"/>
</instance-parameter>
<parameter name="controller" transfer-ownership="none">
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="remove_controller">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="ShortcutManager" c:type="GtkShortcutManager*"/>
</instance-parameter>
<parameter name="controller" transfer-ownership="none">
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</parameter>
</parameters>
</virtual-method>
</interface>
<record name="ShortcutManagerInterface" c:type="GtkShortcutManagerInterface" glib:is-gtype-struct-for="ShortcutManager">
<doc xml:space="preserve">The list of functions that can be implemented for the `GtkShortcutManager`
interface.
Note that no function is mandatory to implement, the default implementation
will work fine.</doc>
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="add_controller">
<callback name="add_controller">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="ShortcutManager" c:type="GtkShortcutManager*"/>
</parameter>
<parameter name="controller" transfer-ownership="none">
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="remove_controller">
<callback name="remove_controller">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="ShortcutManager" c:type="GtkShortcutManager*"/>
</parameter>
<parameter name="controller" transfer-ownership="none">
<type name="ShortcutController" c:type="GtkShortcutController*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<enumeration name="ShortcutScope" glib:type-name="GtkShortcutScope" glib:get-type="gtk_shortcut_scope_get_type" c:type="GtkShortcutScope">
<doc xml:space="preserve">Describes where [class@Shortcut]s added to a
[class@ShortcutController] get handled.</doc>
<member name="local" value="0" c:identifier="GTK_SHORTCUT_SCOPE_LOCAL" glib:nick="local" glib:name="GTK_SHORTCUT_SCOPE_LOCAL">
<doc xml:space="preserve">Shortcuts are handled inside
the widget the controller belongs to.</doc>
</member>
<member name="managed" value="1" c:identifier="GTK_SHORTCUT_SCOPE_MANAGED" glib:nick="managed" glib:name="GTK_SHORTCUT_SCOPE_MANAGED">
<doc xml:space="preserve">Shortcuts are handled by
the first ancestor that is a [iface@ShortcutManager]</doc>
</member>
<member name="global" value="2" c:identifier="GTK_SHORTCUT_SCOPE_GLOBAL" glib:nick="global" glib:name="GTK_SHORTCUT_SCOPE_GLOBAL">
<doc xml:space="preserve">Shortcuts are handled by
the root widget.</doc>
</member>
</enumeration>
<class name="ShortcutTrigger" c:symbol-prefix="shortcut_trigger" c:type="GtkShortcutTrigger" parent="GObject.Object" abstract="1" glib:type-name="GtkShortcutTrigger" glib:get-type="gtk_shortcut_trigger_get_type" glib:type-struct="ShortcutTriggerClass">
<doc xml:space="preserve">`GtkShortcutTrigger` tracks how a `GtkShortcut` should be activated.
To find out if a `GtkShortcutTrigger` triggers, you can call
[method@Gtk.ShortcutTrigger.trigger] on a `GdkEvent`.
`GtkShortcutTriggers` contain functions that allow easy presentation
to end users as well as being printed for debugging.
All `GtkShortcutTriggers` are immutable, you can only specify their
properties during construction. If you want to change a trigger, you
have to replace it with a new one.</doc>
<constructor name="parse_string" c:identifier="gtk_shortcut_trigger_parse_string">
<doc xml:space="preserve">Tries to parse the given string into a trigger.
On success, the parsed trigger is returned.
When parsing failed, %NULL is returned.
The accepted strings are:
- `never`, for `GtkNeverTrigger`
- a string parsed by gtk_accelerator_parse(), for a `GtkKeyvalTrigger`, e.g. `&lt;Control&gt;C`
- underscore, followed by a single character, for `GtkMnemonicTrigger`, e.g. `_l`
- two valid trigger strings, separated by a `|` character, for a
`GtkAlternativeTrigger`: `&lt;Control&gt;q|&lt;Control&gt;w`
Note that you will have to escape the `&lt;` and `&gt;` characters when specifying
triggers in XML files, such as GtkBuilder ui files. Use `&amp;lt;` instead of
`&lt;` and `&amp;gt;` instead of `&gt;`.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a new `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string to parse</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="compare" c:identifier="gtk_shortcut_trigger_compare">
<doc xml:space="preserve">The types of @trigger1 and @trigger2 are `gconstpointer` only to allow
use of this function as a `GCompareFunc`.
They must each be a `GtkShortcutTrigger`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">An integer less than, equal to, or greater than zero if
@trigger1 is found, respectively, to be less than, to match,
or be greater than @trigger2.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="trigger1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="gconstpointer"/>
</instance-parameter>
<parameter name="trigger2" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="gconstpointer"/>
</parameter>
</parameters>
</method>
<method name="equal" c:identifier="gtk_shortcut_trigger_equal">
<doc xml:space="preserve">Checks if @trigger1 and @trigger2 trigger under the same conditions.
The types of @one and @two are `gconstpointer` only to allow use of this
function with `GHashTable`. They must each be a `GtkShortcutTrigger`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @trigger1 and @trigger2 are equal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="trigger1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="gconstpointer"/>
</instance-parameter>
<parameter name="trigger2" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="gconstpointer"/>
</parameter>
</parameters>
</method>
<method name="hash" c:identifier="gtk_shortcut_trigger_hash">
<doc xml:space="preserve">Generates a hash value for a `GtkShortcutTrigger`.
The output of this function is guaranteed to be the same for a given
value only per-process. It may change between different processor
architectures or even different versions of GTK. Do not use this
function as a basis for building protocols or file formats.
The types of @trigger is `gconstpointer` only to allow use of this
function with `GHashTable`. They must each be a `GtkShortcutTrigger`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a hash value corresponding to @trigger</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="trigger" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="gconstpointer"/>
</instance-parameter>
</parameters>
</method>
<method name="print" c:identifier="gtk_shortcut_trigger_print">
<doc xml:space="preserve">Prints the given trigger into a string for the developer.
This is meant for debugging and logging.
The form of the representation may change at any time
and is not guaranteed to stay identical.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</instance-parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">a `GString` to print into</doc>
<type name="GLib.String" c:type="GString*"/>
</parameter>
</parameters>
</method>
<method name="print_label" c:identifier="gtk_shortcut_trigger_print_label">
<doc xml:space="preserve">Prints the given trigger into a string.
This function is returning a translated string for presentation
to end users for example in menu items or in help texts.
The @display in use may influence the resulting string in
various forms, such as resolving hardware keycodes or by
causing display-specific modifier names.
The form of the representation may change at any time and is
not guaranteed to stay identical.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if something was printed or %FALSE if the
trigger did not have a textual representation suitable
for end users.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</instance-parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">`GdkDisplay` to print for</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">a `GString` to print into</doc>
<type name="GLib.String" c:type="GString*"/>
</parameter>
</parameters>
</method>
<method name="to_label" c:identifier="gtk_shortcut_trigger_to_label">
<doc xml:space="preserve">Gets textual representation for the given trigger.
This function is returning a translated string for
presentation to end users for example in menu items
or in help texts.
The @display in use may influence the resulting string in
various forms, such as resolving hardware keycodes or by
causing display-specific modifier names.
The form of the representation may change at any time and is
not guaranteed to stay identical.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</instance-parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">`GdkDisplay` to print for</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_shortcut_trigger_to_string">
<doc xml:space="preserve">Prints the given trigger into a human-readable string.
This is a small wrapper around [method@Gtk.ShortcutTrigger.print]
to help when debugging.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</instance-parameter>
</parameters>
</method>
<method name="trigger" c:identifier="gtk_shortcut_trigger_trigger">
<doc xml:space="preserve">Checks if the given @event triggers @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the event triggered the shortcut</doc>
<type name="Gdk.KeyMatch" c:type="GdkKeyMatch"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkShortcutTrigger`</doc>
<type name="ShortcutTrigger" c:type="GtkShortcutTrigger*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the event to check</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
<parameter name="enable_mnemonics" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if mnemonics should trigger. Usually the
value of this property is determined by checking that the passed
in @event is a Key event and has the right modifiers set.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
</class>
<record name="ShortcutTriggerClass" c:type="GtkShortcutTriggerClass" disguised="1" glib:is-gtype-struct-for="ShortcutTrigger"/>
<enumeration name="ShortcutType" glib:type-name="GtkShortcutType" glib:get-type="gtk_shortcut_type_get_type" c:type="GtkShortcutType">
<doc xml:space="preserve">GtkShortcutType specifies the kind of shortcut that is being described.
More values may be added to this enumeration over time.</doc>
<member name="accelerator" value="0" c:identifier="GTK_SHORTCUT_ACCELERATOR" glib:nick="accelerator" glib:name="GTK_SHORTCUT_ACCELERATOR">
<doc xml:space="preserve">The shortcut is a keyboard accelerator. The GtkShortcutsShortcut:accelerator
property will be used.</doc>
</member>
<member name="gesture_pinch" value="1" c:identifier="GTK_SHORTCUT_GESTURE_PINCH" glib:nick="gesture-pinch" glib:name="GTK_SHORTCUT_GESTURE_PINCH">
<doc xml:space="preserve">The shortcut is a pinch gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_stretch" value="2" c:identifier="GTK_SHORTCUT_GESTURE_STRETCH" glib:nick="gesture-stretch" glib:name="GTK_SHORTCUT_GESTURE_STRETCH">
<doc xml:space="preserve">The shortcut is a stretch gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_rotate_clockwise" value="3" c:identifier="GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE" glib:nick="gesture-rotate-clockwise" glib:name="GTK_SHORTCUT_GESTURE_ROTATE_CLOCKWISE">
<doc xml:space="preserve">The shortcut is a clockwise rotation gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_rotate_counterclockwise" value="4" c:identifier="GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE" glib:nick="gesture-rotate-counterclockwise" glib:name="GTK_SHORTCUT_GESTURE_ROTATE_COUNTERCLOCKWISE">
<doc xml:space="preserve">The shortcut is a counterclockwise rotation gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_two_finger_swipe_left" value="5" c:identifier="GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT" glib:nick="gesture-two-finger-swipe-left" glib:name="GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_LEFT">
<doc xml:space="preserve">The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_two_finger_swipe_right" value="6" c:identifier="GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT" glib:nick="gesture-two-finger-swipe-right" glib:name="GTK_SHORTCUT_GESTURE_TWO_FINGER_SWIPE_RIGHT">
<doc xml:space="preserve">The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture" value="7" c:identifier="GTK_SHORTCUT_GESTURE" glib:nick="gesture" glib:name="GTK_SHORTCUT_GESTURE">
<doc xml:space="preserve">The shortcut is a gesture. The GtkShortcutsShortcut:icon property will be
used.</doc>
</member>
<member name="gesture_swipe_left" value="8" c:identifier="GTK_SHORTCUT_GESTURE_SWIPE_LEFT" glib:nick="gesture-swipe-left" glib:name="GTK_SHORTCUT_GESTURE_SWIPE_LEFT">
<doc xml:space="preserve">The shortcut is a swipe gesture. GTK provides an icon and subtitle.</doc>
</member>
<member name="gesture_swipe_right" value="9" c:identifier="GTK_SHORTCUT_GESTURE_SWIPE_RIGHT" glib:nick="gesture-swipe-right" glib:name="GTK_SHORTCUT_GESTURE_SWIPE_RIGHT">
<doc xml:space="preserve">The shortcut is a swipe gesture. GTK provides an icon and subtitle.</doc>
</member>
</enumeration>
<class name="ShortcutsGroup" c:symbol-prefix="shortcuts_group" c:type="GtkShortcutsGroup" parent="Box" glib:type-name="GtkShortcutsGroup" glib:get-type="gtk_shortcuts_group_get_type" glib:type-struct="ShortcutsGroupClass">
<doc xml:space="preserve">A `GtkShortcutsGroup` represents a group of related keyboard shortcuts
or gestures.
The group has a title. It may optionally be associated with a view
of the application, which can be used to show only relevant shortcuts
depending on the application context.
This widget is only meant to be used with [class@Gtk.ShortcutsWindow].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<property name="accel-size-group" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The size group for the accelerator portion of shortcuts in this group.
This is used internally by GTK, and must not be modified by applications.</doc>
<type name="SizeGroup"/>
</property>
<property name="height" transfer-ownership="none">
<doc xml:space="preserve">A rough measure for the number of lines in this group.
This is used internally by GTK, and is not useful for applications.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="title" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The title for this group of shortcuts.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="title-size-group" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The size group for the textual portion of shortcuts in this group.
This is used internally by GTK, and must not be modified by applications.</doc>
<type name="SizeGroup"/>
</property>
<property name="view" writable="1" transfer-ownership="none">
<doc xml:space="preserve">An optional view that the shortcuts in this group are relevant for.
The group will be hidden if the [property@Gtk.ShortcutsWindow:view-name]
property does not match the view of this group.
Set this to %NULL to make the group always visible.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="ShortcutsGroupClass" c:type="GtkShortcutsGroupClass" disguised="1" glib:is-gtype-struct-for="ShortcutsGroup"/>
<class name="ShortcutsSection" c:symbol-prefix="shortcuts_section" c:type="GtkShortcutsSection" parent="Box" glib:type-name="GtkShortcutsSection" glib:get-type="gtk_shortcuts_section_get_type" glib:type-struct="ShortcutsSectionClass">
<doc xml:space="preserve">A `GtkShortcutsSection` collects all the keyboard shortcuts and gestures
for a major application mode.
If your application needs multiple sections, you should give each
section a unique [property@Gtk.ShortcutsSection:section-name] and
a [property@Gtk.ShortcutsSection:title] that can be shown in the
section selector of the [class@Gtk.ShortcutsWindow].
The [property@Gtk.ShortcutsSection:max-height] property can be used
to influence how the groups in the section are distributed over pages
and columns.
This widget is only meant to be used with [class@Gtk.ShortcutsWindow].</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<property name="max-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The maximum number of lines to allow per column.
This property can be used to influence how the groups in this
section are distributed across pages and columns. The default
value of 15 should work in most cases.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="section-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A unique name to identify this section among the sections
added to the `GtkShortcutsWindow`.
Setting the [property@Gtk.ShortcutsWindow:section-name] property
to this string will make this section shown in the `GtkShortcutsWindow`.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="title" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The string to show in the section selector of the `GtkShortcutsWindow`
for this section.
If there is only one section, you don't need to set a title,
since the section selector will not be shown in this case.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="view-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A view name to filter the groups in this section by.
See [property@Gtk.ShortcutsGroup:view].
Applications are expected to use the
[property@Gtk.ShortcutsWindow:view-name] property
for this purpose.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="change-current-page" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="ShortcutsSectionClass" c:type="GtkShortcutsSectionClass" disguised="1" glib:is-gtype-struct-for="ShortcutsSection"/>
<class name="ShortcutsShortcut" c:symbol-prefix="shortcuts_shortcut" c:type="GtkShortcutsShortcut" parent="Widget" glib:type-name="GtkShortcutsShortcut" glib:get-type="gtk_shortcuts_shortcut_get_type" glib:type-struct="ShortcutsShortcutClass">
<doc xml:space="preserve">A `GtkShortcutsShortcut` represents a single keyboard shortcut or gesture
with a short text.
This widget is only meant to be used with `GtkShortcutsWindow`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<property name="accel-size-group" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The size group for the accelerator portion of this shortcut.
This is used internally by GTK, and must not be modified by applications.</doc>
<type name="SizeGroup"/>
</property>
<property name="accelerator" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The accelerator(s) represented by this object.
This property is used if [property@Gtk.ShortcutsShortcut:shortcut-type]
is set to %GTK_SHORTCUT_ACCELERATOR.
The syntax of this property is (an extension of) the syntax understood
by [func@Gtk.accelerator_parse]. Multiple accelerators can be specified
by separating them with a space, but keep in mind that the available width
is limited.
It is also possible to specify ranges of shortcuts, using "..." between
the keys. Sequences of keys can be specified using a "+" or "&amp;" between
the keys.
Examples:
- A single shortcut: &lt;ctl&gt;&lt;alt&gt;delete
- Two alternative shortcuts: &lt;shift&gt;a Home
- A range of shortcuts: &lt;alt&gt;1...&lt;alt&gt;9
- Several keys pressed together: Control_L&amp;Control_R
- A sequence of shortcuts or keys: &lt;ctl&gt;c+&lt;ctl&gt;x
Use "+" instead of "&amp;" when the keys may (or have to be) pressed
sequentially (e.g use "t+t" for 'press the t key twice').
Note that &lt;, &gt; and &amp; need to be escaped as &amp;lt;, &amp;gt; and &amp;amp; when used
in .ui files.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="action-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">A detailed action name.
If this is set for a shortcut of type %GTK_SHORTCUT_ACCELERATOR,
then GTK will use the accelerators that are associated with the
action via [method@Gtk.Application.set_accels_for_action], and
setting [property@Gtk.ShortcutsShortcut:accelerator] is not necessary.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="direction" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The text direction for which this shortcut is active.
If the shortcut is used regardless of the text direction,
set this property to %GTK_TEXT_DIR_NONE.</doc>
<type name="TextDirection"/>
</property>
<property name="icon" writable="1" transfer-ownership="none">
<doc xml:space="preserve">An icon to represent the shortcut or gesture.
This property is used if [property@Gtk.ShortcutsShortcut:shortcut-type]
is set to %GTK_SHORTCUT_GESTURE.
For the other predefined gesture types, GTK provides an icon on its own.</doc>
<type name="Gio.Icon"/>
</property>
<property name="icon-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if an icon has been set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="shortcut-type" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The type of shortcut that is represented.</doc>
<type name="ShortcutType"/>
</property>
<property name="subtitle" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The subtitle for the shortcut or gesture.
This is typically used for gestures and should be a short, one-line
text that describes the gesture itself. For the predefined gesture
types, GTK provides a subtitle on its own.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="subtitle-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a subtitle has been set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The textual description for the shortcut or gesture represented by
this object.
This should be a short string that can fit in a single line.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="title-size-group" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The size group for the textual portion of this shortcut.
This is used internally by GTK, and must not be modified by applications.</doc>
<type name="SizeGroup"/>
</property>
</class>
<record name="ShortcutsShortcutClass" c:type="GtkShortcutsShortcutClass" disguised="1" glib:is-gtype-struct-for="ShortcutsShortcut"/>
<class name="ShortcutsWindow" c:symbol-prefix="shortcuts_window" c:type="GtkShortcutsWindow" parent="Window" glib:type-name="GtkShortcutsWindow" glib:get-type="gtk_shortcuts_window_get_type">
<doc xml:space="preserve">A `GtkShortcutsWindow` shows information about the keyboard shortcuts
and gestures of an application.
The shortcuts can be grouped, and you can have multiple sections in this
window, corresponding to the major modes of your application.
Additionally, the shortcuts can be filtered by the current view, to avoid
showing information that is not relevant in the current application context.
The recommended way to construct a `GtkShortcutsWindow` is with
[class@Gtk.Builder], by populating a `GtkShortcutsWindow` with one or
more `GtkShortcutsSection` objects, which contain `GtkShortcutsGroups`
that in turn contain objects of class `GtkShortcutsShortcut`.
# A simple example:
![](gedit-shortcuts.png)
This example has as single section. As you can see, the shortcut groups
are arranged in columns, and spread across several pages if there are too
many to find on a single page.
The .ui file for this example can be found [here](https://gitlab.gnome.org/GNOME/gtk/tree/main/demos/gtk-demo/shortcuts-gedit.ui).
# An example with multiple views:
![](clocks-shortcuts.png)
This example shows a `GtkShortcutsWindow` that has been configured to show only
the shortcuts relevant to the "stopwatch" view.
The .ui file for this example can be found [here](https://gitlab.gnome.org/GNOME/gtk/tree/main/demos/gtk-demo/shortcuts-clocks.ui).
# An example with multiple sections:
![](builder-shortcuts.png)
This example shows a `GtkShortcutsWindow` with two sections, "Editor Shortcuts"
and "Terminal Shortcuts".
The .ui file for this example can be found [here](https://gitlab.gnome.org/GNOME/gtk/tree/main/demos/gtk-demo/shortcuts-builder.ui).</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<property name="section-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The name of the section to show.
This should be the section-name of one of the `GtkShortcutsSection`
objects that are in this shortcuts window.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="view-name" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The view name by which to filter the contents.
This should correspond to the [property@Gtk.ShortcutsGroup:view]
property of some of the [class@Gtk.ShortcutsGroup] objects that
are inside this shortcuts window.
Set this to %NULL to show all groups.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<glib:signal name="close" when="last" action="1">
<doc xml:space="preserve">Emitted when the user uses a keybinding to close the window.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is the Escape key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="search" when="last" action="1">
<doc xml:space="preserve">Emitted when the user uses a keybinding to start a search.
This is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is Control-F.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="SignalAction" c:symbol-prefix="signal_action" c:type="GtkSignalAction" parent="ShortcutAction" glib:type-name="GtkSignalAction" glib:get-type="gtk_signal_action_get_type" glib:type-struct="SignalActionClass">
<doc xml:space="preserve">A `GtkShortcut`Action that emits a signal.
Signals that are used in this way are referred to as keybinding signals,
and they are expected to be defined with the %G_SIGNAL_ACTION flag.</doc>
<constructor name="new" c:identifier="gtk_signal_action_new">
<doc xml:space="preserve">Creates an action that when activated, emits the given action signal
on the provided widget.
It will also unpack the args into arguments passed to the signal.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkShortcutAction`</doc>
<type name="SignalAction" c:type="GtkShortcutAction*"/>
</return-value>
<parameters>
<parameter name="signal_name" transfer-ownership="none">
<doc xml:space="preserve">name of the signal to emit</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_signal_name" c:identifier="gtk_signal_action_get_signal_name" glib:get-property="signal-name">
<attribute name="org.gtk.Method.get_property" value="signal-name"/>
<doc xml:space="preserve">Returns the name of the signal that will be emitted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of the signal to emit</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a signal action</doc>
<type name="SignalAction" c:type="GtkSignalAction*"/>
</instance-parameter>
</parameters>
</method>
<property name="signal-name" writable="1" construct-only="1" transfer-ownership="none" getter="get_signal_name">
<attribute name="org.gtk.Property.get" value="gtk_signal_action_get_signal_name"/>
<doc xml:space="preserve">The name of the signal to emit.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="SignalActionClass" c:type="GtkSignalActionClass" disguised="1" glib:is-gtype-struct-for="SignalAction"/>
<class name="SignalListItemFactory" c:symbol-prefix="signal_list_item_factory" c:type="GtkSignalListItemFactory" parent="ListItemFactory" glib:type-name="GtkSignalListItemFactory" glib:get-type="gtk_signal_list_item_factory_get_type" glib:type-struct="SignalListItemFactoryClass">
<doc xml:space="preserve">`GtkSignalListItemFactory` is a `GtkListItemFactory` that emits signals
to to manage listitems.
Signals are emitted for every listitem in the same order:
1. [signal@Gtk.SignalListItemFactory::setup] is emitted to set up permanent
things on the listitem. This usually means constructing the widgets used in
the row and adding them to the listitem.
2. [signal@Gtk.SignalListItemFactory::bind] is emitted to bind the item passed
via [property@Gtk.ListItem:item] to the widgets that have been created in
step 1 or to add item-specific widgets. Signals are connected to listen to
changes - both to changes in the item to update the widgets or to changes
in the widgets to update the item. After this signal has been called, the
listitem may be shown in a list widget.
3. [signal@Gtk.SignalListItemFactory::unbind] is emitted to undo everything
done in step 2. Usually this means disconnecting signal handlers. Once this
signal has been called, the listitem will no longer be used in a list
widget.
4. [signal@Gtk.SignalListItemFactory::bind] and
[signal@Gtk.SignalListItemFactory::unbind] may be emitted multiple times
again to bind the listitem for use with new items. By reusing listitems,
potentially costly setup can be avoided. However, it means code needs to
make sure to properly clean up the listitem in step 3 so that no information
from the previous use leaks into the next use.
5. [signal@Gtk.SignalListItemFactory::teardown] is emitted to allow undoing
the effects of [signal@Gtk.SignalListItemFactory::setup]. After this signal
was emitted on a listitem, the listitem will be destroyed and not be used again.
Note that during the signal emissions, changing properties on the
`GtkListItem`s passed will not trigger notify signals as the listitem's
notifications are frozen. See g_object_freeze_notify() for details.
For tracking changes in other properties in the `GtkListItem`, the
::notify signal is recommended. The signal can be connected in the
[signal@Gtk.SignalListItemFactory::setup] signal and removed again during
[signal@Gtk.SignalListItemFactory::teardown].</doc>
<constructor name="new" c:identifier="gtk_signal_list_item_factory_new">
<doc xml:space="preserve">Creates a new `GtkSignalListItemFactory`.
You need to connect signal handlers before you use it.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkSignalListItemFactory`</doc>
<type name="ListItemFactory" c:type="GtkListItemFactory*"/>
</return-value>
</constructor>
<glib:signal name="bind" when="first">
<doc xml:space="preserve">Emitted when a new [property@Gtk.ListItem:item] has been set
on the @listitem and should be bound for use.
After this signal was emitted, the listitem might be shown in
a [class@Gtk.ListView] or other list widget.
The [signal@Gtk.SignalListItemFactory::unbind] signal is the
opposite of this signal and can be used to undo everything done
in this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="listitem" transfer-ownership="none">
<doc xml:space="preserve">The `GtkListItem` to bind</doc>
<type name="ListItem"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="setup" when="first">
<doc xml:space="preserve">Emitted when a new listitem has been created and needs to be setup for use.
It is the first signal emitted for every listitem.
The [signal@Gtk.SignalListItemFactory::teardown] signal is the opposite
of this signal and can be used to undo everything done in this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="listitem" transfer-ownership="none">
<doc xml:space="preserve">The `GtkListItem` to set up</doc>
<type name="ListItem"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="teardown" when="first">
<doc xml:space="preserve">Emitted when a listitem is about to be destroyed.
It is the last signal ever emitted for this @listitem.
This signal is the opposite of the [signal@Gtk.SignalListItemFactory::setup]
signal and should be used to undo everything done in that signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="listitem" transfer-ownership="none">
<doc xml:space="preserve">The `GtkListItem` to teardown</doc>
<type name="ListItem"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="unbind" when="first">
<doc xml:space="preserve">Emitted when a listitem has been removed from use in a list widget
and its new [property@Gtk.ListItem:item] is about to be unset.
This signal is the opposite of the [signal@Gtk.SignalListItemFactory::bind]
signal and should be used to undo everything done in that signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="listitem" transfer-ownership="none">
<doc xml:space="preserve">The `GtkListItem` to unbind</doc>
<type name="ListItem"/>
</parameter>
</parameters>
</glib:signal>
</class>
<record name="SignalListItemFactoryClass" c:type="GtkSignalListItemFactoryClass" disguised="1" glib:is-gtype-struct-for="SignalListItemFactory"/>
<class name="SingleSelection" c:symbol-prefix="single_selection" c:type="GtkSingleSelection" parent="GObject.Object" glib:type-name="GtkSingleSelection" glib:get-type="gtk_single_selection_get_type" glib:type-struct="SingleSelectionClass">
<doc xml:space="preserve">`GtkSingleSelection` is a `GtkSelectionModel` that allows selecting a single
item.
Note that the selection is *persistent* -- if the selected item is removed
and re-added in the same ::items-changed emission, it stays selected.
In particular, this means that changing the sort order of an underlying sort
model will preserve the selection.</doc>
<implements name="Gio.ListModel"/>
<implements name="SelectionModel"/>
<constructor name="new" c:identifier="gtk_single_selection_new">
<doc xml:space="preserve">Creates a new selection to handle @model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GListModel` to manage</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</constructor>
<method name="get_autoselect" c:identifier="gtk_single_selection_get_autoselect" glib:get-property="autoselect">
<attribute name="org.gtk.Method.get_property" value="autoselect"/>
<doc xml:space="preserve">Checks if autoselect has been enabled or disabled via
gtk_single_selection_set_autoselect().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if autoselect is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_can_unselect" c:identifier="gtk_single_selection_get_can_unselect" glib:get-property="can-unselect">
<attribute name="org.gtk.Method.get_property" value="can-unselect"/>
<doc xml:space="preserve">If %TRUE, gtk_selection_model_unselect_item() is supported and allows
unselecting the selected item.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to support unselecting</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_single_selection_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that @self is wrapping.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model being wrapped</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected" c:identifier="gtk_single_selection_get_selected" glib:get-property="selected">
<attribute name="org.gtk.Method.get_property" value="selected"/>
<doc xml:space="preserve">Gets the position of the selected item.
If no item is selected, %GTK_INVALID_LIST_POSITION is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The position of the selected item</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected_item" c:identifier="gtk_single_selection_get_selected_item" glib:get-property="selected-item">
<attribute name="org.gtk.Method.get_property" value="selected-item"/>
<doc xml:space="preserve">Gets the selected item.
If no item is selected, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The selected item</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_autoselect" c:identifier="gtk_single_selection_set_autoselect" glib:set-property="autoselect">
<attribute name="org.gtk.Method.set_property" value="autoselect"/>
<doc xml:space="preserve">Enables or disables autoselect.
If @autoselect is %TRUE, @self will enforce that an item is always
selected. It will select a new item when the currently selected
item is deleted and it will disallow unselecting the current item.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
<parameter name="autoselect" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to always select an item</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_can_unselect" c:identifier="gtk_single_selection_set_can_unselect" glib:set-property="can-unselect">
<attribute name="org.gtk.Method.set_property" value="can-unselect"/>
<doc xml:space="preserve">If %TRUE, unselecting the current item via
gtk_selection_model_unselect_item() is supported.
Note that setting [property@Gtk.SingleSelection:autoselect] will
cause unselecting to not work, so it practically makes no sense
to set both at the same time the same time.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
<parameter name="can_unselect" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to allow unselecting</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_single_selection_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model that @self should wrap.
If @model is %NULL, @self will be empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GListModel` to wrap</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<method name="set_selected" c:identifier="gtk_single_selection_set_selected" glib:set-property="selected">
<attribute name="org.gtk.Method.set_property" value="selected"/>
<doc xml:space="preserve">Selects the item at the given position.
If the list does not have an item at @position or
%GTK_INVALID_LIST_POSITION is given, the behavior depends on the
value of the [property@Gtk.SingleSelection:autoselect] property:
If it is set, no change will occur and the old item will stay
selected. If it is unset, the selection will be unset and no item
will be selected.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSingleSelection`</doc>
<type name="SingleSelection" c:type="GtkSingleSelection*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the item to select or %GTK_INVALID_LIST_POSITION</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="autoselect" writable="1" transfer-ownership="none" setter="set_autoselect" getter="get_autoselect">
<attribute name="org.gtk.Property.get" value="gtk_single_selection_get_autoselect"/>
<attribute name="org.gtk.Property.set" value="gtk_single_selection_set_autoselect"/>
<doc xml:space="preserve">If the selection will always select an item.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="can-unselect" writable="1" transfer-ownership="none" setter="set_can_unselect" getter="get_can_unselect">
<attribute name="org.gtk.Property.get" value="gtk_single_selection_get_can_unselect"/>
<attribute name="org.gtk.Property.set" value="gtk_single_selection_set_can_unselect"/>
<doc xml:space="preserve">If unselecting the selected item is allowed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_single_selection_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_single_selection_set_model"/>
<doc xml:space="preserve">The model being managed.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="selected" writable="1" transfer-ownership="none" setter="set_selected" getter="get_selected">
<attribute name="org.gtk.Property.get" value="gtk_single_selection_get_selected"/>
<attribute name="org.gtk.Property.set" value="gtk_single_selection_set_selected"/>
<doc xml:space="preserve">Position of the selected item.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="selected-item" transfer-ownership="none" getter="get_selected_item">
<attribute name="org.gtk.Property.get" value="gtk_single_selection_get_selected_item"/>
<doc xml:space="preserve">The selected item.</doc>
<type name="GObject.Object"/>
</property>
</class>
<record name="SingleSelectionClass" c:type="GtkSingleSelectionClass" glib:is-gtype-struct-for="SingleSelection">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="SizeGroup" c:symbol-prefix="size_group" c:type="GtkSizeGroup" parent="GObject.Object" glib:type-name="GtkSizeGroup" glib:get-type="gtk_size_group_get_type">
<doc xml:space="preserve">`GtkSizeGroup` groups widgets together so they all request the same size.
This is typically useful when you want a column of widgets to have the
same size, but you can&#x2019;t use a `GtkGrid`.
In detail, the size requested for each widget in a `GtkSizeGroup` is
the maximum of the sizes that would have been requested for each
widget in the size group if they were not in the size group. The mode
of the size group (see [method@Gtk.SizeGroup.set_mode]) determines whether
this applies to the horizontal size, the vertical size, or both sizes.
Note that size groups only affect the amount of space requested, not
the size that the widgets finally receive. If you want the widgets in
a `GtkSizeGroup` to actually be the same size, you need to pack them in
such a way that they get the size they request and not more.
`GtkSizeGroup` objects are referenced by each widget in the size group,
so once you have added all widgets to a `GtkSizeGroup`, you can drop
the initial reference to the size group with g_object_unref(). If the
widgets in the size group are subsequently destroyed, then they will
be removed from the size group and drop their references on the size
group; when all widgets have been removed, the size group will be
freed.
Widgets can be part of multiple size groups; GTK will compute the
horizontal size of a widget from the horizontal requisition of all
widgets that can be reached from the widget by a chain of size groups
of type %GTK_SIZE_GROUP_HORIZONTAL or %GTK_SIZE_GROUP_BOTH, and the
vertical size from the vertical requisition of all widgets that can be
reached from the widget by a chain of size groups of type
%GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH.
Note that only non-contextual sizes of every widget are ever consulted
by size groups (since size groups have no knowledge of what size a widget
will be allocated in one dimension, it cannot derive how much height
a widget will receive for a given width). When grouping widgets that
trade height for width in mode %GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH:
the height for the minimum width will be the requested height for all
widgets in the group. The same is of course true when horizontally grouping
width for height widgets.
Widgets that trade height-for-width should set a reasonably large minimum
width by way of [property@Gtk.Label:width-chars] for instance. Widgets with
static sizes as well as widgets that grow (such as ellipsizing text) need no
such considerations.
# GtkSizeGroup as GtkBuildable
Size groups can be specified in a UI definition by placing an &lt;object&gt;
element with `class="GtkSizeGroup"` somewhere in the UI definition. The
widgets that belong to the size group are specified by a &lt;widgets&gt; element
that may contain multiple &lt;widget&gt; elements, one for each member of the
size group. The &#x201D;name&#x201D; attribute gives the id of the widget.
An example of a UI definition fragment with `GtkSizeGroup`:
```xml
&lt;object class="GtkSizeGroup"&gt;
&lt;property name="mode"&gt;horizontal&lt;/property&gt;
&lt;widgets&gt;
&lt;widget name="radio1"/&gt;
&lt;widget name="radio2"/&gt;
&lt;/widgets&gt;
&lt;/object&gt;
```</doc>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_size_group_new">
<doc xml:space="preserve">Create a new `GtkSizeGroup`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</return-value>
<parameters>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">the mode for the new size group.</doc>
<type name="SizeGroupMode" c:type="GtkSizeGroupMode"/>
</parameter>
</parameters>
</constructor>
<method name="add_widget" c:identifier="gtk_size_group_add_widget">
<doc xml:space="preserve">Adds a widget to a `GtkSizeGroup`.
In the future, the requisition
of the widget will be determined as the maximum of its requisition
and the requisition of the other widgets in the size group.
Whether this applies horizontally, vertically, or in both directions
depends on the mode of the size group.
See [method@Gtk.SizeGroup.set_mode].
When the widget is destroyed or no longer referenced elsewhere, it
will be removed from the size group.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_mode" c:identifier="gtk_size_group_get_mode" glib:get-property="mode">
<attribute name="org.gtk.Method.get_property" value="mode"/>
<doc xml:space="preserve">Gets the current mode of the size group.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current mode of the size group.</doc>
<type name="SizeGroupMode" c:type="GtkSizeGroupMode"/>
</return-value>
<parameters>
<instance-parameter name="size_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widgets" c:identifier="gtk_size_group_get_widgets">
<doc xml:space="preserve">Returns the list of widgets associated with @size_group.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GSList` of
widgets. The list is owned by GTK and should not be modified.</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="Widget"/>
</type>
</return-value>
<parameters>
<instance-parameter name="size_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_widget" c:identifier="gtk_size_group_remove_widget">
<doc xml:space="preserve">Removes a widget from a `GtkSizeGroup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_mode" c:identifier="gtk_size_group_set_mode" glib:set-property="mode">
<attribute name="org.gtk.Method.set_property" value="mode"/>
<doc xml:space="preserve">Sets the `GtkSizeGroupMode` of the size group.
The mode of the size group determines whether the widgets in the
size group should all have the same horizontal requisition
(%GTK_SIZE_GROUP_HORIZONTAL) all have the same vertical requisition
(%GTK_SIZE_GROUP_VERTICAL), or should all have the same requisition
in both directions (%GTK_SIZE_GROUP_BOTH).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="size_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSizeGroup`</doc>
<type name="SizeGroup" c:type="GtkSizeGroup*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">the mode to set for the size group.</doc>
<type name="SizeGroupMode" c:type="GtkSizeGroupMode"/>
</parameter>
</parameters>
</method>
<property name="mode" writable="1" transfer-ownership="none" setter="set_mode" getter="get_mode">
<attribute name="org.gtk.Property.get" value="gtk_size_group_get_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_size_group_set_mode"/>
<doc xml:space="preserve">The direction in which the size group affects requested sizes.</doc>
<type name="SizeGroupMode"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<enumeration name="SizeGroupMode" glib:type-name="GtkSizeGroupMode" glib:get-type="gtk_size_group_mode_get_type" c:type="GtkSizeGroupMode">
<doc xml:space="preserve">The mode of the size group determines the directions in which the size
group affects the requested sizes of its component widgets.</doc>
<member name="none" value="0" c:identifier="GTK_SIZE_GROUP_NONE" glib:nick="none" glib:name="GTK_SIZE_GROUP_NONE">
<doc xml:space="preserve">group has no effect</doc>
</member>
<member name="horizontal" value="1" c:identifier="GTK_SIZE_GROUP_HORIZONTAL" glib:nick="horizontal" glib:name="GTK_SIZE_GROUP_HORIZONTAL">
<doc xml:space="preserve">group affects horizontal requisition</doc>
</member>
<member name="vertical" value="2" c:identifier="GTK_SIZE_GROUP_VERTICAL" glib:nick="vertical" glib:name="GTK_SIZE_GROUP_VERTICAL">
<doc xml:space="preserve">group affects vertical requisition</doc>
</member>
<member name="both" value="3" c:identifier="GTK_SIZE_GROUP_BOTH" glib:nick="both" glib:name="GTK_SIZE_GROUP_BOTH">
<doc xml:space="preserve">group affects both horizontal and vertical requisition</doc>
</member>
</enumeration>
<enumeration name="SizeRequestMode" glib:type-name="GtkSizeRequestMode" glib:get-type="gtk_size_request_mode_get_type" c:type="GtkSizeRequestMode">
<doc xml:space="preserve">Specifies a preference for height-for-width or
width-for-height geometry management.</doc>
<member name="height_for_width" value="0" c:identifier="GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH" glib:nick="height-for-width" glib:name="GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH">
<doc xml:space="preserve">Prefer height-for-width geometry management</doc>
</member>
<member name="width_for_height" value="1" c:identifier="GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT" glib:nick="width-for-height" glib:name="GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT">
<doc xml:space="preserve">Prefer width-for-height geometry management</doc>
</member>
<member name="constant_size" value="2" c:identifier="GTK_SIZE_REQUEST_CONSTANT_SIZE" glib:nick="constant-size" glib:name="GTK_SIZE_REQUEST_CONSTANT_SIZE">
<doc xml:space="preserve">Don&#x2019;t trade height-for-width or width-for-height</doc>
</member>
</enumeration>
<class name="SliceListModel" c:symbol-prefix="slice_list_model" c:type="GtkSliceListModel" parent="GObject.Object" glib:type-name="GtkSliceListModel" glib:get-type="gtk_slice_list_model_get_type" glib:type-struct="SliceListModelClass">
<doc xml:space="preserve">`GtkSliceListModel` is a list model that presents a slice of another model.
This is useful when implementing paging by setting the size to the number
of elements per page and updating the offset whenever a different page is
opened.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_slice_list_model_new">
<doc xml:space="preserve">Creates a new slice model.
It presents the slice from @offset to offset + @size
of the given @model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to use</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">the offset of the slice</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">maximum size of the slice</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</constructor>
<method name="get_model" c:identifier="gtk_slice_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model that is currently being used or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model in use</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_offset" c:identifier="gtk_slice_list_model_get_offset" glib:get-property="offset">
<attribute name="org.gtk.Method.get_property" value="offset"/>
<doc xml:space="preserve">Gets the offset set via gtk_slice_list_model_set_offset().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The offset</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_size" c:identifier="gtk_slice_list_model_get_size" glib:get-property="size">
<attribute name="org.gtk.Method.get_property" value="size"/>
<doc xml:space="preserve">Gets the size set via gtk_slice_list_model_set_size().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The size</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_slice_list_model_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to show a slice of.
The model's item type must conform to @self's item type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to be sliced</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<method name="set_offset" c:identifier="gtk_slice_list_model_set_offset" glib:set-property="offset">
<attribute name="org.gtk.Method.set_property" value="offset"/>
<doc xml:space="preserve">Sets the offset into the original model for this slice.
If the offset is too large for the sliced model,
@self will end up empty.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
<parameter name="offset" transfer-ownership="none">
<doc xml:space="preserve">the new offset to use</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_size" c:identifier="gtk_slice_list_model_set_size" glib:set-property="size">
<attribute name="org.gtk.Method.set_property" value="size"/>
<doc xml:space="preserve">Sets the maximum size. @self will never have more items
than @size.
It can however have fewer items if the offset is too large
or the model sliced from doesn't have enough items.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSliceListModel`</doc>
<type name="SliceListModel" c:type="GtkSliceListModel*"/>
</instance-parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">the maximum size</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_slice_list_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_slice_list_model_set_model"/>
<doc xml:space="preserve">Child model to take slice from.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="offset" writable="1" transfer-ownership="none" setter="set_offset" getter="get_offset">
<attribute name="org.gtk.Property.get" value="gtk_slice_list_model_get_offset"/>
<attribute name="org.gtk.Property.set" value="gtk_slice_list_model_set_offset"/>
<doc xml:space="preserve">Offset of slice.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="size" writable="1" transfer-ownership="none" setter="set_size" getter="get_size">
<attribute name="org.gtk.Property.get" value="gtk_slice_list_model_get_size"/>
<attribute name="org.gtk.Property.set" value="gtk_slice_list_model_set_size"/>
<doc xml:space="preserve">Maximum size of slice.</doc>
<type name="guint" c:type="guint"/>
</property>
</class>
<record name="SliceListModelClass" c:type="GtkSliceListModelClass" glib:is-gtype-struct-for="SliceListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="Snapshot" c:symbol-prefix="snapshot" parent="Gdk.Snapshot" glib:type-name="GtkSnapshot" glib:get-type="gtk_snapshot_get_type" glib:type-struct="SnapshotClass">
<doc xml:space="preserve">`GtkSnapshot` assists in creating [class@Gsk.RenderNode]s for widgets.
It functions in a similar way to a cairo context, and maintains a stack
of render nodes and their associated transformations.
The node at the top of the stack is the one that `gtk_snapshot_append_&#x2026;()`
functions operate on. Use the `gtk_snapshot_push_&#x2026;()` functions and
[method@Snapshot.pop] to change the current node.
The typical way to obtain a `GtkSnapshot` object is as an argument to
the [vfunc@Gtk.Widget.snapshot] vfunc. If you need to create your own
`GtkSnapshot`, use [ctor@Gtk.Snapshot.new].</doc>
<constructor name="new" c:identifier="gtk_snapshot_new">
<doc xml:space="preserve">Creates a new `GtkSnapshot`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</return-value>
</constructor>
<method name="append_border" c:identifier="gtk_snapshot_append_border">
<doc xml:space="preserve">Appends a stroked border rectangle inside the given @outline.
The four sides of the border can have different widths and colors.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="outline" transfer-ownership="none">
<doc xml:space="preserve">the outline of the border</doc>
<type name="Gsk.RoundedRect" c:type="const GskRoundedRect*"/>
</parameter>
<parameter name="border_width" transfer-ownership="none">
<doc xml:space="preserve">the stroke width of the border on
the top, right, bottom and left side respectively.</doc>
<array zero-terminated="0" c:type="const float*" fixed-size="4">
<type name="gfloat" c:type="float"/>
</array>
</parameter>
<parameter name="border_color" transfer-ownership="none">
<doc xml:space="preserve">the color used on the top, right,
bottom and left side.</doc>
<array zero-terminated="0" c:type="const GdkRGBA*" fixed-size="4">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
</parameters>
</method>
<method name="append_cairo" c:identifier="gtk_snapshot_append_cairo">
<doc xml:space="preserve">Creates a new [class@Gsk.CairoNode] and appends it to the current
render node of @snapshot, without changing the current node.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `cairo_t` suitable for drawing the contents of
the newly created render node</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the bounds for the new node</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="append_color" c:identifier="gtk_snapshot_append_color">
<doc xml:space="preserve">Creates a new render node drawing the @color into the
given @bounds and appends it to the current render node
of @snapshot.
You should try to avoid calling this function if
@color is transparent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">the color to draw</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the bounds for the new node</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="append_conic_gradient" c:identifier="gtk_snapshot_append_conic_gradient">
<doc xml:space="preserve">Appends a conic gradient node with the given stops to @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render the gradient into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="center" transfer-ownership="none">
<doc xml:space="preserve">the center point of the conic gradient</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="rotation" transfer-ownership="none">
<doc xml:space="preserve">the clockwise rotation in degrees of the starting angle.
0 means the starting angle is the top.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="stops" transfer-ownership="none">
<doc xml:space="preserve">the color stops defining the gradient</doc>
<array length="4" zero-terminated="0" c:type="const GskColorStop*">
<type name="Gsk.ColorStop" c:type="GskColorStop"/>
</array>
</parameter>
<parameter name="n_stops" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @stops</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="append_inset_shadow" c:identifier="gtk_snapshot_append_inset_shadow">
<doc xml:space="preserve">Appends an inset shadow into the box given by @outline.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="outline" transfer-ownership="none">
<doc xml:space="preserve">outline of the region surrounded by shadow</doc>
<type name="Gsk.RoundedRect" c:type="const GskRoundedRect*"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">color of the shadow</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
<parameter name="dx" transfer-ownership="none">
<doc xml:space="preserve">horizontal offset of shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="dy" transfer-ownership="none">
<doc xml:space="preserve">vertical offset of shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="spread" transfer-ownership="none">
<doc xml:space="preserve">how far the shadow spreads towards the inside</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="blur_radius" transfer-ownership="none">
<doc xml:space="preserve">how much blur to apply to the shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="append_layout" c:identifier="gtk_snapshot_append_layout">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="layout" transfer-ownership="none">
<type name="Pango.Layout" c:type="PangoLayout*"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
</parameters>
</method>
<method name="append_linear_gradient" c:identifier="gtk_snapshot_append_linear_gradient">
<doc xml:space="preserve">Appends a linear gradient node with the given stops to @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render the linear gradient into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="start_point" transfer-ownership="none">
<doc xml:space="preserve">the point at which the linear gradient will begin</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="end_point" transfer-ownership="none">
<doc xml:space="preserve">the point at which the linear gradient will finish</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="stops" transfer-ownership="none">
<doc xml:space="preserve">the color stops defining the gradient</doc>
<array length="4" zero-terminated="0" c:type="const GskColorStop*">
<type name="Gsk.ColorStop" c:type="GskColorStop"/>
</array>
</parameter>
<parameter name="n_stops" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @stops</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="append_node" c:identifier="gtk_snapshot_append_node">
<doc xml:space="preserve">Appends @node to the current render node of @snapshot,
without changing the current node.
If @snapshot does not have a current node yet, @node
will become the initial node.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="node" transfer-ownership="none">
<doc xml:space="preserve">a `GskRenderNode`</doc>
<type name="Gsk.RenderNode" c:type="GskRenderNode*"/>
</parameter>
</parameters>
</method>
<method name="append_outset_shadow" c:identifier="gtk_snapshot_append_outset_shadow">
<doc xml:space="preserve">Appends an outset shadow node around the box given by @outline.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="outline" transfer-ownership="none">
<doc xml:space="preserve">outline of the region surrounded by shadow</doc>
<type name="Gsk.RoundedRect" c:type="const GskRoundedRect*"/>
</parameter>
<parameter name="color" transfer-ownership="none">
<doc xml:space="preserve">color of the shadow</doc>
<type name="Gdk.RGBA" c:type="const GdkRGBA*"/>
</parameter>
<parameter name="dx" transfer-ownership="none">
<doc xml:space="preserve">horizontal offset of shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="dy" transfer-ownership="none">
<doc xml:space="preserve">vertical offset of shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="spread" transfer-ownership="none">
<doc xml:space="preserve">how far the shadow spreads towards the outside</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="blur_radius" transfer-ownership="none">
<doc xml:space="preserve">how much blur to apply to the shadow</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="append_radial_gradient" c:identifier="gtk_snapshot_append_radial_gradient">
<doc xml:space="preserve">Appends a radial gradient node with the given stops to @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render the readial gradient into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="center" transfer-ownership="none">
<doc xml:space="preserve">the center point for the radial gradient</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="hradius" transfer-ownership="none">
<doc xml:space="preserve">the horizontal radius</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="vradius" transfer-ownership="none">
<doc xml:space="preserve">the vertical radius</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">the start position (on the horizontal axis)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">the end position (on the horizontal axis)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="stops" transfer-ownership="none">
<doc xml:space="preserve">the color stops defining the gradient</doc>
<array length="7" zero-terminated="0" c:type="const GskColorStop*">
<type name="Gsk.ColorStop" c:type="GskColorStop"/>
</array>
</parameter>
<parameter name="n_stops" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @stops</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="append_repeating_linear_gradient" c:identifier="gtk_snapshot_append_repeating_linear_gradient">
<doc xml:space="preserve">Appends a repeating linear gradient node with the given stops to @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render the linear gradient into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="start_point" transfer-ownership="none">
<doc xml:space="preserve">the point at which the linear gradient will begin</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="end_point" transfer-ownership="none">
<doc xml:space="preserve">the point at which the linear gradient will finish</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="stops" transfer-ownership="none">
<doc xml:space="preserve">the color stops defining the gradient</doc>
<array length="4" zero-terminated="0" c:type="const GskColorStop*">
<type name="Gsk.ColorStop" c:type="GskColorStop"/>
</array>
</parameter>
<parameter name="n_stops" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @stops</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="append_repeating_radial_gradient" c:identifier="gtk_snapshot_append_repeating_radial_gradient">
<doc xml:space="preserve">Appends a repeating radial gradient node with the given stops to @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render the readial gradient into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="center" transfer-ownership="none">
<doc xml:space="preserve">the center point for the radial gradient</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="hradius" transfer-ownership="none">
<doc xml:space="preserve">the horizontal radius</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="vradius" transfer-ownership="none">
<doc xml:space="preserve">the vertical radius</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">the start position (on the horizontal axis)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">the end position (on the horizontal axis)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="stops" transfer-ownership="none">
<doc xml:space="preserve">the color stops defining the gradient</doc>
<array length="7" zero-terminated="0" c:type="const GskColorStop*">
<type name="Gsk.ColorStop" c:type="GskColorStop"/>
</array>
</parameter>
<parameter name="n_stops" transfer-ownership="none">
<doc xml:space="preserve">the number of elements in @stops</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="append_texture" c:identifier="gtk_snapshot_append_texture">
<doc xml:space="preserve">Creates a new render node drawing the @texture
into the given @bounds and appends it to the
current render node of @snapshot.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="texture" transfer-ownership="none">
<doc xml:space="preserve">the texture to render</doc>
<type name="Gdk.Texture" c:type="GdkTexture*"/>
</parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the bounds for the new node</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="free_to_node" c:identifier="gtk_snapshot_free_to_node" introspectable="0">
<doc xml:space="preserve">Returns the node that was constructed by @snapshot
and frees @snapshot.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly-created [class@Gsk.RenderNode]</doc>
<type name="Gsk.RenderNode" c:type="GskRenderNode*"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="full">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="free_to_paintable" c:identifier="gtk_snapshot_free_to_paintable" introspectable="0">
<doc xml:space="preserve">Returns a paintable for the node that was
constructed by @snapshot and frees @snapshot.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly-created [iface@Gdk.Paintable]</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="full">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="size" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The size of the resulting paintable
or %NULL to use the bounds of the snapshot</doc>
<type name="Graphene.Size" c:type="const graphene_size_t*"/>
</parameter>
</parameters>
</method>
<method name="gl_shader_pop_texture" c:identifier="gtk_snapshot_gl_shader_pop_texture">
<doc xml:space="preserve">Removes the top element from the stack of render nodes and
adds it to the nearest [class@Gsk.GLShaderNode] below it.
This must be called the same number of times as the number
of textures is needed for the shader in
[method@Gtk.Snapshot.push_gl_shader].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="perspective" c:identifier="gtk_snapshot_perspective">
<doc xml:space="preserve">Applies a perspective projection transform.
See [method@Gsk.Transform.perspective] for a discussion on the details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="depth" transfer-ownership="none">
<doc xml:space="preserve">distance of the z=0 plane</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="pop" c:identifier="gtk_snapshot_pop">
<doc xml:space="preserve">Removes the top element from the stack of render nodes,
and appends it to the node underneath it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="push_blend" c:identifier="gtk_snapshot_push_blend">
<doc xml:space="preserve">Blends together two images with the given blend mode.
Until the first call to [method@Gtk.Snapshot.pop], the
bottom image for the blend operation will be recorded.
After that call, the top image to be blended will be
recorded until the second call to [method@Gtk.Snapshot.pop].
Calling this function requires two subsequent calls
to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="blend_mode" transfer-ownership="none">
<doc xml:space="preserve">blend mode to use</doc>
<type name="Gsk.BlendMode" c:type="GskBlendMode"/>
</parameter>
</parameters>
</method>
<method name="push_blur" c:identifier="gtk_snapshot_push_blur">
<doc xml:space="preserve">Blurs an image.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="radius" transfer-ownership="none">
<doc xml:space="preserve">the blur radius to use. Must be positive</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="push_clip" c:identifier="gtk_snapshot_push_clip">
<doc xml:space="preserve">Clips an image to a rectangle.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to clip to</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="push_color_matrix" c:identifier="gtk_snapshot_push_color_matrix">
<doc xml:space="preserve">Modifies the colors of an image by applying an affine transformation
in RGB space.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="color_matrix" transfer-ownership="none">
<doc xml:space="preserve">the color matrix to use</doc>
<type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/>
</parameter>
<parameter name="color_offset" transfer-ownership="none">
<doc xml:space="preserve">the color offset to use</doc>
<type name="Graphene.Vec4" c:type="const graphene_vec4_t*"/>
</parameter>
</parameters>
</method>
<method name="push_cross_fade" c:identifier="gtk_snapshot_push_cross_fade">
<doc xml:space="preserve">Snapshots a cross-fade operation between two images with the
given @progress.
Until the first call to [method@Gtk.Snapshot.pop], the start image
will be snapshot. After that call, the end image will be recorded
until the second call to [method@Gtk.Snapshot.pop].
Calling this function requires two subsequent calls
to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="progress" transfer-ownership="none">
<doc xml:space="preserve">progress between 0.0 and 1.0</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="push_debug" c:identifier="gtk_snapshot_push_debug" introspectable="0">
<doc xml:space="preserve">Inserts a debug node with a message.
Debug nodes don't affect the rendering at all, but can be
helpful in identifying parts of a render node tree dump,
for example in the GTK inspector.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="message" transfer-ownership="none">
<doc xml:space="preserve">a printf-style format string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments for @message</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="push_gl_shader" c:identifier="gtk_snapshot_push_gl_shader">
<doc xml:space="preserve">Push a [class@Gsk.GLShaderNode].
The node uses the given [class@Gsk.GLShader] and uniform values
Additionally this takes a list of @n_children other nodes
which will be passed to the [class@Gsk.GLShaderNode].
The @take_args argument is a block of data to use for uniform
arguments, as per types and offsets defined by the @shader.
Normally this is generated by [method@Gsk.GLShader.format_args]
or [struct@Gsk.ShaderArgsBuilder].
The snapshotter takes ownership of @take_args, so the caller should
not free it after this.
If the renderer doesn't support GL shaders, or if there is any
problem when compiling the shader, then the node will draw pink.
You should use [method@Gsk.GLShader.compile] to ensure the @shader
will work for the renderer before using it.
If the shader requires textures (see [method@Gsk.GLShader.get_n_textures]),
then it is expected that you call [method@Gtk.Snapshot.gl_shader_pop_texture]
the number of times that are required. Each of these calls will generate
a node that is added as a child to the `GskGLShaderNode`, which in turn
will render these offscreen and pass as a texture to the shader.
Once all textures (if any) are pop:ed, you must call the regular
[method@Gtk.Snapshot.pop].
If you want to use pre-existing textures as input to the shader rather
than rendering new ones, use [method@Gtk.Snapshot.append_texture] to
push a texture node. These will be used directly rather than being
re-rendered.
For details on how to write shaders, see [class@Gsk.GLShader].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="shader" transfer-ownership="none">
<doc xml:space="preserve">The code to run</doc>
<type name="Gsk.GLShader" c:type="GskGLShader*"/>
</parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rectangle to render into</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="take_args" transfer-ownership="full">
<doc xml:space="preserve">Data block with arguments for the shader.</doc>
<type name="GLib.Bytes" c:type="GBytes*"/>
</parameter>
</parameters>
</method>
<method name="push_opacity" c:identifier="gtk_snapshot_push_opacity">
<doc xml:space="preserve">Modifies the opacity of an image.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="opacity" transfer-ownership="none">
<doc xml:space="preserve">the opacity to use</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="push_repeat" c:identifier="gtk_snapshot_push_repeat">
<doc xml:space="preserve">Creates a node that repeats the child node.
The child is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the bounds within which to repeat</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
<parameter name="child_bounds" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the bounds of the child or %NULL
to use the full size of the collected child node</doc>
<type name="Graphene.Rect" c:type="const graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="push_rounded_clip" c:identifier="gtk_snapshot_push_rounded_clip">
<doc xml:space="preserve">Clips an image to a rounded rectangle.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="bounds" transfer-ownership="none">
<doc xml:space="preserve">the rounded rectangle to clip to</doc>
<type name="Gsk.RoundedRect" c:type="const GskRoundedRect*"/>
</parameter>
</parameters>
</method>
<method name="push_shadow" c:identifier="gtk_snapshot_push_shadow">
<doc xml:space="preserve">Applies a shadow to an image.
The image is recorded until the next call to [method@Gtk.Snapshot.pop].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="shadow" transfer-ownership="none">
<doc xml:space="preserve">the first shadow specification</doc>
<array length="1" zero-terminated="0" c:type="const GskShadow*">
<type name="Gsk.Shadow" c:type="GskShadow"/>
</array>
</parameter>
<parameter name="n_shadows" transfer-ownership="none">
<doc xml:space="preserve">number of shadow specifications</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
<method name="render_background" c:identifier="gtk_snapshot_render_background">
<doc xml:space="preserve">Creates a render node for the CSS background according to @context,
and appends it to the current node of @snapshot, without changing
the current node.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the style context that defines the background</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="render_focus" c:identifier="gtk_snapshot_render_focus">
<doc xml:space="preserve">Creates a render node for the focus outline according to @context,
and appends it to the current node of @snapshot, without changing
the current node.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the style context that defines the focus ring</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="render_frame" c:identifier="gtk_snapshot_render_frame">
<doc xml:space="preserve">Creates a render node for the CSS border according to @context,
and appends it to the current node of @snapshot, without changing
the current node.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the style context that defines the frame</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="render_insertion_cursor" c:identifier="gtk_snapshot_render_insertion_cursor">
<doc xml:space="preserve">Draws a text caret using @snapshot at the specified index of @layout.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">snapshot to render to</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">the `PangoLayout` of the text</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</parameter>
<parameter name="index" transfer-ownership="none">
<doc xml:space="preserve">the index in the `PangoLayout`</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the `PangoDirection` of the text</doc>
<type name="Pango.Direction" c:type="PangoDirection"/>
</parameter>
</parameters>
</method>
<method name="render_layout" c:identifier="gtk_snapshot_render_layout">
<doc xml:space="preserve">Creates a render node for rendering @layout according to the style
information in @context, and appends it to the current node of @snapshot,
without changing the current node.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">the style context that defines the text</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">the `PangoLayout` to render</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</parameter>
</parameters>
</method>
<method name="restore" c:identifier="gtk_snapshot_restore">
<doc xml:space="preserve">Restores @snapshot to the state saved by a preceding call to
[method@Snapshot.save] and removes that state from the stack of
saved states.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="rotate" c:identifier="gtk_snapshot_rotate">
<doc xml:space="preserve">Rotates @@snapshot's coordinate system by @angle degrees in 2D space -
or in 3D speak, rotates around the Z axis.
To rotate around other axes, use [method@Gsk.Transform.rotate_3d].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="angle" transfer-ownership="none">
<doc xml:space="preserve">the rotation angle, in degrees (clockwise)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="rotate_3d" c:identifier="gtk_snapshot_rotate_3d">
<doc xml:space="preserve">Rotates @snapshot's coordinate system by @angle degrees around @axis.
For a rotation in 2D space, use [method@Gsk.Transform.rotate].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="angle" transfer-ownership="none">
<doc xml:space="preserve">the rotation angle, in degrees (clockwise)</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="axis" transfer-ownership="none">
<doc xml:space="preserve">The rotation axis</doc>
<type name="Graphene.Vec3" c:type="const graphene_vec3_t*"/>
</parameter>
</parameters>
</method>
<method name="save" c:identifier="gtk_snapshot_save">
<doc xml:space="preserve">Makes a copy of the current state of @snapshot and saves it
on an internal stack.
When [method@Gtk.Snapshot.restore] is called, @snapshot will
be restored to the saved state. Multiple calls to
[method@Snapshot.save] and [class@Snapshot.restore] can be nested;
each call to `gtk_snapshot_restore()` restores the state from
the matching paired `gtk_snapshot_save()`.
It is necessary to clear all saved states with corresponding
calls to `gtk_snapshot_restore()`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="scale" c:identifier="gtk_snapshot_scale">
<doc xml:space="preserve">Scales @snapshot's coordinate system in 2-dimensional space by
the given factors.
Use [method@Gtk.Snapshot.scale_3d] to scale in all 3 dimensions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="factor_x" transfer-ownership="none">
<doc xml:space="preserve">scaling factor on the X axis</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="factor_y" transfer-ownership="none">
<doc xml:space="preserve">scaling factor on the Y axis</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="scale_3d" c:identifier="gtk_snapshot_scale_3d">
<doc xml:space="preserve">Scales @snapshot's coordinate system by the given factors.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="factor_x" transfer-ownership="none">
<doc xml:space="preserve">scaling factor on the X axis</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="factor_y" transfer-ownership="none">
<doc xml:space="preserve">scaling factor on the Y axis</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="factor_z" transfer-ownership="none">
<doc xml:space="preserve">scaling factor on the Z axis</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="to_node" c:identifier="gtk_snapshot_to_node">
<doc xml:space="preserve">Returns the render node that was constructed
by @snapshot.
After calling this function, it is no longer possible to
add more nodes to @snapshot. The only function that should
be called after this is [method@GObject.Object.unref].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the constructed `GskRenderNode`</doc>
<type name="Gsk.RenderNode" c:type="GskRenderNode*"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_paintable" c:identifier="gtk_snapshot_to_paintable">
<doc xml:space="preserve">Returns a paintable encapsulating the render node
that was constructed by @snapshot.
After calling this function, it is no longer possible to
add more nodes to @snapshot. The only function that should
be called after this is [method@GObject.Object.unref].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a new `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="size" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The size of the resulting paintable
or %NULL to use the bounds of the snapshot</doc>
<type name="Graphene.Size" c:type="const graphene_size_t*"/>
</parameter>
</parameters>
</method>
<method name="transform" c:identifier="gtk_snapshot_transform">
<doc xml:space="preserve">Transforms @snapshot's coordinate system with the given @transform.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="transform" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the transform to apply</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</parameter>
</parameters>
</method>
<method name="transform_matrix" c:identifier="gtk_snapshot_transform_matrix">
<doc xml:space="preserve">Transforms @snapshot's coordinate system with the given @matrix.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="matrix" transfer-ownership="none">
<doc xml:space="preserve">the matrix to multiply the transform with</doc>
<type name="Graphene.Matrix" c:type="const graphene_matrix_t*"/>
</parameter>
</parameters>
</method>
<method name="translate" c:identifier="gtk_snapshot_translate">
<doc xml:space="preserve">Translates @snapshot's coordinate system by @point in 2-dimensional space.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="point" transfer-ownership="none">
<doc xml:space="preserve">the point to translate the snapshot by</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
</parameters>
</method>
<method name="translate_3d" c:identifier="gtk_snapshot_translate_3d">
<doc xml:space="preserve">Translates @snapshot's coordinate system by @point.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSnapshot`</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</instance-parameter>
<parameter name="point" transfer-ownership="none">
<doc xml:space="preserve">the point to translate the snapshot by</doc>
<type name="Graphene.Point3D" c:type="const graphene_point3d_t*"/>
</parameter>
</parameters>
</method>
</class>
<record name="SnapshotClass" c:type="GtkSnapshotClass" disguised="1" glib:is-gtype-struct-for="Snapshot"/>
<class name="SortListModel" c:symbol-prefix="sort_list_model" c:type="GtkSortListModel" parent="GObject.Object" glib:type-name="GtkSortListModel" glib:get-type="gtk_sort_list_model_get_type" glib:type-struct="SortListModelClass">
<doc xml:space="preserve">A `GListModel` that sorts the elements of an underlying model
according to a `GtkSorter`.
The model is a stable sort. If two items compare equal according
to the sorter, the one that appears first in the original model will
also appear first after sorting.
Note that if you change the sorter, the previous order will have no
influence on the new order. If you want that, consider using a
`GtkMultiSorter` and appending the previous sorter to it.
The model can be set up to do incremental sorting, so that
sorting long lists doesn't block the UI. See
[method@Gtk.SortListModel.set_incremental] for details.
`GtkSortListModel` is a generic model and because of that it
cannot take advantage of any external knowledge when sorting.
If you run into performance issues with `GtkSortListModel`,
it is strongly recommended that you write your own sorting list
model.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_sort_list_model_new">
<doc xml:space="preserve">Creates a new sort list model that uses the @sorter to sort @model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the model to sort</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="sorter" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkSorter` to sort @model with,</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</constructor>
<method name="get_incremental" c:identifier="gtk_sort_list_model_get_incremental" glib:get-property="incremental">
<attribute name="org.gtk.Method.get_property" value="incremental"/>
<doc xml:space="preserve">Returns whether incremental sorting is enabled.
See [method@Gtk.SortListModel.set_incremental].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if incremental sorting is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_sort_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the model currently sorted or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model that gets sorted</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pending" c:identifier="gtk_sort_list_model_get_pending" glib:get-property="pending">
<attribute name="org.gtk.Method.get_property" value="pending"/>
<doc xml:space="preserve">Estimates progress of an ongoing sorting operation.
The estimate is the number of items that would still need to be
sorted to finish the sorting operation if this was a linear
algorithm. So this number is not related to how many items are
already correctly sorted.
If you want to estimate the progress, you can use code like this:
```c
pending = gtk_sort_list_model_get_pending (self);
model = gtk_sort_list_model_get_model (self);
progress = 1.0 - pending / (double) MAX (1, g_list_model_get_n_items (model));
```
If no sort operation is ongoing - in particular when
[property@Gtk.SortListModel:incremental] is %FALSE - this
function returns 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a progress estimate of remaining items to sort</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sorter" c:identifier="gtk_sort_list_model_get_sorter" glib:get-property="sorter">
<attribute name="org.gtk.Method.get_property" value="sorter"/>
<doc xml:space="preserve">Gets the sorter that is used to sort @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the sorter of #self</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_incremental" c:identifier="gtk_sort_list_model_set_incremental" glib:set-property="incremental">
<attribute name="org.gtk.Method.set_property" value="incremental"/>
<doc xml:space="preserve">Sets the sort model to do an incremental sort.
When incremental sorting is enabled, the `GtkSortListModel` will not do
a complete sort immediately, but will instead queue an idle handler that
incrementally sorts the items towards their correct position. This of
course means that items do not instantly appear in the right place. It
also means that the total sorting time is a lot slower.
When your filter blocks the UI while sorting, you might consider
turning this on. Depending on your model and sorters, this may become
interesting around 10,000 to 100,000 items.
By default, incremental sorting is disabled.
See [method@Gtk.SortListModel.get_pending] for progress information
about an ongoing incremental sorting operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
<parameter name="incremental" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to sort incrementally</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_sort_list_model_set_model" glib:set-property="model">
<attribute name="org.gtk.Method.set_property" value="model"/>
<doc xml:space="preserve">Sets the model to be sorted.
The @model's item type must conform to the item type of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model to be sorted</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
</parameters>
</method>
<method name="set_sorter" c:identifier="gtk_sort_list_model_set_sorter" glib:set-property="sorter">
<attribute name="org.gtk.Method.set_property" value="sorter"/>
<doc xml:space="preserve">Sets a new sorter on @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSortListModel`</doc>
<type name="SortListModel" c:type="GtkSortListModel*"/>
</instance-parameter>
<parameter name="sorter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkSorter` to sort @model with</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</method>
<property name="incremental" writable="1" transfer-ownership="none" setter="set_incremental" getter="get_incremental">
<attribute name="org.gtk.Property.get" value="gtk_sort_list_model_get_incremental"/>
<attribute name="org.gtk.Property.set" value="gtk_sort_list_model_set_incremental"/>
<doc xml:space="preserve">If the model should sort items incrementally.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_sort_list_model_get_model"/>
<attribute name="org.gtk.Property.set" value="gtk_sort_list_model_set_model"/>
<doc xml:space="preserve">The model being sorted.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="pending" transfer-ownership="none" getter="get_pending">
<attribute name="org.gtk.Property.get" value="gtk_sort_list_model_get_pending"/>
<doc xml:space="preserve">Estimate of unsorted items remaining.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="sorter" writable="1" transfer-ownership="none" setter="set_sorter" getter="get_sorter">
<attribute name="org.gtk.Property.get" value="gtk_sort_list_model_get_sorter"/>
<attribute name="org.gtk.Property.set" value="gtk_sort_list_model_set_sorter"/>
<doc xml:space="preserve">The sorter for this model.</doc>
<type name="Sorter"/>
</property>
</class>
<record name="SortListModelClass" c:type="GtkSortListModelClass" glib:is-gtype-struct-for="SortListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<enumeration name="SortType" glib:type-name="GtkSortType" glib:get-type="gtk_sort_type_get_type" c:type="GtkSortType">
<doc xml:space="preserve">Determines the direction of a sort.</doc>
<member name="ascending" value="0" c:identifier="GTK_SORT_ASCENDING" glib:nick="ascending" glib:name="GTK_SORT_ASCENDING">
<doc xml:space="preserve">Sorting is in ascending order.</doc>
</member>
<member name="descending" value="1" c:identifier="GTK_SORT_DESCENDING" glib:nick="descending" glib:name="GTK_SORT_DESCENDING">
<doc xml:space="preserve">Sorting is in descending order.</doc>
</member>
</enumeration>
<class name="Sorter" c:symbol-prefix="sorter" c:type="GtkSorter" parent="GObject.Object" glib:type-name="GtkSorter" glib:get-type="gtk_sorter_get_type" glib:type-struct="SorterClass">
<doc xml:space="preserve">`GtkSorter` is an object to describe sorting criteria.
Its primary user is [class@Gtk.SortListModel]
The model will use a sorter to determine the order in which
its items should appear by calling [method@Gtk.Sorter.compare]
for pairs of items.
Sorters may change their sorting behavior through their lifetime.
In that case, they will emit the [signal@Gtk.Sorter::changed] signal
to notify that the sort order is no longer valid and should be updated
by calling gtk_sorter_compare() again.
GTK provides various pre-made sorter implementations for common sorting
operations. [class@Gtk.ColumnView] has built-in support for sorting lists
via the [property@Gtk.ColumnViewColumn:sorter] property, where the user can
change the sorting by clicking on list headers.
Of course, in particular for large lists, it is also possible to subclass
`GtkSorter` and provide one's own sorter.</doc>
<virtual-method name="compare" invoker="compare">
<doc xml:space="preserve">Compares two given items according to the sort order implemented
by the sorter.
Sorters implement a partial order:
* It is reflexive, ie a = a
* It is antisymmetric, ie if a &lt; b and b &lt; a, then a = b
* It is transitive, ie given any 3 items with a &#x2264; b and b &#x2264; c,
then a &#x2264; c
The sorter may signal it conforms to additional constraints
via the return value of [method@Gtk.Sorter.get_order].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORDERING_EQUAL if @item1 == @item2,
%GTK_ORDERING_SMALLER if @item1 &lt; @item2,
%GTK_ORDERING_LARGER if @item1 &gt; @item2</doc>
<type name="Ordering" c:type="GtkOrdering"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</instance-parameter>
<parameter name="item1" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">first item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="item2" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">second item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_order" invoker="get_order">
<doc xml:space="preserve">Gets the order that @self conforms to.
See [enum@Gtk.SorterOrder] for details
of the possible return values.
This function is intended to allow optimizations.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The order</doc>
<type name="SorterOrder" c:type="GtkSorterOrder"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="changed" c:identifier="gtk_sorter_changed">
<doc xml:space="preserve">Notifies all users of the sorter that it has changed.
This emits the [signal@Gtk.Sorter::changed] signal. Users
of the sorter should then update the sort order via
[method@Gtk.Sorter.compare].
Depending on the @change parameter, it may be possible to
update the sort order without a full resorting. Refer to
the [enum@Gtk.SorterChange] documentation for details.
This function is intended for implementors of `GtkSorter`
subclasses and should not be called from other functions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</instance-parameter>
<parameter name="change" transfer-ownership="none">
<doc xml:space="preserve">How the sorter changed</doc>
<type name="SorterChange" c:type="GtkSorterChange"/>
</parameter>
</parameters>
</method>
<method name="compare" c:identifier="gtk_sorter_compare">
<doc xml:space="preserve">Compares two given items according to the sort order implemented
by the sorter.
Sorters implement a partial order:
* It is reflexive, ie a = a
* It is antisymmetric, ie if a &lt; b and b &lt; a, then a = b
* It is transitive, ie given any 3 items with a &#x2264; b and b &#x2264; c,
then a &#x2264; c
The sorter may signal it conforms to additional constraints
via the return value of [method@Gtk.Sorter.get_order].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORDERING_EQUAL if @item1 == @item2,
%GTK_ORDERING_SMALLER if @item1 &lt; @item2,
%GTK_ORDERING_LARGER if @item1 &gt; @item2</doc>
<type name="Ordering" c:type="GtkOrdering"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</instance-parameter>
<parameter name="item1" transfer-ownership="none">
<doc xml:space="preserve">first item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="item2" transfer-ownership="none">
<doc xml:space="preserve">second item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get_order" c:identifier="gtk_sorter_get_order">
<doc xml:space="preserve">Gets the order that @self conforms to.
See [enum@Gtk.SorterOrder] for details
of the possible return values.
This function is intended to allow optimizations.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The order</doc>
<type name="SorterOrder" c:type="GtkSorterOrder"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</instance-parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted whenever the sorter changed.
Users of the sorter should then update the sort order
again via gtk_sorter_compare().
[class@Gtk.SortListModel] handles this signal automatically.
Depending on the @change parameter, it may be possible to update
the sort order without a full resorting. Refer to the
[enum@Gtk.SorterChange] documentation for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="change" transfer-ownership="none">
<doc xml:space="preserve">how the sorter changed</doc>
<type name="SorterChange"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="SorterChange" glib:type-name="GtkSorterChange" glib:get-type="gtk_sorter_change_get_type" c:type="GtkSorterChange">
<doc xml:space="preserve">Describes changes in a sorter in more detail and allows users
to optimize resorting.</doc>
<member name="different" value="0" c:identifier="GTK_SORTER_CHANGE_DIFFERENT" glib:nick="different" glib:name="GTK_SORTER_CHANGE_DIFFERENT">
<doc xml:space="preserve">The sorter change cannot be described
by any of the other enumeration values</doc>
</member>
<member name="inverted" value="1" c:identifier="GTK_SORTER_CHANGE_INVERTED" glib:nick="inverted" glib:name="GTK_SORTER_CHANGE_INVERTED">
<doc xml:space="preserve">The sort order was inverted. Comparisons
that returned %GTK_ORDERING_SMALLER now return %GTK_ORDERING_LARGER
and vice versa. Other comparisons return the same values as before.</doc>
</member>
<member name="less_strict" value="2" c:identifier="GTK_SORTER_CHANGE_LESS_STRICT" glib:nick="less-strict" glib:name="GTK_SORTER_CHANGE_LESS_STRICT">
<doc xml:space="preserve">The sorter is less strict: Comparisons
may now return %GTK_ORDERING_EQUAL that did not do so before.</doc>
</member>
<member name="more_strict" value="3" c:identifier="GTK_SORTER_CHANGE_MORE_STRICT" glib:nick="more-strict" glib:name="GTK_SORTER_CHANGE_MORE_STRICT">
<doc xml:space="preserve">The sorter is more strict: Comparisons
that did return %GTK_ORDERING_EQUAL may not do so anymore.</doc>
</member>
</enumeration>
<record name="SorterClass" c:type="GtkSorterClass" glib:is-gtype-struct-for="Sorter">
<doc xml:space="preserve">The virtual table for `GtkSorter`.</doc>
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="compare">
<callback name="compare">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%GTK_ORDERING_EQUAL if @item1 == @item2,
%GTK_ORDERING_SMALLER if @item1 &lt; @item2,
%GTK_ORDERING_LARGER if @item1 &gt; @item2</doc>
<type name="Ordering" c:type="GtkOrdering"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
<parameter name="item1" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">first item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="item2" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">second item to compare</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_order">
<callback name="get_order">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The order</doc>
<type name="SorterOrder" c:type="GtkSorterOrder"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved5" introspectable="0">
<callback name="_gtk_reserved5">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved6" introspectable="0">
<callback name="_gtk_reserved6">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved7" introspectable="0">
<callback name="_gtk_reserved7">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved8" introspectable="0">
<callback name="_gtk_reserved8">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<enumeration name="SorterOrder" glib:type-name="GtkSorterOrder" glib:get-type="gtk_sorter_order_get_type" c:type="GtkSorterOrder">
<doc xml:space="preserve">Describes the type of order that a `GtkSorter` may produce.</doc>
<member name="partial" value="0" c:identifier="GTK_SORTER_ORDER_PARTIAL" glib:nick="partial" glib:name="GTK_SORTER_ORDER_PARTIAL">
<doc xml:space="preserve">A partial order. Any `GtkOrdering` is possible.</doc>
</member>
<member name="none" value="1" c:identifier="GTK_SORTER_ORDER_NONE" glib:nick="none" glib:name="GTK_SORTER_ORDER_NONE">
<doc xml:space="preserve">No order, all elements are considered equal.
gtk_sorter_compare() will only return %GTK_ORDERING_EQUAL.</doc>
</member>
<member name="total" value="2" c:identifier="GTK_SORTER_ORDER_TOTAL" glib:nick="total" glib:name="GTK_SORTER_ORDER_TOTAL">
<doc xml:space="preserve">A total order. gtk_sorter_compare() will only
return %GTK_ORDERING_EQUAL if an item is compared with itself. Two
different items will never cause this value to be returned.</doc>
</member>
</enumeration>
<class name="SpinButton" c:symbol-prefix="spin_button" c:type="GtkSpinButton" parent="Widget" glib:type-name="GtkSpinButton" glib:get-type="gtk_spin_button_get_type">
<doc xml:space="preserve">A `GtkSpinButton` is an ideal way to allow the user to set the
value of some attribute.
![An example GtkSpinButton](spinbutton.png)
Rather than having to directly type a number into a `GtkEntry`,
`GtkSpinButton` allows the user to click on one of two arrows
to increment or decrement the displayed value. A value can still be
typed in, with the bonus that it can be checked to ensure it is in a
given range.
The main properties of a `GtkSpinButton` are through an adjustment.
See the [class@Gtk.Adjustment] documentation for more details about
an adjustment's properties.
Note that `GtkSpinButton` will by default make its entry large enough
to accommodate the lower and upper bounds of the adjustment. If this
is not desired, the automatic sizing can be turned off by explicitly
setting [property@Gtk.Editable:width-chars] to a value != -1.
## Using a GtkSpinButton to get an integer
```c
// Provides a function to retrieve an integer value from a GtkSpinButton
// and creates a spin button to model percentage values.
int
grab_int_value (GtkSpinButton *button,
gpointer user_data)
{
return gtk_spin_button_get_value_as_int (button);
}
void
create_integer_spin_button (void)
{
GtkWidget *window, *button;
GtkAdjustment *adjustment;
adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0);
window = gtk_window_new ();
// creates the spinbutton, with no decimal places
button = gtk_spin_button_new (adjustment, 1.0, 0);
gtk_window_set_child (GTK_WINDOW (window), button);
gtk_widget_show (window);
}
```
## Using a GtkSpinButton to get a floating point value
```c
// Provides a function to retrieve a floating point value from a
// GtkSpinButton, and creates a high precision spin button.
float
grab_float_value (GtkSpinButton *button,
gpointer user_data)
{
return gtk_spin_button_get_value (button);
}
void
create_floating_spin_button (void)
{
GtkWidget *window, *button;
GtkAdjustment *adjustment;
adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0);
window = gtk_window_new ();
// creates the spinbutton, with three decimal places
button = gtk_spin_button_new (adjustment, 0.001, 3);
gtk_window_set_child (GTK_WINDOW (window), button);
gtk_widget_show (window);
}
```
# CSS nodes
```
spinbutton.horizontal
&#x251C;&#x2500;&#x2500; text
&#x2502; &#x251C;&#x2500;&#x2500; undershoot.left
&#x2502; &#x2570;&#x2500;&#x2500; undershoot.right
&#x251C;&#x2500;&#x2500; button.down
&#x2570;&#x2500;&#x2500; button.up
```
```
spinbutton.vertical
&#x251C;&#x2500;&#x2500; button.up
&#x251C;&#x2500;&#x2500; text
&#x2502; &#x251C;&#x2500;&#x2500; undershoot.left
&#x2502; &#x2570;&#x2500;&#x2500; undershoot.right
&#x2570;&#x2500;&#x2500; button.down
```
`GtkSpinButton`s main CSS node has the name spinbutton. It creates subnodes
for the entry and the two buttons, with these names. The button nodes have
the style classes .up and .down. The `GtkText` subnodes (if present) are put
below the text node. The orientation of the spin button is reflected in
the .vertical or .horizontal style class on the main node.
# Accessiblity
`GtkSpinButton` uses the %GTK_ACCESSIBLE_ROLE_SPIN_BUTTON role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="CellEditable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_spin_button_new">
<doc xml:space="preserve">Creates a new `GtkSpinButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The new `GtkSpinButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkAdjustment` that this spin button should use</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="climb_rate" transfer-ownership="none">
<doc xml:space="preserve">specifies by how much the rate of change in the value will
accelerate if you continue to hold down an up/down button or arrow key</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="digits" transfer-ownership="none">
<doc xml:space="preserve">the number of decimal places to display</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_range" c:identifier="gtk_spin_button_new_with_range">
<doc xml:space="preserve">Creates a new `GtkSpinButton` with the given properties.
This is a convenience constructor that allows creation
of a numeric `GtkSpinButton` without manually creating
an adjustment. The value is initially set to the minimum
value and a page increment of 10 * @step is the default.
The precision of the spin button is equivalent to the
precision of @step.
Note that the way in which the precision is derived works
best if @step is a power of ten. If the resulting precision
is not suitable for your needs, use
[method@Gtk.SpinButton.set_digits] to correct it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The new `GtkSpinButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="min" transfer-ownership="none">
<doc xml:space="preserve">Minimum allowable value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">Maximum allowable value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">Increment added or subtracted by spinning the widget</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</constructor>
<method name="configure" c:identifier="gtk_spin_button_configure">
<doc xml:space="preserve">Changes the properties of an existing spin button.
The adjustment, climb rate, and number of decimal places
are updated accordingly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkAdjustment` to replace the spin button&#x2019;s
existing adjustment, or %NULL to leave its current adjustment unchanged</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="climb_rate" transfer-ownership="none">
<doc xml:space="preserve">the new climb rate</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="digits" transfer-ownership="none">
<doc xml:space="preserve">the number of decimal places to display in the spin button</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_adjustment" c:identifier="gtk_spin_button_get_adjustment" glib:get-property="adjustment">
<attribute name="org.gtk.Method.get_property" value="adjustment"/>
<doc xml:space="preserve">Get the adjustment associated with a `GtkSpinButton`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkAdjustment` of @spin_button</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_climb_rate" c:identifier="gtk_spin_button_get_climb_rate" glib:get-property="climb-rate">
<attribute name="org.gtk.Method.get_property" value="climb-rate"/>
<doc xml:space="preserve">Returns the acceleration rate for repeated changes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the acceleration rate</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_digits" c:identifier="gtk_spin_button_get_digits" glib:get-property="digits">
<attribute name="org.gtk.Method.get_property" value="digits"/>
<doc xml:space="preserve">Fetches the precision of @spin_button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current precision</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_increments" c:identifier="gtk_spin_button_get_increments">
<doc xml:space="preserve">Gets the current step and page the increments
used by @spin_button.
See [method@Gtk.SpinButton.set_increments].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="step" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store step increment</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="page" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store page increment</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_numeric" c:identifier="gtk_spin_button_get_numeric" glib:get-property="numeric">
<attribute name="org.gtk.Method.get_property" value="numeric"/>
<doc xml:space="preserve">Returns whether non-numeric text can be typed into the spin button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if only numeric text can be entered</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_range" c:identifier="gtk_spin_button_get_range">
<doc xml:space="preserve">Gets the range allowed for @spin_button.
See [method@Gtk.SpinButton.set_range].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="min" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store minimum allowed value</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="max" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store maximum allowed value</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="get_snap_to_ticks" c:identifier="gtk_spin_button_get_snap_to_ticks" glib:get-property="snap-to-ticks">
<attribute name="org.gtk.Method.get_property" value="snap-to-ticks"/>
<doc xml:space="preserve">Returns whether the values are corrected to the nearest step.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if values are snapped to the nearest step</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_update_policy" c:identifier="gtk_spin_button_get_update_policy" glib:get-property="update-policy">
<attribute name="org.gtk.Method.get_property" value="update-policy"/>
<doc xml:space="preserve">Gets the update behavior of a spin button.
See [method@Gtk.SpinButton.set_update_policy].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current update policy</doc>
<type name="SpinButtonUpdatePolicy" c:type="GtkSpinButtonUpdatePolicy"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_spin_button_get_value" glib:get-property="value">
<attribute name="org.gtk.Method.get_property" value="value"/>
<doc xml:space="preserve">Get the value in the @spin_button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of @spin_button</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_value_as_int" c:identifier="gtk_spin_button_get_value_as_int">
<doc xml:space="preserve">Get the value @spin_button represented as an integer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the value of @spin_button</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_wrap" c:identifier="gtk_spin_button_get_wrap" glib:get-property="wrap">
<attribute name="org.gtk.Method.get_property" value="wrap"/>
<doc xml:space="preserve">Returns whether the spin button&#x2019;s value wraps around to the
opposite limit when the upper or lower limit of the range is
exceeded.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the spin button wraps around</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_adjustment" c:identifier="gtk_spin_button_set_adjustment" glib:set-property="adjustment">
<attribute name="org.gtk.Method.set_property" value="adjustment"/>
<doc xml:space="preserve">Replaces the `GtkAdjustment` associated with @spin_button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="adjustment" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAdjustment` to replace the existing adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</method>
<method name="set_climb_rate" c:identifier="gtk_spin_button_set_climb_rate" glib:set-property="climb-rate">
<attribute name="org.gtk.Method.set_property" value="climb-rate"/>
<doc xml:space="preserve">Sets the acceleration rate for repeated changes when you
hold down a button or key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="climb_rate" transfer-ownership="none">
<doc xml:space="preserve">the rate of acceleration, must be &gt;= 0</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_digits" c:identifier="gtk_spin_button_set_digits" glib:set-property="digits">
<attribute name="org.gtk.Method.set_property" value="digits"/>
<doc xml:space="preserve">Set the precision to be displayed by @spin_button.
Up to 20 digit precision is allowed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="digits" transfer-ownership="none">
<doc xml:space="preserve">the number of digits after the decimal point to be
displayed for the spin button&#x2019;s value</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_increments" c:identifier="gtk_spin_button_set_increments">
<doc xml:space="preserve">Sets the step and page increments for spin_button.
This affects how quickly the value changes when
the spin button&#x2019;s arrows are activated.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">increment applied for a button 1 press.</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="page" transfer-ownership="none">
<doc xml:space="preserve">increment applied for a button 2 press.</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_numeric" c:identifier="gtk_spin_button_set_numeric" glib:set-property="numeric">
<attribute name="org.gtk.Method.set_property" value="numeric"/>
<doc xml:space="preserve">Sets the flag that determines if non-numeric text can be typed
into the spin button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="numeric" transfer-ownership="none">
<doc xml:space="preserve">flag indicating if only numeric entry is allowed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_range" c:identifier="gtk_spin_button_set_range">
<doc xml:space="preserve">Sets the minimum and maximum allowable values for @spin_button.
If the current value is outside this range, it will be adjusted
to fit within the range, otherwise it will remain unchanged.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="min" transfer-ownership="none">
<doc xml:space="preserve">minimum allowable value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="max" transfer-ownership="none">
<doc xml:space="preserve">maximum allowable value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_snap_to_ticks" c:identifier="gtk_spin_button_set_snap_to_ticks" glib:set-property="snap-to-ticks">
<attribute name="org.gtk.Method.set_property" value="snap-to-ticks"/>
<doc xml:space="preserve">Sets the policy as to whether values are corrected to the
nearest step increment when a spin button is activated after
providing an invalid value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="snap_to_ticks" transfer-ownership="none">
<doc xml:space="preserve">a flag indicating if invalid values should be corrected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_update_policy" c:identifier="gtk_spin_button_set_update_policy" glib:set-property="update-policy">
<attribute name="org.gtk.Method.set_property" value="update-policy"/>
<doc xml:space="preserve">Sets the update behavior of a spin button.
This determines whether the spin button is always
updated or only when a valid value is set.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="policy" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButtonUpdatePolicy` value</doc>
<type name="SpinButtonUpdatePolicy" c:type="GtkSpinButtonUpdatePolicy"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_spin_button_set_value" glib:set-property="value">
<attribute name="org.gtk.Method.set_property" value="value"/>
<doc xml:space="preserve">Sets the value of @spin_button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_wrap" c:identifier="gtk_spin_button_set_wrap" glib:set-property="wrap">
<attribute name="org.gtk.Method.set_property" value="wrap"/>
<doc xml:space="preserve">Sets the flag that determines if a spin button value wraps
around to the opposite limit when the upper or lower limit
of the range is exceeded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="wrap" transfer-ownership="none">
<doc xml:space="preserve">a flag indicating if wrapping behavior is performed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="spin" c:identifier="gtk_spin_button_spin">
<doc xml:space="preserve">Increment or decrement a spin button&#x2019;s value in a specified
direction by a specified amount.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinType` indicating the direction to spin</doc>
<type name="SpinType" c:type="GtkSpinType"/>
</parameter>
<parameter name="increment" transfer-ownership="none">
<doc xml:space="preserve">step increment to apply in the specified direction</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="update" c:identifier="gtk_spin_button_update">
<doc xml:space="preserve">Manually force an update of the spin button.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spin_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinButton`</doc>
<type name="SpinButton" c:type="GtkSpinButton*"/>
</instance-parameter>
</parameters>
</method>
<property name="adjustment" writable="1" transfer-ownership="none" setter="set_adjustment" getter="get_adjustment">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_adjustment"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_adjustment"/>
<doc xml:space="preserve">The adjustment that holds the value of the spin button.</doc>
<type name="Adjustment"/>
</property>
<property name="climb-rate" writable="1" transfer-ownership="none" setter="set_climb_rate" getter="get_climb_rate">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_climb_rate"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_climb_rate"/>
<doc xml:space="preserve">The acceleration rate when you hold down a button or key.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="digits" writable="1" transfer-ownership="none" setter="set_digits" getter="get_digits">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_digits"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_digits"/>
<doc xml:space="preserve">The number of decimal places to display.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="numeric" writable="1" transfer-ownership="none" setter="set_numeric" getter="get_numeric">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_numeric"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_numeric"/>
<doc xml:space="preserve">Whether non-numeric characters should be ignored.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="snap-to-ticks" writable="1" transfer-ownership="none" setter="set_snap_to_ticks" getter="get_snap_to_ticks">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_snap_to_ticks"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_snap_to_ticks"/>
<doc xml:space="preserve">Whether erroneous values are automatically changed to the spin buttons
nearest step increment.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="update-policy" writable="1" transfer-ownership="none" setter="set_update_policy" getter="get_update_policy">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_update_policy"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_update_policy"/>
<doc xml:space="preserve">Whether the spin button should update always, or only when the value
is acceptable.</doc>
<type name="SpinButtonUpdatePolicy"/>
</property>
<property name="value" writable="1" transfer-ownership="none" setter="set_value" getter="get_value">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_value"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_value"/>
<doc xml:space="preserve">The current value.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="wrap" writable="1" transfer-ownership="none" setter="set_wrap" getter="get_wrap">
<attribute name="org.gtk.Property.get" value="gtk_spin_button_get_wrap"/>
<attribute name="org.gtk.Property.set" value="gtk_spin_button_set_wrap"/>
<doc xml:space="preserve">Whether a spin button should wrap upon reaching its limits.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="change-value" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a value change.
This is a [keybinding signal](class.SignalAction.html).
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal are Up/Down and PageUp/PageDown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="scroll" transfer-ownership="none">
<doc xml:space="preserve">a `GtkScrollType` to specify the speed and amount of change</doc>
<type name="ScrollType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="input" when="last">
<doc xml:space="preserve">Emitted to convert the users input into a double value.
The signal handler is expected to use [method@Gtk.Editable.get_text]
to retrieve the text of the spinbutton and set @new_value to the
new value.
The default conversion uses g_strtod().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE for a successful conversion, %FALSE if the input
was not handled, and %GTK_INPUT_ERROR if the conversion failed.</doc>
<type name="gint" c:type="gint"/>
</return-value>
<parameters>
<parameter name="new_value" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the new value</doc>
<type name="gdouble" c:type="gpointer"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="output" when="last">
<doc xml:space="preserve">Emitted to tweak the formatting of the value for display.
```c
// show leading zeros
static gboolean
on_output (GtkSpinButton *spin,
gpointer data)
{
GtkAdjustment *adjustment;
char *text;
int value;
adjustment = gtk_spin_button_get_adjustment (spin);
value = (int)gtk_adjustment_get_value (adjustment);
text = g_strdup_printf ("%02d", value);
gtk_spin_button_set_text (spin, text):
g_free (text);
return TRUE;
}
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the value has been displayed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="value-changed" when="last">
<doc xml:space="preserve">Emitted when the value is changed.
Also see the [signal@Gtk.SpinButton::output] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="wrapped" when="last">
<doc xml:space="preserve">Emitted right after the spinbutton wraps from its maximum
to its minimum value or vice-versa.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<enumeration name="SpinButtonUpdatePolicy" glib:type-name="GtkSpinButtonUpdatePolicy" glib:get-type="gtk_spin_button_update_policy_get_type" c:type="GtkSpinButtonUpdatePolicy">
<doc xml:space="preserve">Determines whether the spin button displays values outside the adjustment
bounds.
See [method@Gtk.SpinButton.set_update_policy].</doc>
<member name="always" value="0" c:identifier="GTK_UPDATE_ALWAYS" glib:nick="always" glib:name="GTK_UPDATE_ALWAYS">
<doc xml:space="preserve">When refreshing your `GtkSpinButton`, the value is
always displayed</doc>
</member>
<member name="if_valid" value="1" c:identifier="GTK_UPDATE_IF_VALID" glib:nick="if-valid" glib:name="GTK_UPDATE_IF_VALID">
<doc xml:space="preserve">When refreshing your `GtkSpinButton`, the value is
only displayed if it is valid within the bounds of the spin button's
adjustment</doc>
</member>
</enumeration>
<enumeration name="SpinType" glib:type-name="GtkSpinType" glib:get-type="gtk_spin_type_get_type" c:type="GtkSpinType">
<doc xml:space="preserve">The values of the GtkSpinType enumeration are used to specify the
change to make in gtk_spin_button_spin().</doc>
<member name="step_forward" value="0" c:identifier="GTK_SPIN_STEP_FORWARD" glib:nick="step-forward" glib:name="GTK_SPIN_STEP_FORWARD">
<doc xml:space="preserve">Increment by the adjustments step increment.</doc>
</member>
<member name="step_backward" value="1" c:identifier="GTK_SPIN_STEP_BACKWARD" glib:nick="step-backward" glib:name="GTK_SPIN_STEP_BACKWARD">
<doc xml:space="preserve">Decrement by the adjustments step increment.</doc>
</member>
<member name="page_forward" value="2" c:identifier="GTK_SPIN_PAGE_FORWARD" glib:nick="page-forward" glib:name="GTK_SPIN_PAGE_FORWARD">
<doc xml:space="preserve">Increment by the adjustments page increment.</doc>
</member>
<member name="page_backward" value="3" c:identifier="GTK_SPIN_PAGE_BACKWARD" glib:nick="page-backward" glib:name="GTK_SPIN_PAGE_BACKWARD">
<doc xml:space="preserve">Decrement by the adjustments page increment.</doc>
</member>
<member name="home" value="4" c:identifier="GTK_SPIN_HOME" glib:nick="home" glib:name="GTK_SPIN_HOME">
<doc xml:space="preserve">Go to the adjustments lower bound.</doc>
</member>
<member name="end" value="5" c:identifier="GTK_SPIN_END" glib:nick="end" glib:name="GTK_SPIN_END">
<doc xml:space="preserve">Go to the adjustments upper bound.</doc>
</member>
<member name="user_defined" value="6" c:identifier="GTK_SPIN_USER_DEFINED" glib:nick="user-defined" glib:name="GTK_SPIN_USER_DEFINED">
<doc xml:space="preserve">Change by a specified amount.</doc>
</member>
</enumeration>
<class name="Spinner" c:symbol-prefix="spinner" c:type="GtkSpinner" parent="Widget" glib:type-name="GtkSpinner" glib:get-type="gtk_spinner_get_type">
<doc xml:space="preserve">A `GtkSpinner` widget displays an icon-size spinning animation.
It is often used as an alternative to a [class@Gtk.ProgressBar]
for displaying indefinite activity, instead of actual progress.
![An example GtkSpinner](spinner.png)
To start the animation, use [method@Gtk.Spinner.start], to stop it
use [method@Gtk.Spinner.stop].
# CSS nodes
`GtkSpinner` has a single CSS node with the name spinner.
When the animation is active, the :checked pseudoclass is
added to this node.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_spinner_new">
<doc xml:space="preserve">Returns a new spinner widget. Not yet started.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkSpinner`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_spinning" c:identifier="gtk_spinner_get_spinning" glib:get-property="spinning">
<attribute name="org.gtk.Method.get_property" value="spinning"/>
<doc xml:space="preserve">Returns whether the spinner is spinning.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the spinner is active</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="spinner" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinner`</doc>
<type name="Spinner" c:type="GtkSpinner*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_spinning" c:identifier="gtk_spinner_set_spinning" glib:set-property="spinning">
<attribute name="org.gtk.Method.set_property" value="spinning"/>
<doc xml:space="preserve">Sets the activity of the spinner.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spinner" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinner`</doc>
<type name="Spinner" c:type="GtkSpinner*"/>
</instance-parameter>
<parameter name="spinning" transfer-ownership="none">
<doc xml:space="preserve">whether the spinner should be spinning</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="start" c:identifier="gtk_spinner_start">
<doc xml:space="preserve">Starts the animation of the spinner.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spinner" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinner`</doc>
<type name="Spinner" c:type="GtkSpinner*"/>
</instance-parameter>
</parameters>
</method>
<method name="stop" c:identifier="gtk_spinner_stop">
<doc xml:space="preserve">Stops the animation of the spinner.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="spinner" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSpinner`</doc>
<type name="Spinner" c:type="GtkSpinner*"/>
</instance-parameter>
</parameters>
</method>
<property name="spinning" writable="1" transfer-ownership="none" setter="set_spinning" getter="get_spinning">
<attribute name="org.gtk.Property.get" value="gtk_spinner_get_spinning"/>
<attribute name="org.gtk.Property.set" value="gtk_spinner_set_spinning"/>
<doc xml:space="preserve">Whether the spinner is spinning</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="Stack" c:symbol-prefix="stack" c:type="GtkStack" parent="Widget" glib:type-name="GtkStack" glib:get-type="gtk_stack_get_type">
<doc xml:space="preserve">`GtkStack` 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, a separate widget
such as [class@Gtk.StackSwitcher] or [class@Gtk.StackSidebar] can
be used with `GtkStack` to provide this functionality.
Transitions between pages can be animated as slides or fades. This
can be controlled with [method@Gtk.Stack.set_transition_type].
These animations respect the [property@Gtk.Settings:gtk-enable-animations]
setting.
`GtkStack` maintains a [class@Gtk.StackPage] object for each added
child, which holds additional per-child properties. You
obtain the `GtkStackPage` for a child with [method@Gtk.Stack.get_page]
and you can obtain a `GtkSelectionModel` containing all the pages
with [method@Gtk.Stack.get_pages].
# GtkStack as GtkBuildable
To set child-specific properties in a .ui file, create `GtkStackPage`
objects explicitly, and set the child widget as a property on it:
```xml
&lt;object class="GtkStack" id="stack"&gt;
&lt;child&gt;
&lt;object class="GtkStackPage"&gt;
&lt;property name="name"&gt;page1&lt;/property&gt;
&lt;property name="title"&gt;In the beginning&#x2026;&lt;/property&gt;
&lt;property name="child"&gt;
&lt;object class="GtkLabel"&gt;
&lt;property name="label"&gt;It was dark&lt;/property&gt;
&lt;/object&gt;
&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
```
# CSS nodes
`GtkStack` has a single CSS node named stack.
# Accessibility
`GtkStack` uses the %GTK_ACCESSIBLE_ROLE_TAB_PANEL for the stack
pages, which are the accessible parent objects of the child widgets.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_stack_new">
<doc xml:space="preserve">Creates a new `GtkStack`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkStack`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="add_child" c:identifier="gtk_stack_add_child">
<doc xml:space="preserve">Adds a child to @stack.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkStackPage` for @child</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="add_named" c:identifier="gtk_stack_add_named">
<doc xml:space="preserve">Adds a child to @stack.
The child is identified by the @name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkStackPage` for @child</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name for @child</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_titled" c:identifier="gtk_stack_add_titled">
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkStackPage` for @child</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the widget to add</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name for @child</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">a human-readable title for @child</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_child_by_name" c:identifier="gtk_stack_get_child_by_name">
<doc xml:space="preserve">Finds the child with the name given as the argument.
Returns %NULL if there is no child with this name.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the requested child
of the `GtkStack`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the child to find</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_hhomogeneous" c:identifier="gtk_stack_get_hhomogeneous" glib:get-property="hhomogeneous">
<attribute name="org.gtk.Method.get_property" value="hhomogeneous"/>
<doc xml:space="preserve">Gets whether @stack is horizontally homogeneous.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @stack is horizontally homogeneous.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_interpolate_size" c:identifier="gtk_stack_get_interpolate_size" glib:get-property="interpolate-size">
<attribute name="org.gtk.Method.get_property" value="interpolate-size"/>
<doc xml:space="preserve">Returns whether the `GtkStack` is set up to interpolate between
the sizes of children on page switch.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if child sizes are interpolated</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">A `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_page" c:identifier="gtk_stack_get_page">
<doc xml:space="preserve">Returns the `GtkStackPage` object for @child.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkStackPage` for @child</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @stack</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="get_pages" c:identifier="gtk_stack_get_pages" glib:get-property="pages">
<attribute name="org.gtk.Method.get_property" value="pages"/>
<doc xml:space="preserve">Returns a `GListModel` that contains the pages of the stack.
This can be used to keep an up-to-date view. The model also
implements [iface@Gtk.SelectionModel] and can be used to track
and modify the visible page.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a `GtkSelectionModel` for the stack's children</doc>
<type name="SelectionModel" c:type="GtkSelectionModel*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transition_duration" c:identifier="gtk_stack_get_transition_duration" glib:get-property="transition-duration">
<attribute name="org.gtk.Method.get_property" value="transition-duration"/>
<doc xml:space="preserve">Returns the amount of time (in milliseconds) that
transitions between pages in @stack will take.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the transition duration</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transition_running" c:identifier="gtk_stack_get_transition_running" glib:get-property="transition-running">
<attribute name="org.gtk.Method.get_property" value="transition-running"/>
<doc xml:space="preserve">Returns whether the @stack is currently in a transition from one page to
another.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the transition is currently running, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transition_type" c:identifier="gtk_stack_get_transition_type" glib:get-property="transition-type">
<attribute name="org.gtk.Method.get_property" value="transition-type"/>
<doc xml:space="preserve">Gets the type of animation that will be used
for transitions between pages in @stack.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current transition type of @stack</doc>
<type name="StackTransitionType" c:type="GtkStackTransitionType"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vhomogeneous" c:identifier="gtk_stack_get_vhomogeneous" glib:get-property="vhomogeneous">
<attribute name="org.gtk.Method.get_property" value="vhomogeneous"/>
<doc xml:space="preserve">Gets whether @stack is vertically homogeneous.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @stack is vertically homogeneous.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible_child" c:identifier="gtk_stack_get_visible_child" glib:get-property="visible-child">
<attribute name="org.gtk.Method.get_property" value="visible-child"/>
<doc xml:space="preserve">Gets the currently visible child of @stack.
Returns %NULL if there are no visible children.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the visible child of the `GtkStack`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible_child_name" c:identifier="gtk_stack_get_visible_child_name" glib:get-property="visible-child-name">
<attribute name="org.gtk.Method.get_property" value="visible-child-name"/>
<doc xml:space="preserve">Returns the name of the currently visible child of @stack.
Returns %NULL if there is no visible child.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the name of the visible child
of the `GtkStack`</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_stack_remove">
<doc xml:space="preserve">Removes a child widget from @stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_hhomogeneous" c:identifier="gtk_stack_set_hhomogeneous" glib:set-property="hhomogeneous">
<attribute name="org.gtk.Method.set_property" value="hhomogeneous"/>
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="hhomogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make @stack horizontally homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_interpolate_size" c:identifier="gtk_stack_set_interpolate_size" glib:set-property="interpolate-size">
<attribute name="org.gtk.Method.set_property" value="interpolate-size"/>
<doc xml:space="preserve">Sets whether or not @stack will interpolate its size when
changing the visible child.
If the [property@Gtk.Stack: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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">A `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="interpolate_size" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_transition_duration" c:identifier="gtk_stack_set_transition_duration" glib:set-property="transition-duration">
<attribute name="org.gtk.Method.set_property" value="transition-duration"/>
<doc xml:space="preserve">Sets the duration that transitions between pages in @stack
will take.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="duration" transfer-ownership="none">
<doc xml:space="preserve">the new duration, in milliseconds</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_transition_type" c:identifier="gtk_stack_set_transition_type" glib:set-property="transition-type">
<attribute name="org.gtk.Method.set_property" value="transition-type"/>
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="transition" transfer-ownership="none">
<doc xml:space="preserve">the new transition type</doc>
<type name="StackTransitionType" c:type="GtkStackTransitionType"/>
</parameter>
</parameters>
</method>
<method name="set_vhomogeneous" c:identifier="gtk_stack_set_vhomogeneous" glib:set-property="vhomogeneous">
<attribute name="org.gtk.Method.set_property" value="vhomogeneous"/>
<doc xml:space="preserve">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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="vhomogeneous" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make @stack vertically homogeneous</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_visible_child" c:identifier="gtk_stack_set_visible_child" glib:set-property="visible-child">
<attribute name="org.gtk.Method.set_property" value="visible-child"/>
<doc xml:space="preserve">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 [method@Gtk.Widget.show]) in order to become the visible
child of @stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @stack</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_visible_child_full" c:identifier="gtk_stack_set_visible_child_full">
<doc xml:space="preserve">Makes the child with the given name visible.
Note that the child widget has to be visible itself
(see [method@Gtk.Widget.show]) in order to become the visible
child of @stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the child to make visible</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="transition" transfer-ownership="none">
<doc xml:space="preserve">the transition type to use</doc>
<type name="StackTransitionType" c:type="GtkStackTransitionType"/>
</parameter>
</parameters>
</method>
<method name="set_visible_child_name" c:identifier="gtk_stack_set_visible_child_name" glib:set-property="visible-child-name">
<attribute name="org.gtk.Method.set_property" value="visible-child-name"/>
<doc xml:space="preserve">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 [method@Gtk.Widget.show]) in order to become the visible
child of @stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the child to make visible</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="hhomogeneous" writable="1" transfer-ownership="none" setter="set_hhomogeneous" getter="get_hhomogeneous">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_hhomogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_hhomogeneous"/>
<doc xml:space="preserve">%TRUE if the stack allocates the same width for all children.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="interpolate-size" writable="1" transfer-ownership="none" setter="set_interpolate_size" getter="get_interpolate_size">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_interpolate_size"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_interpolate_size"/>
<doc xml:space="preserve">Whether or not the size should smoothly change during the transition.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pages" transfer-ownership="none" getter="get_pages">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_pages"/>
<doc xml:space="preserve">A selection model with the stack pages.</doc>
<type name="SelectionModel"/>
</property>
<property name="transition-duration" writable="1" transfer-ownership="none" setter="set_transition_duration" getter="get_transition_duration">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_transition_duration"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_transition_duration"/>
<doc xml:space="preserve">The animation duration, in milliseconds.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="transition-running" transfer-ownership="none" getter="get_transition_running">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_transition_running"/>
<doc xml:space="preserve">Whether or not the transition is currently running.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="transition-type" writable="1" transfer-ownership="none" setter="set_transition_type" getter="get_transition_type">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_transition_type"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_transition_type"/>
<doc xml:space="preserve">The type of animation used to transition.</doc>
<type name="StackTransitionType"/>
</property>
<property name="vhomogeneous" writable="1" transfer-ownership="none" setter="set_vhomogeneous" getter="get_vhomogeneous">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_vhomogeneous"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_vhomogeneous"/>
<doc xml:space="preserve">%TRUE if the stack allocates the same height for all children.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visible-child" writable="1" transfer-ownership="none" setter="set_visible_child" getter="get_visible_child">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_visible_child"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_set_visible_child"/>
<doc xml:space="preserve">The widget currently visible in the stack.</doc>
<type name="Widget"/>
</property>
<property name="visible-child-name" writable="1" transfer-ownership="none" setter="set_visible_child_name" getter="get_visible_child_name">
<attribute name="org.gtk.Property.get" value="gtk_stack_get_visible_child_name"/>
<attribute name="org.gtk.Poperty.set" value="gtk_stack_set_visible_child_name"/>
<doc xml:space="preserve">The name of the widget currently visible in the stack.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<class name="StackPage" c:symbol-prefix="stack_page" c:type="GtkStackPage" parent="GObject.Object" glib:type-name="GtkStackPage" glib:get-type="gtk_stack_page_get_type">
<doc xml:space="preserve">`GtkStackPage` is an auxiliary class used by `GtkStack`.</doc>
<implements name="Accessible"/>
<method name="get_child" c:identifier="gtk_stack_page_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Returns the stack child to which @self belongs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the child to which @self belongs</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_stack_page_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Returns the icon name of the page.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The value of the [property@Gtk.StackPage:icon-name] property</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_stack_page_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Returns the name of the page.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The value of the [property@Gtk.StackPage:name] property</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_needs_attention" c:identifier="gtk_stack_page_get_needs_attention" glib:get-property="needs-attention">
<attribute name="org.gtk.Method.get_property" value="needs-attention"/>
<doc xml:space="preserve">Returns whether the page is marked as &#x201C;needs attention&#x201D;.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The value of the [property@Gtk.StackPage:needs-attention]
property.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_stack_page_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Gets the page title.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The value of the [property@Gtk.StackPage:title] property</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_use_underline" c:identifier="gtk_stack_page_get_use_underline" glib:get-property="use-underline">
<attribute name="org.gtk.Method.get_property" value="use-underline"/>
<doc xml:space="preserve">Gets whether underlines in the page title indicate mnemonics.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The value of the [property@Gtk.StackPage:use-underline] property</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_stack_page_get_visible" glib:get-property="visible">
<attribute name="org.gtk.Method.get_property" value="visible"/>
<doc xml:space="preserve">Returns whether @page is visible in its `GtkStack`.
This is independent from the [property@Gtk.Widget:visible]
property of its widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @page is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_icon_name" c:identifier="gtk_stack_page_set_icon_name" glib:set-property="icon-name">
<attribute name="org.gtk.Method.set_property" value="icon-name"/>
<doc xml:space="preserve">Sets the icon name of the page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_name" c:identifier="gtk_stack_page_set_name" glib:set-property="name">
<attribute name="org.gtk.Method.set_property" value="name"/>
<doc xml:space="preserve">Sets the name of the page.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_needs_attention" c:identifier="gtk_stack_page_set_needs_attention" glib:set-property="needs-attention">
<attribute name="org.gtk.Method.set_property" value="needs-attention"/>
<doc xml:space="preserve">Sets whether the page is marked as &#x201C;needs attention&#x201D;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_stack_page_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the page title.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_use_underline" c:identifier="gtk_stack_page_set_use_underline" glib:set-property="use-underline">
<attribute name="org.gtk.Method.set_property" value="use-underline"/>
<doc xml:space="preserve">Sets whether underlines in the page title indicate mnemonics.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value to set</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_stack_page_set_visible" glib:set-property="visible">
<attribute name="org.gtk.Method.set_property" value="visible"/>
<doc xml:space="preserve">Sets whether @page is visible in its `GtkStack`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackPage`</doc>
<type name="StackPage" c:type="GtkStackPage*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">The new property value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" construct-only="1" transfer-ownership="none" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_child"/>
<doc xml:space="preserve">The child that this page is for.</doc>
<type name="Widget"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none" setter="set_icon_name" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_icon_name"/>
<doc xml:space="preserve">The icon name of the child page.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="name" writable="1" transfer-ownership="none" setter="set_name" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_name"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_name"/>
<doc xml:space="preserve">The name of the child page.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="needs-attention" writable="1" transfer-ownership="none" setter="set_needs_attention" getter="get_needs_attention">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_needs_attention"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_needs_attention"/>
<doc xml:space="preserve">Whether the page requires the user attention.
This is used by the [class@Gtk.StackSwitcher] to change the
appearance of the corresponding button when a page needs
attention and it is not the current one.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_title"/>
<doc xml:space="preserve">The title of the child page.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="use-underline" writable="1" transfer-ownership="none" setter="set_use_underline" getter="get_use_underline">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_use_underline"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_use_underline"/>
<doc xml:space="preserve">If set, an underline in the title indicates a mnemonic.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" setter="set_visible" getter="get_visible">
<attribute name="org.gtk.Property.get" value="gtk_stack_page_get_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_page_set_visible"/>
<doc xml:space="preserve">Whether this page is visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="StackSidebar" c:symbol-prefix="stack_sidebar" c:type="GtkStackSidebar" parent="Widget" glib:type-name="GtkStackSidebar" glib:get-type="gtk_stack_sidebar_get_type">
<doc xml:space="preserve">A `GtkStackSidebar` uses a sidebar to switch between `GtkStack` pages.
In order to use a `GtkStackSidebar`, you simply use a `GtkStack` to
organize your UI flow, and add the sidebar to your sidebar area. You
can use [method@Gtk.StackSidebar.set_stack] to connect the `GtkStackSidebar`
to the `GtkStack`.
# CSS nodes
`GtkStackSidebar` has a single CSS node with name stacksidebar and
style class .sidebar.
When circumstances require it, `GtkStackSidebar` adds the
.needs-attention style class to the widgets representing the stack
pages.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_stack_sidebar_new">
<doc xml:space="preserve">Creates a new `GtkStackSidebar`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkStackSidebar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_stack" c:identifier="gtk_stack_sidebar_get_stack" glib:get-property="stack">
<attribute name="org.gtk.Method.get_property" value="stack"/>
<doc xml:space="preserve">Retrieves the stack.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the associated `GtkStack` or
%NULL if none has been set explicitly</doc>
<type name="Stack" c:type="GtkStack*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackSidebar`</doc>
<type name="StackSidebar" c:type="GtkStackSidebar*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_stack" c:identifier="gtk_stack_sidebar_set_stack" glib:set-property="stack">
<attribute name="org.gtk.Method.set_property" value="stack"/>
<doc xml:space="preserve">Set the `GtkStack` associated with this `GtkStackSidebar`.
The sidebar widget will automatically update according to
the order and items within the given `GtkStack`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackSidebar`</doc>
<type name="StackSidebar" c:type="GtkStackSidebar*"/>
</instance-parameter>
<parameter name="stack" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</parameter>
</parameters>
</method>
<property name="stack" writable="1" transfer-ownership="none" setter="set_stack" getter="get_stack">
<attribute name="org.gtk.Property.get" value="gtk_stack_sidebar_get_stack"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_sidebar_set_stack"/>
<doc xml:space="preserve">The stack.</doc>
<type name="Stack"/>
</property>
</class>
<class name="StackSwitcher" c:symbol-prefix="stack_switcher" c:type="GtkStackSwitcher" parent="Widget" glib:type-name="GtkStackSwitcher" glib:get-type="gtk_stack_switcher_get_type">
<doc xml:space="preserve">The `GtkStackSwitcher` shows a row of buttons to switch between `GtkStack`
pages.
![An example GtkStackSwitcher](stackswitcher.png)
It acts as a controller for the associated `GtkStack`.
All the content for the buttons comes from the properties of the stacks
[class@Gtk.StackPage] objects; the button visibility in a `GtkStackSwitcher`
widget is controlled by the visibility of the child in the `GtkStack`.
It is possible to associate multiple `GtkStackSwitcher` widgets
with the same `GtkStack` widget.
# CSS nodes
`GtkStackSwitcher` has a single CSS node named stackswitcher and
style class .stack-switcher.
When circumstances require it, `GtkStackSwitcher` adds the
.needs-attention style class to the widgets representing the
stack pages.
# Accessibility
`GtkStackSwitcher` uses the %GTK_ACCESSIBLE_ROLE_TAB_LIST role
and uses the %GTK_ACCESSIBLE_ROLE_TAB for its buttons.
# Orientable
Since GTK 4.4, `GtkStackSwitcher` implements `GtkOrientable` allowing
the stack switcher to be made vertical with
`gtk_orientable_set_orientation()`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_stack_switcher_new">
<doc xml:space="preserve">Create a new `GtkStackSwitcher`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkStackSwitcher`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_stack" c:identifier="gtk_stack_switcher_get_stack" glib:get-property="stack">
<attribute name="org.gtk.Method.get_property" value="stack"/>
<doc xml:space="preserve">Retrieves the stack.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the stack</doc>
<type name="Stack" c:type="GtkStack*"/>
</return-value>
<parameters>
<instance-parameter name="switcher" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackSwitcher`</doc>
<type name="StackSwitcher" c:type="GtkStackSwitcher*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_stack" c:identifier="gtk_stack_switcher_set_stack" glib:set-property="stack">
<attribute name="org.gtk.Method.set_property" value="stack"/>
<doc xml:space="preserve">Sets the stack to control.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="switcher" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStackSwitcher`</doc>
<type name="StackSwitcher" c:type="GtkStackSwitcher*"/>
</instance-parameter>
<parameter name="stack" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkStack`</doc>
<type name="Stack" c:type="GtkStack*"/>
</parameter>
</parameters>
</method>
<property name="stack" writable="1" construct="1" transfer-ownership="none" setter="set_stack" getter="get_stack">
<attribute name="org.gtk.Property.get" value="gtk_stack_switcher_get_stack"/>
<attribute name="org.gtk.Property.set" value="gtk_stack_switcher_set_stack"/>
<doc xml:space="preserve">The stack.</doc>
<type name="Stack"/>
</property>
</class>
<enumeration name="StackTransitionType" glib:type-name="GtkStackTransitionType" glib:get-type="gtk_stack_transition_type_get_type" c:type="GtkStackTransitionType">
<doc xml:space="preserve">Possible transitions between pages in a `GtkStack` widget.
New values may be added to this enumeration over time.</doc>
<member name="none" value="0" c:identifier="GTK_STACK_TRANSITION_TYPE_NONE" glib:nick="none" glib:name="GTK_STACK_TRANSITION_TYPE_NONE">
<doc xml:space="preserve">No transition</doc>
</member>
<member name="crossfade" value="1" c:identifier="GTK_STACK_TRANSITION_TYPE_CROSSFADE" glib:nick="crossfade" glib:name="GTK_STACK_TRANSITION_TYPE_CROSSFADE">
<doc xml:space="preserve">A cross-fade</doc>
</member>
<member name="slide_right" value="2" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT" glib:nick="slide-right" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT">
<doc xml:space="preserve">Slide from left to right</doc>
</member>
<member name="slide_left" value="3" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT" glib:nick="slide-left" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT">
<doc xml:space="preserve">Slide from right to left</doc>
</member>
<member name="slide_up" value="4" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_UP" glib:nick="slide-up" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_UP">
<doc xml:space="preserve">Slide from bottom up</doc>
</member>
<member name="slide_down" value="5" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN" glib:nick="slide-down" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN">
<doc xml:space="preserve">Slide from top down</doc>
</member>
<member name="slide_left_right" value="6" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT" glib:nick="slide-left-right" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT">
<doc xml:space="preserve">Slide from left or right according to the children order</doc>
</member>
<member name="slide_up_down" value="7" c:identifier="GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN" glib:nick="slide-up-down" glib:name="GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN">
<doc xml:space="preserve">Slide from top down or bottom up according to the order</doc>
</member>
<member name="over_up" value="8" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_UP" glib:nick="over-up" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_UP">
<doc xml:space="preserve">Cover the old page by sliding up</doc>
</member>
<member name="over_down" value="9" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_DOWN" glib:nick="over-down" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_DOWN">
<doc xml:space="preserve">Cover the old page by sliding down</doc>
</member>
<member name="over_left" value="10" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_LEFT" glib:nick="over-left" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_LEFT">
<doc xml:space="preserve">Cover the old page by sliding to the left</doc>
</member>
<member name="over_right" value="11" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_RIGHT" glib:nick="over-right" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_RIGHT">
<doc xml:space="preserve">Cover the old page by sliding to the right</doc>
</member>
<member name="under_up" value="12" c:identifier="GTK_STACK_TRANSITION_TYPE_UNDER_UP" glib:nick="under-up" glib:name="GTK_STACK_TRANSITION_TYPE_UNDER_UP">
<doc xml:space="preserve">Uncover the new page by sliding up</doc>
</member>
<member name="under_down" value="13" c:identifier="GTK_STACK_TRANSITION_TYPE_UNDER_DOWN" glib:nick="under-down" glib:name="GTK_STACK_TRANSITION_TYPE_UNDER_DOWN">
<doc xml:space="preserve">Uncover the new page by sliding down</doc>
</member>
<member name="under_left" value="14" c:identifier="GTK_STACK_TRANSITION_TYPE_UNDER_LEFT" glib:nick="under-left" glib:name="GTK_STACK_TRANSITION_TYPE_UNDER_LEFT">
<doc xml:space="preserve">Uncover the new page by sliding to the left</doc>
</member>
<member name="under_right" value="15" c:identifier="GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT" glib:nick="under-right" glib:name="GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT">
<doc xml:space="preserve">Uncover the new page by sliding to the right</doc>
</member>
<member name="over_up_down" value="16" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN" glib:nick="over-up-down" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN">
<doc xml:space="preserve">Cover the old page sliding up or uncover the new page sliding down, according to order</doc>
</member>
<member name="over_down_up" value="17" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP" glib:nick="over-down-up" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP">
<doc xml:space="preserve">Cover the old page sliding down or uncover the new page sliding up, according to order</doc>
</member>
<member name="over_left_right" value="18" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT" glib:nick="over-left-right" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT">
<doc xml:space="preserve">Cover the old page sliding left or uncover the new page sliding right, according to order</doc>
</member>
<member name="over_right_left" value="19" c:identifier="GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT" glib:nick="over-right-left" glib:name="GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT">
<doc xml:space="preserve">Cover the old page sliding right or uncover the new page sliding left, according to order</doc>
</member>
<member name="rotate_left" value="20" c:identifier="GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT" glib:nick="rotate-left" glib:name="GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT">
<doc xml:space="preserve">Pretend the pages are sides of a cube and rotate that cube to the left</doc>
</member>
<member name="rotate_right" value="21" c:identifier="GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT" glib:nick="rotate-right" glib:name="GTK_STACK_TRANSITION_TYPE_ROTATE_RIGHT">
<doc xml:space="preserve">Pretend the pages are sides of a cube and rotate that cube to the right</doc>
</member>
<member name="rotate_left_right" value="22" c:identifier="GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT" glib:nick="rotate-left-right" glib:name="GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT">
<doc xml:space="preserve">Pretend the pages are sides of a cube and rotate that cube to the left or right according to the children order</doc>
</member>
</enumeration>
<bitfield name="StateFlags" glib:type-name="GtkStateFlags" glib:get-type="gtk_state_flags_get_type" c:type="GtkStateFlags">
<doc xml:space="preserve">Describes a widget state.
Widget states are used to match the widget against CSS pseudo-classes.
Note that GTK extends the regular CSS classes and sometimes uses
different names.</doc>
<member name="normal" value="0" c:identifier="GTK_STATE_FLAG_NORMAL" glib:nick="normal" glib:name="GTK_STATE_FLAG_NORMAL">
<doc xml:space="preserve">State during normal operation</doc>
</member>
<member name="active" value="1" c:identifier="GTK_STATE_FLAG_ACTIVE" glib:nick="active" glib:name="GTK_STATE_FLAG_ACTIVE">
<doc xml:space="preserve">Widget is active</doc>
</member>
<member name="prelight" value="2" c:identifier="GTK_STATE_FLAG_PRELIGHT" glib:nick="prelight" glib:name="GTK_STATE_FLAG_PRELIGHT">
<doc xml:space="preserve">Widget has a mouse pointer over it</doc>
</member>
<member name="selected" value="4" c:identifier="GTK_STATE_FLAG_SELECTED" glib:nick="selected" glib:name="GTK_STATE_FLAG_SELECTED">
<doc xml:space="preserve">Widget is selected</doc>
</member>
<member name="insensitive" value="8" c:identifier="GTK_STATE_FLAG_INSENSITIVE" glib:nick="insensitive" glib:name="GTK_STATE_FLAG_INSENSITIVE">
<doc xml:space="preserve">Widget is insensitive</doc>
</member>
<member name="inconsistent" value="16" c:identifier="GTK_STATE_FLAG_INCONSISTENT" glib:nick="inconsistent" glib:name="GTK_STATE_FLAG_INCONSISTENT">
<doc xml:space="preserve">Widget is inconsistent</doc>
</member>
<member name="focused" value="32" c:identifier="GTK_STATE_FLAG_FOCUSED" glib:nick="focused" glib:name="GTK_STATE_FLAG_FOCUSED">
<doc xml:space="preserve">Widget has the keyboard focus</doc>
</member>
<member name="backdrop" value="64" c:identifier="GTK_STATE_FLAG_BACKDROP" glib:nick="backdrop" glib:name="GTK_STATE_FLAG_BACKDROP">
<doc xml:space="preserve">Widget is in a background toplevel window</doc>
</member>
<member name="dir_ltr" value="128" c:identifier="GTK_STATE_FLAG_DIR_LTR" glib:nick="dir-ltr" glib:name="GTK_STATE_FLAG_DIR_LTR">
<doc xml:space="preserve">Widget is in left-to-right text direction</doc>
</member>
<member name="dir_rtl" value="256" c:identifier="GTK_STATE_FLAG_DIR_RTL" glib:nick="dir-rtl" glib:name="GTK_STATE_FLAG_DIR_RTL">
<doc xml:space="preserve">Widget is in right-to-left text direction</doc>
</member>
<member name="link" value="512" c:identifier="GTK_STATE_FLAG_LINK" glib:nick="link" glib:name="GTK_STATE_FLAG_LINK">
<doc xml:space="preserve">Widget is a link</doc>
</member>
<member name="visited" value="1024" c:identifier="GTK_STATE_FLAG_VISITED" glib:nick="visited" glib:name="GTK_STATE_FLAG_VISITED">
<doc xml:space="preserve">The location the widget points to has already been visited</doc>
</member>
<member name="checked" value="2048" c:identifier="GTK_STATE_FLAG_CHECKED" glib:nick="checked" glib:name="GTK_STATE_FLAG_CHECKED">
<doc xml:space="preserve">Widget is checked</doc>
</member>
<member name="drop_active" value="4096" c:identifier="GTK_STATE_FLAG_DROP_ACTIVE" glib:nick="drop-active" glib:name="GTK_STATE_FLAG_DROP_ACTIVE">
<doc xml:space="preserve">Widget is highlighted as a drop target for DND</doc>
</member>
<member name="focus_visible" value="8192" c:identifier="GTK_STATE_FLAG_FOCUS_VISIBLE" glib:nick="focus-visible" glib:name="GTK_STATE_FLAG_FOCUS_VISIBLE">
<doc xml:space="preserve">Widget has the visible focus</doc>
</member>
<member name="focus_within" value="16384" c:identifier="GTK_STATE_FLAG_FOCUS_WITHIN" glib:nick="focus-within" glib:name="GTK_STATE_FLAG_FOCUS_WITHIN">
<doc xml:space="preserve">Widget contains the keyboard focus</doc>
</member>
</bitfield>
<class name="Statusbar" c:symbol-prefix="statusbar" c:type="GtkStatusbar" parent="Widget" glib:type-name="GtkStatusbar" glib:get-type="gtk_statusbar_get_type">
<doc xml:space="preserve">A `GtkStatusbar` widget is usually placed along the bottom of an application's
main [class@Gtk.Window].
![An example GtkStatusbar](statusbar.png)
A `GtkStatusBar` may provide a regular commentary of the application's
status (as is usually the case in a web browser, for example), or may be
used to simply output a message when the status changes, (when an upload
is complete in an FTP client, for example).
Status bars in GTK maintain a stack of messages. The message at
the top of the each bar&#x2019;s stack is the one that will currently be displayed.
Any messages added to a statusbar&#x2019;s stack must specify a context id that
is used to uniquely identify the source of a message. This context id can
be generated by [method@Gtk.Statusbar.get_context_id], given a message and
the statusbar that it will be added to. Note that messages are stored in a
stack, and when choosing which message to display, the stack structure is
adhered to, regardless of the context identifier of a message.
One could say that a statusbar maintains one stack of messages for
display purposes, but allows multiple message producers to maintain
sub-stacks of the messages they produced (via context ids).
Status bars are created using [ctor@Gtk.Statusbar.new].
Messages are added to the bar&#x2019;s stack with [method@Gtk.Statusbar.push].
The message at the top of the stack can be removed using
[method@Gtk.Statusbar.pop]. A message can be removed from anywhere in the
stack if its message id was recorded at the time it was added. This is done
using [method@Gtk.Statusbar.remove].
## CSS node
`GtkStatusbar` has a single CSS node with name `statusbar`.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_statusbar_new">
<doc xml:space="preserve">Creates a new `GtkStatusbar` ready for messages.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkStatusbar`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_context_id" c:identifier="gtk_statusbar_get_context_id">
<doc xml:space="preserve">Returns a new context identifier, given a description
of the actual context.
Note that the description is not shown in the UI.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">an integer id</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="statusbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStatusbar`</doc>
<type name="Statusbar" c:type="GtkStatusbar*"/>
</instance-parameter>
<parameter name="context_description" transfer-ownership="none">
<doc xml:space="preserve">textual description of what context
the new message is being used in</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="pop" c:identifier="gtk_statusbar_pop">
<doc xml:space="preserve">Removes the first message in the `GtkStatusbar`&#x2019;s stack
with the given context id.
Note that this may not change the displayed message,
if the message at the top of the stack has a different
context id.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="statusbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStatusbar`</doc>
<type name="Statusbar" c:type="GtkStatusbar*"/>
</instance-parameter>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">a context identifier</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="push" c:identifier="gtk_statusbar_push">
<doc xml:space="preserve">Pushes a new message onto a statusbar&#x2019;s stack.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a message id that can be used with
[method@Gtk.Statusbar.remove].</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="statusbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStatusbar`</doc>
<type name="Statusbar" c:type="GtkStatusbar*"/>
</instance-parameter>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">the message&#x2019;s context id, as returned by
gtk_statusbar_get_context_id()</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the message to add to the statusbar</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_statusbar_remove">
<doc xml:space="preserve">Forces the removal of a message from a statusbar&#x2019;s stack.
The exact @context_id and @message_id must be specified.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="statusbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStatusbar`</doc>
<type name="Statusbar" c:type="GtkStatusbar*"/>
</instance-parameter>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">a context identifier</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="message_id" transfer-ownership="none">
<doc xml:space="preserve">a message identifier, as returned by [method@Gtk.Statusbar.push]</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="remove_all" c:identifier="gtk_statusbar_remove_all">
<doc xml:space="preserve">Forces the removal of all messages from a statusbar's
stack with the exact @context_id.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="statusbar" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStatusbar`</doc>
<type name="Statusbar" c:type="GtkStatusbar*"/>
</instance-parameter>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">a context identifier</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<glib:signal name="text-popped" when="last">
<doc xml:space="preserve">Emitted whenever a new message is popped off a statusbar's stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">the context id of the relevant message/statusbar</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the message that was just popped</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="text-pushed" when="last">
<doc xml:space="preserve">Emitted whenever a new message gets pushed onto a statusbar's stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context_id" transfer-ownership="none">
<doc xml:space="preserve">the context id of the relevant message/statusbar</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the message that was pushed</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<class name="StringFilter" c:symbol-prefix="string_filter" c:type="GtkStringFilter" parent="Filter" glib:type-name="GtkStringFilter" glib:get-type="gtk_string_filter_get_type" glib:type-struct="StringFilterClass">
<doc xml:space="preserve">`GtkStringFilter` determines whether to include items by comparing
strings to a fixed search term.
The strings are obtained from the items by evaluating a `GtkExpression`
set with [method@Gtk.StringFilter.set_expression], and they are
compared against a search term set with [method@Gtk.StringFilter.set_search].
`GtkStringFilter` has several different modes of comparison - it
can match the whole string, just a prefix, or any substring. Use
[method@Gtk.StringFilter.set_match_mode] choose a mode.
It is also possible to make case-insensitive comparisons, with
[method@Gtk.StringFilter.set_ignore_case].</doc>
<constructor name="new" c:identifier="gtk_string_filter_new">
<doc xml:space="preserve">Creates a new string filter.
You will want to set up the filter by providing a string to search for
and by providing a property to look up on the item.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</return-value>
<parameters>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The expression to evaluate</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</constructor>
<method name="get_expression" c:identifier="gtk_string_filter_get_expression" glib:get-property="expression">
<attribute name="org.gtk.Method.get_property" value="expression"/>
<doc xml:space="preserve">Gets the expression that the string filter uses to
obtain strings from items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ignore_case" c:identifier="gtk_string_filter_get_ignore_case" glib:get-property="ignore-case">
<attribute name="org.gtk.Method.get_property" value="ignore-case"/>
<doc xml:space="preserve">Returns whether the filter ignores case differences.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the filter ignores case</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_match_mode" c:identifier="gtk_string_filter_get_match_mode" glib:get-property="match-mode">
<attribute name="org.gtk.Method.get_property" value="match-mode"/>
<doc xml:space="preserve">Returns the match mode that the filter is using.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the match mode of the filter</doc>
<type name="StringFilterMatchMode" c:type="GtkStringFilterMatchMode"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search" c:identifier="gtk_string_filter_get_search" glib:get-property="search">
<attribute name="org.gtk.Method.get_property" value="search"/>
<doc xml:space="preserve">Gets the search term.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The search term</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expression" c:identifier="gtk_string_filter_set_expression" glib:set-property="expression">
<attribute name="org.gtk.Method.set_property" value="expression"/>
<doc xml:space="preserve">Sets the expression that the string filter uses to
obtain strings from items.
The expression must have a value type of %G_TYPE_STRING.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
<parameter name="expression" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</method>
<method name="set_ignore_case" c:identifier="gtk_string_filter_set_ignore_case" glib:set-property="ignore-case">
<attribute name="org.gtk.Method.set_property" value="ignore-case"/>
<doc xml:space="preserve">Sets whether the filter ignores case differences.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
<parameter name="ignore_case" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to ignore case</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_match_mode" c:identifier="gtk_string_filter_set_match_mode" glib:set-property="match-mode">
<attribute name="org.gtk.Method.set_property" value="match-mode"/>
<doc xml:space="preserve">Sets the match mode for the filter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
<parameter name="mode" transfer-ownership="none">
<doc xml:space="preserve">the new match mode</doc>
<type name="StringFilterMatchMode" c:type="GtkStringFilterMatchMode"/>
</parameter>
</parameters>
</method>
<method name="set_search" c:identifier="gtk_string_filter_set_search" glib:set-property="search">
<attribute name="org.gtk.Method.set_property" value="search"/>
<doc xml:space="preserve">Sets the string to search for.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringFilter`</doc>
<type name="StringFilter" c:type="GtkStringFilter*"/>
</instance-parameter>
<parameter name="search" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The string to search for
or %NULL to clear the search</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="expression" writable="1" transfer-ownership="none" setter="set_expression" getter="get_expression">
<attribute name="org.gtk.Property.get" value="gtk_string_filter_get_expression"/>
<attribute name="org.gtk.Property.set" value="gtk_string_filter_set_expression"/>
<doc xml:space="preserve">The expression to evaluate on item to get a string to compare with.</doc>
<type name="Expression"/>
</property>
<property name="ignore-case" writable="1" transfer-ownership="none" setter="set_ignore_case" getter="get_ignore_case">
<attribute name="org.gtk.Property.get" value="gtk_string_filter_get_ignore_case"/>
<attribute name="org.gtk.Property.set" value="gtk_string_filter_set_ignore_case"/>
<doc xml:space="preserve">If matching is case sensitive.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="match-mode" writable="1" transfer-ownership="none" setter="set_match_mode" getter="get_match_mode">
<attribute name="org.gtk.Property.get" value="gtk_string_filter_get_match_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_string_filter_set_match_mode"/>
<doc xml:space="preserve">If exact matches are necessary or if substrings are allowed.</doc>
<type name="StringFilterMatchMode"/>
</property>
<property name="search" writable="1" transfer-ownership="none" setter="set_search" getter="get_search">
<attribute name="org.gtk.Property.get" value="gtk_string_filter_get_search"/>
<attribute name="org.gtk.Property.set" value="gtk_string_filter_set_search"/>
<doc xml:space="preserve">The search term.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="StringFilterClass" c:type="GtkStringFilterClass" glib:is-gtype-struct-for="StringFilter">
<field name="parent_class">
<type name="FilterClass" c:type="GtkFilterClass"/>
</field>
</record>
<enumeration name="StringFilterMatchMode" glib:type-name="GtkStringFilterMatchMode" glib:get-type="gtk_string_filter_match_mode_get_type" c:type="GtkStringFilterMatchMode">
<doc xml:space="preserve">Specifies how search strings are matched inside text.</doc>
<member name="exact" value="0" c:identifier="GTK_STRING_FILTER_MATCH_MODE_EXACT" glib:nick="exact" glib:name="GTK_STRING_FILTER_MATCH_MODE_EXACT">
<doc xml:space="preserve">The search string and
text must match exactly.</doc>
</member>
<member name="substring" value="1" c:identifier="GTK_STRING_FILTER_MATCH_MODE_SUBSTRING" glib:nick="substring" glib:name="GTK_STRING_FILTER_MATCH_MODE_SUBSTRING">
<doc xml:space="preserve">The search string
must be contained as a substring inside the text.</doc>
</member>
<member name="prefix" value="2" c:identifier="GTK_STRING_FILTER_MATCH_MODE_PREFIX" glib:nick="prefix" glib:name="GTK_STRING_FILTER_MATCH_MODE_PREFIX">
<doc xml:space="preserve">The text must begin
with the search string.</doc>
</member>
</enumeration>
<class name="StringList" c:symbol-prefix="string_list" c:type="GtkStringList" parent="GObject.Object" glib:type-name="GtkStringList" glib:get-type="gtk_string_list_get_type" glib:type-struct="StringListClass">
<doc xml:space="preserve">`GtkStringList` is a list model that wraps an array of strings.
The objects in the model have a "string" property.
`GtkStringList` is well-suited for any place where you would
typically use a `char*[]`, but need a list model.
# GtkStringList as GtkBuildable
The `GtkStringList` implementation of the `GtkBuildable` interface
supports adding items directly using the &lt;items&gt; element and
specifying &lt;item&gt; elements for each item. Each &lt;item&gt; element
supports the regular translation attributes &#x201C;translatable&#x201D;,
&#x201C;context&#x201D; and &#x201C;comments&#x201D;.
Here is a UI definition fragment specifying a `GtkStringList`
```xml
&lt;object class="GtkStringList"&gt;
&lt;items&gt;
&lt;item translatable="yes"&gt;Factory&lt;/item&gt;
&lt;item translatable="yes"&gt;Home&lt;/item&gt;
&lt;item translatable="yes"&gt;Subway&lt;/item&gt;
&lt;/items&gt;
&lt;/object&gt;
```</doc>
<implements name="Gio.ListModel"/>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_string_list_new">
<doc xml:space="preserve">Creates a new `GtkStringList` with the given @strings.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</return-value>
<parameters>
<parameter name="strings" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The strings to put in the model</doc>
<array c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="append" c:identifier="gtk_string_list_append">
<doc xml:space="preserve">Appends @string to @self.
The @string will be copied. See
[method@Gtk.StringList.take] for a way to avoid that.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</instance-parameter>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string to insert</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_string" c:identifier="gtk_string_list_get_string">
<doc xml:space="preserve">Gets the string that is at @position in @self.
If @self does not contain @position items, %NULL is returned.
This function returns the const char *. To get the
object wrapping it, use g_list_model_get_item().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the string at the given position</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position to get the string for</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_string_list_remove">
<doc xml:space="preserve">Removes the string at @position from @self.
@position must be smaller than the current
length of the list.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the string that is to be removed</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="splice" c:identifier="gtk_string_list_splice">
<doc xml:space="preserve">Changes @self by removing @n_removals strings and adding @additions
to it.
This function is more efficient than [method@Gtk.StringList.append]
and [method@Gtk.StringList.remove], because it only emits the
::items-changed signal once for the change.
This function copies the strings in @additions.
The parameters @position and @n_removals must be correct (ie:
@position + @n_removals must be less than or equal to the length
of the list at the time this function is called).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position at which to make the change</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="n_removals" transfer-ownership="none">
<doc xml:space="preserve">the number of strings to remove</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="additions" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The strings to add</doc>
<array c:type="const char* const*">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="take" c:identifier="gtk_string_list_take">
<doc xml:space="preserve">Adds @string to self at the end, and takes
ownership of it.
This variant of [method@Gtk.StringList.append]
is convenient for formatting strings:
```c
gtk_string_list_take (self, g_strdup_print ("%d dollars", lots));
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringList`</doc>
<type name="StringList" c:type="GtkStringList*"/>
</instance-parameter>
<parameter name="string" transfer-ownership="full">
<doc xml:space="preserve">the string to insert</doc>
<type name="utf8" c:type="char*"/>
</parameter>
</parameters>
</method>
</class>
<record name="StringListClass" c:type="GtkStringListClass" glib:is-gtype-struct-for="StringList">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="StringObject" c:symbol-prefix="string_object" c:type="GtkStringObject" parent="GObject.Object" glib:type-name="GtkStringObject" glib:get-type="gtk_string_object_get_type" glib:type-struct="StringObjectClass">
<doc xml:space="preserve">`GtkStringObject` is the type of items in a `GtkStringList`.
A `GtkStringObject` is a wrapper around a `const char*`; it has
a [property@Gtk.StringObject:string] property.</doc>
<constructor name="new" c:identifier="gtk_string_object_new">
<doc xml:space="preserve">Wraps a string in an object for use with `GListModel`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkStringObject`</doc>
<type name="StringObject" c:type="GtkStringObject*"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">The string to wrap</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_string" c:identifier="gtk_string_object_get_string" glib:get-property="string">
<attribute name="org.gtk.Method.get_property" value="string"/>
<doc xml:space="preserve">Returns the string contained in a `GtkStringObject`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the string of @self</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringObject`</doc>
<type name="StringObject" c:type="GtkStringObject*"/>
</instance-parameter>
</parameters>
</method>
<property name="string" transfer-ownership="none" getter="get_string">
<attribute name="org.gtk.Property.get" value="gtk_string_object_get_string"/>
<doc xml:space="preserve">The string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
</class>
<record name="StringObjectClass" c:type="GtkStringObjectClass" glib:is-gtype-struct-for="StringObject">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="StringSorter" c:symbol-prefix="string_sorter" c:type="GtkStringSorter" parent="Sorter" glib:type-name="GtkStringSorter" glib:get-type="gtk_string_sorter_get_type" glib:type-struct="StringSorterClass">
<doc xml:space="preserve">`GtkStringSorter` is a `GtkSorter` that compares strings.
It does the comparison in a linguistically correct way using the
current locale by normalizing Unicode strings and possibly case-folding
them before performing the comparison.
To obtain the strings to compare, this sorter evaluates a
[class@Gtk.Expression].</doc>
<constructor name="new" c:identifier="gtk_string_sorter_new">
<doc xml:space="preserve">Creates a new string sorter that compares items using the given
@expression.
Unless an expression is set on it, this sorter will always
compare items as invalid.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkStringSorter`</doc>
<type name="StringSorter" c:type="GtkStringSorter*"/>
</return-value>
<parameters>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">The expression to evaluate</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</constructor>
<method name="get_expression" c:identifier="gtk_string_sorter_get_expression" glib:get-property="expression">
<attribute name="org.gtk.Method.get_property" value="expression"/>
<doc xml:space="preserve">Gets the expression that is evaluated to obtain strings from items.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringSorter`</doc>
<type name="StringSorter" c:type="GtkStringSorter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_ignore_case" c:identifier="gtk_string_sorter_get_ignore_case" glib:get-property="ignore-case">
<attribute name="org.gtk.Method.get_property" value="ignore-case"/>
<doc xml:space="preserve">Gets whether the sorter ignores case differences.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self is ignoring case differences</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringSorter`</doc>
<type name="StringSorter" c:type="GtkStringSorter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expression" c:identifier="gtk_string_sorter_set_expression" glib:set-property="expression">
<attribute name="org.gtk.Method.set_property" value="expression"/>
<doc xml:space="preserve">Sets the expression that is evaluated to obtain strings from items.
The expression must have the type %G_TYPE_STRING.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringSorter`</doc>
<type name="StringSorter" c:type="GtkStringSorter*"/>
</instance-parameter>
<parameter name="expression" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</method>
<method name="set_ignore_case" c:identifier="gtk_string_sorter_set_ignore_case" glib:set-property="ignore-case">
<attribute name="org.gtk.Method.set_property" value="ignore-case"/>
<doc xml:space="preserve">Sets whether the sorter will ignore case differences.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStringSorter`</doc>
<type name="StringSorter" c:type="GtkStringSorter*"/>
</instance-parameter>
<parameter name="ignore_case" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to ignore case differences</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="expression" writable="1" transfer-ownership="none" setter="set_expression" getter="get_expression">
<attribute name="org.gtk.Property.get" value="gtk_string_sorter_get_expression"/>
<attribute name="org.gtk.Property.set" value="gtk_string_sorter_set_expression"/>
<doc xml:space="preserve">The expression to evaluate on item to get a string to compare with.</doc>
<type name="Expression"/>
</property>
<property name="ignore-case" writable="1" transfer-ownership="none" setter="set_ignore_case" getter="get_ignore_case">
<attribute name="org.gtk.Property.get" value="gtk_string_sorter_get_ignore_case"/>
<attribute name="org.gtk.Property.set" value="gtk_string_sorter_set_ignore_case"/>
<doc xml:space="preserve">If matching is case sensitive.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="StringSorterClass" c:type="GtkStringSorterClass" glib:is-gtype-struct-for="StringSorter">
<field name="parent_class">
<type name="SorterClass" c:type="GtkSorterClass"/>
</field>
</record>
<class name="StyleContext" c:symbol-prefix="style_context" c:type="GtkStyleContext" parent="GObject.Object" glib:type-name="GtkStyleContext" glib:get-type="gtk_style_context_get_type" glib:type-struct="StyleContextClass">
<doc xml:space="preserve">`GtkStyleContext` stores styling information affecting a widget.
In order to construct the final style information, `GtkStyleContext`
queries information from all attached `GtkStyleProviders`. Style
providers can be either attached explicitly to the context through
[method@Gtk.StyleContext.add_provider], or to the display through
[func@Gtk.StyleContext.add_provider_for_display]. The resulting
style is a combination of all providers&#x2019; information in priority order.
For GTK widgets, any `GtkStyleContext` returned by
[method@Gtk.Widget.get_style_context] will already have a `GdkDisplay`
and RTL/LTR information set. The style context will also be updated
automatically if any of these settings change on the widget.
# Style Classes
Widgets can add style classes to their context, which can be used to associate
different styles by class. The documentation for individual widgets lists
which style classes it uses itself, and which style classes may be added by
applications to affect their appearance.
# Custom styling in UI libraries and applications
If you are developing a library with custom widgets that render differently
than standard components, you may need to add a `GtkStyleProvider` yourself
with the %GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority, either a
`GtkCssProvider` or a custom object implementing the `GtkStyleProvider`
interface. This way themes may still attempt to style your UI elements in
a different way if needed so.
If you are using custom styling on an applications, you probably want then
to make your style information prevail to the theme&#x2019;s, so you must use
a `GtkStyleProvider` with the %GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
priority, keep in mind that the user settings in
`XDG_CONFIG_HOME/gtk-4.0/gtk.css` will
still take precedence over your changes, as it uses the
%GTK_STYLE_PROVIDER_PRIORITY_USER priority.</doc>
<function name="add_provider_for_display" c:identifier="gtk_style_context_add_provider_for_display">
<doc xml:space="preserve">Adds a global style provider to @display, which will be used
in style construction for all `GtkStyleContexts` under @display.
GTK uses this to make styling information from `GtkSettings`
available.
Note: If both priorities are the same, A `GtkStyleProvider`
added through [method@Gtk.StyleContext.add_provider] takes
precedence over another added through this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleProvider`</doc>
<type name="StyleProvider" c:type="GtkStyleProvider*"/>
</parameter>
<parameter name="priority" transfer-ownership="none">
<doc xml:space="preserve">the priority of the style provider. The lower
it is, the earlier it will be used in the style construction.
Typically this will be in the range between
%GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and
%GTK_STYLE_PROVIDER_PRIORITY_USER</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</function>
<function name="remove_provider_for_display" c:identifier="gtk_style_context_remove_provider_for_display">
<doc xml:space="preserve">Removes @provider from the global style providers list in @display.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleProvider`</doc>
<type name="StyleProvider" c:type="GtkStyleProvider*"/>
</parameter>
</parameters>
</function>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="add_class" c:identifier="gtk_style_context_add_class">
<doc xml:space="preserve">Adds a style class to @context, so later uses of the
style context will make use of this new class for styling.
In the CSS file format, a `GtkEntry` defining a &#x201C;search&#x201D;
class, would be matched by:
```css
entry.search { ... }
```
While any widget defining a &#x201C;search&#x201D; class would be
matched by:
```css
.search { ... }
```</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="class_name" transfer-ownership="none">
<doc xml:space="preserve">class name to use in styling</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_provider" c:identifier="gtk_style_context_add_provider">
<doc xml:space="preserve">Adds a style provider to @context, to be used in style construction.
Note that a style provider added by this function only affects
the style of the widget to which @context belongs. If you want
to affect the style of all widgets, use
[func@Gtk.StyleContext.add_provider_for_display].
Note: If both priorities are the same, a `GtkStyleProvider`
added through this function takes precedence over another added
through [func@Gtk.StyleContext.add_provider_for_display].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleProvider`</doc>
<type name="StyleProvider" c:type="GtkStyleProvider*"/>
</parameter>
<parameter name="priority" transfer-ownership="none">
<doc xml:space="preserve">the priority of the style provider. The lower
it is, the earlier it will be used in the style construction.
Typically this will be in the range between
%GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and
%GTK_STYLE_PROVIDER_PRIORITY_USER</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_border" c:identifier="gtk_style_context_get_border">
<doc xml:space="preserve">Gets the border for a given state as a `GtkBorder`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="border" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return value for the border settings</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</method>
<method name="get_color" c:identifier="gtk_style_context_get_color">
<doc xml:space="preserve">Gets the foreground color for a given state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return value for the foreground color</doc>
<type name="Gdk.RGBA" c:type="GdkRGBA*"/>
</parameter>
</parameters>
</method>
<method name="get_display" c:identifier="gtk_style_context_get_display" glib:get-property="display">
<doc xml:space="preserve">Returns the `GdkDisplay` to which @context is attached.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`.</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin" c:identifier="gtk_style_context_get_margin">
<doc xml:space="preserve">Gets the margin for a given state as a `GtkBorder`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="margin" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return value for the margin settings</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</method>
<method name="get_padding" c:identifier="gtk_style_context_get_padding">
<doc xml:space="preserve">Gets the padding for a given state as a `GtkBorder`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="padding" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">return value for the padding settings</doc>
<type name="Border" c:type="GtkBorder*"/>
</parameter>
</parameters>
</method>
<method name="get_scale" c:identifier="gtk_style_context_get_scale">
<doc xml:space="preserve">Returns the scale used for assets.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scale</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_state" c:identifier="gtk_style_context_get_state">
<doc xml:space="preserve">Returns the state used for style matching.
This method should only be used to retrieve the `GtkStateFlags`
to pass to `GtkStyleContext` methods, like
[method@Gtk.StyleContext.get_padding].
If you need to retrieve the current state of a `GtkWidget`, use
[method@Gtk.Widget.get_state_flags].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the state flags</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_class" c:identifier="gtk_style_context_has_class">
<doc xml:space="preserve">Returns %TRUE if @context currently has defined the
given class name.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @context has @class_name defined</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="class_name" transfer-ownership="none">
<doc xml:space="preserve">a class name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="lookup_color" c:identifier="gtk_style_context_lookup_color">
<doc xml:space="preserve">Looks up and resolves a color name in the @context color map.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @color_name was found and resolved, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="color_name" transfer-ownership="none">
<doc xml:space="preserve">color name to lookup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="color" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">Return location for the looked up color</doc>
<type name="Gdk.RGBA" c:type="GdkRGBA*"/>
</parameter>
</parameters>
</method>
<method name="remove_class" c:identifier="gtk_style_context_remove_class">
<doc xml:space="preserve">Removes @class_name from @context.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="class_name" transfer-ownership="none">
<doc xml:space="preserve">class name to remove</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove_provider" c:identifier="gtk_style_context_remove_provider">
<doc xml:space="preserve">Removes @provider from the style providers list in @context.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="provider" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleProvider`</doc>
<type name="StyleProvider" c:type="GtkStyleProvider*"/>
</parameter>
</parameters>
</method>
<method name="restore" c:identifier="gtk_style_context_restore">
<doc xml:space="preserve">Restores @context state to a previous stage.
See [method@Gtk.StyleContext.save].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="save" c:identifier="gtk_style_context_save">
<doc xml:space="preserve">Saves the @context state.
This allows temporary modifications done through
[method@Gtk.StyleContext.add_class],
[method@Gtk.StyleContext.remove_class],
[method@Gtk.StyleContext.set_state] to be quickly
reverted in one go through [method@Gtk.StyleContext.restore].
The matching call to [method@Gtk.StyleContext.restore]
must be done before GTK returns to the main loop.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_display" c:identifier="gtk_style_context_set_display" glib:set-property="display">
<doc xml:space="preserve">Attaches @context to the given display.
The display is used to add style information from &#x201C;global&#x201D;
style providers, such as the display's `GtkSettings` instance.
If you are using a `GtkStyleContext` returned from
[method@Gtk.Widget.get_style_context], you do not need to
call this yourself.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</method>
<method name="set_scale" c:identifier="gtk_style_context_set_scale">
<doc xml:space="preserve">Sets the scale to use when getting image assets for the style.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="scale" transfer-ownership="none">
<doc xml:space="preserve">scale</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_state" c:identifier="gtk_style_context_set_state">
<doc xml:space="preserve">Sets the state to be used for style matching.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">state to represent</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_style_context_to_string">
<doc xml:space="preserve">Converts the style context into a string representation.
The string representation always includes information about
the name, state, id, visibility and style classes of the CSS
node that is backing @context. Depending on the flags, more
information may be included.
This function is intended for testing and debugging of the
CSS implementation in GTK. There are no guarantees about
the format of the returned string, it may change.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated string representing @context</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">Flags that determine what to print</doc>
<type name="StyleContextPrintFlags" c:type="GtkStyleContextPrintFlags"/>
</parameter>
</parameters>
</method>
<property name="display" writable="1" transfer-ownership="none" setter="set_display" getter="get_display">
<type name="Gdk.Display"/>
</property>
<field name="parent_object">
<type name="GObject.Object" c:type="GObject"/>
</field>
</class>
<record name="StyleContextClass" c:type="GtkStyleContextClass" glib:is-gtype-struct-for="StyleContext">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<bitfield name="StyleContextPrintFlags" glib:type-name="GtkStyleContextPrintFlags" glib:get-type="gtk_style_context_print_flags_get_type" c:type="GtkStyleContextPrintFlags">
<doc xml:space="preserve">Flags that modify the behavior of gtk_style_context_to_string().
New values may be added to this enumeration.</doc>
<member name="none" value="0" c:identifier="GTK_STYLE_CONTEXT_PRINT_NONE" glib:nick="none" glib:name="GTK_STYLE_CONTEXT_PRINT_NONE">
<doc xml:space="preserve">Default value.</doc>
</member>
<member name="recurse" value="1" c:identifier="GTK_STYLE_CONTEXT_PRINT_RECURSE" glib:nick="recurse" glib:name="GTK_STYLE_CONTEXT_PRINT_RECURSE">
<doc xml:space="preserve">Print the entire tree of
CSS nodes starting at the style context's node</doc>
</member>
<member name="show_style" value="2" c:identifier="GTK_STYLE_CONTEXT_PRINT_SHOW_STYLE" glib:nick="show-style" glib:name="GTK_STYLE_CONTEXT_PRINT_SHOW_STYLE">
<doc xml:space="preserve">Show the values of the
CSS properties for each node</doc>
</member>
<member name="show_change" value="4" c:identifier="GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE" glib:nick="show-change" glib:name="GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE">
<doc xml:space="preserve">Show information about
what changes affect the styles</doc>
</member>
</bitfield>
<interface name="StyleProvider" c:symbol-prefix="style_provider" c:type="GtkStyleProvider" glib:type-name="GtkStyleProvider" glib:get-type="gtk_style_provider_get_type">
<doc xml:space="preserve">`GtkStyleProvider` is an interface for style information used by
`GtkStyleContext`.
See [method@Gtk.StyleContext.add_provider] and
[func@Gtk.StyleContext.add_provider_for_display] for
adding `GtkStyleProviders`.
GTK uses the `GtkStyleProvider` implementation for CSS in
[class@Gtk.CssProvider].</doc>
<glib:signal name="gtk-private-changed" when="last">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</interface>
<class name="Switch" c:symbol-prefix="switch" c:type="GtkSwitch" parent="Widget" glib:type-name="GtkSwitch" glib:get-type="gtk_switch_get_type">
<doc xml:space="preserve">`GtkSwitch` is a "light switch" that has two states: on or off.
![An example GtkSwitch](switch.png)
The user can control which state should be active by clicking the
empty area, or by dragging the handle.
`GtkSwitch` can also handle situations where the underlying state
changes with a delay. See [signal@GtkSwitch::state-set] for details.
# CSS nodes
```
switch
&#x251C;&#x2500;&#x2500; label
&#x251C;&#x2500;&#x2500; label
&#x2570;&#x2500;&#x2500; slider
```
`GtkSwitch` has four css nodes, the main node with the name switch and
subnodes for the slider and the on and off labels. Neither of them is
using any style classes.
# Accessibility
`GtkSwitch` uses the %GTK_ACCESSIBLE_ROLE_SWITCH role.</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_switch_new">
<doc xml:space="preserve">Creates a new `GtkSwitch` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the newly created `GtkSwitch` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_active" c:identifier="gtk_switch_get_active" glib:get-property="active">
<attribute name="org.gtk.Method.get_property" value="active"/>
<doc xml:space="preserve">Gets whether the `GtkSwitch` is in its &#x201C;on&#x201D; or &#x201C;off&#x201D; state.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the `GtkSwitch` is active, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSwitch`</doc>
<type name="Switch" c:type="GtkSwitch*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_state" c:identifier="gtk_switch_get_state" glib:get-property="state">
<attribute name="org.gtk.Method.get_property" value="state"/>
<doc xml:space="preserve">Gets the underlying state of the `GtkSwitch`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the underlying state</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSwitch`</doc>
<type name="Switch" c:type="GtkSwitch*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_active" c:identifier="gtk_switch_set_active" glib:set-property="active">
<attribute name="org.gtk.Method.set_property" value="active"/>
<doc xml:space="preserve">Changes the state of @self to the desired one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSwitch`</doc>
<type name="Switch" c:type="GtkSwitch*"/>
</instance-parameter>
<parameter name="is_active" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self should be active, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_state" c:identifier="gtk_switch_set_state" glib:set-property="state">
<attribute name="org.gtk.Method.set_property" value="state"/>
<doc xml:space="preserve">Sets the underlying state of the `GtkSwitch`.
Normally, this is the same as [property@Gtk.Switch:active], unless
the switch is set up for delayed state changes. This function is
typically called from a [signal@Gtk.Switch::state-set] signal handler.
See [signal@Gtk.Switch::state-set] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSwitch`</doc>
<type name="Switch" c:type="GtkSwitch*"/>
</instance-parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new state</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="active" writable="1" transfer-ownership="none" setter="set_active" getter="get_active">
<attribute name="org.gtk.Property.get" value="gtk_switch_get_active"/>
<attribute name="org.gtk.Property.set" value="gtk_switch_set_active"/>
<doc xml:space="preserve">Whether the `GtkSwitch` widget is in its on or off state.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="state" writable="1" transfer-ownership="none" setter="set_state" getter="get_state">
<attribute name="org.gtk.Property.get" value="gtk_switch_get_state"/>
<attribute name="org.gtk.Property.set" value="gtk_switch_set_state"/>
<doc xml:space="preserve">The backend state that is controlled by the switch.
See [signal@GtkSwitch::state-set] for details.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="activate" when="first" action="1">
<doc xml:space="preserve">Emitted to animate the switch.
Applications should never connect to this signal,
but use the [property@Gtk.Switch:active] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="state-set" when="last">
<doc xml:space="preserve">Emitted to change the underlying state.
The ::state-set signal is emitted when the user changes the switch
position. The default handler keeps the state in sync with the
[property@Gtk.Switch:active] property.
To implement delayed state change, applications can connect to this
signal, initiate the change of the underlying state, and call
[method@Gtk.Switch.set_state] when the underlying state change is
complete. The signal handler should return %TRUE to prevent the
default handler from running.
Visually, the underlying state is represented by the trough color of
the switch, while the [property@Gtk.Switch:active] property is
represented by the position of the switch.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop the signal emission</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new state of the switch</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="SymbolicColor" version="4.6" glib:type-name="GtkSymbolicColor" glib:get-type="gtk_symbolic_color_get_type" c:type="GtkSymbolicColor">
<doc xml:space="preserve">The indexes of colors passed to symbolic color rendering, such as
[vfunc@Gtk.SymbolicPaintable.snapshot_symbolic].
More values may be added over time.</doc>
<member name="foreground" value="0" c:identifier="GTK_SYMBOLIC_COLOR_FOREGROUND" glib:nick="foreground" glib:name="GTK_SYMBOLIC_COLOR_FOREGROUND">
<doc xml:space="preserve">The default foreground color</doc>
</member>
<member name="error" value="1" c:identifier="GTK_SYMBOLIC_COLOR_ERROR" glib:nick="error" glib:name="GTK_SYMBOLIC_COLOR_ERROR">
<doc xml:space="preserve">Indication color for errors</doc>
</member>
<member name="warning" value="2" c:identifier="GTK_SYMBOLIC_COLOR_WARNING" glib:nick="warning" glib:name="GTK_SYMBOLIC_COLOR_WARNING">
<doc xml:space="preserve">Indication color for warnings</doc>
</member>
<member name="success" value="3" c:identifier="GTK_SYMBOLIC_COLOR_SUCCESS" glib:nick="success" glib:name="GTK_SYMBOLIC_COLOR_SUCCESS">
<doc xml:space="preserve">Indication color for success</doc>
</member>
</enumeration>
<interface name="SymbolicPaintable" c:symbol-prefix="symbolic_paintable" c:type="GtkSymbolicPaintable" version="4.6" glib:type-name="GtkSymbolicPaintable" glib:get-type="gtk_symbolic_paintable_get_type" glib:type-struct="SymbolicPaintableInterface">
<doc xml:space="preserve">`GtkSymbolicPaintable` is an interface that support symbolic colors in
paintables.
`GdkPaintable`s implementing the interface will have the
[vfunc@Gtk.SymbolicPaintable.snapshot_symbolic] function called and
have the colors for drawing symbolic icons passed. At least 4 colors are guaranteed
to be passed every time.
These 4 colors are the foreground color, and the colors to use for errors, warnings
and success information in that order.
More colors may be added in the future.</doc>
<prerequisite name="Gdk.Paintable"/>
<virtual-method name="snapshot_symbolic" invoker="snapshot_symbolic" version="4.6">
<doc xml:space="preserve">Snapshots the paintable with the given colors.
If less than 4 colors are provided, GTK will pad the array with default
colors.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSymbolicPaintable`</doc>
<type name="SymbolicPaintable" c:type="GtkSymbolicPaintable*"/>
</instance-parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSnapshot` to snapshot to</doc>
<type name="Gdk.Snapshot" c:type="GdkSnapshot*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="colors" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an array of colors</doc>
<array length="4" zero-terminated="0" c:type="const GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">The number of colors</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</virtual-method>
<method name="snapshot_symbolic" c:identifier="gtk_symbolic_paintable_snapshot_symbolic" version="4.6">
<doc xml:space="preserve">Snapshots the paintable with the given colors.
If less than 4 colors are provided, GTK will pad the array with default
colors.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSymbolicPaintable`</doc>
<type name="SymbolicPaintable" c:type="GtkSymbolicPaintable*"/>
</instance-parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSnapshot` to snapshot to</doc>
<type name="Gdk.Snapshot" c:type="GdkSnapshot*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="colors" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an array of colors</doc>
<array length="4" zero-terminated="0" c:type="const GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">The number of colors</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</method>
</interface>
<record name="SymbolicPaintableInterface" c:type="GtkSymbolicPaintableInterface" glib:is-gtype-struct-for="SymbolicPaintable">
<doc xml:space="preserve">The list of virtual functions for the `GtkSymbolicPaintable` interface.
No function must be implemented, default implementations exist for each one.</doc>
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="snapshot_symbolic">
<callback name="snapshot_symbolic">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GtkSymbolicPaintable`</doc>
<type name="SymbolicPaintable" c:type="GtkSymbolicPaintable*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSnapshot` to snapshot to</doc>
<type name="Gdk.Snapshot" c:type="GdkSnapshot*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height to snapshot in</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="colors" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an array of colors</doc>
<array length="5" zero-terminated="0" c:type="const GdkRGBA*">
<type name="Gdk.RGBA" c:type="GdkRGBA"/>
</array>
</parameter>
<parameter name="n_colors" transfer-ownership="none">
<doc xml:space="preserve">The number of colors</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<enumeration name="SystemSetting" glib:type-name="GtkSystemSetting" glib:get-type="gtk_system_setting_get_type" c:type="GtkSystemSetting">
<doc xml:space="preserve">Values that can be passed to the [vfunc@Gtk.Widget.system_setting_changed]
vfunc.
The values indicate which system setting has changed.
Widgets may need to drop caches, or react otherwise.
Most of the values correspond to [class@Settings] properties.
More values may be added over time.</doc>
<member name="dpi" value="0" c:identifier="GTK_SYSTEM_SETTING_DPI" glib:nick="dpi" glib:name="GTK_SYSTEM_SETTING_DPI">
<doc xml:space="preserve">the [property@Gtk.Settings:gtk-xft-dpi] setting has changed</doc>
</member>
<member name="font_name" value="1" c:identifier="GTK_SYSTEM_SETTING_FONT_NAME" glib:nick="font-name" glib:name="GTK_SYSTEM_SETTING_FONT_NAME">
<doc xml:space="preserve">The [property@Gtk.Settings:gtk-font-name] setting has changed</doc>
</member>
<member name="font_config" value="2" c:identifier="GTK_SYSTEM_SETTING_FONT_CONFIG" glib:nick="font-config" glib:name="GTK_SYSTEM_SETTING_FONT_CONFIG">
<doc xml:space="preserve">The font configuration has changed in a way that
requires text to be redrawn. This can be any of the
[property@Gtk.Settings:gtk-xft-antialias],
[property@Gtk.Settings:gtk-xft-hinting],
[property@Gtk.Settings:gtk-xft-hintstyle],
[property@Gtk.Settings:gtk-xft-rgba] or
[property@Gtk.Settings:gtk-fontconfig-timestamp] settings</doc>
</member>
<member name="display" value="3" c:identifier="GTK_SYSTEM_SETTING_DISPLAY" glib:nick="display" glib:name="GTK_SYSTEM_SETTING_DISPLAY">
<doc xml:space="preserve">The display has changed</doc>
</member>
<member name="icon_theme" value="4" c:identifier="GTK_SYSTEM_SETTING_ICON_THEME" glib:nick="icon-theme" glib:name="GTK_SYSTEM_SETTING_ICON_THEME">
<doc xml:space="preserve">The icon theme has changed in a way that requires
icons to be looked up again</doc>
</member>
</enumeration>
<function-macro name="TEXT" c:identifier="GTK_TEXT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_BUFFER" c:identifier="GTK_TEXT_BUFFER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_BUFFER_CLASS" c:identifier="GTK_TEXT_BUFFER_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_BUFFER_GET_CLASS" c:identifier="GTK_TEXT_BUFFER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_CHILD_ANCHOR" c:identifier="GTK_TEXT_CHILD_ANCHOR" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_CHILD_ANCHOR_CLASS" c:identifier="GTK_TEXT_CHILD_ANCHOR_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_CHILD_ANCHOR_GET_CLASS" c:identifier="GTK_TEXT_CHILD_ANCHOR_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_MARK" c:identifier="GTK_TEXT_MARK" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_MARK_CLASS" c:identifier="GTK_TEXT_MARK_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_MARK_GET_CLASS" c:identifier="GTK_TEXT_MARK_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_TAG" c:identifier="GTK_TEXT_TAG" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_TAG_CLASS" c:identifier="GTK_TEXT_TAG_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_TAG_GET_CLASS" c:identifier="GTK_TEXT_TAG_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_TAG_TABLE" c:identifier="GTK_TEXT_TAG_TABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_VIEW" c:identifier="GTK_TEXT_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_VIEW_CLASS" c:identifier="GTK_TEXT_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TEXT_VIEW_GET_CLASS" c:identifier="GTK_TEXT_VIEW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="TEXT_VIEW_PRIORITY_VALIDATE" value="125" c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
<doc xml:space="preserve">The priority at which the text view validates onscreen lines
in an idle job in the background.</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="TOGGLE_BUTTON" c:identifier="GTK_TOGGLE_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TOGGLE_BUTTON_CLASS" c:identifier="GTK_TOGGLE_BUTTON_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TOGGLE_BUTTON_GET_CLASS" c:identifier="GTK_TOGGLE_BUTTON_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TOOLTIP" c:identifier="GTK_TOOLTIP" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_DRAG_DEST" c:identifier="GTK_TREE_DRAG_DEST" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_DRAG_DEST_GET_IFACE" c:identifier="GTK_TREE_DRAG_DEST_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_DRAG_SOURCE" c:identifier="GTK_TREE_DRAG_SOURCE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_DRAG_SOURCE_GET_IFACE" c:identifier="GTK_TREE_DRAG_SOURCE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL" c:identifier="GTK_TREE_MODEL" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_FILTER" c:identifier="GTK_TREE_MODEL_FILTER" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_FILTER_CLASS" c:identifier="GTK_TREE_MODEL_FILTER_CLASS" introspectable="0">
<parameters>
<parameter name="vtable">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_FILTER_GET_CLASS" c:identifier="GTK_TREE_MODEL_FILTER_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_GET_IFACE" c:identifier="GTK_TREE_MODEL_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_SORT" c:identifier="GTK_TREE_MODEL_SORT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_SORT_CLASS" c:identifier="GTK_TREE_MODEL_SORT_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_MODEL_SORT_GET_CLASS" c:identifier="GTK_TREE_MODEL_SORT_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_SELECTION" c:identifier="GTK_TREE_SELECTION" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_SORTABLE" c:identifier="GTK_TREE_SORTABLE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID" value="-1" c:type="GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID">
<doc xml:space="preserve">Uses the default sort function in a [iface@Gtk.TreeSortable].
See also: [method@Gtk.TreeSortable.set_sort_column_id]</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="TREE_SORTABLE_GET_IFACE" c:identifier="GTK_TREE_SORTABLE_GET_IFACE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<constant name="TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID" value="-2" c:type="GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID">
<doc xml:space="preserve">Disables sorting in a [iface@Gtk.TreeSortable].
See also: [method@Gtk.TreeSortable.set_sort_column_id]</doc>
<type name="gint" c:type="gint"/>
</constant>
<function-macro name="TREE_STORE" c:identifier="GTK_TREE_STORE" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_STORE_CLASS" c:identifier="GTK_TREE_STORE_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_STORE_GET_CLASS" c:identifier="GTK_TREE_STORE_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_VIEW" c:identifier="GTK_TREE_VIEW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_VIEW_CLASS" c:identifier="GTK_TREE_VIEW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_VIEW_COLUMN" c:identifier="GTK_TREE_VIEW_COLUMN" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="TREE_VIEW_GET_CLASS" c:identifier="GTK_TREE_VIEW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="Text" c:symbol-prefix="text" c:type="GtkText" parent="Widget" glib:type-name="GtkText" glib:get-type="gtk_text_get_type">
<doc xml:space="preserve">The `GtkText` widget is a single-line text entry widget.
`GtkText` is the common implementation of single-line text editing
that is shared between `GtkEntry`, `GtkPasswordEntry`, `GtkSpinButton`
and other widgets. In all of these, `GtkText` is used as the delegate
for the [iface@Gtk.Editable] implementation.
A fairly large set of key bindings are supported by default. If the
entered text is longer than the allocation of the widget, the widget
will scroll so that the cursor position is visible.
When using an entry for passwords and other sensitive information,
it can be put into &#x201C;password mode&#x201D; using [method@Gtk.Text.set_visibility].
In this mode, entered text is displayed using a &#x201C;invisible&#x201D; character.
By default, GTK picks the best invisible character that is available
in the current font, but it can be changed with
[method@Gtk.Text.set_invisible_char].
If you are looking to add icons or progress display in an entry, look
at `GtkEntry`. There other alternatives for more specialized use cases,
such as `GtkSearchEntry`.
If you need multi-line editable text, look at `GtkTextView`.
# CSS nodes
```
text[.read-only]
&#x251C;&#x2500;&#x2500; placeholder
&#x251C;&#x2500;&#x2500; undershoot.left
&#x251C;&#x2500;&#x2500; undershoot.right
&#x251C;&#x2500;&#x2500; [selection]
&#x251C;&#x2500;&#x2500; [block-cursor]
&#x2570;&#x2500;&#x2500; [window.popup]
```
`GtkText` has a main node with the name text. Depending on the properties
of the widget, the .read-only style class may appear.
When the entry has a selection, it adds a subnode with the name selection.
When the entry is in overwrite mode, it adds a subnode with the name
block-cursor that determines how the block cursor is drawn.
The CSS node for a context menu is added as a subnode below text as well.
The undershoot nodes are used to draw the underflow indication when content
is scrolled out of view. These nodes get the .left and .right style classes
added depending on where the indication is drawn.
When touch is used and touch selection handles are shown, they are using
CSS nodes with name cursor-handle. They get the .top or .bottom style class
depending on where they are shown in relation to the selection. If there is
just a single handle for the text cursor, it gets the style class
.insertion-cursor.
# Accessibility
`GtkText` uses the %GTK_ACCESSIBLE_ROLE_NONE role, which causes it to be
skipped for accessibility. This is because `GtkText` is expected to be used
as a delegate for a `GtkEditable` implementation that will be represented
to accessibility.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Editable"/>
<constructor name="new" c:identifier="gtk_text_new">
<doc xml:space="preserve">Creates a new `GtkText`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkText`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_buffer" c:identifier="gtk_text_new_with_buffer">
<doc xml:space="preserve">Creates a new `GtkText` with the specified text buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkText`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">The buffer to use for the new `GtkText`.</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
</parameters>
</constructor>
<method name="compute_cursor_extents" c:identifier="gtk_text_compute_cursor_extents" version="4.4">
<doc xml:space="preserve">Determine the positions of the strong and weak cursors if the
insertion point in the layout is at @position.
The position of each cursor is stored as a zero-width rectangle.
The strong cursor location is the location where characters of
the directionality equal to the base direction are inserted.
The weak cursor location is the location where characters of
the directionality opposite to the base direction are inserted.
The rectangle positions are in widget coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the character position</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
<parameter name="strong" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the strong cursor position</doc>
<type name="Graphene.Rect" c:type="graphene_rect_t*"/>
</parameter>
<parameter name="weak" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the weak cursor position</doc>
<type name="Graphene.Rect" c:type="graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="get_activates_default" c:identifier="gtk_text_get_activates_default" glib:get-property="activates-default">
<attribute name="org.gtk.Method.get_property" value="activates-default"/>
<doc xml:space="preserve">Returns whether pressing Enter will activate
the default widget for the window containing @self.
See [method@Gtk.Text.set_activates_default].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the `GtkText` will activate the default widget</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_attributes" c:identifier="gtk_text_get_attributes" glib:get-property="attributes">
<attribute name="org.gtk.Method.get_property" value="attributes"/>
<doc xml:space="preserve">Gets the attribute list that was set on the `GtkText`.
See [method@Gtk.Text.set_attributes].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the attribute list</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_buffer" c:identifier="gtk_text_get_buffer" glib:get-property="buffer">
<attribute name="org.gtk.Method.get_property" value="buffer"/>
<doc xml:space="preserve">Get the `GtkEntryBuffer` object which holds the text for
this widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GtkEntryBuffer` object.</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_enable_emoji_completion" c:identifier="gtk_text_get_enable_emoji_completion" glib:get-property="enable-emoji-completion">
<attribute name="org.gtk.Method.get_property" value="enable-emoji-completion"/>
<doc xml:space="preserve">Returns whether Emoji completion is enabled for this
`GtkText` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if Emoji completion is enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_extra_menu" c:identifier="gtk_text_get_extra_menu" glib:get-property="extra-menu">
<attribute name="org.gtk.Method.get_property" value="extra-menu"/>
<doc xml:space="preserve">Gets the menu model for extra items in the context menu.
See [method@Gtk.Text.set_extra_menu].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the menu model</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_hints" c:identifier="gtk_text_get_input_hints" glib:get-property="input-hints">
<attribute name="org.gtk.Method.get_property" value="input-hints"/>
<doc xml:space="preserve">Gets the input hints of the `GtkText`.</doc>
<return-value transfer-ownership="none">
<type name="InputHints" c:type="GtkInputHints"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_purpose" c:identifier="gtk_text_get_input_purpose" glib:get-property="input-purpose">
<attribute name="org.gtk.Method.get_property" value="input-purpose"/>
<doc xml:space="preserve">Gets the input purpose of the `GtkText`.</doc>
<return-value transfer-ownership="none">
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_invisible_char" c:identifier="gtk_text_get_invisible_char" glib:get-property="invisible-char">
<attribute name="org.gtk.Method.get_property" value="invisible-char"/>
<doc xml:space="preserve">Retrieves the character displayed when visibility is set to false.
Note that GTK does not compute this value unless it needs it,
so the value returned by this function is not very useful unless
it has been explicitly set with [method@Gtk.Text.set_invisible_char].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current invisible char, or 0, if @text does not
show invisible text at all.</doc>
<type name="gunichar" c:type="gunichar"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_length" c:identifier="gtk_text_get_max_length" glib:get-property="max-length">
<attribute name="org.gtk.Method.get_property" value="max-length"/>
<doc xml:space="preserve">Retrieves the maximum allowed length of the text in @self.
See [method@Gtk.Text.set_max_length].
This is equivalent to getting @self's `GtkEntryBuffer` and
calling [method@Gtk.EntryBuffer.get_max_length] on it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the maximum allowed number of characters
in `GtkText`, or 0 if there is no maximum.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_overwrite_mode" c:identifier="gtk_text_get_overwrite_mode" glib:get-property="overwrite-mode">
<attribute name="org.gtk.Method.get_property" value="overwrite-mode"/>
<doc xml:space="preserve">Gets whether text is overwritten when typing in the `GtkText`.
See [method@Gtk.Text.set_overwrite_mode].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the text is overwritten when typing</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_placeholder_text" c:identifier="gtk_text_get_placeholder_text" glib:get-property="placeholder-text">
<attribute name="org.gtk.Method.get_property" value="placeholder-text"/>
<doc xml:space="preserve">Retrieves the text that will be displayed when
@self is empty and unfocused
If no placeholder text has been set, %NULL will be returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the placeholder text</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_propagate_text_width" c:identifier="gtk_text_get_propagate_text_width" glib:get-property="propagate-text-width">
<attribute name="org.gtk.Method.get_property" value="propagate-text-width"/>
<doc xml:space="preserve">Returns whether the `GtkText` will grow and shrink
with the content.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self will propagate the text width</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tabs" c:identifier="gtk_text_get_tabs" glib:get-property="tabs">
<attribute name="org.gtk.Method.get_property" value="tabs"/>
<doc xml:space="preserve">Gets the tabstops that were set on the `GtkText`.
See [method@Gtk.Text.set_tabs].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the tabstops</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text_length" c:identifier="gtk_text_get_text_length">
<doc xml:space="preserve">Retrieves the current length of the text in @self.
This is equivalent to getting @self's `GtkEntryBuffer`
and calling [method@Gtk.EntryBuffer.get_length] on it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current number of characters
in `GtkText`, or 0 if there are none.</doc>
<type name="guint16" c:type="guint16"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_truncate_multiline" c:identifier="gtk_text_get_truncate_multiline" glib:get-property="truncate-multiline">
<attribute name="org.gtk.Method.get_property" value="truncate-multiline"/>
<doc xml:space="preserve">Returns whether the `GtkText` will truncate multi-line text
that is pasted into the widget</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @self will truncate multi-line text</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visibility" c:identifier="gtk_text_get_visibility" glib:get-property="visibility">
<attribute name="org.gtk.Method.get_property" value="visibility"/>
<doc xml:space="preserve">Retrieves whether the text in @self is visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the text is currently visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="grab_focus_without_selecting" c:identifier="gtk_text_grab_focus_without_selecting">
<doc xml:space="preserve">Causes @self to have keyboard focus.
It behaves like [method@Gtk.Widget.grab_focus],
except that it doesn't select the contents of @self.
You only want to call this on some special entries
which the user usually doesn't want to replace all text in,
such as search-as-you-type entries.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is now inside @self</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_activates_default" c:identifier="gtk_text_set_activates_default" glib:set-property="activates-default">
<attribute name="org.gtk.Method.set_property" value="activates-default"/>
<doc xml:space="preserve">If @activates is %TRUE, pressing Enter will activate
the default widget for the window containing @self.
This usually means that the dialog containing the `GtkText`
will be closed, since the default widget is usually one of
the dialog buttons.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="activates" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to activate window&#x2019;s default widget on Enter keypress</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_text_set_attributes" glib:set-property="attributes">
<attribute name="org.gtk.Method.set_property" value="attributes"/>
<doc xml:space="preserve">Sets attributes that are applied to the text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="attrs" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoAttrList`</doc>
<type name="Pango.AttrList" c:type="PangoAttrList*"/>
</parameter>
</parameters>
</method>
<method name="set_buffer" c:identifier="gtk_text_set_buffer" glib:set-property="buffer">
<attribute name="org.gtk.Method.set_property" value="buffer"/>
<doc xml:space="preserve">Set the `GtkEntryBuffer` object which holds the text for
this widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEntryBuffer`</doc>
<type name="EntryBuffer" c:type="GtkEntryBuffer*"/>
</parameter>
</parameters>
</method>
<method name="set_enable_emoji_completion" c:identifier="gtk_text_set_enable_emoji_completion" glib:set-property="enable-emoji-completion">
<attribute name="org.gtk.Method.set_property" value="enable-emoji-completion"/>
<doc xml:space="preserve">Sets whether Emoji completion is enabled.
If it is, typing ':', followed by a recognized keyword,
will pop up a window with suggested Emojis matching the
keyword.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="enable_emoji_completion" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable Emoji completion</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_extra_menu" c:identifier="gtk_text_set_extra_menu" glib:set-property="extra-menu">
<attribute name="org.gtk.Method.set_property" value="extra-menu"/>
<doc xml:space="preserve">Sets a menu model to add when constructing
the context menu for @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_input_hints" c:identifier="gtk_text_set_input_hints" glib:set-property="input-hints">
<attribute name="org.gtk.Method.set_property" value="input-hints"/>
<doc xml:space="preserve">Sets input hints that allow input methods
to fine-tune their behaviour.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="hints" transfer-ownership="none">
<doc xml:space="preserve">the hints</doc>
<type name="InputHints" c:type="GtkInputHints"/>
</parameter>
</parameters>
</method>
<method name="set_input_purpose" c:identifier="gtk_text_set_input_purpose" glib:set-property="input-purpose">
<attribute name="org.gtk.Method.set_property" value="input-purpose"/>
<doc xml:space="preserve">Sets the input purpose of the `GtkText`.
This can be used by on-screen keyboards and other
input methods to adjust their behaviour.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="purpose" transfer-ownership="none">
<doc xml:space="preserve">the purpose</doc>
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</parameter>
</parameters>
</method>
<method name="set_invisible_char" c:identifier="gtk_text_set_invisible_char" glib:set-property="invisible-char">
<attribute name="org.gtk.Method.set_property" value="invisible-char"/>
<doc xml:space="preserve">Sets the character to use when in &#x201C;password mode&#x201D;.
By default, GTK picks the best invisible char available in the
current font. If you set the invisible char to 0, then the user
will get no feedback at all; there will be no text on the screen
as they type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="ch" transfer-ownership="none">
<doc xml:space="preserve">a Unicode character</doc>
<type name="gunichar" c:type="gunichar"/>
</parameter>
</parameters>
</method>
<method name="set_max_length" c:identifier="gtk_text_set_max_length" glib:set-property="max-length">
<attribute name="org.gtk.Method.set_property" value="max-length"/>
<doc xml:space="preserve">Sets the maximum allowed length of the contents of the widget.
If the current contents are longer than the given length, then
they will be truncated to fit.
This is equivalent to getting @self's `GtkEntryBuffer` and
calling [method@Gtk.EntryBuffer.set_max_length] on it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">the maximum length of the `GtkText`, or 0 for no maximum.
(other than the maximum length of entries.) The value passed
in will be clamped to the range 0-65536.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_overwrite_mode" c:identifier="gtk_text_set_overwrite_mode" glib:set-property="overwrite-mode">
<attribute name="org.gtk.Method.set_property" value="overwrite-mode"/>
<doc xml:space="preserve">Sets whether the text is overwritten when typing
in the `GtkText`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="overwrite" transfer-ownership="none">
<doc xml:space="preserve">new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_placeholder_text" c:identifier="gtk_text_set_placeholder_text" glib:set-property="placeholder-text">
<attribute name="org.gtk.Method.set_property" value="placeholder-text"/>
<doc xml:space="preserve">Sets text to be displayed in @self when it is empty.
This can be used to give a visual hint of the expected
contents of the `GtkText`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string to be displayed when @self
is empty and unfocused</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_propagate_text_width" c:identifier="gtk_text_set_propagate_text_width" glib:set-property="propagate-text-width">
<attribute name="org.gtk.Method.set_property" value="propagate-text-width"/>
<doc xml:space="preserve">Sets whether the `GtkText` should grow and shrink with the content.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="propagate_text_width" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to propagate the text width</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_tabs" c:identifier="gtk_text_set_tabs" glib:set-property="tabs">
<attribute name="org.gtk.Method.set_property" value="tabs"/>
<doc xml:space="preserve">Sets tabstops that are applied to the text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="tabs" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoTabArray`</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</parameter>
</parameters>
</method>
<method name="set_truncate_multiline" c:identifier="gtk_text_set_truncate_multiline" glib:set-property="truncate-multiline">
<attribute name="org.gtk.Method.set_property" value="truncate-multiline"/>
<doc xml:space="preserve">Sets whether the `GtkText` should truncate multi-line text
that is pasted into the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="truncate_multiline" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to truncate multi-line text</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_visibility" c:identifier="gtk_text_set_visibility" glib:set-property="visibility">
<attribute name="org.gtk.Method.set_property" value="visibility"/>
<doc xml:space="preserve">Sets whether the contents of the `GtkText` are visible or not.
When visibility is set to %FALSE, characters are displayed
as the invisible char, and will also appear that way when
the text in the widget is copied to the clipboard.
By default, GTK picks the best invisible character available
in the current font, but it can be changed with
[method@Gtk.Text.set_invisible_char].
Note that you probably want to set [property@Gtk.Text:input-purpose]
to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN to
inform input methods about the purpose of this self,
in addition to setting visibility to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the contents of the `GtkText` are displayed
as plaintext</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="unset_invisible_char" c:identifier="gtk_text_unset_invisible_char">
<doc xml:space="preserve">Unsets the invisible char.
After calling this, the default invisible
char is used again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkText`</doc>
<type name="Text" c:type="GtkText*"/>
</instance-parameter>
</parameters>
</method>
<property name="activates-default" writable="1" transfer-ownership="none" setter="set_activates_default" getter="get_activates_default">
<attribute name="org.gtk.Property.get" value="gtk_text_get_activates_default"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_activates_default"/>
<doc xml:space="preserve">Whether to activate the default widget when Enter is pressed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="attributes" writable="1" transfer-ownership="none" setter="set_attributes" getter="get_attributes">
<attribute name="org.gtk.Property.get" value="gtk_text_get_attributes"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_attributes"/>
<doc xml:space="preserve">A list of Pango attributes to apply to the text of the `GtkText`.
This is mainly useful to change the size or weight of the text.
The `PangoAttribute`'s @start_index and @end_index must refer to the
`GtkEntryBuffer` text, i.e. without the preedit string.</doc>
<type name="Pango.AttrList"/>
</property>
<property name="buffer" writable="1" construct="1" transfer-ownership="none" setter="set_buffer" getter="get_buffer">
<attribute name="org.gtk.Property.get" value="gtk_text_get_buffer"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_buffer"/>
<doc xml:space="preserve">The `GtkEntryBuffer` object which stores the text.</doc>
<type name="EntryBuffer"/>
</property>
<property name="enable-emoji-completion" writable="1" transfer-ownership="none" setter="set_enable_emoji_completion" getter="get_enable_emoji_completion">
<attribute name="org.gtk.Property.get" value="gtk_text_get_enable_emoji_completion"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_enable_emoji_completion"/>
<doc xml:space="preserve">Whether to suggest Emoji replacements.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="extra-menu" writable="1" transfer-ownership="none" setter="set_extra_menu" getter="get_extra_menu">
<attribute name="org.gtk.Property.get" value="gtk_text_get_extra_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_extra_menu"/>
<doc xml:space="preserve">A menu model whose contents will be appended to
the context menu.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="im-module" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Which IM (input method) module should be used for this self.
See [class@Gtk.IMMulticontext].
Setting this to a non-%NULL value overrides the system-wide
IM module setting. See the [property@Gtk.Settings:gtk-im-module]
property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="input-hints" writable="1" transfer-ownership="none" setter="set_input_hints" getter="get_input_hints">
<attribute name="org.gtk.Property.get" value="gtk_text_get_input_hints"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_input_hints"/>
<doc xml:space="preserve">Additional hints that allow input methods to fine-tune
their behaviour.</doc>
<type name="InputHints"/>
</property>
<property name="input-purpose" writable="1" transfer-ownership="none" setter="set_input_purpose" getter="get_input_purpose">
<attribute name="org.gtk.Property.get" value="gtk_text_get_input_purpose"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_input_purpose"/>
<doc xml:space="preserve">The purpose of this text field.
This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.
Note that setting the purpose to %GTK_INPUT_PURPOSE_PASSWORD or
%GTK_INPUT_PURPOSE_PIN is independent from setting
[property@Gtk.Text:visibility].</doc>
<type name="InputPurpose"/>
</property>
<property name="invisible-char" writable="1" transfer-ownership="none" setter="set_invisible_char" getter="get_invisible_char">
<attribute name="org.gtk.Property.get" value="gtk_text_set_invisible_char"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_invisible_char"/>
<doc xml:space="preserve">The character to used when masking contents (in &#x201C;password mode&#x201D;).</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="invisible-char-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the invisible char has been set for the `GtkText`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="max-length" writable="1" transfer-ownership="none" setter="set_max_length" getter="get_max_length">
<attribute name="org.gtk.Property.get" value="gtk_text_get_max_length"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_max_length"/>
<doc xml:space="preserve">Maximum number of characters that are allowed.
Zero indicates no limit.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="overwrite-mode" writable="1" transfer-ownership="none" setter="set_overwrite_mode" getter="get_overwrite_mode">
<attribute name="org.gtk.Property.get" value="gtk_text_get_overwrite_mode"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_overwrite_mode"/>
<doc xml:space="preserve">If text is overwritten when typing in the `GtkText`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="placeholder-text" writable="1" transfer-ownership="none" setter="set_placeholder_text" getter="get_placeholder_text">
<attribute name="org.gtk.Property.get" value="gtk_text_get_placeholder_text"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_placeholder_text"/>
<doc xml:space="preserve">The text that will be displayed in the `GtkText` when it is empty
and unfocused.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="propagate-text-width" writable="1" transfer-ownership="none" setter="set_propagate_text_width" getter="get_propagate_text_width">
<attribute name="org.gtk.Property.get" value="gtk_text_get_propagate_text_width"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_propagate_text_width"/>
<doc xml:space="preserve">Whether the widget should grow and shrink with the content.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="scroll-offset" transfer-ownership="none">
<doc xml:space="preserve">Number of pixels scrolled of the screen to the left.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="tabs" writable="1" transfer-ownership="none" setter="set_tabs" getter="get_tabs">
<attribute name="org.gtk.Property.get" value="gtk_text_get_tabs"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_tabs"/>
<doc xml:space="preserve">A list of tabstops to apply to the text of the `GtkText`.</doc>
<type name="Pango.TabArray"/>
</property>
<property name="truncate-multiline" writable="1" transfer-ownership="none" setter="set_truncate_multiline" getter="get_truncate_multiline">
<attribute name="org.gtk.Property.get" value="gtk_text_get_truncate_multiline"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_truncate_multiline"/>
<doc xml:space="preserve">When %TRUE, pasted multi-line text is truncated to the first line.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visibility" writable="1" transfer-ownership="none" setter="set_visibility" getter="get_visibility">
<attribute name="org.gtk.Property.get" value="gtk_text_get_visibility"/>
<attribute name="org.gtk.Property.set" value="gtk_text_set_visibility"/>
<doc xml:space="preserve">If %FALSE, the text is masked with the &#x201C;invisible char&#x201D;.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance" readable="0" private="1">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate" when="last" action="1">
<doc xml:space="preserve">Emitted when the user hits the Enter key.
The default bindings for this signal are all forms
of the &lt;kbd&gt;Enter&lt;/kbd&gt; key.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="backspace" when="last" action="1">
<doc xml:space="preserve">Emitted when the user asks for it.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Backspace&lt;/kbd&gt; and &lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Backspace&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="copy-clipboard" when="last" action="1">
<doc xml:space="preserve">Emitted to copy the selection to the clipboard.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;c&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="cut-clipboard" when="last" action="1">
<doc xml:space="preserve">Emitted to cut the selection to the clipboard.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;x&lt;/kbd&gt; and
&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Delete&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="delete-from-cursor" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a text deletion.
This is a [keybinding signal](class.SignalAction.html).
If the @type is %GTK_DELETE_CHARS, GTK deletes the selection
if there is one, otherwise it deletes the requested number
of characters.
The default bindings for this signal are &lt;kbd&gt;Delete&lt;/kbd&gt;
for deleting a character and &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Delete&lt;/kbd&gt;
for deleting a word.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the deletion, as a `GtkDeleteType`</doc>
<type name="DeleteType"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @type units to delete</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-at-cursor" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates the insertion of a
fixed string at the cursor.
This is a [keybinding signal](class.SignalAction.html).
This signal has no default bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string to insert</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-emoji" when="last" action="1">
<doc xml:space="preserve">Emitted to present the Emoji chooser for the widget.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;.&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;;&lt;/kbd&gt;</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">Emitted when the user initiates a cursor movement.
If the cursor is not visible in @self, this signal causes
the viewport to be moved instead.
This is a [keybinding signal](class.SignalAction.html).
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants,
the variant with the &lt;kbd&gt;Shift&lt;/kbd&gt; modifier extends the
selection, the variant without it does not.
There are too many key combinations to list them all here.
- &lt;kbd&gt;&#x2190;&lt;/kbd&gt;, &lt;kbd&gt;&#x2192;&lt;/kbd&gt;, &lt;kbd&gt;&#x2191;&lt;/kbd&gt;, &lt;kbd&gt;&#x2193;&lt;/kbd&gt;
move by individual characters/lines
- &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;&#x2192;&lt;/kbd&gt;, etc. move by words/paragraphs
- &lt;kbd&gt;Home&lt;/kbd&gt;, &lt;kbd&gt;End&lt;/kbd&gt; move to the ends of the buffer</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the move, as a `GtkMovementStep`</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the move should extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="paste-clipboard" when="last" action="1">
<doc xml:space="preserve">Emitted to paste the contents of the clipboard.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;v&lt;/kbd&gt; and &lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="preedit-changed" when="last" action="1">
<doc xml:space="preserve">Emitted when the preedit text changes.
If an input method is used, the typed text will not immediately
be committed to the buffer. So if you are interested in the text,
connect to this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preedit" transfer-ownership="none">
<doc xml:space="preserve">the current preedit string</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="toggle-overwrite" when="last" action="1">
<doc xml:space="preserve">Emitted to toggle the overwrite mode of the `GtkText`.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal is &lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<class name="TextBuffer" c:symbol-prefix="text_buffer" c:type="GtkTextBuffer" parent="GObject.Object" glib:type-name="GtkTextBuffer" glib:get-type="gtk_text_buffer_get_type" glib:type-struct="TextBufferClass">
<doc xml:space="preserve">Stores text and attributes for display in a `GtkTextView`.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
GtkTextBuffer can support undoing changes to the buffer
content, see [method@Gtk.TextBuffer.set_enable_undo].</doc>
<constructor name="new" c:identifier="gtk_text_buffer_new">
<doc xml:space="preserve">Creates a new text buffer.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new text buffer</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<parameter name="table" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a tag table, or %NULL to create a new one</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="apply_tag" invoker="apply_tag">
<doc xml:space="preserve">Emits the &#x201C;apply-tag&#x201D; signal on @buffer.
The default handler for the signal applies
@tag to the given range. @start and @end do
not have to be in order.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="begin_user_action" invoker="begin_user_action">
<doc xml:space="preserve">Called to indicate that the buffer operations between here and a
call to gtk_text_buffer_end_user_action() are part of a single
user-visible operation.
The operations between gtk_text_buffer_begin_user_action() and
gtk_text_buffer_end_user_action() can then be grouped when creating
an undo stack. `GtkTextBuffer` maintains a count of calls to
gtk_text_buffer_begin_user_action() that have not been closed with
a call to gtk_text_buffer_end_user_action(), and emits the
&#x201C;begin-user-action&#x201D; and &#x201C;end-user-action&#x201D; signals only for the
outermost pair of calls. This allows you to build user actions
from other user actions.
The &#x201C;interactive&#x201D; buffer mutation functions, such as
[method@Gtk.TextBuffer.insert_interactive], automatically call
begin/end user action around the buffer operations they perform,
so there's no need to add extra calls if you user action consists
solely of a single call to one of those functions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="delete_range">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="end_user_action" invoker="end_user_action">
<doc xml:space="preserve">Ends a user-visible operation.
Should be paired with a call to
[method@Gtk.TextBuffer.begin_user_action].
See that function for a full explanation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_child_anchor" invoker="insert_child_anchor">
<doc xml:space="preserve">Inserts a child widget anchor into the text buffer at @iter.
The anchor will be counted as one character in character counts, and
when obtaining the buffer contents as a string, will be represented
by the Unicode &#x201C;object replacement character&#x201D; 0xFFFC. Note that the
&#x201C;slice&#x201D; variants for obtaining portions of the buffer as a string
include this character for child anchors, but the &#x201C;text&#x201D; variants do
not. E.g. see [method@Gtk.TextBuffer.get_slice] and
[method@Gtk.TextBuffer.get_text].
Consider [method@Gtk.TextBuffer.create_child_anchor] as a more
convenient alternative to this function. The buffer will add a
reference to the anchor, so you can unref it after insertion.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the anchor</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_paintable" invoker="insert_paintable">
<doc xml:space="preserve">Inserts an image into the text buffer at @iter.
The image will be counted as one character in character counts,
and when obtaining the buffer contents as a string, will be
represented by the Unicode &#x201C;object replacement character&#x201D; 0xFFFC.
Note that the &#x201C;slice&#x201D; variants for obtaining portions of the buffer
as a string include this character for paintable, but the &#x201C;text&#x201D;
variants do not. e.g. see [method@Gtk.TextBuffer.get_slice] and
[method@Gtk.TextBuffer.get_text].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the paintable</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="pos" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="new_text" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="new_text_length" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="mark_deleted">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="mark_set">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="location" transfer-ownership="none">
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="mark" transfer-ownership="none">
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="modified_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="paste_done">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="redo" invoker="redo">
<doc xml:space="preserve">Redoes the next redoable action on the buffer, if there is one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="remove_tag" invoker="remove_tag">
<doc xml:space="preserve">Emits the &#x201C;remove-tag&#x201D; signal.
The default handler for the signal removes all occurrences
of @tag from the given range. @start and @end don&#x2019;t have
to be in order.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="undo" invoker="undo">
<doc xml:space="preserve">Undoes the last undoable action on the buffer, if there is one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="add_mark" c:identifier="gtk_text_buffer_add_mark">
<doc xml:space="preserve">Adds the mark at position @where.
The mark must not be added to another buffer, and if its name
is not %NULL then there must not be another mark in the buffer
with the same name.
Emits the [signal@Gtk.TextBuffer::mark-set] signal as notification
of the mark's initial placement.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">the mark to add</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
<parameter name="where" transfer-ownership="none">
<doc xml:space="preserve">location to place mark</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="add_selection_clipboard" c:identifier="gtk_text_buffer_add_selection_clipboard">
<doc xml:space="preserve">Adds @clipboard to the list of clipboards in which the selection
contents of @buffer are available.
In most cases, @clipboard will be the `GdkClipboard` returned by
[method@Gtk.Widget.get_primary_clipboard] for a view of @buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">a `GdkClipboard`</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
</parameters>
</method>
<method name="apply_tag" c:identifier="gtk_text_buffer_apply_tag">
<doc xml:space="preserve">Emits the &#x201C;apply-tag&#x201D; signal on @buffer.
The default handler for the signal applies
@tag to the given range. @start and @end do
not have to be in order.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="apply_tag_by_name" c:identifier="gtk_text_buffer_apply_tag_by_name">
<doc xml:space="preserve">Emits the &#x201C;apply-tag&#x201D; signal on @buffer.
Calls [method@Gtk.TextTagTable.lookup] on the buffer&#x2019;s
tag table to get a `GtkTextTag`, then calls
[method@Gtk.TextBuffer.apply_tag].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of a named `GtkTextTag`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="backspace" c:identifier="gtk_text_buffer_backspace">
<doc xml:space="preserve">Performs the appropriate action as if the user hit the delete
key with the cursor at the position specified by @iter.
In the normal case a single character will be deleted, but when
combining accents are involved, more than one character can
be deleted, and when precomposed character and accent combinations
are involved, less than one character will be deleted.
Because the buffer is modified, all outstanding iterators become
invalid after calling this function; however, the @iter will be
re-initialized to point to the location where text was deleted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the buffer was modified</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="interactive" transfer-ownership="none">
<doc xml:space="preserve">whether the deletion is caused by user interaction</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">whether the buffer is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="begin_irreversible_action" c:identifier="gtk_text_buffer_begin_irreversible_action">
<doc xml:space="preserve">Denotes the beginning of an action that may not be undone.
This will cause any previous operations in the undo/redo queue
to be cleared.
This should be paired with a call to
[method@Gtk.TextBuffer.end_irreversible_action] after the irreversible
action has completed.
You may nest calls to gtk_text_buffer_begin_irreversible_action()
and gtk_text_buffer_end_irreversible_action() pairs.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="begin_user_action" c:identifier="gtk_text_buffer_begin_user_action">
<doc xml:space="preserve">Called to indicate that the buffer operations between here and a
call to gtk_text_buffer_end_user_action() are part of a single
user-visible operation.
The operations between gtk_text_buffer_begin_user_action() and
gtk_text_buffer_end_user_action() can then be grouped when creating
an undo stack. `GtkTextBuffer` maintains a count of calls to
gtk_text_buffer_begin_user_action() that have not been closed with
a call to gtk_text_buffer_end_user_action(), and emits the
&#x201C;begin-user-action&#x201D; and &#x201C;end-user-action&#x201D; signals only for the
outermost pair of calls. This allows you to build user actions
from other user actions.
The &#x201C;interactive&#x201D; buffer mutation functions, such as
[method@Gtk.TextBuffer.insert_interactive], automatically call
begin/end user action around the buffer operations they perform,
so there's no need to add extra calls if you user action consists
solely of a single call to one of those functions.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="copy_clipboard" c:identifier="gtk_text_buffer_copy_clipboard">
<doc xml:space="preserve">Copies the currently-selected text to a clipboard.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">the `GdkClipboard` object to copy to</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
</parameters>
</method>
<method name="create_child_anchor" c:identifier="gtk_text_buffer_create_child_anchor">
<doc xml:space="preserve">Creates and inserts a child anchor.
This is a convenience function which simply creates a child anchor
with [ctor@Gtk.TextChildAnchor.new] and inserts it into the buffer
with [method@Gtk.TextBuffer.insert_child_anchor].
The new anchor is owned by the buffer; no reference count is
returned to the caller of this function.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the created child anchor</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location in the buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="create_mark" c:identifier="gtk_text_buffer_create_mark">
<doc xml:space="preserve">Creates a mark at position @where.
If @mark_name is %NULL, the mark is anonymous; otherwise, the mark
can be retrieved by name using [method@Gtk.TextBuffer.get_mark].
If a mark has left gravity, and text is inserted at the mark&#x2019;s
current location, the mark will be moved to the left of the
newly-inserted text. If the mark has right gravity
(@left_gravity = %FALSE), the mark will end up on the right of
newly-inserted text. The standard left-to-right cursor is a mark
with right gravity (when you type, the cursor stays on the right
side of the text you&#x2019;re typing).
The caller of this function does not own a
reference to the returned `GtkTextMark`, so you can ignore the
return value if you like. Marks are owned by the buffer and go
away when the buffer does.
Emits the [signal@Gtk.TextBuffer::mark-set] signal as notification
of the mark's initial placement.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTextMark` object</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="mark_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">name for mark</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="where" transfer-ownership="none">
<doc xml:space="preserve">location to place mark</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="left_gravity" transfer-ownership="none">
<doc xml:space="preserve">whether the mark has left gravity</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="create_tag" c:identifier="gtk_text_buffer_create_tag" introspectable="0">
<doc xml:space="preserve">Creates a tag and adds it to the tag table for @buffer.
Equivalent to calling [ctor@Gtk.TextTag.new] and then adding the
tag to the buffer&#x2019;s tag table. The returned tag is owned by
the buffer&#x2019;s tag table, so the ref count will be equal to one.
If @tag_name is %NULL, the tag is anonymous.
If @tag_name is non-%NULL, a tag called @tag_name must not already
exist in the tag table for this buffer.
The @first_property_name argument and subsequent arguments are a list
of properties to set on the tag, as with g_object_set().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new tag</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="tag_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">name of the new tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="first_property_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">name of first property to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">%NULL-terminated list of property names and values</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="cut_clipboard" c:identifier="gtk_text_buffer_cut_clipboard">
<doc xml:space="preserve">Copies the currently-selected text to a clipboard,
then deletes said text if it&#x2019;s editable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">the `GdkClipboard` object to cut to</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">default editability of the buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="delete" c:identifier="gtk_text_buffer_delete">
<doc xml:space="preserve">Deletes text between @start and @end.
The order of @start and @end is not actually relevant;
gtk_text_buffer_delete() will reorder them.
This function actually emits the &#x201C;delete-range&#x201D; signal, and
the default handler of that signal deletes the text. Because the
buffer is modified, all outstanding iterators become invalid after
calling this function; however, the @start and @end will be
re-initialized to point to the location where text was deleted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">a position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">another position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="delete_interactive" c:identifier="gtk_text_buffer_delete_interactive">
<doc xml:space="preserve">Deletes all editable text in the given range.
Calls [method@Gtk.TextBuffer.delete] for each editable
sub-range of [@start,@end). @start and @end are revalidated
to point to the location of the last deleted range, or left
untouched if no text was deleted.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether some text was actually deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start_iter" transfer-ownership="none">
<doc xml:space="preserve">start of range to delete</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end_iter" transfer-ownership="none">
<doc xml:space="preserve">end of range</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">whether the buffer is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="delete_mark" c:identifier="gtk_text_buffer_delete_mark">
<doc xml:space="preserve">Deletes @mark, so that it&#x2019;s no longer located anywhere in the
buffer.
Removes the reference the buffer holds to the mark, so if
you haven&#x2019;t called g_object_ref() on the mark, it will be freed.
Even if the mark isn&#x2019;t freed, most operations on @mark become
invalid, until it gets added to a buffer again with
[method@Gtk.TextBuffer.add_mark]. Use [method@Gtk.TextMark.get_deleted]
to find out if a mark has been removed from its buffer.
The [signal@Gtk.TextBuffer::mark-deleted] signal will be emitted as
notification after the mark is deleted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark` in @buffer</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</method>
<method name="delete_mark_by_name" c:identifier="gtk_text_buffer_delete_mark_by_name">
<doc xml:space="preserve">Deletes the mark named @name; the mark must exist.
See [method@Gtk.TextBuffer.delete_mark] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of a mark in @buffer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="delete_selection" c:identifier="gtk_text_buffer_delete_selection">
<doc xml:space="preserve">Deletes the range between the &#x201C;insert&#x201D; and &#x201C;selection_bound&#x201D; marks,
that is, the currently-selected text.
If @interactive is %TRUE, the editability of the selection will be
considered (users can&#x2019;t delete uneditable text).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there was a non-empty selection to delete</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="interactive" transfer-ownership="none">
<doc xml:space="preserve">whether the deletion is caused by user interaction</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">whether the buffer is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="end_irreversible_action" c:identifier="gtk_text_buffer_end_irreversible_action">
<doc xml:space="preserve">Denotes the end of an action that may not be undone.
This will cause any previous operations in the undo/redo
queue to be cleared.
This should be called after completing modifications to the
text buffer after [method@Gtk.TextBuffer.begin_irreversible_action]
was called.
You may nest calls to gtk_text_buffer_begin_irreversible_action()
and gtk_text_buffer_end_irreversible_action() pairs.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="end_user_action" c:identifier="gtk_text_buffer_end_user_action">
<doc xml:space="preserve">Ends a user-visible operation.
Should be paired with a call to
[method@Gtk.TextBuffer.begin_user_action].
See that function for a full explanation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_bounds" c:identifier="gtk_text_buffer_get_bounds">
<doc xml:space="preserve">Retrieves the first and last iterators in the buffer, i.e. the
entire buffer lies within the range [@start,@end).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize with first position in the buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize with the end iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_can_redo" c:identifier="gtk_text_buffer_get_can_redo" glib:get-property="can-redo">
<attribute name="org.gtk.Method.get_property" value="can-redo"/>
<doc xml:space="preserve">Gets whether there is a redoable action in the history.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is an redoable action</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_can_undo" c:identifier="gtk_text_buffer_get_can_undo" glib:get-property="can-undo">
<attribute name="org.gtk.Method.get_property" value="can-undo"/>
<doc xml:space="preserve">Gets whether there is an undoable action in the history.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there is an undoable action</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_char_count" c:identifier="gtk_text_buffer_get_char_count">
<doc xml:space="preserve">Gets the number of characters in the buffer.
Note that characters and bytes are not the same, you can&#x2019;t e.g.
expect the contents of the buffer in string form to be this
many bytes long.
The character count is cached, so this function is very fast.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of characters in the buffer</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_enable_undo" c:identifier="gtk_text_buffer_get_enable_undo" glib:get-property="enable-undo">
<attribute name="org.gtk.Method.get_property" value="enable-undo"/>
<doc xml:space="preserve">Gets whether the buffer is saving modifications to the buffer
to allow for undo and redo actions.
See [method@Gtk.TextBuffer.begin_irreversible_action] and
[method@Gtk.TextBuffer.end_irreversible_action] to create
changes to the buffer that cannot be undone.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_end_iter" c:identifier="gtk_text_buffer_get_end_iter">
<doc xml:space="preserve">Initializes @iter with the &#x201C;end iterator,&#x201D; one past the last valid
character in the text buffer.
If dereferenced with [method@Gtk.TextIter.get_char], the end
iterator has a character value of 0.
The entire buffer lies in the range from the first position in
the buffer (call [method@Gtk.TextBuffer.get_start_iter] to get
character position 0) to the end iterator.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_has_selection" c:identifier="gtk_text_buffer_get_has_selection" glib:get-property="has-selection">
<doc xml:space="preserve">Indicates whether the buffer has some text currently selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the there is text selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_insert" c:identifier="gtk_text_buffer_get_insert">
<doc xml:space="preserve">Returns the mark that represents the cursor (insertion point).
Equivalent to calling [method@Gtk.TextBuffer.get_mark]
to get the mark named &#x201C;insert&#x201D;, but very slightly more
efficient, and involves less typing.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">insertion point mark</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_iter_at_child_anchor" c:identifier="gtk_text_buffer_get_iter_at_child_anchor">
<doc xml:space="preserve">Obtains the location of @anchor within @buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">an iterator to be initialized</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a child anchor that appears in @buffer</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_line" c:identifier="gtk_text_buffer_get_iter_at_line">
<doc xml:space="preserve">Initializes @iter to the start of the given line.
If @line_number is greater than or equal to the number of lines
in the @buffer, the end iterator is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the exact position has been found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="line_number" transfer-ownership="none">
<doc xml:space="preserve">line number counting from 0</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_line_index" c:identifier="gtk_text_buffer_get_iter_at_line_index">
<doc xml:space="preserve">Obtains an iterator pointing to @byte_index within the given line.
@byte_index must be the start of a UTF-8 character. Note bytes, not
characters; UTF-8 may encode one character as multiple bytes.
If @line_number is greater than or equal to the number of lines in the @buffer,
the end iterator is returned. And if @byte_index is off the
end of the line, the iterator at the end of the line is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the exact position has been found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="line_number" transfer-ownership="none">
<doc xml:space="preserve">line number counting from 0</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="byte_index" transfer-ownership="none">
<doc xml:space="preserve">byte index from start of line</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_line_offset" c:identifier="gtk_text_buffer_get_iter_at_line_offset">
<doc xml:space="preserve">Obtains an iterator pointing to @char_offset within the given line.
Note characters, not bytes; UTF-8 may encode one character as multiple
bytes.
If @line_number is greater than or equal to the number of lines in the @buffer,
the end iterator is returned. And if @char_offset is off the
end of the line, the iterator at the end of the line is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the exact position has been found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="line_number" transfer-ownership="none">
<doc xml:space="preserve">line number counting from 0</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="char_offset" transfer-ownership="none">
<doc xml:space="preserve">char offset from start of line</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_mark" c:identifier="gtk_text_buffer_get_iter_at_mark">
<doc xml:space="preserve">Initializes @iter with the current position of @mark.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark` in @buffer</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_offset" c:identifier="gtk_text_buffer_get_iter_at_offset">
<doc xml:space="preserve">Initializes @iter to a position @char_offset chars from the start
of the entire buffer.
If @char_offset is -1 or greater than the number
of characters in the buffer, @iter is initialized to the end iterator,
the iterator one past the last valid character in the buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="char_offset" transfer-ownership="none">
<doc xml:space="preserve">char offset from start of buffer, counting from 0, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_line_count" c:identifier="gtk_text_buffer_get_line_count">
<doc xml:space="preserve">Obtains the number of lines in the buffer.
This value is cached, so the function is very fast.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of lines in the buffer</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mark" c:identifier="gtk_text_buffer_get_mark">
<doc xml:space="preserve">Returns the mark named @name in buffer @buffer, or %NULL if no such
mark exists in the buffer.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">a mark name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_max_undo_levels" c:identifier="gtk_text_buffer_get_max_undo_levels">
<doc xml:space="preserve">Gets the maximum number of undo levels to perform.
If 0, unlimited undo actions may be performed. Note that this may
have a memory usage impact as it requires storing an additional
copy of the inserted or removed text within the text buffer.</doc>
<return-value transfer-ownership="none">
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modified" c:identifier="gtk_text_buffer_get_modified">
<doc xml:space="preserve">Indicates whether the buffer has been modified since the last call
to [method@Gtk.TextBuffer.set_modified] set the modification flag to
%FALSE.
Used for example to enable a &#x201C;save&#x201D; function in a text editor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the buffer has been modified</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_bound" c:identifier="gtk_text_buffer_get_selection_bound">
<doc xml:space="preserve">Returns the mark that represents the selection bound.
Equivalent to calling [method@Gtk.TextBuffer.get_mark]
to get the mark named &#x201C;selection_bound&#x201D;, but very slightly
more efficient, and involves less typing.
The currently-selected text in @buffer is the region between the
&#x201C;selection_bound&#x201D; and &#x201C;insert&#x201D; marks. If &#x201C;selection_bound&#x201D; and
&#x201C;insert&#x201D; are in the same place, then there is no current selection.
[method@Gtk.TextBuffer.get_selection_bounds] is another convenient
function for handling the selection, if you just want to know whether
there&#x2019;s a selection and what its bounds are.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">selection bound mark</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection_bounds" c:identifier="gtk_text_buffer_get_selection_bounds">
<doc xml:space="preserve">Returns %TRUE if some text is selected; places the bounds
of the selection in @start and @end.
If the selection has length 0, then @start and @end are filled
in with the same value. @start and @end will be in ascending order.
If @start and @end are %NULL, then they are not filled in, but the
return value still indicates whether text is selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the selection has nonzero length</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer` a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize with selection start</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize with selection end</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_selection_content" c:identifier="gtk_text_buffer_get_selection_content">
<doc xml:space="preserve">Get a content provider for this buffer.
It can be used to make the content of @buffer available
in a `GdkClipboard`, see [method@Gdk.Clipboard.set_content].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GdkContentProvider`.</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_slice" c:identifier="gtk_text_buffer_get_slice">
<doc xml:space="preserve">Returns the text in the range [@start,@end).
Excludes undisplayed text (text marked with tags that set the
invisibility attribute) if @include_hidden_chars is %FALSE.
The returned string includes a 0xFFFC character whenever the
buffer contains embedded images, so byte and character indexes
into the returned string do correspond to byte and character
indexes into the buffer. Contrast with [method@Gtk.TextBuffer.get_text].
Note that 0xFFFC can occur in normal text as well, so it is not a
reliable indicator that a paintable or widget is in the buffer.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">an allocated UTF-8 string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">start of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">end of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="include_hidden_chars" transfer-ownership="none">
<doc xml:space="preserve">whether to include invisible text</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_start_iter" c:identifier="gtk_text_buffer_get_start_iter">
<doc xml:space="preserve">Initialized @iter with the first position in the text buffer.
This is the same as using [method@Gtk.TextBuffer.get_iter_at_offset]
to get the iter at character offset 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">iterator to initialize</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_tag_table" c:identifier="gtk_text_buffer_get_tag_table" glib:get-property="tag-table">
<attribute name="org.gtk.Method.get_property" value="tag-table"/>
<doc xml:space="preserve">Get the `GtkTextTagTable` associated with this buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the buffer&#x2019;s tag table</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_text_buffer_get_text" glib:get-property="text">
<doc xml:space="preserve">Returns the text in the range [@start,@end).
Excludes undisplayed text (text marked with tags that set the
invisibility attribute) if @include_hidden_chars is %FALSE.
Does not include characters representing embedded images, so
byte and character indexes into the returned string do not
correspond to byte and character indexes into the buffer.
Contrast with [method@Gtk.TextBuffer.get_slice].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">an allocated UTF-8 string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">start of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">end of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="include_hidden_chars" transfer-ownership="none">
<doc xml:space="preserve">whether to include invisible text</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_text_buffer_insert">
<doc xml:space="preserve">Inserts @len bytes of @text at position @iter.
If @len is -1, @text must be nul-terminated and will be inserted in its
entirety. Emits the &#x201C;insert-text&#x201D; signal; insertion actually occurs
in the default handler for the signal. @iter is invalidated when
insertion occurs (because the buffer contents change), but the
default signal handler revalidates it to point to the end of the
inserted text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a position in the buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text in UTF-8 format</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_at_cursor" c:identifier="gtk_text_buffer_insert_at_cursor">
<doc xml:space="preserve">Inserts @text in @buffer.
Simply calls [method@Gtk.TextBuffer.insert],
using the current cursor position as the insertion point.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text in UTF-8 format</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of text, in bytes</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_child_anchor" c:identifier="gtk_text_buffer_insert_child_anchor">
<doc xml:space="preserve">Inserts a child widget anchor into the text buffer at @iter.
The anchor will be counted as one character in character counts, and
when obtaining the buffer contents as a string, will be represented
by the Unicode &#x201C;object replacement character&#x201D; 0xFFFC. Note that the
&#x201C;slice&#x201D; variants for obtaining portions of the buffer as a string
include this character for child anchors, but the &#x201C;text&#x201D; variants do
not. E.g. see [method@Gtk.TextBuffer.get_slice] and
[method@Gtk.TextBuffer.get_text].
Consider [method@Gtk.TextBuffer.create_child_anchor] as a more
convenient alternative to this function. The buffer will add a
reference to the anchor, so you can unref it after insertion.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the anchor</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</parameter>
</parameters>
</method>
<method name="insert_interactive" c:identifier="gtk_text_buffer_insert_interactive">
<doc xml:space="preserve">Inserts @text in @buffer.
Like [method@Gtk.TextBuffer.insert], but the insertion will not occur
if @iter is at a non-editable location in the buffer. Usually you
want to prevent insertions at ineditable locations if the insertion
results from a user action (is interactive).
@default_editable indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of [method@Gtk.TextView.get_editable] is appropriate here.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether text was actually inserted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">some UTF-8 text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">default editability of buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="insert_interactive_at_cursor" c:identifier="gtk_text_buffer_insert_interactive_at_cursor">
<doc xml:space="preserve">Inserts @text in @buffer.
Calls [method@Gtk.TextBuffer.insert_interactive]
at the cursor position.
@default_editable indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of [method@Gtk.TextView.get_editable] is appropriate here.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether text was actually inserted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">text in UTF-8 format</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of text in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">default editability of buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="insert_markup" c:identifier="gtk_text_buffer_insert_markup">
<doc xml:space="preserve">Inserts the text in @markup at position @iter.
@markup will be inserted in its entirety and must be nul-terminated
and valid UTF-8. Emits the [signal@Gtk.TextBuffer::insert-text] signal,
possibly multiple times; insertion actually occurs in the default handler
for the signal. @iter will point to the end of the inserted text on return.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the markup</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="markup" transfer-ownership="none">
<doc xml:space="preserve">a nul-terminated UTF-8 string containing Pango markup</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @markup in bytes, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_paintable" c:identifier="gtk_text_buffer_insert_paintable">
<doc xml:space="preserve">Inserts an image into the text buffer at @iter.
The image will be counted as one character in character counts,
and when obtaining the buffer contents as a string, will be
represented by the Unicode &#x201C;object replacement character&#x201D; 0xFFFC.
Note that the &#x201C;slice&#x201D; variants for obtaining portions of the buffer
as a string include this character for paintable, but the &#x201C;text&#x201D;
variants do not. e.g. see [method@Gtk.TextBuffer.get_slice] and
[method@Gtk.TextBuffer.get_text].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the paintable</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="insert_range" c:identifier="gtk_text_buffer_insert_range">
<doc xml:space="preserve">Copies text, tags, and paintables between @start and @end
and inserts the copy at @iter.
The order of @start and @end doesn&#x2019;t matter.
Used instead of simply getting/inserting text because it preserves
images and tags. If @start and @end are in a different buffer from
@buffer, the two buffers must share the same tag table.
Implemented via emissions of the ::insert-text and ::apply-tag signals,
so expect those.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">a position in a `GtkTextBuffer`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">another position in the same buffer as @start</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="insert_range_interactive" c:identifier="gtk_text_buffer_insert_range_interactive">
<doc xml:space="preserve">Copies text, tags, and paintables between @start and @end
and inserts the copy at @iter.
Same as [method@Gtk.TextBuffer.insert_range], but does nothing
if the insertion point isn&#x2019;t editable. The @default_editable
parameter indicates whether the text is editable at @iter if
no tags enclosing @iter affect editability. Typically the result
of [method@Gtk.TextView.get_editable] is appropriate here.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether an insertion was possible at @iter</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">a position in a `GtkTextBuffer`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">another position in the same buffer as @start</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">default editability of the buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="insert_with_tags" c:identifier="gtk_text_buffer_insert_with_tags" introspectable="0">
<doc xml:space="preserve">Inserts @text into @buffer at @iter, applying the list of tags to
the newly-inserted text.
The last tag specified must be %NULL to terminate the list.
Equivalent to calling [method@Gtk.TextBuffer.insert],
then [method@Gtk.TextBuffer.apply_tag] on the inserted text;
this is just a convenience function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">UTF-8 text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @text, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="first_tag" transfer-ownership="none">
<doc xml:space="preserve">first tag to apply to @text</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">%NULL-terminated list of tags to apply</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="insert_with_tags_by_name" c:identifier="gtk_text_buffer_insert_with_tags_by_name" introspectable="0">
<doc xml:space="preserve">Inserts @text into @buffer at @iter, applying the list of tags to
the newly-inserted text.
Same as [method@Gtk.TextBuffer.insert_with_tags], but allows you
to pass in tag names instead of tag objects.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">position in @buffer</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">UTF-8 text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @text, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="first_tag_name" transfer-ownership="none">
<doc xml:space="preserve">name of a tag to apply to @text</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">more tag names</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="move_mark" c:identifier="gtk_text_buffer_move_mark">
<doc xml:space="preserve">Moves @mark to the new location @where.
Emits the [signal@Gtk.TextBuffer::mark-set] signal
as notification of the move.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
<parameter name="where" transfer-ownership="none">
<doc xml:space="preserve">new location for @mark in @buffer</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="move_mark_by_name" c:identifier="gtk_text_buffer_move_mark_by_name">
<doc xml:space="preserve">Moves the mark named @name (which must exist) to location @where.
See [method@Gtk.TextBuffer.move_mark] for details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of a mark</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="where" transfer-ownership="none">
<doc xml:space="preserve">new location for mark</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="paste_clipboard" c:identifier="gtk_text_buffer_paste_clipboard">
<doc xml:space="preserve">Pastes the contents of a clipboard.
If @override_location is %NULL, the pasted text will be inserted
at the cursor position, or the buffer selection will be replaced
if the selection is non-empty.
Note: pasting is asynchronous, that is, we&#x2019;ll ask for the paste data
and return, and at some point later after the main loop runs, the paste
data will be inserted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">the `GdkClipboard` to paste from</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
<parameter name="override_location" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">location to insert pasted text</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="default_editable" transfer-ownership="none">
<doc xml:space="preserve">whether the buffer is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="place_cursor" c:identifier="gtk_text_buffer_place_cursor">
<doc xml:space="preserve">This function moves the &#x201C;insert&#x201D; and &#x201C;selection_bound&#x201D; marks
simultaneously.
If you move them to the same place in two steps with
[method@Gtk.TextBuffer.move_mark], you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="where" transfer-ownership="none">
<doc xml:space="preserve">where to put the cursor</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="redo" c:identifier="gtk_text_buffer_redo">
<doc xml:space="preserve">Redoes the next redoable action on the buffer, if there is one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_all_tags" c:identifier="gtk_text_buffer_remove_all_tags">
<doc xml:space="preserve">Removes all tags in the range between @start and @end.
Be careful with this function; it could remove tags added in code
unrelated to the code you&#x2019;re currently writing. That is, using this
function is probably a bad idea if you have two or more unrelated
code sections that add tags.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="remove_selection_clipboard" c:identifier="gtk_text_buffer_remove_selection_clipboard">
<doc xml:space="preserve">Removes a `GdkClipboard` added with
gtk_text_buffer_add_selection_clipboard().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">a `GdkClipboard` added to @buffer by
[method@Gtk.TextBuffer.add_selection_clipboard]</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
</parameters>
</method>
<method name="remove_tag" c:identifier="gtk_text_buffer_remove_tag">
<doc xml:space="preserve">Emits the &#x201C;remove-tag&#x201D; signal.
The default handler for the signal removes all occurrences
of @tag from the given range. @start and @end don&#x2019;t have
to be in order.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="remove_tag_by_name" c:identifier="gtk_text_buffer_remove_tag_by_name">
<doc xml:space="preserve">Emits the &#x201C;remove-tag&#x201D; signal.
Calls [method@Gtk.TextTagTable.lookup] on the buffer&#x2019;s
tag table to get a `GtkTextTag`, then calls
[method@Gtk.TextBuffer.remove_tag].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of a `GtkTextTag`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="select_range" c:identifier="gtk_text_buffer_select_range">
<doc xml:space="preserve">This function moves the &#x201C;insert&#x201D; and &#x201C;selection_bound&#x201D; marks
simultaneously.
If you move them in two steps with
[method@Gtk.TextBuffer.move_mark], you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="ins" transfer-ownership="none">
<doc xml:space="preserve">where to put the &#x201C;insert&#x201D; mark</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="bound" transfer-ownership="none">
<doc xml:space="preserve">where to put the &#x201C;selection_bound&#x201D; mark</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="set_enable_undo" c:identifier="gtk_text_buffer_set_enable_undo" glib:set-property="enable-undo">
<attribute name="org.gtk.Method.set_property" value="enable-undo"/>
<doc xml:space="preserve">Sets whether or not to enable undoable actions in the text buffer.
Undoable actions in this context are changes to the text content of
the buffer. Changes to tags and marks are not tracked.
If enabled, the user will be able to undo the last number of actions
up to [method@Gtk.TextBuffer.get_max_undo_levels].
See [method@Gtk.TextBuffer.begin_irreversible_action] and
[method@Gtk.TextBuffer.end_irreversible_action] to create
changes to the buffer that cannot be undone.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="enable_undo" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable undo</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_max_undo_levels" c:identifier="gtk_text_buffer_set_max_undo_levels">
<doc xml:space="preserve">Sets the maximum number of undo levels to perform.
If 0, unlimited undo actions may be performed. Note that this may
have a memory usage impact as it requires storing an additional
copy of the inserted or removed text within the text buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="max_undo_levels" transfer-ownership="none">
<doc xml:space="preserve">the maximum number of undo actions to perform</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_modified" c:identifier="gtk_text_buffer_set_modified">
<doc xml:space="preserve">Used to keep track of whether the buffer has been
modified since the last time it was saved.
Whenever the buffer is saved to disk, call
`gtk_text_buffer_set_modified (@buffer, FALSE)`.
When the buffer is modified, it will automatically
toggled on the modified bit again. When the modified
bit flips, the buffer emits the
[signal@Gtk.TextBuffer::modified-changed] signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">modification flag setting</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_text_buffer_set_text" glib:set-property="text">
<attribute name="org.gtk.Method.set_property" value="text"/>
<doc xml:space="preserve">Deletes current contents of @buffer, and inserts @text instead.
If @len is -1, @text must be nul-terminated.
@text must be valid UTF-8.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">UTF-8 text to insert</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of @text in bytes</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="undo" c:identifier="gtk_text_buffer_undo">
<doc xml:space="preserve">Undoes the last undoable action on the buffer, if there is one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</instance-parameter>
</parameters>
</method>
<property name="can-redo" transfer-ownership="none" getter="get_can_redo">
<attribute name="org.gtk.Property.get" value="gtk_text_buffer_get_can_redo"/>
<doc xml:space="preserve">Denotes that the buffer can reapply the last undone action.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="can-undo" transfer-ownership="none" getter="get_can_undo">
<attribute name="org.gtk.Property.get" value="gtk_text_buffer_get_can_undo"/>
<doc xml:space="preserve">Denotes that the buffer can undo the last applied action.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="cursor-position" transfer-ownership="none">
<doc xml:space="preserve">The position of the insert mark.
This is an offset from the beginning of the buffer.
It is useful for getting notified when the cursor moves.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="enable-undo" writable="1" transfer-ownership="none" setter="set_enable_undo" getter="get_enable_undo">
<attribute name="org.gtk.Property.get" value="gtk_text_buffer_get_enable_undo"/>
<attribute name="org.gtk.Property.set" value="gtk_text_buffer_set_enable_undo"/>
<doc xml:space="preserve">Denotes if support for undoing and redoing changes to the buffer is allowed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-selection" transfer-ownership="none" getter="get_has_selection">
<doc xml:space="preserve">Whether the buffer has some text currently selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tag-table" writable="1" construct-only="1" transfer-ownership="none" getter="get_tag_table">
<attribute name="org.gtk.Property.get" value="gtk_text_buffer_get_tag_table"/>
<doc xml:space="preserve">The GtkTextTagTable for the buffer.</doc>
<type name="TextTagTable"/>
</property>
<property name="text" writable="1" transfer-ownership="none" setter="set_text" getter="get_text">
<attribute name="org.gtk.Property.set" value="gtk_text_buffer_set_text"/>
<doc xml:space="preserve">The text content of the buffer.
Without child widgets and images,
see [method@Gtk.TextBuffer.get_text] for more information.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv">
<type name="TextBufferPrivate" c:type="GtkTextBufferPrivate*"/>
</field>
<glib:signal name="apply-tag" when="last">
<doc xml:space="preserve">Emitted to apply a tag to a range of text in a `GtkTextBuffer`.
Applying actually occurs in the default handler.
Note that if your handler runs before the default handler
it must not invalidate the @start and @end iters (or has to
revalidate them).
See also:
[method@Gtk.TextBuffer.apply_tag],
[method@Gtk.TextBuffer.insert_with_tags],
[method@Gtk.TextBuffer.insert_range].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the applied tag</doc>
<type name="TextTag"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">the start of the range the tag is applied to</doc>
<type name="TextIter"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">the end of the range the tag is applied to</doc>
<type name="TextIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="begin-user-action" when="last">
<doc xml:space="preserve">Emitted at the beginning of a single user-visible
operation on a `GtkTextBuffer`.
See also:
[method@Gtk.TextBuffer.begin_user_action],
[method@Gtk.TextBuffer.insert_interactive],
[method@Gtk.TextBuffer.insert_range_interactive],
[method@Gtk.TextBuffer.delete_interactive],
[method@Gtk.TextBuffer.backspace],
[method@Gtk.TextBuffer.delete_selection].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="changed" when="last">
<doc xml:space="preserve">Emitted when the content of a `GtkTextBuffer` has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="delete-range" when="last">
<doc xml:space="preserve">Emitted to delete a range from a `GtkTextBuffer`.
Note that if your handler runs before the default handler
it must not invalidate the @start and @end iters (or has
to revalidate them). The default signal handler revalidates
the @start and @end iters to both point to the location
where text was deleted. Handlers which run after the default
handler (see g_signal_connect_after()) do not have access to
the deleted text.
See also: [method@Gtk.TextBuffer.delete].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">the start of the range to be deleted</doc>
<type name="TextIter"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">the end of the range to be deleted</doc>
<type name="TextIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="end-user-action" when="last">
<doc xml:space="preserve">Emitted at the end of a single user-visible
operation on the `GtkTextBuffer`.
See also:
[method@Gtk.TextBuffer.end_user_action],
[method@Gtk.TextBuffer.insert_interactive],
[method@Gtk.TextBuffer.insert_range_interactive],
[method@Gtk.TextBuffer.delete_interactive],
[method@Gtk.TextBuffer.backspace],
[method@Gtk.TextBuffer.delete_selection],
[method@Gtk.TextBuffer.backspace].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="insert-child-anchor" when="last">
<doc xml:space="preserve">Emitted to insert a `GtkTextChildAnchor` in a `GtkTextBuffer`.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler
it must not invalidate the @location iter (or has to
revalidate it). The default signal handler revalidates
it to be placed after the inserted @anchor.
See also: [method@Gtk.TextBuffer.insert_child_anchor].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="location" transfer-ownership="none">
<doc xml:space="preserve">position to insert @anchor in @textbuffer</doc>
<type name="TextIter"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTextChildAnchor` to be inserted</doc>
<type name="TextChildAnchor"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-paintable" when="last">
<doc xml:space="preserve">Emitted to insert a `GdkPaintable` in a `GtkTextBuffer`.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler
it must not invalidate the @location iter (or has to
revalidate it). The default signal handler revalidates
it to be placed after the inserted @paintable.
See also: [method@Gtk.TextBuffer.insert_paintable].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="location" transfer-ownership="none">
<doc xml:space="preserve">position to insert @paintable in @textbuffer</doc>
<type name="TextIter"/>
</parameter>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">the `GdkPaintable` to be inserted</doc>
<type name="Gdk.Paintable"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-text" when="last">
<doc xml:space="preserve">Emitted to insert text in a `GtkTextBuffer`.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler
it must not invalidate the @location iter (or has to
revalidate it). The default signal handler revalidates
it to point to the end of the inserted text.
See also: [method@Gtk.TextBuffer.insert],
[method@Gtk.TextBuffer.insert_range].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="location" transfer-ownership="none">
<doc xml:space="preserve">position to insert @text in @textbuffer</doc>
<type name="TextIter"/>
</parameter>
<parameter name="text" transfer-ownership="none">
<doc xml:space="preserve">the UTF-8 text to be inserted</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="len" transfer-ownership="none">
<doc xml:space="preserve">length of the inserted text in bytes</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="mark-deleted" when="last">
<doc xml:space="preserve">Emitted as notification after a `GtkTextMark` is deleted.
See also: [method@Gtk.TextBuffer.delete_mark].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">The mark that was deleted</doc>
<type name="TextMark"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="mark-set" when="last">
<doc xml:space="preserve">Emitted as notification after a `GtkTextMark` is set.
See also:
[method@Gtk.TextBuffer.create_mark],
[method@Gtk.TextBuffer.move_mark].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="location" transfer-ownership="none">
<doc xml:space="preserve">The location of @mark in @textbuffer</doc>
<type name="TextIter"/>
</parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">The mark that is set</doc>
<type name="TextMark"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="modified-changed" when="last">
<doc xml:space="preserve">Emitted when the modified bit of a `GtkTextBuffer` flips.
See also: [method@Gtk.TextBuffer.set_modified].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="paste-done" when="last">
<doc xml:space="preserve">Emitted after paste operation has been completed.
This is useful to properly scroll the view to the end
of the pasted text. See [method@Gtk.TextBuffer.paste_clipboard]
for more details.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="clipboard" transfer-ownership="none">
<doc xml:space="preserve">the `GdkClipboard` pasted from</doc>
<type name="Gdk.Clipboard"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="redo" when="last">
<doc xml:space="preserve">Emitted when a request has been made to redo the
previously undone operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="remove-tag" when="last">
<doc xml:space="preserve">Emitted to remove all occurrences of @tag from a range
of text in a `GtkTextBuffer`.
Removal actually occurs in the default handler.
Note that if your handler runs before the default handler
it must not invalidate the @start and @end iters (or has
to revalidate them).
See also: [method@Gtk.TextBuffer.remove_tag].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the tag to be removed</doc>
<type name="TextTag"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">the start of the range the tag is removed from</doc>
<type name="TextIter"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">the end of the range the tag is removed from</doc>
<type name="TextIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="undo" when="last">
<doc xml:space="preserve">Emitted when a request has been made to undo the
previous operation or set of operations that have
been grouped together.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="TextBufferClass" c:type="GtkTextBufferClass" glib:is-gtype-struct-for="TextBuffer">
<doc xml:space="preserve">The class structure for `GtkTextBuffer`.</doc>
<field name="parent_class">
<doc xml:space="preserve">The object class structure needs to be the first.</doc>
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="insert_text">
<callback name="insert_text">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="new_text" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="new_text_length" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="insert_paintable">
<callback name="insert_paintable">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the paintable</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="paintable" transfer-ownership="none">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="insert_child_anchor">
<callback name="insert_child_anchor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">location to insert the anchor</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="delete_range">
<callback name="delete_range">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="changed">
<callback name="changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="modified_changed">
<callback name="modified_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="mark_set">
<callback name="mark_set">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="location" transfer-ownership="none">
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="mark" transfer-ownership="none">
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="mark_deleted">
<callback name="mark_deleted">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="mark" transfer-ownership="none">
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="apply_tag">
<callback name="apply_tag">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be tagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="remove_tag">
<callback name="remove_tag">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">one bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">other bound of range to be untagged</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="begin_user_action">
<callback name="begin_user_action">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="end_user_action">
<callback name="end_user_action">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="paste_done">
<callback name="paste_done">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
<parameter name="clipboard" transfer-ownership="none">
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="undo">
<callback name="undo">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="redo">
<callback name="redo">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="TextBufferPrivate" c:type="GtkTextBufferPrivate" disguised="1"/>
<callback name="TextCharPredicate" c:type="GtkTextCharPredicate">
<doc xml:space="preserve">The predicate function used by gtk_text_iter_forward_find_char() and
gtk_text_iter_backward_find_char().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the predicate is satisfied, and the iteration should
stop, and %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="ch" transfer-ownership="none">
<doc xml:space="preserve">a Unicode code point</doc>
<type name="gunichar" c:type="gunichar"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">data passed to the callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="TextChildAnchor" c:symbol-prefix="text_child_anchor" c:type="GtkTextChildAnchor" parent="GObject.Object" glib:type-name="GtkTextChildAnchor" glib:get-type="gtk_text_child_anchor_get_type" glib:type-struct="TextChildAnchorClass">
<doc xml:space="preserve">A `GtkTextChildAnchor` is a spot in a `GtkTextBuffer` where child widgets can
be &#x201C;anchored&#x201D;.
The anchor can have multiple widgets anchored, to allow for multiple views.</doc>
<constructor name="new" c:identifier="gtk_text_child_anchor_new">
<doc xml:space="preserve">Creates a new `GtkTextChildAnchor`.
Usually you would then insert it into a `GtkTextBuffer` with
[method@Gtk.TextBuffer.insert_child_anchor]. To perform the
creation and insertion in one step, use the convenience
function [method@Gtk.TextBuffer.create_child_anchor].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</return-value>
</constructor>
<constructor name="new_with_replacement" c:identifier="gtk_text_child_anchor_new_with_replacement" version="4.6">
<doc xml:space="preserve">Creates a new `GtkTextChildAnchor` with the given replacement character.
Usually you would then insert it into a `GtkTextBuffer` with
[method@Gtk.TextBuffer.insert_child_anchor].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</return-value>
<parameters>
<parameter name="character" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_deleted" c:identifier="gtk_text_child_anchor_get_deleted">
<doc xml:space="preserve">Determines whether a child anchor has been deleted from
the buffer.
Keep in mind that the child anchor will be unreferenced
when removed from the buffer, so you need to hold your own
reference (with g_object_ref()) if you plan to use this
function &#x2014; otherwise all deleted child anchors will also
be finalized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the child anchor has been deleted from its buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widgets" c:identifier="gtk_text_child_anchor_get_widgets">
<doc xml:space="preserve">Gets a list of all widgets anchored at this child anchor.
The order in which the widgets are returned is not defined.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">an
array of widgets anchored at @anchor</doc>
<array length="0" zero-terminated="0" c:type="GtkWidget**">
<type name="Widget" c:type="GtkWidget*"/>
</array>
</return-value>
<parameters>
<instance-parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor`</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</instance-parameter>
<parameter name="out_len" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for the length of the array</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="segment" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
</class>
<record name="TextChildAnchorClass" c:type="GtkTextChildAnchorClass" glib:is-gtype-struct-for="TextChildAnchor">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<enumeration name="TextDirection" glib:type-name="GtkTextDirection" glib:get-type="gtk_text_direction_get_type" c:type="GtkTextDirection">
<doc xml:space="preserve">Reading directions for text.</doc>
<member name="none" value="0" c:identifier="GTK_TEXT_DIR_NONE" glib:nick="none" glib:name="GTK_TEXT_DIR_NONE">
<doc xml:space="preserve">No direction.</doc>
</member>
<member name="ltr" value="1" c:identifier="GTK_TEXT_DIR_LTR" glib:nick="ltr" glib:name="GTK_TEXT_DIR_LTR">
<doc xml:space="preserve">Left to right text direction.</doc>
</member>
<member name="rtl" value="2" c:identifier="GTK_TEXT_DIR_RTL" glib:nick="rtl" glib:name="GTK_TEXT_DIR_RTL">
<doc xml:space="preserve">Right to left text direction.</doc>
</member>
</enumeration>
<enumeration name="TextExtendSelection" glib:type-name="GtkTextExtendSelection" glib:get-type="gtk_text_extend_selection_get_type" c:type="GtkTextExtendSelection">
<doc xml:space="preserve">Granularity types that extend the text selection. Use the
`GtkTextView::extend-selection` signal to customize the selection.</doc>
<member name="word" value="0" c:identifier="GTK_TEXT_EXTEND_SELECTION_WORD" glib:nick="word" glib:name="GTK_TEXT_EXTEND_SELECTION_WORD">
<doc xml:space="preserve">Selects the current word. It is triggered by
a double-click for example.</doc>
</member>
<member name="line" value="1" c:identifier="GTK_TEXT_EXTEND_SELECTION_LINE" glib:nick="line" glib:name="GTK_TEXT_EXTEND_SELECTION_LINE">
<doc xml:space="preserve">Selects the current line. It is triggered by
a triple-click for example.</doc>
</member>
</enumeration>
<record name="TextIter" c:type="GtkTextIter" glib:type-name="GtkTextIter" glib:get-type="gtk_text_iter_get_type" c:symbol-prefix="text_iter">
<doc xml:space="preserve">An iterator for the contents of a `GtkTextBuffer`.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.</doc>
<field name="dummy1" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="dummy2" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="dummy3" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy4" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy5" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy6" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy7" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy8" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy9" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="dummy10" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="dummy11" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy12" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy13" readable="0" private="1">
<type name="gint" c:type="int"/>
</field>
<field name="dummy14" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
<method name="assign" c:identifier="gtk_text_iter_assign">
<doc xml:space="preserve">Assigns the value of @other to @iter.
This function is not useful in applications, because
iterators can be assigned with `GtkTextIter i = j;`.
The function is used by language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="other" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="backward_char" c:identifier="gtk_text_iter_backward_char">
<doc xml:space="preserve">Moves backward by one character offset.
Returns %TRUE if movement was possible; if @iter was the first
in the buffer (character offset 0), this function returns %FALSE
for convenience when writing loops.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether movement was possible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_chars" c:identifier="gtk_text_iter_backward_chars">
<doc xml:space="preserve">Moves @count characters backward, if possible.
If @count would move past the start or end of the buffer, moves
to the start or end of the buffer.
The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn&#x2019;t move, or
moved onto the end iterator, then %FALSE is returned. If @count is 0,
the function does nothing and returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of characters to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_cursor_position" c:identifier="gtk_text_iter_backward_cursor_position">
<doc xml:space="preserve">Like gtk_text_iter_forward_cursor_position(), but moves backward.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_cursor_positions" c:identifier="gtk_text_iter_backward_cursor_positions">
<doc xml:space="preserve">Moves up to @count cursor positions.
See [method@Gtk.TextIter.forward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of positions to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_find_char" c:identifier="gtk_text_iter_backward_find_char">
<doc xml:space="preserve">Same as gtk_text_iter_forward_find_char(),
but goes backward from @iter.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a match was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="pred" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">function to be called on each character</doc>
<type name="TextCharPredicate" c:type="GtkTextCharPredicate"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @pred</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="limit" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">search limit</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="backward_line" c:identifier="gtk_text_iter_backward_line">
<doc xml:space="preserve">Moves @iter to the start of the previous line.
Returns %TRUE if @iter could be moved; i.e. if @iter was at
character offset 0, this function returns %FALSE. Therefore,
if @iter was already on line 0, but not at the start of the line,
@iter is snapped to the start of the line and the function returns
%TRUE. (Note that this implies that
in a loop calling this function, the line number may not change on
every iteration, if your first iteration is on line 0.)</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_lines" c:identifier="gtk_text_iter_backward_lines">
<doc xml:space="preserve">Moves @count lines backward, if possible.
If @count would move past the start or end of the buffer, moves to
the start or end of the buffer.
The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn&#x2019;t move, or
moved onto the end iterator, then %FALSE is returned. If @count is 0,
the function does nothing and returns %FALSE. If @count is negative,
moves forward by 0 - @count lines.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of lines to move backward</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_search" c:identifier="gtk_text_iter_backward_search">
<doc xml:space="preserve">Same as gtk_text_iter_forward_search(), but moves backward.
@match_end will never be set to a `GtkTextIter` located after @iter,
even if there is a possible @match_start before or at @iter.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a match was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter` where the search begins</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">search string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">bitmask of flags affecting the search</doc>
<type name="TextSearchFlags" c:type="GtkTextSearchFlags"/>
</parameter>
<parameter name="match_start" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">return location for start of match</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="match_end" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">return location for end of match</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="limit" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">location of last possible @match_start, or %NULL for start of buffer</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="backward_sentence_start" c:identifier="gtk_text_iter_backward_sentence_start">
<doc xml:space="preserve">Moves backward to the previous sentence start.
If @iter is already at the start of a sentence, moves backward
to the next one.
Sentence boundaries are determined by Pango and should
be correct for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_sentence_starts" c:identifier="gtk_text_iter_backward_sentence_starts">
<doc xml:space="preserve">Calls gtk_text_iter_backward_sentence_start() up to @count times.
If @count is negative, moves forward instead of backward.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of sentences to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_to_tag_toggle" c:identifier="gtk_text_iter_backward_to_tag_toggle">
<doc xml:space="preserve">Moves backward to the next toggle (on or off) of the
@tag, or to the next toggle of any tag if
@tag is %NULL.
If no matching tag toggles are found,
returns %FALSE, otherwise %TRUE. Does not return toggles
located at @iter, only toggles before @iter. Sets @iter
to the location of the toggle, or the start of the buffer
if no toggle is found.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether we found a tag toggle before @iter</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="backward_visible_cursor_position" c:identifier="gtk_text_iter_backward_visible_cursor_position">
<doc xml:space="preserve">Moves @iter forward to the previous visible cursor position.
See [method@Gtk.TextIter.backward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_visible_cursor_positions" c:identifier="gtk_text_iter_backward_visible_cursor_positions">
<doc xml:space="preserve">Moves up to @count visible cursor positions.
See [method@Gtk.TextIter.backward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of positions to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_visible_line" c:identifier="gtk_text_iter_backward_visible_line">
<doc xml:space="preserve">Moves @iter to the start of the previous visible line.
Returns %TRUE if
@iter could be moved; i.e. if @iter was at character offset 0, this
function returns %FALSE. Therefore if @iter was already on line 0,
but not at the start of the line, @iter is snapped to the start of
the line and the function returns %TRUE. (Note that this implies that
in a loop calling this function, the line number may not change on
every iteration, if your first iteration is on line 0.)</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_visible_lines" c:identifier="gtk_text_iter_backward_visible_lines">
<doc xml:space="preserve">Moves @count visible lines backward, if possible.
If @count would move past the start or end of the buffer, moves to
the start or end of the buffer.
The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn&#x2019;t move, or
moved onto the end iterator, then %FALSE is returned. If @count is 0,
the function does nothing and returns %FALSE. If @count is negative,
moves forward by 0 - @count lines.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of lines to move backward</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_visible_word_start" c:identifier="gtk_text_iter_backward_visible_word_start">
<doc xml:space="preserve">Moves backward to the previous visible word start.
If @iter is currently on a word start, moves backward to the
next one after that.
Word breaks are determined by Pango and should be correct
for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_visible_word_starts" c:identifier="gtk_text_iter_backward_visible_word_starts">
<doc xml:space="preserve">Calls gtk_text_iter_backward_visible_word_start() up to @count times.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of times to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_word_start" c:identifier="gtk_text_iter_backward_word_start">
<doc xml:space="preserve">Moves backward to the previous word start.
If @iter is currently on a word start, moves backward to the
next one after that.
Word breaks are determined by Pango and should be correct
for nearly any language</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="backward_word_starts" c:identifier="gtk_text_iter_backward_word_starts">
<doc xml:space="preserve">Calls gtk_text_iter_backward_word_start() up to @count times.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of times to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="can_insert" c:identifier="gtk_text_iter_can_insert">
<doc xml:space="preserve">Considering the default editability of the buffer, and tags that
affect editability, determines whether text inserted at @iter would
be editable.
If text inserted at @iter would be editable then the
user should be allowed to insert text at @iter.
[method@Gtk.TextBuffer.insert_interactive] uses this function
to decide whether insertions are allowed at a given position.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether text inserted at @iter would be editable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="default_editability" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if text is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="compare" c:identifier="gtk_text_iter_compare">
<doc xml:space="preserve">A qsort()-style function that returns negative if @lhs is less than
@rhs, positive if @lhs is greater than @rhs, and 0 if they&#x2019;re equal.
Ordering is in character offset order, i.e. the first character
in the buffer is less than the second character in the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">-1 if @lhs is less than @rhs, 1 if @lhs is greater, 0 if they are equal</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="lhs" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="rhs" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="copy" c:identifier="gtk_text_iter_copy">
<doc xml:space="preserve">Creates a dynamically-allocated copy of an iterator.
This function is not useful in applications, because
iterators can be copied with a simple assignment
(`GtkTextIter i = j;`).
The function is used by language bindings.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of the @iter, free with [method@Gtk.TextIter.free]</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="editable" c:identifier="gtk_text_iter_editable">
<doc xml:space="preserve">Returns whether the character at @iter is within an editable region
of text.
Non-editable text is &#x201C;locked&#x201D; and can&#x2019;t be changed by the
user via `GtkTextView`. If no tags applied to this text affect
editability, @default_setting will be returned.
You don&#x2019;t want to use this function to decide whether text can be
inserted at @iter, because for insertion you don&#x2019;t want to know
whether the char at @iter is inside an editable range, you want to
know whether a new character inserted at @iter would be inside an
editable range. Use [method@Gtk.TextIter.can_insert] to handle this
case.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is inside an editable range</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="default_setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if text is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="ends_line" c:identifier="gtk_text_iter_ends_line">
<doc xml:space="preserve">Returns %TRUE if @iter points to the start of the paragraph
delimiter characters for a line.
Delimiters will be either a newline, a carriage return, a carriage
return followed by a newline, or a Unicode paragraph separator
character.
Note that an iterator pointing to the \n of a \r\n pair will not be
counted as the end of a line, the line ends before the \r. The end
iterator is considered to be at the end of a line, even though there
are no paragraph delimiter chars there.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is at the end of a line</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="ends_sentence" c:identifier="gtk_text_iter_ends_sentence">
<doc xml:space="preserve">Determines whether @iter ends a sentence.
Sentence boundaries are determined by Pango and should
be correct for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is at the end of a sentence.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="ends_tag" c:identifier="gtk_text_iter_ends_tag">
<doc xml:space="preserve">Returns %TRUE if @tag is toggled off at exactly this point.
If @tag is %NULL, returns %TRUE if any tag is toggled off at this point.
Note that if this function returns %TRUE, it means that
@iter is at the end of the tagged range, but that the character
at @iter is outside the tagged range. In other words,
unlike [method@Gtk.TextIter.starts_tag], if this function
returns %TRUE, [method@Gtk.TextIter.has_tag] will return
%FALSE for the same parameters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is the end of a range tagged with @tag</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="ends_word" c:identifier="gtk_text_iter_ends_word">
<doc xml:space="preserve">Determines whether @iter ends a natural-language word.
Word breaks are determined by Pango and should be correct
for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is at the end of a word</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="equal" c:identifier="gtk_text_iter_equal">
<doc xml:space="preserve">Tests whether two iterators are equal, using the fastest possible
mechanism.
This function is very fast; you can expect it to perform
better than e.g. getting the character offset for each
iterator and comparing the offsets yourself. Also, it&#x2019;s a
bit faster than [method@Gtk.TextIter.compare].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the iterators point to the same place in the buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="lhs" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="rhs" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="forward_char" c:identifier="gtk_text_iter_forward_char">
<doc xml:space="preserve">Moves @iter forward by one character offset.
Note that images embedded in the buffer occupy 1 character slot, so
this function may actually move onto an image instead of a character,
if you have images in your buffer. If @iter is the end iterator or
one character before it, @iter will now point at the end iterator,
and this function returns %FALSE for convenience when writing loops.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_chars" c:identifier="gtk_text_iter_forward_chars">
<doc xml:space="preserve">Moves @count characters if possible.
If @count would move past the start or end of the buffer,
moves to the start or end of the buffer.
The return value indicates whether the new position of
@iter is different from its original position, and dereferenceable
(the last iterator in the buffer is not dereferenceable). If @count
is 0, the function does nothing and returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of characters to move, may be negative</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_cursor_position" c:identifier="gtk_text_iter_forward_cursor_position">
<doc xml:space="preserve">Moves @iter forward by a single cursor position.
Cursor positions are (unsurprisingly) positions where the
cursor can appear. Perhaps surprisingly, there may not be
a cursor position between all characters. The most common
example for European languages would be a carriage return/newline
sequence.
For some Unicode characters, the equivalent of say the letter &#x201C;a&#x201D;
with an accent mark will be represented as two characters, first
the letter then a "combining mark" that causes the accent to be
rendered; so the cursor can&#x2019;t go between those two characters.
See also the [struct@Pango.LogAttr] struct and the [func@Pango.break]
function.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_cursor_positions" c:identifier="gtk_text_iter_forward_cursor_positions">
<doc xml:space="preserve">Moves up to @count cursor positions.
See [method@Gtk.TextIter.forward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of positions to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_find_char" c:identifier="gtk_text_iter_forward_find_char">
<doc xml:space="preserve">Advances @iter, calling @pred on each character.
If @pred returns %TRUE, returns %TRUE and stops scanning.
If @pred never returns %TRUE, @iter is set to @limit if
@limit is non-%NULL, otherwise to the end iterator.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a match was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="pred" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">a function to be called on each character</doc>
<type name="TextCharPredicate" c:type="GtkTextCharPredicate"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data for @pred</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="limit" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">search limit</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="forward_line" c:identifier="gtk_text_iter_forward_line">
<doc xml:space="preserve">Moves @iter to the start of the next line.
If the iter is already on the last line of the buffer,
moves the iter to the end of the current line. If after
the operation, the iter is at the end of the buffer and not
dereferenceable, returns %FALSE. Otherwise, returns %TRUE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter can be dereferenced</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_lines" c:identifier="gtk_text_iter_forward_lines">
<doc xml:space="preserve">Moves @count lines forward, if possible.
If @count would move past the start or end of the buffer, moves to
the start or end of the buffer.
The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn&#x2019;t move, or
moved onto the end iterator, then %FALSE is returned. If @count is 0,
the function does nothing and returns %FALSE. If @count is negative,
moves backward by 0 - @count lines.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of lines to move forward</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_search" c:identifier="gtk_text_iter_forward_search">
<doc xml:space="preserve">Searches forward for @str.
Any match is returned by setting @match_start to the first character
of the match and @match_end to the first character after the match.
The search will not continue past @limit. Note that a search is a
linear or O(n) operation, so you may wish to use @limit to avoid
locking up your UI on large buffers.
@match_start will never be set to a `GtkTextIter` located before @iter,
even if there is a possible @match_end after or at @iter.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a match was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">start of search</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<doc xml:space="preserve">a search string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags affecting how the search is done</doc>
<type name="TextSearchFlags" c:type="GtkTextSearchFlags"/>
</parameter>
<parameter name="match_start" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">return location for start of match</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="match_end" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">return location for end of match</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="limit" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">location of last possible @match_end, or %NULL for the end of the buffer</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="forward_sentence_end" c:identifier="gtk_text_iter_forward_sentence_end">
<doc xml:space="preserve">Moves forward to the next sentence end.
If @iter is at the end of a sentence, moves to the next
end of sentence.
Sentence boundaries are determined by Pango and should
be correct for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_sentence_ends" c:identifier="gtk_text_iter_forward_sentence_ends">
<doc xml:space="preserve">Calls gtk_text_iter_forward_sentence_end() @count times.
If @count is negative, moves backward instead of forward.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of sentences to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_to_end" c:identifier="gtk_text_iter_forward_to_end">
<doc xml:space="preserve">Moves @iter forward to the &#x201C;end iterator&#x201D;, which points
one past the last valid character in the buffer.
gtk_text_iter_get_char() called on the end iterator
returns 0, which is convenient for writing loops.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_to_line_end" c:identifier="gtk_text_iter_forward_to_line_end">
<doc xml:space="preserve">Moves the iterator to point to the paragraph delimiter characters.
The possible characters are either a newline, a carriage return,
a carriage return/newline in sequence, or the Unicode paragraph
separator character.
If the iterator is already at the paragraph delimiter
characters, moves to the paragraph delimiter characters for the
next line. If @iter is on the last line in the buffer, which does
not end in paragraph delimiters, moves to the end iterator (end of
the last line), and returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new location is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_to_tag_toggle" c:identifier="gtk_text_iter_forward_to_tag_toggle">
<doc xml:space="preserve">Moves forward to the next toggle (on or off) of the
@tag, or to the next toggle of any tag if
@tag is %NULL.
If no matching tag toggles are found,
returns %FALSE, otherwise %TRUE. Does not return toggles
located at @iter, only toggles after @iter. Sets @iter to
the location of the toggle, or to the end of the buffer
if no toggle is found.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether we found a tag toggle after @iter</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="forward_visible_cursor_position" c:identifier="gtk_text_iter_forward_visible_cursor_position">
<doc xml:space="preserve">Moves @iter forward to the next visible cursor position.
See [method@Gtk.TextIter.forward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_visible_cursor_positions" c:identifier="gtk_text_iter_forward_visible_cursor_positions">
<doc xml:space="preserve">Moves up to @count visible cursor positions.
See [method@Gtk.TextIter.forward_cursor_position] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if we moved and the new position is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of positions to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_visible_line" c:identifier="gtk_text_iter_forward_visible_line">
<doc xml:space="preserve">Moves @iter to the start of the next visible line.
Returns %TRUE if there
was a next line to move to, and %FALSE if @iter was simply moved to
the end of the buffer and is now not dereferenceable, or if @iter was
already at the end of the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter can be dereferenced</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_visible_lines" c:identifier="gtk_text_iter_forward_visible_lines">
<doc xml:space="preserve">Moves @count visible lines forward, if possible.
If @count would move past the start or end of the buffer, moves to
the start or end of the buffer.
The return value indicates whether the iterator moved
onto a dereferenceable position; if the iterator didn&#x2019;t move, or
moved onto the end iterator, then %FALSE is returned. If @count is 0,
the function does nothing and returns %FALSE. If @count is negative,
moves backward by 0 - @count lines.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter moved and is dereferenceable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of lines to move forward</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_visible_word_end" c:identifier="gtk_text_iter_forward_visible_word_end">
<doc xml:space="preserve">Moves forward to the next visible word end.
If @iter is currently on a word end, moves forward to the
next one after that.
Word breaks are determined by Pango and should be correct
for nearly any language</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_visible_word_ends" c:identifier="gtk_text_iter_forward_visible_word_ends">
<doc xml:space="preserve">Calls gtk_text_iter_forward_visible_word_end() up to @count times.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of times to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="forward_word_end" c:identifier="gtk_text_iter_forward_word_end">
<doc xml:space="preserve">Moves forward to the next word end.
If @iter is currently on a word end, moves forward to the
next one after that.
Word breaks are determined by Pango and should be correct
for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="forward_word_ends" c:identifier="gtk_text_iter_forward_word_ends">
<doc xml:space="preserve">Calls gtk_text_iter_forward_word_end() up to @count times.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of times to move</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_text_iter_free">
<doc xml:space="preserve">Free an iterator allocated on the heap.
This function is intended for use in language bindings,
and is not especially useful for applications, because
iterators can simply be allocated on the stack.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a dynamically-allocated iterator</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_buffer" c:identifier="gtk_text_iter_get_buffer">
<doc xml:space="preserve">Returns the `GtkTextBuffer` this iterator is associated with.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the buffer</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_bytes_in_line" c:identifier="gtk_text_iter_get_bytes_in_line">
<doc xml:space="preserve">Returns the number of bytes in the line containing @iter,
including the paragraph delimiters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of bytes in the line</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_char" c:identifier="gtk_text_iter_get_char">
<doc xml:space="preserve">The Unicode character at this iterator is returned.
Equivalent to operator* on a C++ iterator. If the element at
this iterator is a non-character element, such as an image
embedded in the buffer, the Unicode &#x201C;unknown&#x201D; character 0xFFFC
is returned. If invoked on the end iterator, zero is returned;
zero is not a valid Unicode character.
So you can write a loop which ends when this function returns 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a Unicode character, or 0 if @iter is not dereferenceable</doc>
<type name="gunichar" c:type="gunichar"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_chars_in_line" c:identifier="gtk_text_iter_get_chars_in_line">
<doc xml:space="preserve">Returns the number of characters in the line containing @iter,
including the paragraph delimiters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of characters in the line</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_anchor" c:identifier="gtk_text_iter_get_child_anchor">
<doc xml:space="preserve">If the location at @iter contains a child anchor, the
anchor is returned.
Otherwise, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the anchor at @iter</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_language" c:identifier="gtk_text_iter_get_language">
<doc xml:space="preserve">Returns the language in effect at @iter.
If no tags affecting language apply to @iter, the return
value is identical to that of [func@Gtk.get_default_language].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">language in effect at @iter</doc>
<type name="Pango.Language" c:type="PangoLanguage*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_line" c:identifier="gtk_text_iter_get_line">
<doc xml:space="preserve">Returns the line number containing the iterator.
Lines in a `GtkTextBuffer` are numbered beginning
with 0 for the first line in the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a line number</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_line_index" c:identifier="gtk_text_iter_get_line_index">
<doc xml:space="preserve">Returns the byte index of the iterator, counting
from the start of a newline-terminated line.
Remember that `GtkTextBuffer` encodes text in
UTF-8, and that characters can require a variable
number of bytes to represent.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">distance from start of line, in bytes</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_line_offset" c:identifier="gtk_text_iter_get_line_offset">
<doc xml:space="preserve">Returns the character offset of the iterator,
counting from the start of a newline-terminated line.
The first character on the line has offset 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">offset from start of line</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_marks" c:identifier="gtk_text_iter_get_marks">
<doc xml:space="preserve">Returns a list of all `GtkTextMark` at this location.
Because marks are not iterable (they don&#x2019;t take up any "space"
in the buffer, they are just marks in between iterable locations),
multiple marks can exist in the same place.
The returned list is not in any meaningful order.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">
list of `GtkTextMark`</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="TextMark"/>
</type>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_offset" c:identifier="gtk_text_iter_get_offset">
<doc xml:space="preserve">Returns the character offset of an iterator.
Each character in a `GtkTextBuffer` has an offset,
starting with 0 for the first character in the buffer.
Use [method@Gtk,TextBuffer.get_iter_at_offset] to convert
an offset back into an iterator.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a character offset</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_paintable" c:identifier="gtk_text_iter_get_paintable">
<doc xml:space="preserve">If the element at @iter is a paintable, the paintable is returned.
Otherwise, %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the paintable at @iter</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_slice" c:identifier="gtk_text_iter_get_slice">
<doc xml:space="preserve">Returns the text in the given range.
A &#x201C;slice&#x201D; is an array of characters encoded in UTF-8 format,
including the Unicode &#x201C;unknown&#x201D; character 0xFFFC for iterable
non-character elements in the buffer, such as images.
Because images are encoded in the slice, byte and
character offsets in the returned array will correspond to byte
offsets in the text buffer. Note that 0xFFFC can occur in normal
text as well, so it is not a reliable indicator that a paintable or
widget is in the buffer.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">slice of text from the buffer</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">iterator at start of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">iterator at end of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_tags" c:identifier="gtk_text_iter_get_tags">
<doc xml:space="preserve">Returns a list of tags that apply to @iter, in ascending order of
priority.
The highest-priority tags are last.
The `GtkTextTag`s in the list don&#x2019;t have a reference added,
but you have to free the list itself.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">list of
`GtkTextTag`</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="TextTag"/>
</type>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_text" c:identifier="gtk_text_iter_get_text">
<doc xml:space="preserve">Returns text in the given range.
If the range
contains non-text elements such as images, the character and byte
offsets in the returned string will not correspond to character and
byte offsets in the buffer. If you want offsets to correspond, see
[method@Gtk.TextIter.get_slice].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">array of characters from the buffer</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">iterator at start of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">iterator at end of a range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_toggled_tags" c:identifier="gtk_text_iter_get_toggled_tags">
<doc xml:space="preserve">Returns a list of `GtkTextTag` that are toggled on or off at this
point.
If @toggled_on is %TRUE, the list contains tags that are
toggled on. If a tag is toggled on at @iter, then some non-empty
range of characters following @iter has that tag applied to it. If
a tag is toggled off, then some non-empty range following @iter
does not have the tag applied to it.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">tags
toggled at this point</doc>
<type name="GLib.SList" c:type="GSList*">
<type name="TextTag"/>
</type>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="toggled_on" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to get toggled-on tags</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_visible_line_index" c:identifier="gtk_text_iter_get_visible_line_index">
<doc xml:space="preserve">Returns the number of bytes from the start of the
line to the given @iter, not counting bytes that
are invisible due to tags with the &#x201C;invisible&#x201D; flag
toggled on.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">byte index of @iter with respect to the start of the line</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible_line_offset" c:identifier="gtk_text_iter_get_visible_line_offset">
<doc xml:space="preserve">Returns the offset in characters from the start of the
line to the given @iter, not counting characters that
are invisible due to tags with the &#x201C;invisible&#x201D; flag
toggled on.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">offset in visible characters from the start of the line</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible_slice" c:identifier="gtk_text_iter_get_visible_slice">
<doc xml:space="preserve">Returns visible text in the given range.
Like [method@Gtk.TextIter.get_slice], but invisible text
is not included. Invisible text is usually invisible because
a `GtkTextTag` with the &#x201C;invisible&#x201D; attribute turned on has
been applied to it.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">slice of text from the buffer</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">iterator at start of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">iterator at end of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_visible_text" c:identifier="gtk_text_iter_get_visible_text">
<doc xml:space="preserve">Returns visible text in the given range.
Like [method@Gtk.TextIter.get_text], but invisible text
is not included. Invisible text is usually invisible because
a `GtkTextTag` with the &#x201C;invisible&#x201D; attribute turned on has
been applied to it.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">string containing visible text in the
range</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">iterator at start of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">iterator at end of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="has_tag" c:identifier="gtk_text_iter_has_tag">
<doc xml:space="preserve">Returns %TRUE if @iter points to a character that is part
of a range tagged with @tag.
See also [method@Gtk.TextIter.starts_tag] and
[method@Gtk.TextIter.ends_tag].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is tagged with @tag</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="in_range" c:identifier="gtk_text_iter_in_range">
<doc xml:space="preserve">Checks whether @iter falls in the range [@start, @end).
@start and @end must be in ascending order.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is in the range</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">start of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">end of range</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="inside_sentence" c:identifier="gtk_text_iter_inside_sentence">
<doc xml:space="preserve">Determines whether @iter is inside a sentence (as opposed to in
between two sentences, e.g. after a period and before the first
letter of the next sentence).
Sentence boundaries are determined by Pango and should be correct
for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is inside a sentence.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="inside_word" c:identifier="gtk_text_iter_inside_word">
<doc xml:space="preserve">Determines whether the character pointed by @iter is part of a
natural-language word (as opposed to say inside some whitespace).
Word breaks are determined by Pango and should be correct
for nearly any language.
Note that if [method@Gtk.TextIter.starts_word] returns %TRUE,
then this function returns %TRUE too, since @iter points to
the first character of the word.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is inside a word</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_cursor_position" c:identifier="gtk_text_iter_is_cursor_position">
<doc xml:space="preserve">Determine if @iter is at a cursor position.
See [method@Gtk.TextIter.forward_cursor_position] or
[struct@Pango.LogAttr] or [func@Pango.break] for details
on what a cursor position is.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cursor can be placed at @iter</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_end" c:identifier="gtk_text_iter_is_end">
<doc xml:space="preserve">Returns %TRUE if @iter is the end iterator.
This means it is one past the last dereferenceable iterator
in the buffer. gtk_text_iter_is_end() is the most efficient
way to check whether an iterator is the end iterator.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_start" c:identifier="gtk_text_iter_is_start">
<doc xml:space="preserve">Returns %TRUE if @iter is the first iterator in the buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is the first in the buffer</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="order" c:identifier="gtk_text_iter_order">
<doc xml:space="preserve">Swaps the value of @first and @second if @second comes before
@first in the buffer.
That is, ensures that @first and @second are in sequence.
Most text buffer functions that take a range call this
automatically on your behalf, so there&#x2019;s no real reason to
call it yourself in those cases. There are some exceptions,
such as [method@Gtk.TextIter.in_range], that expect a
pre-sorted range.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="first" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="second" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="set_line" c:identifier="gtk_text_iter_set_line">
<doc xml:space="preserve">Moves iterator @iter to the start of the line @line_number.
If @line_number is negative or larger than or equal to the number of lines
in the buffer, moves @iter to the start of the last line in the buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="line_number" transfer-ownership="none">
<doc xml:space="preserve">line number (counted from 0)</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_line_index" c:identifier="gtk_text_iter_set_line_index">
<doc xml:space="preserve">Same as gtk_text_iter_set_line_offset(), but works with a
byte index. The given byte index must be at
the start of a character, it can&#x2019;t be in the middle of a UTF-8
encoded character.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="byte_on_line" transfer-ownership="none">
<doc xml:space="preserve">a byte index relative to the start of @iter&#x2019;s current line</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_line_offset" c:identifier="gtk_text_iter_set_line_offset">
<doc xml:space="preserve">Moves @iter within a line, to a new character (not byte) offset.
The given character offset must be less than or equal to the number
of characters in the line; if equal, @iter moves to the start of the
next line. See [method@Gtk.TextIter.set_line_index] if you have a byte
index rather than a character offset.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="char_on_line" transfer-ownership="none">
<doc xml:space="preserve">a character offset relative to the start of @iter&#x2019;s current line</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_offset" c:identifier="gtk_text_iter_set_offset">
<doc xml:space="preserve">Sets @iter to point to @char_offset.
@char_offset counts from the start
of the entire text buffer, starting with 0.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="char_offset" transfer-ownership="none">
<doc xml:space="preserve">a character number</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_visible_line_index" c:identifier="gtk_text_iter_set_visible_line_index">
<doc xml:space="preserve">Like gtk_text_iter_set_line_index(), but the index is in visible
bytes, i.e. text with a tag making it invisible is not counted
in the index.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="byte_on_line" transfer-ownership="none">
<doc xml:space="preserve">a byte index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_visible_line_offset" c:identifier="gtk_text_iter_set_visible_line_offset">
<doc xml:space="preserve">Like gtk_text_iter_set_line_offset(), but the offset is in visible
characters, i.e. text with a tag making it invisible is not
counted in the offset.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</instance-parameter>
<parameter name="char_on_line" transfer-ownership="none">
<doc xml:space="preserve">a character offset</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="starts_line" c:identifier="gtk_text_iter_starts_line">
<doc xml:space="preserve">Returns %TRUE if @iter begins a paragraph.
This is the case if [method@Gtk.TextIter.get_line_offset]
would return 0. However this function is potentially more
efficient than [method@Gtk.TextIter.get_line_offset], because
it doesn&#x2019;t have to compute the offset, it just has to see
whether it&#x2019;s 0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter begins a line</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="starts_sentence" c:identifier="gtk_text_iter_starts_sentence">
<doc xml:space="preserve">Determines whether @iter begins a sentence.
Sentence boundaries are determined by Pango and
should be correct for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is at the start of a sentence.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="starts_tag" c:identifier="gtk_text_iter_starts_tag">
<doc xml:space="preserve">Returns %TRUE if @tag is toggled on at exactly this point.
If @tag is %NULL, returns %TRUE if any tag is toggled on at this point.
Note that if this function returns %TRUE, it means that
@iter is at the beginning of the tagged range, and that the
character at @iter is inside the tagged range. In other
words, unlike [method@Gtk.TextIter.ends_tag], if
this function returns %TRUE, [method@Gtk.TextIter.has_tag
will also return %TRUE for the same parameters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @iter is the start of a range tagged with @tag</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="starts_word" c:identifier="gtk_text_iter_starts_word">
<doc xml:space="preserve">Determines whether @iter begins a natural-language word.
Word breaks are determined by Pango and should be correct
for nearly any language.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is at the start of a word</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="toggles_tag" c:identifier="gtk_text_iter_toggles_tag">
<doc xml:space="preserve">Gets whether a range with @tag applied to it begins
or ends at @iter.
This is equivalent to (gtk_text_iter_starts_tag() ||
gtk_text_iter_ends_tag())</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @tag is toggled on or off at @iter</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">an iterator</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
</record>
<class name="TextMark" c:symbol-prefix="text_mark" c:type="GtkTextMark" parent="GObject.Object" glib:type-name="GtkTextMark" glib:get-type="gtk_text_mark_get_type" glib:type-struct="TextMarkClass">
<doc xml:space="preserve">A `GtkTextMark` is a position in a `GtkTextbuffer` that is preserved
across modifications.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
A `GtkTextMark` is like a bookmark in a text buffer; it preserves
a position in the text. You can convert the mark to an iterator using
[method@Gtk.TextBuffer.get_iter_at_mark]. Unlike iterators, marks remain
valid across buffer mutations, because their behavior is defined when
text is inserted or deleted. When text containing a mark is deleted,
the mark remains in the position originally occupied by the deleted
text. When text is inserted at a mark, a mark with &#x201C;left gravity&#x201D; will
be moved to the beginning of the newly-inserted text, and a mark with
&#x201C;right gravity&#x201D; will be moved to the end.
Note that &#x201C;left&#x201D; and &#x201C;right&#x201D; here refer to logical direction (left
is the toward the start of the buffer); in some languages such as
Hebrew the logically-leftmost text is not actually on the left when
displayed.
Marks are reference counted, but the reference count only controls
the validity of the memory; marks can be deleted from the buffer at
any time with [method@Gtk.TextBuffer.delete_mark]. Once deleted from
the buffer, a mark is essentially useless.
Marks optionally have names; these can be convenient to avoid passing
the `GtkTextMark` object around.
Marks are typically created using the [method@Gtk.TextBuffer.create_mark]
function.</doc>
<constructor name="new" c:identifier="gtk_text_mark_new">
<doc xml:space="preserve">Creates a text mark.
Add it to a buffer using [method@Gtk.TextBuffer.add_mark].
If @name is %NULL, the mark is anonymous; otherwise, the mark can be
retrieved by name using [method@Gtk.TextBuffer.get_mark]. If a mark
has left gravity, and text is inserted at the mark&#x2019;s current location,
the mark will be moved to the left of the newly-inserted text. If the
mark has right gravity (@left_gravity = %FALSE), the mark will end up
on the right of newly-inserted text. The standard left-to-right cursor
is a mark with right gravity (when you type, the cursor stays on the
right side of the text you&#x2019;re typing).</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">new `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">mark name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="left_gravity" transfer-ownership="none">
<doc xml:space="preserve">whether the mark should have left gravity</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</constructor>
<method name="get_buffer" c:identifier="gtk_text_mark_get_buffer">
<doc xml:space="preserve">Gets the buffer this mark is located inside.
Returns %NULL if the mark is deleted.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the mark&#x2019;s `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_deleted" c:identifier="gtk_text_mark_get_deleted">
<doc xml:space="preserve">Returns %TRUE if the mark has been removed from its buffer.
See [method@Gtk.TextBuffer.add_mark] for a way to add it
to a buffer again.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the mark is deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_left_gravity" c:identifier="gtk_text_mark_get_left_gravity" glib:get-property="left-gravity">
<doc xml:space="preserve">Determines whether the mark has left gravity.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the mark has left gravity, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_text_mark_get_name" glib:get-property="name">
<doc xml:space="preserve">Returns the mark name.
Returns %NULL for anonymous marks.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">mark name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_text_mark_get_visible">
<doc xml:space="preserve">Returns %TRUE if the mark is visible.
A cursor is displayed for visible marks.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_text_mark_set_visible">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="mark" transfer-ownership="none">
<type name="TextMark" c:type="GtkTextMark*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="left-gravity" writable="1" construct-only="1" transfer-ownership="none" getter="get_left_gravity">
<doc xml:space="preserve">Whether the mark has left gravity.
When text is inserted at the mark&#x2019;s current location, if the mark
has left gravity it will be moved to the left of the newly-inserted
text, otherwise to the right.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="name" writable="1" construct-only="1" transfer-ownership="none" getter="get_name">
<doc xml:space="preserve">The name of the mark or %NULL if the mark is anonymous.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="segment" readable="0" private="1">
<type name="gpointer" c:type="gpointer"/>
</field>
</class>
<record name="TextMarkClass" c:type="GtkTextMarkClass" glib:is-gtype-struct-for="TextMark">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<bitfield name="TextSearchFlags" glib:type-name="GtkTextSearchFlags" glib:get-type="gtk_text_search_flags_get_type" c:type="GtkTextSearchFlags">
<doc xml:space="preserve">Flags affecting how a search is done.
If neither %GTK_TEXT_SEARCH_VISIBLE_ONLY nor %GTK_TEXT_SEARCH_TEXT_ONLY are
enabled, the match must be exact; the special 0xFFFC character will match
embedded paintables or child widgets.</doc>
<member name="visible_only" value="1" c:identifier="GTK_TEXT_SEARCH_VISIBLE_ONLY" glib:nick="visible-only" glib:name="GTK_TEXT_SEARCH_VISIBLE_ONLY">
<doc xml:space="preserve">Search only visible data. A search match may
have invisible text interspersed.</doc>
</member>
<member name="text_only" value="2" c:identifier="GTK_TEXT_SEARCH_TEXT_ONLY" glib:nick="text-only" glib:name="GTK_TEXT_SEARCH_TEXT_ONLY">
<doc xml:space="preserve">Search only text. A match may have paintables or
child widgets mixed inside the matched range.</doc>
</member>
<member name="case_insensitive" value="4" c:identifier="GTK_TEXT_SEARCH_CASE_INSENSITIVE" glib:nick="case-insensitive" glib:name="GTK_TEXT_SEARCH_CASE_INSENSITIVE">
<doc xml:space="preserve">The text will be matched regardless of
what case it is in.</doc>
</member>
</bitfield>
<class name="TextTag" c:symbol-prefix="text_tag" c:type="GtkTextTag" parent="GObject.Object" glib:type-name="GtkTextTag" glib:get-type="gtk_text_tag_get_type" glib:type-struct="TextTagClass">
<doc xml:space="preserve">A tag that can be applied to text contained in a `GtkTextBuffer`.
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
Tags should be in the [class@Gtk.TextTagTable] for a given
`GtkTextBuffer` before using them with that buffer.
[method@Gtk.TextBuffer.create_tag] is the best way to create tags.
See &#x201C;gtk4-demo&#x201D; for numerous examples.
For each property of `GtkTextTag`, there is a &#x201C;set&#x201D; property, e.g.
&#x201C;font-set&#x201D; corresponds to &#x201C;font&#x201D;. These &#x201C;set&#x201D; properties reflect
whether a property has been set or not.
They are maintained by GTK and you should not set them independently.</doc>
<constructor name="new" c:identifier="gtk_text_tag_new">
<doc xml:space="preserve">Creates a `GtkTextTag`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">tag name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="changed" c:identifier="gtk_text_tag_changed">
<doc xml:space="preserve">Emits the [signal@Gtk.TextTagTable::tag-changed] signal on the
`GtkTextTagTable` where the tag is included.
The signal is already emitted when setting a `GtkTextTag` property.
This function is useful for a `GtkTextTag` subclass.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</instance-parameter>
<parameter name="size_changed" transfer-ownership="none">
<doc xml:space="preserve">whether the change affects the `GtkTextView` layout</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="get_priority" c:identifier="gtk_text_tag_get_priority">
<doc xml:space="preserve">Get the tag priority.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The tag&#x2019;s priority.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_priority" c:identifier="gtk_text_tag_set_priority">
<doc xml:space="preserve">Sets the priority of a `GtkTextTag`.
Valid priorities start at 0 and go to one less than
[method@Gtk.TextTagTable.get_size]. Each tag in a table
has a unique priority; setting the priority of one tag shifts
the priorities of all the other tags in the table to maintain
a unique priority for each tag.
Higher priority tags &#x201C;win&#x201D; if two tags both set the same text
attribute. When adding a tag to a tag table, it will be assigned
the highest priority in the table by default; so normally the
precedence of a set of tags is the order in which they were added
to the table, or created with [method@Gtk.TextBuffer.create_tag],
which adds the tag to the buffer&#x2019;s table automatically.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</instance-parameter>
<parameter name="priority" transfer-ownership="none">
<doc xml:space="preserve">the new priority</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<property name="accumulative-margin" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the margins accumulate or override each other.
When set to %TRUE the margins of this tag are added to the margins
of any other non-accumulative margins present. When set to %FALSE
the margins override one another (the default).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="allow-breaks" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether breaks are allowed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="allow-breaks-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="background" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Background color as a string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="background-full-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the background color fills the entire line height
or only the height of the tagged characters.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="background-full-height-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="background-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Background color as a `GdkRGBA`.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="background-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="direction" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Text direction, e.g. right-to-left or left-to-right.</doc>
<type name="TextDirection"/>
</property>
<property name="editable" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether the text can be modified by the user.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="editable-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="fallback" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether font fallback is enabled.
When set to %TRUE, other fonts will be substituted
where the current font is missing glyphs.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="fallback-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="family" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Name of the font family, e.g. Sans, Helvetica, Times, Monospace.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="family-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="font" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font description as string, e.g. \"Sans Italic 12\".
Note that the initial value of this property depends on
the internals of `PangoFontDescription`.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="font-desc" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font description as a `PangoFontDescription`.</doc>
<type name="Pango.FontDescription"/>
</property>
<property name="font-features" writable="1" transfer-ownership="none">
<doc xml:space="preserve">OpenType font features, as a string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="font-features-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="foreground" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Foreground color as a string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="foreground-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Foreground color as a `GdkRGBA`.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="foreground-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="indent" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Amount to indent the paragraph, in pixels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="indent-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="insert-hyphens" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to insert hyphens at breaks.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="insert-hyphens-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="invisible" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether this text is hidden.
Note that there may still be problems with the support for invisible
text, in particular when navigating programmatically inside a buffer
containing invisible segments.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="invisible-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="justification" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Left, right, or center justification.</doc>
<type name="Justification"/>
</property>
<property name="justification-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="language" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The language this text is in, as an ISO code.
Pango can use this as a hint when rendering the text.
If not set, an appropriate default will be used.
Note that the initial value of this property depends
on the current locale, see also [func@Gtk.get_default_language].</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="language-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="left-margin" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Width of the left margin in pixels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="left-margin-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="letter-spacing" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Extra spacing between graphemes, in Pango units.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="letter-spacing-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="line-height" writable="1" transfer-ownership="none">
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="line-height-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="name" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The name used to refer to the tag.
%NULL for anonymous tags.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="overline" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Style of overline for this text.</doc>
<type name="Pango.Overline"/>
</property>
<property name="overline-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">This property modifies the color of overlines.
If not set, overlines will use the foreground color.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="overline-rgba-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="overline-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="paragraph-background" readable="0" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The paragraph background color as a string.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="paragraph-background-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The paragraph background color as a `GdkRGBA`.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="paragraph-background-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pixels-above-lines" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Pixels of blank space above paragraphs.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="pixels-above-lines-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pixels-below-lines" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Pixels of blank space below paragraphs.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="pixels-below-lines-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pixels-inside-wrap" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Pixels of blank space between wrapped lines in a paragraph.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="pixels-inside-wrap-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="right-margin" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Width of the right margin, in pixels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="right-margin-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="rise" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Offset of text above the baseline, in Pango units.
Negative values go below the baseline.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="rise-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="scale" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font size as a scale factor relative to the default font size.
This properly adapts to theme changes, etc. so is recommended.
Pango predefines some scales such as %PANGO_SCALE_X_LARGE.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="scale-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sentence" version="4.6" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether this tag represents a single sentence.
This affects cursor movement.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sentence-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="show-spaces" writable="1" transfer-ownership="none">
<doc xml:space="preserve">How to render invisible characters.</doc>
<type name="Pango.ShowFlags"/>
</property>
<property name="show-spaces-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="size" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font size in Pango units.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="size-points" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font size in points.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="size-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="stretch" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font stretch as a `PangoStretch`, e.g. %PANGO_STRETCH_CONDENSED.</doc>
<type name="Pango.Stretch"/>
</property>
<property name="stretch-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="strikethrough" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to strike through the text.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="strikethrough-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">This property modifies the color of strikeouts.
If not set, strikeouts will use the foreground color.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="strikethrough-rgba-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">If the `strikethrough-rgba` property has been set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="strikethrough-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="style" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font style as a `PangoStyle`, e.g. %PANGO_STYLE_ITALIC.</doc>
<type name="Pango.Style"/>
</property>
<property name="style-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tabs" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Custom tabs for this text.</doc>
<type name="Pango.TabArray"/>
</property>
<property name="tabs-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="text-transform" version="4.6" writable="1" transfer-ownership="none">
<doc xml:space="preserve">How to transform the text for display.</doc>
<type name="Pango.TextTransform"/>
</property>
<property name="text-transform-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="underline" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Style of underline for this text.</doc>
<type name="Pango.Underline"/>
</property>
<property name="underline-rgba" writable="1" transfer-ownership="none">
<doc xml:space="preserve">This property modifies the color of underlines.
If not set, underlines will use the foreground color.
If [property@Gtk.TextTag:underline] is set to %PANGO_UNDERLINE_ERROR,
an alternate color may be applied instead of the foreground. Setting
this property will always override those defaults.</doc>
<type name="Gdk.RGBA"/>
</property>
<property name="underline-rgba-set" writable="1" transfer-ownership="none">
<doc xml:space="preserve">If the `underline-rgba` property has been set.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="underline-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="variant" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font variant as a `PangoVariant`, e.g. %PANGO_VARIANT_SMALL_CAPS.</doc>
<type name="Pango.Variant"/>
</property>
<property name="variant-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="weight" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Font weight as an integer.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="weight-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="word" version="4.6" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether this tag represents a single word.
This affects line breaks and cursor movement.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="word-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="wrap-mode" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to wrap lines never, at word boundaries, or
at character boundaries.</doc>
<type name="WrapMode"/>
</property>
<property name="wrap-mode-set" writable="1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv">
<type name="TextTagPrivate" c:type="GtkTextTagPrivate*"/>
</field>
</class>
<record name="TextTagClass" c:type="GtkTextTagClass" glib:is-gtype-struct-for="TextTag">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="TextTagPrivate" c:type="GtkTextTagPrivate" disguised="1"/>
<class name="TextTagTable" c:symbol-prefix="text_tag_table" c:type="GtkTextTagTable" parent="GObject.Object" glib:type-name="GtkTextTagTable" glib:get-type="gtk_text_tag_table_get_type">
<doc xml:space="preserve">The collection of tags in a `GtkTextBuffer`
You may wish to begin by reading the
[text widget conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types
related to the text widget and how they work together.
# GtkTextTagTables as GtkBuildable
The `GtkTextTagTable` implementation of the `GtkBuildable` interface
supports adding tags by specifying &#x201C;tag&#x201D; as the &#x201C;type&#x201D; attribute
of a &lt;child&gt; element.
An example of a UI definition fragment specifying tags:
```xml
&lt;object class="GtkTextTagTable"&gt;
&lt;child type="tag"&gt;
&lt;object class="GtkTextTag"/&gt;
&lt;/child&gt;
&lt;/object&gt;
```</doc>
<implements name="Buildable"/>
<constructor name="new" c:identifier="gtk_text_tag_table_new">
<doc xml:space="preserve">Creates a new `GtkTextTagTable`.
The table contains no tags by default.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</return-value>
</constructor>
<method name="add" c:identifier="gtk_text_tag_table_add">
<doc xml:space="preserve">Add a tag to the table.
The tag is assigned the highest priority in the table.
@tag must not be in a tag table already, and may not have
the same name as an already-added tag.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE on success.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="table" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<method name="foreach" c:identifier="gtk_text_tag_table_foreach">
<doc xml:space="preserve">Calls @func on each tag in @table, with user data @data.
Note that the table may not be modified while iterating
over it (you can&#x2019;t add/remove tags).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="table" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">a function to call on each tag</doc>
<type name="TextTagTableForeach" c:type="GtkTextTagTableForeach"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get_size" c:identifier="gtk_text_tag_table_get_size">
<doc xml:space="preserve">Returns the size of the table (number of tags)</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of tags in @table</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="table" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</instance-parameter>
</parameters>
</method>
<method name="lookup" c:identifier="gtk_text_tag_table_lookup">
<doc xml:space="preserve">Look up a named tag.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The tag</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</return-value>
<parameters>
<instance-parameter name="table" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name of a tag</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_text_tag_table_remove">
<doc xml:space="preserve">Remove a tag from the table.
If a `GtkTextBuffer` has @table as its tag table, the tag is
removed from the buffer. The table&#x2019;s reference to the tag is
removed, so the tag will end up destroyed if you don&#x2019;t have
a reference to it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="table" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTagTable`</doc>
<type name="TextTagTable" c:type="GtkTextTagTable*"/>
</instance-parameter>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
</parameters>
</method>
<glib:signal name="tag-added" when="last">
<doc xml:space="preserve">Emitted every time a new tag is added in the `GtkTextTagTable`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the added tag.</doc>
<type name="TextTag"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="tag-changed" when="last">
<doc xml:space="preserve">Emitted every time a tag in the `GtkTextTagTable` changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the changed tag.</doc>
<type name="TextTag"/>
</parameter>
<parameter name="size_changed" transfer-ownership="none">
<doc xml:space="preserve">whether the change affects the `GtkTextView` layout.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="tag-removed" when="last">
<doc xml:space="preserve">Emitted every time a tag is removed from the `GtkTextTagTable`.
The @tag is still valid by the time the signal is emitted, but
it is not associated with a tag table any more.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the removed tag.</doc>
<type name="TextTag"/>
</parameter>
</parameters>
</glib:signal>
</class>
<callback name="TextTagTableForeach" c:type="GtkTextTagTableForeach">
<doc xml:space="preserve">A function used with gtk_text_tag_table_foreach(),
to iterate over every `GtkTextTag` inside a `GtkTextTagTable`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tag" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTextTag`</doc>
<type name="TextTag" c:type="GtkTextTag*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">data passed to gtk_text_tag_table_foreach()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="TextView" c:symbol-prefix="text_view" c:type="GtkTextView" parent="Widget" glib:type-name="GtkTextView" glib:get-type="gtk_text_view_get_type" glib:type-struct="TextViewClass">
<doc xml:space="preserve">A widget that displays the contents of a [class@Gtk.TextBuffer].
![An example GtkTextview](multiline-text.png)
You may wish to begin by reading the [conceptual overview](section-text-widget.html),
which gives an overview of all the objects and data types related to the
text widget and how they work together.
## CSS nodes
```
textview.view
&#x251C;&#x2500;&#x2500; border.top
&#x251C;&#x2500;&#x2500; border.left
&#x251C;&#x2500;&#x2500; text
&#x2502; &#x2570;&#x2500;&#x2500; [selection]
&#x251C;&#x2500;&#x2500; border.right
&#x251C;&#x2500;&#x2500; border.bottom
&#x2570;&#x2500;&#x2500; [window.popup]
```
`GtkTextView` has a main css node with name textview and style class .view,
and subnodes for each of the border windows, and the main text area,
with names border and text, respectively. The border nodes each get
one of the style classes .left, .right, .top or .bottom.
A node representing the selection will appear below the text node.
If a context menu is opened, the window node will appear as a subnode
of the main node.
## Accessibility
`GtkTextView` uses the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_text_view_new">
<doc xml:space="preserve">Creates a new `GtkTextView`.
If you don&#x2019;t call [method@Gtk.TextView.set_buffer] before using the
text view, an empty default buffer will be created for you. Get the
buffer with [method@Gtk.TextView.get_buffer]. If you want to specify
your own buffer, consider [ctor@Gtk.TextView.new_with_buffer].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkTextView`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_buffer" c:identifier="gtk_text_view_new_with_buffer">
<doc xml:space="preserve">Creates a new `GtkTextView` widget displaying the buffer @buffer.
One buffer can be shared among many widgets. @buffer may be %NULL
to create a default buffer, in which case this function is equivalent
to [ctor@Gtk.TextView.new]. The text view adds its own reference count
to the buffer; it does not take over an existing reference.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkTextView`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="buffer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="backspace">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="copy_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="create_buffer" introspectable="0">
<return-value>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="cut_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="delete_from_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<type name="DeleteType" c:type="GtkDeleteType"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="extend_selection">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="granularity" transfer-ownership="none">
<type name="TextExtendSelection" c:type="GtkTextExtendSelection"/>
</parameter>
<parameter name="location" transfer-ownership="none">
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_at_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="str" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="insert_emoji">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="move_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="step" transfer-ownership="none">
<type name="MovementStep" c:type="GtkMovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="extend_selection" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="paste_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_anchor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="snapshot_layer">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="layer" transfer-ownership="none">
<type name="TextViewLayer" c:type="GtkTextViewLayer"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="toggle_overwrite">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="add_child_at_anchor" c:identifier="gtk_text_view_add_child_at_anchor">
<doc xml:space="preserve">Adds a child widget in the text buffer, at the given @anchor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="anchor" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextChildAnchor` in the `GtkTextBuffer` for @text_view</doc>
<type name="TextChildAnchor" c:type="GtkTextChildAnchor*"/>
</parameter>
</parameters>
</method>
<method name="add_overlay" c:identifier="gtk_text_view_add_overlay">
<doc xml:space="preserve">Adds @child at a fixed coordinate in the `GtkTextView`'s text window.
The @xpos and @ypos must be in buffer coordinates (see
[method@Gtk.TextView.get_iter_location] to convert to
buffer coordinates).
@child will scroll with the text view.
If instead you want a widget that will not move with the
`GtkTextView` contents see `GtkOverlay`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="xpos" transfer-ownership="none">
<doc xml:space="preserve">X position of child in window coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="ypos" transfer-ownership="none">
<doc xml:space="preserve">Y position of child in window coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="backward_display_line" c:identifier="gtk_text_view_backward_display_line">
<doc xml:space="preserve">Moves the given @iter backward by one display (wrapped) line.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view&#x2019;s width; paragraphs are the same in all
views, since they depend on the contents of the `GtkTextBuffer`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter was moved and is not on the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="backward_display_line_start" c:identifier="gtk_text_view_backward_display_line_start">
<doc xml:space="preserve">Moves the given @iter backward to the next display line start.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view&#x2019;s width; paragraphs are the same in all
views, since they depend on the contents of the `GtkTextBuffer`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter was moved and is not on the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="buffer_to_window_coords" c:identifier="gtk_text_view_buffer_to_window_coords">
<doc xml:space="preserve">Converts buffer coordinates to window coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="win" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextWindowType`</doc>
<type name="TextWindowType" c:type="GtkTextWindowType"/>
</parameter>
<parameter name="buffer_x" transfer-ownership="none">
<doc xml:space="preserve">buffer x coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="buffer_y" transfer-ownership="none">
<doc xml:space="preserve">buffer y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="window_x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">window x coordinate return location</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="window_y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">window y coordinate return location</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="forward_display_line" c:identifier="gtk_text_view_forward_display_line">
<doc xml:space="preserve">Moves the given @iter forward by one display (wrapped) line.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view&#x2019;s width; paragraphs are the same in all
views, since they depend on the contents of the `GtkTextBuffer`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter was moved and is not on the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="forward_display_line_end" c:identifier="gtk_text_view_forward_display_line_end">
<doc xml:space="preserve">Moves the given @iter forward to the next display line end.
A display line is different from a paragraph. Paragraphs are
separated by newlines or other paragraph separator characters.
Display lines are created by line-wrapping a paragraph. If
wrapping is turned off, display lines and paragraphs will be the
same. Display lines are divided differently for each view, since
they depend on the view&#x2019;s width; paragraphs are the same in all
views, since they depend on the contents of the `GtkTextBuffer`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter was moved and is not on the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="get_accepts_tab" c:identifier="gtk_text_view_get_accepts_tab" glib:get-property="accepts-tab">
<attribute name="org.gtk.Method.get_property" value="accepts-tab"/>
<doc xml:space="preserve">Returns whether pressing the &lt;kbd&gt;Tab&lt;/kbd&gt; key inserts a tab characters.
See [method@Gtk.TextView.set_accepts_tab].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if pressing the Tab key inserts a tab character,
%FALSE if pressing the Tab key moves the keyboard focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_bottom_margin" c:identifier="gtk_text_view_get_bottom_margin" glib:get-property="bottom-margin">
<attribute name="org.gtk.Method.get_property" value="bottom-margin"/>
<doc xml:space="preserve">Gets the bottom margin for text in the @text_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">bottom margin in pixels</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_buffer" c:identifier="gtk_text_view_get_buffer" glib:get-property="buffer">
<attribute name="org.gtk.Method.get_property" value="buffer"/>
<doc xml:space="preserve">Returns the `GtkTextBuffer` being displayed by this text view.
The reference count on the buffer is not incremented; the caller
of this function won&#x2019;t own a new reference.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cursor_locations" c:identifier="gtk_text_view_get_cursor_locations">
<doc xml:space="preserve">Determine the positions of the strong and weak cursors if the
insertion point is at @iter.
The position of each cursor is stored as a zero-width rectangle.
The strong cursor location is the location where characters of
the directionality equal to the base direction of the paragraph
are inserted. The weak cursor location is the location where
characters of the directionality opposite to the base direction
of the paragraph are inserted.
If @iter is %NULL, the actual cursor position is used.
Note that if @iter happens to be the actual cursor position, and
there is currently an IM preedit sequence being entered, the
returned locations will be adjusted to account for the preedit
cursor&#x2019;s offset within the preedit sequence.
The rectangle position is in buffer coordinates; use
[method@Gtk.TextView.buffer_to_window_coords] to convert these
coordinates to coordinates for one of the windows in the text view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="strong" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the strong cursor position</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
<parameter name="weak" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the weak cursor position</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_cursor_visible" c:identifier="gtk_text_view_get_cursor_visible" glib:get-property="cursor-visible">
<attribute name="org.gtk.Method.get_property" value="cursor-visible"/>
<doc xml:space="preserve">Find out whether the cursor should be displayed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the insertion mark is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_editable" c:identifier="gtk_text_view_get_editable" glib:get-property="editable">
<attribute name="org.gtk.Method.get_property" value="editable"/>
<doc xml:space="preserve">Returns the default editability of the `GtkTextView`.
Tags in the buffer may override this setting for some ranges of text.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether text is editable by default</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_extra_menu" c:identifier="gtk_text_view_get_extra_menu" glib:get-property="extra-menu">
<attribute name="org.gtk.Method.get_property" value="extra-menu"/>
<doc xml:space="preserve">Gets the menu model that gets added to the context menu
or %NULL if none has been set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the menu model</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_gutter" c:identifier="gtk_text_view_get_gutter">
<doc xml:space="preserve">Gets a `GtkWidget` that has previously been set as gutter.
See [method@Gtk.TextView.set_gutter].
@win must be one of %GTK_TEXT_WINDOW_LEFT, %GTK_TEXT_WINDOW_RIGHT,
%GTK_TEXT_WINDOW_TOP, or %GTK_TEXT_WINDOW_BOTTOM.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="win" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextWindowType`</doc>
<type name="TextWindowType" c:type="GtkTextWindowType"/>
</parameter>
</parameters>
</method>
<method name="get_indent" c:identifier="gtk_text_view_get_indent" glib:get-property="indent">
<attribute name="org.gtk.Method.get_property" value="indent"/>
<doc xml:space="preserve">Gets the default indentation of paragraphs in @text_view.
Tags in the view&#x2019;s buffer may override the default.
The indentation may be negative.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of pixels of indentation</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_hints" c:identifier="gtk_text_view_get_input_hints" glib:get-property="input-hints">
<attribute name="org.gtk.Method.get_property" value="input-hints"/>
<doc xml:space="preserve">Gets the `input-hints` of the `GtkTextView`.</doc>
<return-value transfer-ownership="none">
<type name="InputHints" c:type="GtkInputHints"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_input_purpose" c:identifier="gtk_text_view_get_input_purpose" glib:get-property="input-purpose">
<attribute name="org.gtk.Method.get_property" value="input-purpose"/>
<doc xml:space="preserve">Gets the `input-purpose` of the `GtkTextView`.</doc>
<return-value transfer-ownership="none">
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_iter_at_location" c:identifier="gtk_text_view_get_iter_at_location">
<doc xml:space="preserve">Retrieves the iterator at buffer coordinates @x and @y.
Buffer coordinates are coordinates for the entire buffer, not just
the currently-displayed portion. If you have coordinates from an
event, you have to convert those to buffer coordinates with
[method@Gtk.TextView.window_to_buffer_coords].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the position is over text</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">x position, in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">y position, in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_iter_at_position" c:identifier="gtk_text_view_get_iter_at_position">
<doc xml:space="preserve">Retrieves the iterator pointing to the character at buffer
coordinates @x and @y.
Buffer coordinates are coordinates for the entire buffer, not just
the currently-displayed portion. If you have coordinates from an event,
you have to convert those to buffer coordinates with
[method@Gtk.TextView.window_to_buffer_coords].
Note that this is different from [method@Gtk.TextView.get_iter_at_location],
which returns cursor locations, i.e. positions between characters.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the position is over text</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="trailing" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">if non-%NULL, location to store
an integer indicating where in the grapheme the user clicked.
It will either be zero, or the number of characters in the grapheme.
0 represents the trailing edge of the grapheme.</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">x position, in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">y position, in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_iter_location" c:identifier="gtk_text_view_get_iter_location">
<doc xml:space="preserve">Gets a rectangle which roughly contains the character at @iter.
The rectangle position is in buffer coordinates; use
[method@Gtk.TextView.buffer_to_window_coords] to convert these
coordinates to coordinates for one of the windows in the text view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="location" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">bounds of the character at @iter</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_justification" c:identifier="gtk_text_view_get_justification" glib:get-property="justification">
<attribute name="org.gtk.Method.get_property" value="justification"/>
<doc xml:space="preserve">Gets the default justification of paragraphs in @text_view.
Tags in the buffer may override the default.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">default justification</doc>
<type name="Justification" c:type="GtkJustification"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_left_margin" c:identifier="gtk_text_view_get_left_margin" glib:get-property="left-margin">
<attribute name="org.gtk.Method.get_property" value="left-margin"/>
<doc xml:space="preserve">Gets the default left margin size of paragraphs in the @text_view.
Tags in the buffer may override the default.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">left margin in pixels</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_line_at_y" c:identifier="gtk_text_view_get_line_at_y">
<doc xml:space="preserve">Gets the `GtkTextIter` at the start of the line containing
the coordinate @y.
@y is in buffer coordinates, convert from window coordinates with
[method@Gtk.TextView.window_to_buffer_coords]. If non-%NULL,
@line_top will be filled with the coordinate of the top edge
of the line.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="target_iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">a y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="line_top" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for top coordinate of the line</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_line_yrange" c:identifier="gtk_text_view_get_line_yrange">
<doc xml:space="preserve">Gets the y coordinate of the top of the line containing @iter,
and the height of the line.
The coordinate is a buffer coordinate; convert to window
coordinates with [method@Gtk.TextView.buffer_to_window_coords].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="y" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for a y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for a height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_ltr_context" c:identifier="gtk_text_view_get_ltr_context" version="4.4">
<doc xml:space="preserve">Gets the `PangoContext` that is used for rendering LTR directed
text layouts.
The context may be replaced when CSS changes occur.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `PangoContext`</doc>
<type name="Pango.Context" c:type="PangoContext*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_monospace" c:identifier="gtk_text_view_get_monospace" glib:get-property="monospace">
<attribute name="org.gtk.Method.get_property" value="monospace"/>
<doc xml:space="preserve">Gets whether the `GtkTextView` uses monospace styling.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if monospace fonts are desired</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_overwrite" c:identifier="gtk_text_view_get_overwrite" glib:get-property="overwrite">
<attribute name="org.gtk.Method.get_property" value="overwrite"/>
<doc xml:space="preserve">Returns whether the `GtkTextView` is in overwrite mode or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether @text_view is in overwrite mode or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pixels_above_lines" c:identifier="gtk_text_view_get_pixels_above_lines" glib:get-property="pixels-above-lines">
<attribute name="org.gtk.Method.get_property" value="pixels-above-lines"/>
<doc xml:space="preserve">Gets the default number of pixels to put above paragraphs.
Adding this function with [method@Gtk.TextView.get_pixels_below_lines]
is equal to the line space between each paragraph.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">default number of pixels above paragraphs</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pixels_below_lines" c:identifier="gtk_text_view_get_pixels_below_lines" glib:get-property="pixels-below-lines">
<attribute name="org.gtk.Method.get_property" value="pixels-below-lines"/>
<doc xml:space="preserve">Gets the default number of pixels to put below paragraphs.
The line space is the sum of the value returned by this function and
the value returned by [method@Gtk.TextView.get_pixels_above_lines].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">default number of blank pixels below paragraphs</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pixels_inside_wrap" c:identifier="gtk_text_view_get_pixels_inside_wrap" glib:get-property="pixels-inside-wrap">
<attribute name="org.gtk.Method.get_property" value="pixels-inside-wrap"/>
<doc xml:space="preserve">Gets the default number of pixels to put between wrapped lines
inside a paragraph.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">default number of pixels of blank space between wrapped lines</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_right_margin" c:identifier="gtk_text_view_get_right_margin" glib:get-property="right-margin">
<attribute name="org.gtk.Method.get_property" value="right-margin"/>
<doc xml:space="preserve">Gets the default right margin for text in @text_view.
Tags in the buffer may override the default.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">right margin in pixels</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_rtl_context" c:identifier="gtk_text_view_get_rtl_context" version="4.4">
<doc xml:space="preserve">Gets the `PangoContext` that is used for rendering RTL directed
text layouts.
The context may be replaced when CSS changes occur.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `PangoContext`</doc>
<type name="Pango.Context" c:type="PangoContext*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tabs" c:identifier="gtk_text_view_get_tabs" glib:get-property="tabs">
<attribute name="org.gtk.Method.get_property" value="tabs"/>
<doc xml:space="preserve">Gets the default tabs for @text_view.
Tags in the buffer may override the defaults. The returned array
will be %NULL if &#x201C;standard&#x201D; (8-space) tabs are used. Free the
return value with [method@Pango.TabArray.free].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">copy of default tab array,
or %NULL if standard tabs are used; must be freed with
[method@Pango.TabArray.free].</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_top_margin" c:identifier="gtk_text_view_get_top_margin" glib:get-property="top-margin">
<attribute name="org.gtk.Method.get_property" value="top-margin"/>
<doc xml:space="preserve">Gets the top margin for text in the @text_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">top margin in pixels</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible_rect" c:identifier="gtk_text_view_get_visible_rect">
<doc xml:space="preserve">Fills @visible_rect with the currently-visible
region of the buffer, in buffer coordinates.
Convert to window coordinates with
[method@Gtk.TextView.buffer_to_window_coords].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="visible_rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">rectangle to fill</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_wrap_mode" c:identifier="gtk_text_view_get_wrap_mode" glib:get-property="wrap-mode">
<attribute name="org.gtk.Method.get_property" value="wrap-mode"/>
<doc xml:space="preserve">Gets the line wrapping for the view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the line wrap setting</doc>
<type name="WrapMode" c:type="GtkWrapMode"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="im_context_filter_keypress" c:identifier="gtk_text_view_im_context_filter_keypress">
<doc xml:space="preserve">Allow the `GtkTextView` input method to internally handle key press
and release events.
If this function returns %TRUE, then no further processing should be
done for this key event. See [method@Gtk.IMContext.filter_keypress].
Note that you are expected to call this function from your handler
when overriding key event handling. This is needed in the case when
you need to insert your own key handling between the input method
and the default key event handling of the `GtkTextView`.
```c
static gboolean
gtk_foo_bar_key_press_event (GtkWidget *widget,
GdkEvent *event)
{
guint keyval;
gdk_event_get_keyval ((GdkEvent*)event, &amp;keyval);
if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter)
{
if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event))
return TRUE;
}
// Do some stuff
return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)-&gt;key_press_event (widget, event);
}
```</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input method handled the key event.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="event" transfer-ownership="none">
<doc xml:space="preserve">the key event</doc>
<type name="Gdk.Event" c:type="GdkEvent*"/>
</parameter>
</parameters>
</method>
<method name="move_mark_onscreen" c:identifier="gtk_text_view_move_mark_onscreen">
<doc xml:space="preserve">Moves a mark within the buffer so that it's
located within the currently-visible text area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the mark moved (wasn&#x2019;t already onscreen)</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</method>
<method name="move_overlay" c:identifier="gtk_text_view_move_overlay">
<doc xml:space="preserve">Updates the position of a child.
See [method@Gtk.TextView.add_overlay].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a widget already added with [method@Gtk.TextView.add_overlay]</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="xpos" transfer-ownership="none">
<doc xml:space="preserve">new X position in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="ypos" transfer-ownership="none">
<doc xml:space="preserve">new Y position in buffer coordinates</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="move_visually" c:identifier="gtk_text_view_move_visually">
<doc xml:space="preserve">Move the iterator a given number of characters visually, treating
it as the strong cursor position.
If @count is positive, then the new strong cursor position will
be @count positions to the right of the old cursor position.
If @count is negative then the new strong cursor position will
be @count positions to the left of the old cursor position.
In the presence of bi-directional text, the correspondence
between logical and visual order will depend on the direction
of the current run, and there may be jumps when the cursor
is moved off of the end of a run.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter moved and is not on the end iterator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">number of characters to move (negative moves left,
positive moves right)</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="place_cursor_onscreen" c:identifier="gtk_text_view_place_cursor_onscreen">
<doc xml:space="preserve">Moves the cursor to the currently visible region of the
buffer.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the cursor had to be moved.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_text_view_remove">
<doc xml:space="preserve">Removes a child widget from @text_view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the child to remove</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="reset_cursor_blink" c:identifier="gtk_text_view_reset_cursor_blink">
<doc xml:space="preserve">Ensures that the cursor is shown.
This also resets the time that it will stay blinking (or
visible, in case blinking is disabled).
This function should be called in response to user input
(e.g. from derived classes that override the textview's
event handlers).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="reset_im_context" c:identifier="gtk_text_view_reset_im_context">
<doc xml:space="preserve">Reset the input method context of the text view if needed.
This can be necessary in the case where modifying the buffer
would confuse on-going input method behavior.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
</parameters>
</method>
<method name="scroll_mark_onscreen" c:identifier="gtk_text_view_scroll_mark_onscreen">
<doc xml:space="preserve">Scrolls @text_view the minimum distance such that @mark is contained
within the visible area of the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a mark in the buffer for @text_view</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
</parameters>
</method>
<method name="scroll_to_iter" c:identifier="gtk_text_view_scroll_to_iter">
<doc xml:space="preserve">Scrolls @text_view so that @iter is on the screen in the position
indicated by @xalign and @yalign.
An alignment of 0.0 indicates left or top, 1.0 indicates right or
bottom, 0.5 means center. If @use_align is %FALSE, the text scrolls
the minimal distance to get the mark onscreen, possibly not scrolling
at all. The effective screen for purposes of this function is reduced
by a margin of size @within_margin.
Note that this function uses the currently-computed height of the
lines in the text buffer. Line heights are computed in an idle
handler; so this function may not have the desired effect if it&#x2019;s
called before the height computations. To avoid oddness, consider
using [method@Gtk.TextView.scroll_to_mark] which saves a point to be
scrolled to after line validation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if scrolling occurred</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="within_margin" transfer-ownership="none">
<doc xml:space="preserve">margin as a [0.0,0.5) fraction of screen size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="use_align" transfer-ownership="none">
<doc xml:space="preserve">whether to use alignment arguments (if %FALSE,
just get the mark onscreen)</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">horizontal alignment of mark within visible area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">vertical alignment of mark within visible area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="scroll_to_mark" c:identifier="gtk_text_view_scroll_to_mark">
<doc xml:space="preserve">Scrolls @text_view so that @mark is on the screen in the position
indicated by @xalign and @yalign.
An alignment of 0.0 indicates left or top, 1.0 indicates right or
bottom, 0.5 means center. If @use_align is %FALSE, the text scrolls
the minimal distance to get the mark onscreen, possibly not scrolling
at all. The effective screen for purposes of this function is reduced
by a margin of size @within_margin.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="mark" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextMark`</doc>
<type name="TextMark" c:type="GtkTextMark*"/>
</parameter>
<parameter name="within_margin" transfer-ownership="none">
<doc xml:space="preserve">margin as a [0.0,0.5) fraction of screen size</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="use_align" transfer-ownership="none">
<doc xml:space="preserve">whether to use alignment arguments (if %FALSE, just
get the mark onscreen)</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">horizontal alignment of mark within visible area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="yalign" transfer-ownership="none">
<doc xml:space="preserve">vertical alignment of mark within visible area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_accepts_tab" c:identifier="gtk_text_view_set_accepts_tab" glib:set-property="accepts-tab">
<attribute name="org.gtk.Method.set_property" value="accepts-tab"/>
<doc xml:space="preserve">Sets the behavior of the text widget when the &lt;kbd&gt;Tab&lt;/kbd&gt; key is pressed.
If @accepts_tab is %TRUE, a tab character is inserted. If @accepts_tab
is %FALSE the keyboard focus is moved to the next widget in the focus
chain.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="accepts_tab" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if pressing the Tab key should insert a tab
character, %FALSE, if pressing the Tab key should move the
keyboard focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_bottom_margin" c:identifier="gtk_text_view_set_bottom_margin" glib:set-property="bottom-margin">
<attribute name="org.gtk.Method.set_property" value="bottom-margin"/>
<doc xml:space="preserve">Sets the bottom margin for text in @text_view.
Note that this function is confusingly named.
In CSS terms, the value set here is padding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="bottom_margin" transfer-ownership="none">
<doc xml:space="preserve">bottom margin in pixels</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_buffer" c:identifier="gtk_text_view_set_buffer" glib:set-property="buffer">
<attribute name="org.gtk.Method.set_property" value="buffer"/>
<doc xml:space="preserve">Sets @buffer as the buffer being displayed by @text_view.
The previous buffer displayed by the text view is unreferenced, and
a reference is added to @buffer. If you owned a reference to @buffer
before passing it to this function, you must remove that reference
yourself; `GtkTextView` will not &#x201C;adopt&#x201D; it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="buffer" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTextBuffer`</doc>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</parameter>
</parameters>
</method>
<method name="set_cursor_visible" c:identifier="gtk_text_view_set_cursor_visible" glib:set-property="cursor-visible">
<attribute name="org.gtk.Method.set_property" value="cursor-visible"/>
<doc xml:space="preserve">Toggles whether the insertion point should be displayed.
A buffer with no editable text probably shouldn&#x2019;t have a visible
cursor, so you may want to turn the cursor off.
Note that this property may be overridden by the
[property@GtkSettings:gtk-keynav-use-caret] setting.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">whether to show the insertion cursor</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_editable" c:identifier="gtk_text_view_set_editable" glib:set-property="editable">
<attribute name="org.gtk.Method.set_property" value="editable"/>
<doc xml:space="preserve">Sets the default editability of the `GtkTextView`.
You can override this default setting with tags in the buffer,
using the &#x201C;editable&#x201D; attribute of tags.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">whether it&#x2019;s editable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_extra_menu" c:identifier="gtk_text_view_set_extra_menu" glib:set-property="extra-menu">
<attribute name="org.gtk.Method.set_property" value="extra-menu"/>
<doc xml:space="preserve">Sets a menu model to add when constructing the context
menu for @text_view.
You can pass %NULL to remove a previously set extra menu.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GMenuModel`</doc>
<type name="Gio.MenuModel" c:type="GMenuModel*"/>
</parameter>
</parameters>
</method>
<method name="set_gutter" c:identifier="gtk_text_view_set_gutter">
<doc xml:space="preserve">Places @widget into the gutter specified by @win.
@win must be one of %GTK_TEXT_WINDOW_LEFT, %GTK_TEXT_WINDOW_RIGHT,
%GTK_TEXT_WINDOW_TOP, or %GTK_TEXT_WINDOW_BOTTOM.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="win" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextWindowType`</doc>
<type name="TextWindowType" c:type="GtkTextWindowType"/>
</parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_indent" c:identifier="gtk_text_view_set_indent" glib:set-property="indent">
<attribute name="org.gtk.Method.set_property" value="indent"/>
<doc xml:space="preserve">Sets the default indentation for paragraphs in @text_view.
Tags in the buffer may override the default.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="indent" transfer-ownership="none">
<doc xml:space="preserve">indentation in pixels</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_input_hints" c:identifier="gtk_text_view_set_input_hints" glib:set-property="input-hints">
<attribute name="org.gtk.Method.set_property" value="input-hints"/>
<doc xml:space="preserve">Sets the `input-hints` of the `GtkTextView`.
The `input-hints` allow input methods to fine-tune
their behaviour.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="hints" transfer-ownership="none">
<doc xml:space="preserve">the hints</doc>
<type name="InputHints" c:type="GtkInputHints"/>
</parameter>
</parameters>
</method>
<method name="set_input_purpose" c:identifier="gtk_text_view_set_input_purpose" glib:set-property="input-purpose">
<attribute name="org.gtk.Method.set_property" value="input-purpose"/>
<doc xml:space="preserve">Sets the `input-purpose` of the `GtkTextView`.
The `input-purpose` can be used by on-screen keyboards
and other input methods to adjust their behaviour.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="purpose" transfer-ownership="none">
<doc xml:space="preserve">the purpose</doc>
<type name="InputPurpose" c:type="GtkInputPurpose"/>
</parameter>
</parameters>
</method>
<method name="set_justification" c:identifier="gtk_text_view_set_justification" glib:set-property="justification">
<attribute name="org.gtk.Method.set_property" value="justification"/>
<doc xml:space="preserve">Sets the default justification of text in @text_view.
Tags in the view&#x2019;s buffer may override the default.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="justification" transfer-ownership="none">
<doc xml:space="preserve">justification</doc>
<type name="Justification" c:type="GtkJustification"/>
</parameter>
</parameters>
</method>
<method name="set_left_margin" c:identifier="gtk_text_view_set_left_margin" glib:set-property="left-margin">
<attribute name="org.gtk.Method.set_property" value="left-margin"/>
<doc xml:space="preserve">Sets the default left margin for text in @text_view.
Tags in the buffer may override the default.
Note that this function is confusingly named.
In CSS terms, the value set here is padding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="left_margin" transfer-ownership="none">
<doc xml:space="preserve">left margin in pixels</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_monospace" c:identifier="gtk_text_view_set_monospace" glib:set-property="monospace">
<attribute name="org.gtk.Method.set_property" value="monospace"/>
<doc xml:space="preserve">Sets whether the `GtkTextView` should display text in
monospace styling.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="monospace" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to request monospace styling</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_overwrite" c:identifier="gtk_text_view_set_overwrite" glib:set-property="overwrite">
<attribute name="org.gtk.Method.set_property" value="overwrite"/>
<doc xml:space="preserve">Changes the `GtkTextView` overwrite mode.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="overwrite" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to turn on overwrite mode, %FALSE to turn it off</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_pixels_above_lines" c:identifier="gtk_text_view_set_pixels_above_lines" glib:set-property="pixels-above-lines">
<attribute name="org.gtk.Method.set_property" value="pixels-above-lines"/>
<doc xml:space="preserve">Sets the default number of blank pixels above paragraphs in @text_view.
Tags in the buffer for @text_view may override the defaults.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="pixels_above_lines" transfer-ownership="none">
<doc xml:space="preserve">pixels above paragraphs</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_pixels_below_lines" c:identifier="gtk_text_view_set_pixels_below_lines" glib:set-property="pixels-below-lines">
<attribute name="org.gtk.Method.set_property" value="pixels-below-lines"/>
<doc xml:space="preserve">Sets the default number of pixels of blank space
to put below paragraphs in @text_view.
May be overridden by tags applied to @text_view&#x2019;s buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="pixels_below_lines" transfer-ownership="none">
<doc xml:space="preserve">pixels below paragraphs</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_pixels_inside_wrap" c:identifier="gtk_text_view_set_pixels_inside_wrap" glib:set-property="pixels-inside-wrap">
<attribute name="org.gtk.Method.set_property" value="pixels-inside-wrap"/>
<doc xml:space="preserve">Sets the default number of pixels of blank space to leave between
display/wrapped lines within a paragraph.
May be overridden by tags in @text_view&#x2019;s buffer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="pixels_inside_wrap" transfer-ownership="none">
<doc xml:space="preserve">default number of pixels between wrapped lines</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_right_margin" c:identifier="gtk_text_view_set_right_margin" glib:set-property="right-margin">
<attribute name="org.gtk.Method.set_property" value="right-margin"/>
<doc xml:space="preserve">Sets the default right margin for text in the text view.
Tags in the buffer may override the default.
Note that this function is confusingly named.
In CSS terms, the value set here is padding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="right_margin" transfer-ownership="none">
<doc xml:space="preserve">right margin in pixels</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_tabs" c:identifier="gtk_text_view_set_tabs" glib:set-property="tabs">
<attribute name="org.gtk.Method.set_property" value="tabs"/>
<doc xml:space="preserve">Sets the default tab stops for paragraphs in @text_view.
Tags in the buffer may override the default.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="tabs" transfer-ownership="none">
<doc xml:space="preserve">tabs as a `PangoTabArray`</doc>
<type name="Pango.TabArray" c:type="PangoTabArray*"/>
</parameter>
</parameters>
</method>
<method name="set_top_margin" c:identifier="gtk_text_view_set_top_margin" glib:set-property="top-margin">
<attribute name="org.gtk.Method.set_property" value="top-margin"/>
<doc xml:space="preserve">Sets the top margin for text in @text_view.
Note that this function is confusingly named.
In CSS terms, the value set here is padding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="top_margin" transfer-ownership="none">
<doc xml:space="preserve">top margin in pixels</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_wrap_mode" c:identifier="gtk_text_view_set_wrap_mode" glib:set-property="wrap-mode">
<attribute name="org.gtk.Method.set_property" value="wrap-mode"/>
<doc xml:space="preserve">Sets the line wrapping for the view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="wrap_mode" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWrapMode`</doc>
<type name="WrapMode" c:type="GtkWrapMode"/>
</parameter>
</parameters>
</method>
<method name="starts_display_line" c:identifier="gtk_text_view_starts_display_line">
<doc xml:space="preserve">Determines whether @iter is at the start of a display line.
See [method@Gtk.TextView.forward_display_line] for an
explanation of display lines vs. paragraphs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter begins a wrapped line</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextIter`</doc>
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
</parameters>
</method>
<method name="window_to_buffer_coords" c:identifier="gtk_text_view_window_to_buffer_coords">
<doc xml:space="preserve">Converts coordinates on the window identified by @win to buffer
coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="text_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextView`</doc>
<type name="TextView" c:type="GtkTextView*"/>
</instance-parameter>
<parameter name="win" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTextWindowType`</doc>
<type name="TextWindowType" c:type="GtkTextWindowType"/>
</parameter>
<parameter name="window_x" transfer-ownership="none">
<doc xml:space="preserve">window x coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="window_y" transfer-ownership="none">
<doc xml:space="preserve">window y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="buffer_x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">buffer x coordinate return location</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="buffer_y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">buffer y coordinate return location</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<property name="accepts-tab" writable="1" transfer-ownership="none" setter="set_accepts_tab" getter="get_accepts_tab">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_accepts_tab"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_accepts_tab"/>
<doc xml:space="preserve">Whether Tab will result in a tab character being entered.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="bottom-margin" writable="1" transfer-ownership="none" setter="set_bottom_margin" getter="get_bottom_margin">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_bottom_margin"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_bottom_margin"/>
<doc xml:space="preserve">The bottom margin for text in the text view.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with [property@Gtk.Widget:margin-bottom].</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="buffer" writable="1" transfer-ownership="none" setter="set_buffer" getter="get_buffer">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_buffer"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_buffer"/>
<doc xml:space="preserve">The buffer which is displayed.</doc>
<type name="TextBuffer"/>
</property>
<property name="cursor-visible" writable="1" transfer-ownership="none" setter="set_cursor_visible" getter="get_cursor_visible">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_cursor_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_cursor_visible"/>
<doc xml:space="preserve">If the insertion cursor is shown.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="editable" writable="1" transfer-ownership="none" setter="set_editable" getter="get_editable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="extra-menu" writable="1" transfer-ownership="none" setter="set_extra_menu" getter="get_extra_menu">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_extra_menu"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_extra_menu"/>
<doc xml:space="preserve">A menu model whose contents will be appended to the context menu.</doc>
<type name="Gio.MenuModel"/>
</property>
<property name="im-module" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Which IM (input method) module should be used for this text_view.
See [class@Gtk.IMMulticontext].
Setting this to a non-%NULL value overrides the system-wide IM module
setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module] property.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="indent" writable="1" transfer-ownership="none" setter="set_indent" getter="get_indent">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_indent"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_indent"/>
<doc xml:space="preserve">Amount to indent the paragraph, in pixels.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="input-hints" writable="1" transfer-ownership="none" setter="set_input_hints" getter="get_input_hints">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_input_hints"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_input_hints"/>
<doc xml:space="preserve">Additional hints (beyond [property@Gtk.TextView:input-purpose])
that allow input methods to fine-tune their behaviour.</doc>
<type name="InputHints"/>
</property>
<property name="input-purpose" writable="1" transfer-ownership="none" setter="set_input_purpose" getter="get_input_purpose">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_input_purpose"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_input_purpose"/>
<doc xml:space="preserve">The purpose of this text field.
This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.</doc>
<type name="InputPurpose"/>
</property>
<property name="justification" writable="1" transfer-ownership="none" setter="set_justification" getter="get_justification">
<type name="Justification"/>
</property>
<property name="left-margin" writable="1" transfer-ownership="none" setter="set_left_margin" getter="get_left_margin">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_left_margin"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_left_margin"/>
<doc xml:space="preserve">The default left margin for text in the text view.
Tags in the buffer may override the default.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="monospace" writable="1" transfer-ownership="none" setter="set_monospace" getter="get_monospace">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_monospace"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_monospace"/>
<doc xml:space="preserve">Whether text should be displayed in a monospace font.
If %TRUE, set the .monospace style class on the
text view to indicate that a monospace font is desired.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="overwrite" writable="1" transfer-ownership="none" setter="set_overwrite" getter="get_overwrite">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_overwrite"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_overwrite"/>
<doc xml:space="preserve">Whether entered text overwrites existing contents.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="pixels-above-lines" writable="1" transfer-ownership="none" setter="set_pixels_above_lines" getter="get_pixels_above_lines">
<type name="gint" c:type="gint"/>
</property>
<property name="pixels-below-lines" writable="1" transfer-ownership="none" setter="set_pixels_below_lines" getter="get_pixels_below_lines">
<type name="gint" c:type="gint"/>
</property>
<property name="pixels-inside-wrap" writable="1" transfer-ownership="none" setter="set_pixels_inside_wrap" getter="get_pixels_inside_wrap">
<type name="gint" c:type="gint"/>
</property>
<property name="right-margin" writable="1" transfer-ownership="none" setter="set_right_margin" getter="get_right_margin">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_right_margin"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_right_margin"/>
<doc xml:space="preserve">The default right margin for text in the text view.
Tags in the buffer may override the default.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="tabs" writable="1" transfer-ownership="none" setter="set_tabs" getter="get_tabs">
<type name="Pango.TabArray"/>
</property>
<property name="top-margin" writable="1" transfer-ownership="none" setter="set_top_margin" getter="get_top_margin">
<attribute name="org.gtk.Property.get" value="gtk_text_view_get_top_margin"/>
<attribute name="org.gtk.Property.set" value="gtk_text_view_set_top_margin"/>
<doc xml:space="preserve">The top margin for text in the text view.
Note that this property is confusingly named. In CSS terms,
the value set here is padding, and it is applied in addition
to the padding from the theme.
Don't confuse this property with [property@Gtk.Widget:margin-top].</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="wrap-mode" writable="1" transfer-ownership="none" setter="set_wrap_mode" getter="get_wrap_mode">
<type name="WrapMode"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<field name="priv" readable="0" private="1">
<type name="TextViewPrivate" c:type="GtkTextViewPrivate*"/>
</field>
<glib:signal name="backspace" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user asks for it.
The ::backspace signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Backspace&lt;/kbd&gt; and &lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Backspace&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="copy-clipboard" when="last" action="1">
<doc xml:space="preserve">Gets emitted to copy the selection to the clipboard.
The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;c&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="cut-clipboard" when="last" action="1">
<doc xml:space="preserve">Gets emitted to cut the selection to the clipboard.
The ::cut-clipboard signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;x&lt;/kbd&gt; and
&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Delete&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="delete-from-cursor" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user initiates a text deletion.
The ::delete-from-cursor signal is a [keybinding signal](class.SignalAction.html).
If the @type is %GTK_DELETE_CHARS, GTK deletes the selection
if there is one, otherwise it deletes the requested number
of characters.
The default bindings for this signal are &lt;kbd&gt;Delete&lt;/kbd&gt; for
deleting a character, &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Delete&lt;/kbd&gt; for
deleting a word and &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;Backspace&lt;/kbd&gt; for
deleting a word backwards.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the deletion, as a `GtkDeleteType`</doc>
<type name="DeleteType"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @type units to delete</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="extend-selection" when="last">
<doc xml:space="preserve">Emitted when the selection needs to be extended at @location.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%GDK_EVENT_STOP to stop other handlers from being invoked for the
event. %GDK_EVENT_PROPAGATE to propagate the event further.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="granularity" transfer-ownership="none">
<doc xml:space="preserve">the granularity type</doc>
<type name="TextExtendSelection"/>
</parameter>
<parameter name="location" transfer-ownership="none">
<doc xml:space="preserve">the location where to extend the selection</doc>
<type name="TextIter"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<doc xml:space="preserve">where the selection should start</doc>
<type name="TextIter"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<doc xml:space="preserve">where the selection should end</doc>
<type name="TextIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-at-cursor" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user initiates the insertion of a
fixed string at the cursor.
The ::insert-at-cursor signal is a [keybinding signal](class.SignalAction.html).
This signal has no default bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="string" transfer-ownership="none">
<doc xml:space="preserve">the string to insert</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="insert-emoji" when="last" action="1">
<doc xml:space="preserve">Gets emitted to present the Emoji chooser for the @text_view.
The ::insert-emoji signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;.&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;;&lt;/kbd&gt;</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user initiates a cursor movement.
The ::move-cursor signal is a [keybinding signal](class.SignalAction.html).
If the cursor is not visible in @text_view, this signal causes
the viewport to be moved instead.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants,
the variant with the &lt;kbd&gt;Shift&lt;/kbd&gt; modifier extends the
selection, the variant without it does not.
There are too many key combinations to list them all here.
- &lt;kbd&gt;&#x2190;&lt;/kbd&gt;, &lt;kbd&gt;&#x2192;&lt;/kbd&gt;, &lt;kbd&gt;&#x2191;&lt;/kbd&gt;, &lt;kbd&gt;&#x2193;&lt;/kbd&gt;
move by individual characters/lines
- &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;&#x2192;&lt;/kbd&gt;, etc. move by words/paragraphs
- &lt;kbd&gt;Home&lt;/kbd&gt;, &lt;kbd&gt;End&lt;/kbd&gt; move to the ends of the buffer
- &lt;kbd&gt;PgUp&lt;/kbd&gt;, &lt;kbd&gt;PgDn&lt;/kbd&gt; move vertically by pages
- &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;PgUp&lt;/kbd&gt;, &lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;PgDn&lt;/kbd&gt;
move horizontally by pages</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the move, as a `GtkMovementStep`</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend_selection" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the move should extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-viewport" when="last" action="1">
<doc xml:space="preserve">Gets emitted to move the viewport.
The ::move-viewport signal is a [keybinding signal](class.SignalAction.html),
which can be bound to key combinations to allow the user to move the viewport,
i.e. change what part of the text view is visible in a containing scrolled
window.
There are no default bindings for this signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the movement, as a `GtkScrollStep`</doc>
<type name="ScrollStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<doc xml:space="preserve">the number of @step units to move</doc>
<type name="gint" c:type="gint"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="paste-clipboard" when="last" action="1">
<doc xml:space="preserve">Gets emitted to paste the contents of the clipboard
into the text view.
The ::paste-clipboard signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;v&lt;/kbd&gt; and
&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="preedit-changed" when="last" action="1">
<doc xml:space="preserve">Emitted when preedit text of the active IM changes.
If an input method is used, the typed text will not immediately
be committed to the buffer. So if you are interested in the text,
connect to this signal.
This signal is only emitted if the text at the given position
is actually editable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="preedit" transfer-ownership="none">
<doc xml:space="preserve">the current preedit string</doc>
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-all" when="last" action="1">
<doc xml:space="preserve">Gets emitted to select or unselect the complete contents of the text view.
The ::select-all signal is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;/&lt;/kbd&gt; for selecting and
&lt;kbd&gt;Shift&lt;/kbd&gt;-&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;a&lt;/kbd&gt; and
&lt;kbd&gt;Ctrl&lt;/kbd&gt;-&lt;kbd&gt;\&lt;/kbd&gt; for unselecting.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="select" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to select, %FALSE to unselect</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="set-anchor" when="last" action="1">
<doc xml:space="preserve">Gets emitted when the user initiates settings the "anchor" mark.
The ::set-anchor signal is a [keybinding signal](class.SignalAction.html)
which gets emitted when the user initiates setting the "anchor"
mark. The "anchor" mark gets placed at the same position as the
"insert" mark.
This signal has no default bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggle-cursor-visible" when="last" action="1">
<doc xml:space="preserve">Gets emitted to toggle the `cursor-visible` property.
The ::toggle-cursor-visible signal is a
[keybinding signal](class.SignalAction.html).
The default binding for this signal is &lt;kbd&gt;F7&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="toggle-overwrite" when="last" action="1">
<doc xml:space="preserve">Gets emitted to toggle the overwrite mode of the text view.
The ::toggle-overwrite signal is a [keybinding signal](class.SignalAction.html).
The default binding for this signal is &lt;kbd&gt;Insert&lt;/kbd&gt;.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="TextViewClass" c:type="GtkTextViewClass" glib:is-gtype-struct-for="TextView">
<field name="parent_class">
<doc xml:space="preserve">The object class structure needs to be the first</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="move_cursor">
<callback name="move_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
<parameter name="step" transfer-ownership="none">
<type name="MovementStep" c:type="GtkMovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="extend_selection" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_anchor">
<callback name="set_anchor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="insert_at_cursor">
<callback name="insert_at_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
<parameter name="str" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="delete_from_cursor">
<callback name="delete_from_cursor">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
<parameter name="type" transfer-ownership="none">
<type name="DeleteType" c:type="GtkDeleteType"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="backspace">
<callback name="backspace">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="cut_clipboard">
<callback name="cut_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="copy_clipboard">
<callback name="copy_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="paste_clipboard">
<callback name="paste_clipboard">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="toggle_overwrite">
<callback name="toggle_overwrite">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="create_buffer" introspectable="0">
<callback name="create_buffer" introspectable="0">
<return-value>
<type name="TextBuffer" c:type="GtkTextBuffer*"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="snapshot_layer">
<callback name="snapshot_layer">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
<parameter name="layer" transfer-ownership="none">
<type name="TextViewLayer" c:type="GtkTextViewLayer"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="extend_selection">
<callback name="extend_selection">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
<parameter name="granularity" transfer-ownership="none">
<type name="TextExtendSelection" c:type="GtkTextExtendSelection"/>
</parameter>
<parameter name="location" transfer-ownership="none">
<type name="TextIter" c:type="const GtkTextIter*"/>
</parameter>
<parameter name="start" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
<parameter name="end" transfer-ownership="none">
<type name="TextIter" c:type="GtkTextIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="insert_emoji">
<callback name="insert_emoji">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="text_view" transfer-ownership="none">
<type name="TextView" c:type="GtkTextView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<enumeration name="TextViewLayer" glib:type-name="GtkTextViewLayer" glib:get-type="gtk_text_view_layer_get_type" c:type="GtkTextViewLayer">
<doc xml:space="preserve">Used to reference the layers of `GtkTextView` for the purpose of customized
drawing with the ::snapshot_layer vfunc.</doc>
<member name="below_text" value="0" c:identifier="GTK_TEXT_VIEW_LAYER_BELOW_TEXT" glib:nick="below-text" glib:name="GTK_TEXT_VIEW_LAYER_BELOW_TEXT">
<doc xml:space="preserve">The layer rendered below the text (but above the background).</doc>
</member>
<member name="above_text" value="1" c:identifier="GTK_TEXT_VIEW_LAYER_ABOVE_TEXT" glib:nick="above-text" glib:name="GTK_TEXT_VIEW_LAYER_ABOVE_TEXT">
<doc xml:space="preserve">The layer rendered above the text.</doc>
</member>
</enumeration>
<record name="TextViewPrivate" c:type="GtkTextViewPrivate" disguised="1"/>
<enumeration name="TextWindowType" glib:type-name="GtkTextWindowType" glib:get-type="gtk_text_window_type_get_type" c:type="GtkTextWindowType">
<doc xml:space="preserve">Used to reference the parts of `GtkTextView`.</doc>
<member name="widget" value="1" c:identifier="GTK_TEXT_WINDOW_WIDGET" glib:nick="widget" glib:name="GTK_TEXT_WINDOW_WIDGET">
<doc xml:space="preserve">Window that floats over scrolling areas.</doc>
</member>
<member name="text" value="2" c:identifier="GTK_TEXT_WINDOW_TEXT" glib:nick="text" glib:name="GTK_TEXT_WINDOW_TEXT">
<doc xml:space="preserve">Scrollable text window.</doc>
</member>
<member name="left" value="3" c:identifier="GTK_TEXT_WINDOW_LEFT" glib:nick="left" glib:name="GTK_TEXT_WINDOW_LEFT">
<doc xml:space="preserve">Left side border window.</doc>
</member>
<member name="right" value="4" c:identifier="GTK_TEXT_WINDOW_RIGHT" glib:nick="right" glib:name="GTK_TEXT_WINDOW_RIGHT">
<doc xml:space="preserve">Right side border window.</doc>
</member>
<member name="top" value="5" c:identifier="GTK_TEXT_WINDOW_TOP" glib:nick="top" glib:name="GTK_TEXT_WINDOW_TOP">
<doc xml:space="preserve">Top border window.</doc>
</member>
<member name="bottom" value="6" c:identifier="GTK_TEXT_WINDOW_BOTTOM" glib:nick="bottom" glib:name="GTK_TEXT_WINDOW_BOTTOM">
<doc xml:space="preserve">Bottom border window.</doc>
</member>
</enumeration>
<callback name="TickCallback" c:type="GtkTickCallback">
<doc xml:space="preserve">Callback type for adding a function to update animations. See gtk_widget_add_tick_callback().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%G_SOURCE_CONTINUE if the tick callback should continue to be called,
%G_SOURCE_REMOVE if the tick callback should be removed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="frame_clock" transfer-ownership="none">
<doc xml:space="preserve">the frame clock for the widget (same as calling gtk_widget_get_frame_clock())</doc>
<type name="Gdk.FrameClock" c:type="GdkFrameClock*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data passed to gtk_widget_add_tick_callback().</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="ToggleButton" c:symbol-prefix="toggle_button" c:type="GtkToggleButton" parent="Button" glib:type-name="GtkToggleButton" glib:get-type="gtk_toggle_button_get_type" glib:type-struct="ToggleButtonClass">
<doc xml:space="preserve">A `GtkToggleButton` is a button which remains &#x201C;pressed-in&#x201D; when
clicked.
Clicking again will cause the toggle button to return to its normal state.
A toggle button is created by calling either [ctor@Gtk.ToggleButton.new] or
[ctor@Gtk.ToggleButton.new_with_label]. If using the former, it is advisable
to pack a widget, (such as a `GtkLabel` and/or a `GtkImage`), into the toggle
button&#x2019;s container. (See [class@Gtk.Button] for more information).
The state of a `GtkToggleButton` can be set specifically using
[method@Gtk.ToggleButton.set_active], and retrieved using
[method@Gtk.ToggleButton.get_active].
To simply switch the state of a toggle button, use
[method@Gtk.ToggleButton.toggled].
## Grouping
Toggle buttons can be grouped together, to form mutually exclusive
groups - only one of the buttons can be toggled at a time, and toggling
another one will switch the currently toggled one off.
To add a `GtkToggleButton` to a group, use [method@Gtk.ToggleButton.set_group].
## CSS nodes
`GtkToggleButton` has a single CSS node with name button. To differentiate
it from a plain `GtkButton`, it gets the `.toggle` style class.
## Creating two `GtkToggleButton` widgets.
```c
static void
output_state (GtkToggleButton *source,
gpointer user_data)
{
g_print ("Toggle button "%s" is active: %s",
gtk_button_get_label (GTK_BUTTON (source)),
gtk_toggle_button_get_active (source) ? "Yes" : "No");
}
static void
make_toggles (void)
{
GtkWidget *window, *toggle1, *toggle2;
GtkWidget *box;
const char *text;
window = gtk_window_new ();
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
text = "Hi, I&#x2019;m toggle button one";
toggle1 = gtk_toggle_button_new_with_label (text);
g_signal_connect (toggle1, "toggled",
G_CALLBACK (output_state),
NULL);
gtk_box_append (GTK_BOX (box), toggle1);
text = "Hi, I&#x2019;m toggle button two";
toggle2 = gtk_toggle_button_new_with_label (text);
g_signal_connect (toggle2, "toggled",
G_CALLBACK (output_state),
NULL);
gtk_box_append (GTK_BOX (box), toggle2);
gtk_window_set_child (GTK_WINDOW (window), box);
gtk_widget_show (window);
}
```</doc>
<implements name="Accessible"/>
<implements name="Actionable"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_toggle_button_new">
<doc xml:space="preserve">Creates a new toggle button.
A widget should be packed into the button, as in [ctor@Gtk.Button.new].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new toggle button.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_label" c:identifier="gtk_toggle_button_new_with_label">
<doc xml:space="preserve">Creates a new toggle button with a text label.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new toggle button.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">a string containing the message to be placed in the toggle button.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_mnemonic" c:identifier="gtk_toggle_button_new_with_mnemonic">
<doc xml:space="preserve">Creates a new `GtkToggleButton` containing a label.
The label will be created using [ctor@Gtk.Label.new_with_mnemonic],
so underscores in @label indicate the mnemonic for the button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkToggleButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">the text of the button, with an underscore in front of the
mnemonic character</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="toggled" invoker="toggled">
<doc xml:space="preserve">Emits the ::toggled signal on the `GtkToggleButton`.
There is no good reason for an application ever to call this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`.</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_active" c:identifier="gtk_toggle_button_get_active" glib:get-property="active">
<attribute name="org.gtk.Method.get_property" value="active"/>
<doc xml:space="preserve">Queries a `GtkToggleButton` and returns its current state.
Returns %TRUE if the toggle button is pressed in and %FALSE
if it is raised.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the button is pressed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`.</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_active" c:identifier="gtk_toggle_button_set_active" glib:set-property="active">
<attribute name="org.gtk.Method.set_property" value="active"/>
<doc xml:space="preserve">Sets the status of the toggle button.
Set to %TRUE if you want the `GtkToggleButton` to be &#x201C;pressed in&#x201D;,
and %FALSE to raise it.
If the status of the button changes, this action causes the
[signal@GtkToggleButton::toggled] signal to be emitted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`.</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</instance-parameter>
<parameter name="is_active" transfer-ownership="none">
<doc xml:space="preserve">%TRUE or %FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_group" c:identifier="gtk_toggle_button_set_group" glib:set-property="group">
<attribute name="org.gtk.Method.set_property" value="group"/>
<doc xml:space="preserve">Adds @self to the group of @group.
In a group of multiple toggle buttons, only one button can be active
at a time.
Setting up groups in a cycle leads to undefined behavior.
Note that the same effect can be achieved via the [iface@Gtk.Actionable]
API, by using the same action with parameter type and state type 's'
for all buttons in the group, and giving each button its own target
value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</instance-parameter>
<parameter name="group" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">another `GtkToggleButton` to
form a group with</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</parameter>
</parameters>
</method>
<method name="toggled" c:identifier="gtk_toggle_button_toggled">
<doc xml:space="preserve">Emits the ::toggled signal on the `GtkToggleButton`.
There is no good reason for an application ever to call this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`.</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</instance-parameter>
</parameters>
</method>
<property name="active" writable="1" transfer-ownership="none" setter="set_active" getter="get_active">
<attribute name="org.gtk.Property.get" value="gtk_toggle_button_get_active"/>
<attribute name="org.gtk.Property.set" value="gtk_toggle_button_set_active"/>
<doc xml:space="preserve">If the toggle button should be pressed in.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="group" readable="0" writable="1" transfer-ownership="none" setter="set_group">
<attribute name="org.gtk.Property.set" value="gtk_toggle_button_set_group"/>
<doc xml:space="preserve">The toggle button whose group this widget belongs to.</doc>
<type name="ToggleButton"/>
</property>
<field name="button" readable="0" private="1">
<type name="Button" c:type="GtkButton"/>
</field>
<glib:signal name="toggled" when="first">
<doc xml:space="preserve">Emitted whenever the `GtkToggleButton`'s state is changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="ToggleButtonClass" c:type="GtkToggleButtonClass" glib:is-gtype-struct-for="ToggleButton">
<field name="parent_class">
<type name="ButtonClass" c:type="GtkButtonClass"/>
</field>
<field name="toggled">
<callback name="toggled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="toggle_button" transfer-ownership="none">
<doc xml:space="preserve">a `GtkToggleButton`.</doc>
<type name="ToggleButton" c:type="GtkToggleButton*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="Tooltip" c:symbol-prefix="tooltip" c:type="GtkTooltip" parent="GObject.Object" glib:type-name="GtkTooltip" glib:get-type="gtk_tooltip_get_type">
<doc xml:space="preserve">`GtkTooltip` is an object representing a widget tooltip.
Basic tooltips can be realized simply by using
[method@Gtk.Widget.set_tooltip_text] or
[method@Gtk.Widget.set_tooltip_markup] without
any explicit tooltip object.
When you need a tooltip with a little more fancy contents,
like adding an image, or you want the tooltip to have different
contents per `GtkTreeView` row or cell, you will have to do a
little more work:
- Set the [property@Gtk.Widget:has-tooltip] property to %TRUE.
This will make GTK monitor the widget for motion and related events
which are needed to determine when and where to show a tooltip.
- Connect to the [signal@Gtk.Widget::query-tooltip] signal.
This signal will be emitted when a tooltip is supposed to be shown.
One of the arguments passed to the signal handler is a `GtkTooltip`
object. This is the object that we are about to display as a tooltip,
and can be manipulated in your callback using functions like
[method@Gtk.Tooltip.set_icon]. There are functions for setting
the tooltip&#x2019;s markup, setting an image from a named icon, or even
putting in a custom widget.
- Return %TRUE from your ::query-tooltip handler. This causes the tooltip
to be show. If you return %FALSE, it will not be shown.</doc>
<method name="set_custom" c:identifier="gtk_tooltip_set_custom">
<doc xml:space="preserve">Replaces the widget packed into the tooltip with
@custom_widget. @custom_widget does not get destroyed when the tooltip goes
away.
By default a box with a `GtkImage` and `GtkLabel` is embedded in
the tooltip, which can be configured using gtk_tooltip_set_markup()
and gtk_tooltip_set_icon().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="custom_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`, or %NULL to unset the old custom widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_icon" c:identifier="gtk_tooltip_set_icon">
<doc xml:space="preserve">Sets the icon of the tooltip (which is in front of the text) to be
@paintable. If @paintable is %NULL, the image will be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="paintable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkPaintable`</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_from_gicon" c:identifier="gtk_tooltip_set_icon_from_gicon">
<doc xml:space="preserve">Sets the icon of the tooltip (which is in front of the text)
to be the icon indicated by @gicon with the size indicated
by @size. If @gicon is %NULL, the image will be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="gicon" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GIcon` representing the icon</doc>
<type name="Gio.Icon" c:type="GIcon*"/>
</parameter>
</parameters>
</method>
<method name="set_icon_from_icon_name" c:identifier="gtk_tooltip_set_icon_from_icon_name">
<doc xml:space="preserve">Sets the icon of the tooltip (which is in front of the text) to be
the icon indicated by @icon_name with the size indicated
by @size. If @icon_name is %NULL, the image will be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="icon_name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an icon name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_markup" c:identifier="gtk_tooltip_set_markup">
<doc xml:space="preserve">Sets the text of the tooltip to be @markup.
The string must be marked up with Pango markup.
If @markup is %NULL, the label will be hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="markup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a string with Pango markup or %NLL</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_text" c:identifier="gtk_tooltip_set_text">
<doc xml:space="preserve">Sets the text of the tooltip to be @text.
If @text is %NULL, the label will be hidden.
See also [method@Gtk.Tooltip.set_markup].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a text string</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_tip_area" c:identifier="gtk_tooltip_set_tip_area">
<doc xml:space="preserve">Sets the area of the widget, where the contents of this tooltip apply,
to be @rect (in widget coordinates). This is especially useful for
properly setting tooltips on `GtkTreeView` rows and cells, `GtkIconViews`,
etc.
For setting tooltips on `GtkTreeView`, please refer to the convenience
functions for this: gtk_tree_view_set_tooltip_row() and
gtk_tree_view_set_tooltip_cell().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</instance-parameter>
<parameter name="rect" transfer-ownership="none">
<doc xml:space="preserve">a `GdkRectangle`</doc>
<type name="Gdk.Rectangle" c:type="const GdkRectangle*"/>
</parameter>
</parameters>
</method>
</class>
<callback name="TreeCellDataFunc" c:type="GtkTreeCellDataFunc">
<doc xml:space="preserve">A function to set the properties of a cell instead of just using the
straight mapping between the cell and the model.
This function is useful for customizing the cell renderer. For example,
a function might get an* integer from the @tree_model, and render it to
the &#x201C;text&#x201D; attribute of &#x201C;cell&#x201D; by converting it to its written equivalent.
See also: gtk_tree_view_column_set_cell_data_func()</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellRenderer` that is being rendered by @tree_column</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeModel` being rendered</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter` of the current row rendered</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<interface name="TreeDragDest" c:symbol-prefix="tree_drag_dest" c:type="GtkTreeDragDest" glib:type-name="GtkTreeDragDest" glib:get-type="gtk_tree_drag_dest_get_type" glib:type-struct="TreeDragDestIface">
<doc xml:space="preserve">Interface for Drag-and-Drop destinations in `GtkTreeView`.</doc>
<virtual-method name="drag_data_received" invoker="drag_data_received">
<doc xml:space="preserve">Asks the `GtkTreeDragDest` to insert a row before the path @dest,
deriving the contents of the row from @value. If @dest is
outside the tree so that inserting before it is impossible, %FALSE
will be returned. Also, %FALSE may be returned if the new row is
not created for some model-specific reason. Should robustly handle
a @dest no longer found in the model!</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a new row was created before position @dest</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</instance-parameter>
<parameter name="dest" transfer-ownership="none">
<doc xml:space="preserve">row to drop in front of</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">data to drop</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_drop_possible" invoker="row_drop_possible">
<doc xml:space="preserve">Determines whether a drop is possible before the given @dest_path,
at the same depth as @dest_path. i.e., can we drop the data in
@value at that location. @dest_path does not have to
exist; the return value will almost certainly be %FALSE if the
parent of @dest_path doesn&#x2019;t exist, though.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a drop is possible before @dest_path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</instance-parameter>
<parameter name="dest_path" transfer-ownership="none">
<doc xml:space="preserve">destination row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the data being dropped</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</virtual-method>
<method name="drag_data_received" c:identifier="gtk_tree_drag_dest_drag_data_received">
<doc xml:space="preserve">Asks the `GtkTreeDragDest` to insert a row before the path @dest,
deriving the contents of the row from @value. If @dest is
outside the tree so that inserting before it is impossible, %FALSE
will be returned. Also, %FALSE may be returned if the new row is
not created for some model-specific reason. Should robustly handle
a @dest no longer found in the model!</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a new row was created before position @dest</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</instance-parameter>
<parameter name="dest" transfer-ownership="none">
<doc xml:space="preserve">row to drop in front of</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">data to drop</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</method>
<method name="row_drop_possible" c:identifier="gtk_tree_drag_dest_row_drop_possible">
<doc xml:space="preserve">Determines whether a drop is possible before the given @dest_path,
at the same depth as @dest_path. i.e., can we drop the data in
@value at that location. @dest_path does not have to
exist; the return value will almost certainly be %FALSE if the
parent of @dest_path doesn&#x2019;t exist, though.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a drop is possible before @dest_path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</instance-parameter>
<parameter name="dest_path" transfer-ownership="none">
<doc xml:space="preserve">destination row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the data being dropped</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</method>
</interface>
<record name="TreeDragDestIface" c:type="GtkTreeDragDestIface" glib:is-gtype-struct-for="TreeDragDest">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="drag_data_received">
<callback name="drag_data_received">
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether a new row was created before position @dest</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</parameter>
<parameter name="dest" transfer-ownership="none">
<doc xml:space="preserve">row to drop in front of</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">data to drop</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_drop_possible">
<callback name="row_drop_possible">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a drop is possible before @dest_path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drag_dest" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragDest`</doc>
<type name="TreeDragDest" c:type="GtkTreeDragDest*"/>
</parameter>
<parameter name="dest_path" transfer-ownership="none">
<doc xml:space="preserve">destination row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">the data being dropped</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<interface name="TreeDragSource" c:symbol-prefix="tree_drag_source" c:type="GtkTreeDragSource" glib:type-name="GtkTreeDragSource" glib:get-type="gtk_tree_drag_source_get_type" glib:type-struct="TreeDragSourceIface">
<doc xml:space="preserve">Interface for Drag-and-Drop destinations in `GtkTreeView`.</doc>
<virtual-method name="drag_data_delete" invoker="drag_data_delete">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` to delete the row at @path, because
it was moved somewhere else via drag-and-drop. Returns %FALSE
if the deletion fails because @path no longer exists, or for
some model-specific reason. Should robustly handle a @path no
longer found in the model!</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row was successfully deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was being dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="drag_data_get" invoker="drag_data_get">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` to return a `GdkContentProvider` representing
the row at @path. Should robustly handle a @path no
longer found in the model!</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GdkContentProvider` for the
given @path</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_draggable" invoker="row_draggable">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` whether a particular row can be used as
the source of a DND operation. If the source doesn&#x2019;t implement
this interface, the row is assumed draggable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row can be dragged</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row on which user is initiating a drag</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<method name="drag_data_delete" c:identifier="gtk_tree_drag_source_drag_data_delete">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` to delete the row at @path, because
it was moved somewhere else via drag-and-drop. Returns %FALSE
if the deletion fails because @path no longer exists, or for
some model-specific reason. Should robustly handle a @path no
longer found in the model!</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row was successfully deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was being dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="drag_data_get" c:identifier="gtk_tree_drag_source_drag_data_get">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` to return a `GdkContentProvider` representing
the row at @path. Should robustly handle a @path no
longer found in the model!</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GdkContentProvider` for the
given @path</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="row_draggable" c:identifier="gtk_tree_drag_source_row_draggable">
<doc xml:space="preserve">Asks the `GtkTreeDragSource` whether a particular row can be used as
the source of a DND operation. If the source doesn&#x2019;t implement
this interface, the row is assumed draggable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row can be dragged</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row on which user is initiating a drag</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
</interface>
<record name="TreeDragSourceIface" c:type="GtkTreeDragSourceIface" glib:is-gtype-struct-for="TreeDragSource">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="row_draggable">
<callback name="row_draggable">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row can be dragged</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row on which user is initiating a drag</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="drag_data_get">
<callback name="drag_data_get">
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GdkContentProvider` for the
given @path</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="drag_data_delete">
<callback name="drag_data_delete">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row was successfully deleted</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="drag_source" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeDragSource`</doc>
<type name="TreeDragSource" c:type="GtkTreeDragSource*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">row that was being dragged</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="TreeExpander" c:symbol-prefix="tree_expander" c:type="GtkTreeExpander" parent="Widget" glib:type-name="GtkTreeExpander" glib:get-type="gtk_tree_expander_get_type" glib:type-struct="TreeExpanderClass">
<doc xml:space="preserve">`GtkTreeExpander` is a widget that provides an expander for a list.
It is typically placed as a bottommost child into a `GtkListView`
to allow users to expand and collapse children in a list with a
[class@Gtk.TreeListModel]. `GtkTreeExpander` provides the common UI
elements, gestures and keybindings for this purpose.
On top of this, the "listitem.expand", "listitem.collapse" and
"listitem.toggle-expand" actions are provided to allow adding custom
UI for managing expanded state.
The `GtkTreeListModel` must be set to not be passthrough. Then it
will provide [class@Gtk.TreeListRow] items which can be set via
[method@Gtk.TreeExpander.set_list_row] on the expander.
The expander will then watch that row item automatically.
[method@Gtk.TreeExpander.set_child] sets the widget that displays
the actual row contents.
# CSS nodes
```
treeexpander
&#x251C;&#x2500;&#x2500; [indent]*
&#x251C;&#x2500;&#x2500; [expander]
&#x2570;&#x2500;&#x2500; &lt;child&gt;
```
`GtkTreeExpander` has zero or one CSS nodes with the name "expander" that
should display the expander icon. The node will be `:checked` when it
is expanded. If the node is not expandable, an "indent" node will be
displayed instead.
For every level of depth, another "indent" node is prepended.
# Accessibility
`GtkTreeExpander` uses the %GTK_ACCESSIBLE_ROLE_GROUP role. The expander icon
is represented as a %GTK_ACCESSIBLE_ROLE_BUTTON, labelled by the expander's
child, and toggling it will change the %GTK_ACCESSIBLE_STATE_EXPANDED state.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_tree_expander_new">
<doc xml:space="preserve">Creates a new `GtkTreeExpander`</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkTreeExpander`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_child" c:identifier="gtk_tree_expander_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget displayed by @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The child displayed by @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander`</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_indent_for_icon" c:identifier="gtk_tree_expander_get_indent_for_icon" glib:get-property="indent-for-icon" version="4.6">
<attribute name="org.gtk.Method.get_property" value="indent-for-icon"/>
<doc xml:space="preserve">TreeExpander indents the child by the width of an expander-icon if it is not expandable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">TRUE if the child should be indented when not expandable. Otherwise FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander`</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_item" c:identifier="gtk_tree_expander_get_item" glib:get-property="item">
<attribute name="org.gtk.Method.get_property" value="item"/>
<doc xml:space="preserve">Forwards the item set on the `GtkTreeListRow` that @self is managing.
This call is essentially equivalent to calling:
```c
gtk_tree_list_row_get_item (gtk_tree_expander_get_list_row (@self));
```</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The item of the row</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander`</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_list_row" c:identifier="gtk_tree_expander_get_list_row" glib:get-property="list-row">
<attribute name="org.gtk.Method.get_property" value="list-row"/>
<doc xml:space="preserve">Gets the list row managed by @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The list row displayed by @self</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander`</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_tree_expander_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the content widget to display.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander`</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_indent_for_icon" c:identifier="gtk_tree_expander_set_indent_for_icon" glib:set-property="indent-for-icon" version="4.6">
<attribute name="org.gtk.Method.set_property" value="indent-for-icon"/>
<doc xml:space="preserve">Sets if the TreeExpander should indent the child by the width of an expander-icon when it is not expandable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander` widget</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
<parameter name="indent_for_icon" transfer-ownership="none">
<doc xml:space="preserve">TRUE if the child should be indented without expander. Otherwise FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_list_row" c:identifier="gtk_tree_expander_set_list_row" glib:set-property="list-row">
<attribute name="org.gtk.Method.set_property" value="list-row"/>
<doc xml:space="preserve">Sets the tree list row that this expander should manage.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeExpander` widget</doc>
<type name="TreeExpander" c:type="GtkTreeExpander*"/>
</instance-parameter>
<parameter name="list_row" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_tree_expander_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_tree_expander_set_child"/>
<doc xml:space="preserve">The child widget with the actual contents.</doc>
<type name="Widget"/>
</property>
<property name="indent-for-icon" version="4.6" writable="1" transfer-ownership="none" setter="set_indent_for_icon" getter="get_indent_for_icon">
<attribute name="org.gtk.Property.get" value="gtk_tree_expander_get_indent_for_icon"/>
<attribute name="org.gtk.Property.set" value="gtk_tree_expander_set_indent_for_icon"/>
<doc xml:space="preserve">TreeExpander indents the child by the width of an expander-icon if it is not expandable.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="item" transfer-ownership="none" getter="get_item">
<attribute name="org.gtk.Property.get" value="gtk_tree_expander_get_item"/>
<doc xml:space="preserve">The item held by this expander's row.</doc>
<type name="GObject.Object"/>
</property>
<property name="list-row" writable="1" transfer-ownership="none" setter="set_list_row" getter="get_list_row">
<attribute name="org.gtk.Property.get" value="gtk_tree_expander_get_list_row"/>
<attribute name="org.gtk.Property.set" value="gtk_tree_expander_set_list_row"/>
<doc xml:space="preserve">The list row to track for expander state.</doc>
<type name="TreeListRow"/>
</property>
</class>
<record name="TreeExpanderClass" c:type="GtkTreeExpanderClass" glib:is-gtype-struct-for="TreeExpander">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<record name="TreeIter" c:type="GtkTreeIter" glib:type-name="GtkTreeIter" glib:get-type="gtk_tree_iter_get_type" c:symbol-prefix="tree_iter">
<doc xml:space="preserve">The `GtkTreeIter` is the primary structure
for accessing a `GtkTreeModel`. Models are expected to put a unique
integer in the @stamp member, and put
model-specific data in the three @user_data
members.</doc>
<field name="stamp" writable="1">
<doc xml:space="preserve">a unique stamp to catch invalid iterators</doc>
<type name="gint" c:type="int"/>
</field>
<field name="user_data" writable="1">
<doc xml:space="preserve">model-specific data</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="user_data2" writable="1">
<doc xml:space="preserve">model-specific data</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<field name="user_data3" writable="1">
<doc xml:space="preserve">model-specific data</doc>
<type name="gpointer" c:type="gpointer"/>
</field>
<method name="copy" c:identifier="gtk_tree_iter_copy">
<doc xml:space="preserve">Creates a dynamically allocated tree iterator as a copy of @iter.
This function is not intended for use in applications,
because you can just copy the structs by value
(`GtkTreeIter new_iter = iter;`).
You must free this iter with gtk_tree_iter_free().</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated copy of @iter</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_tree_iter_free">
<doc xml:space="preserve">Frees an iterator that has been allocated by gtk_tree_iter_copy().
This function is mainly used for language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a dynamically allocated tree iterator</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</instance-parameter>
</parameters>
</method>
</record>
<callback name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc">
<doc xml:space="preserve">A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
integer if @a sorts before @b, @a sorts with @b, or @a sorts after @b
respectively.
If two iters compare as equal, their order in the sorted model
is undefined. In order to ensure that the `GtkTreeSortable` behaves as
expected, the GtkTreeIterCompareFunc must define a partial order on
the model, i.e. it must be reflexive, antisymmetric and transitive.
For example, if @model is a product catalogue, then a compare function
for the &#x201C;price&#x201D; column could be one which returns
`price_of(@a) - price_of(@b)`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a negative integer, zero or a positive integer depending on whether
@a sorts before, with or after @b</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeModel` the comparison is within</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="a" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter` in @model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">Another `GtkTreeIter` in @model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">Data passed when the compare func is assigned e.g. by
gtk_tree_sortable_set_sort_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="TreeListModel" c:symbol-prefix="tree_list_model" c:type="GtkTreeListModel" parent="GObject.Object" glib:type-name="GtkTreeListModel" glib:get-type="gtk_tree_list_model_get_type" glib:type-struct="TreeListModelClass">
<doc xml:space="preserve">`GtkTreeListModel` is a list model that can create child models on demand.</doc>
<implements name="Gio.ListModel"/>
<constructor name="new" c:identifier="gtk_tree_list_model_new">
<doc xml:space="preserve">Creates a new empty `GtkTreeListModel` displaying @root
with all rows collapsed.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created `GtkTreeListModel`.</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</return-value>
<parameters>
<parameter name="root" transfer-ownership="full">
<doc xml:space="preserve">The `GListModel` to use as root</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</parameter>
<parameter name="passthrough" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to pass through items from the models</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="autoexpand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to set the autoexpand property and expand the @root model</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="create_func" transfer-ownership="none" scope="notified" closure="4" destroy="5">
<doc xml:space="preserve">Function to call to create the `GListModel` for the children
of an item</doc>
<type name="TreeListModelCreateModelFunc" c:type="GtkTreeListModelCreateModelFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">Data to pass to @create_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="user_destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">Function to call to free @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</constructor>
<method name="get_autoexpand" c:identifier="gtk_tree_list_model_get_autoexpand" glib:get-property="autoexpand">
<attribute name="org.gtk.Method.get_property" value="autoexpand"/>
<doc xml:space="preserve">Gets whether the model is set to automatically expand new rows
that get added.
This can be either rows added by changes to the underlying
models or via [method@Gtk.TreeListRow.set_expanded].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the model is set to autoexpand</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_row" c:identifier="gtk_tree_list_model_get_child_row">
<doc xml:space="preserve">Gets the row item corresponding to the child at index @position for
@self's root model.
If @position is greater than the number of children in the root model,
%NULL is returned.
Do not confuse this function with [method@Gtk.TreeListModel.get_row].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the child in @position</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of the child to get</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_tree_list_model_get_model" glib:get-property="model">
<attribute name="org.gtk.Method.get_property" value="model"/>
<doc xml:space="preserve">Gets the root model that @self was created with.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the root model</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_passthrough" c:identifier="gtk_tree_list_model_get_passthrough" glib:get-property="passthrough">
<attribute name="org.gtk.Method.get_property" value="passthrough"/>
<doc xml:space="preserve">Gets whether the model is passing through original row items.
If this function returns %FALSE, the `GListModel` functions for @self
return custom `GtkTreeListRow` objects. You need to call
[method@Gtk.TreeListRow.get_item] on these objects to get the original
item.
If %TRUE, the values of the child models are passed through in their
original state. You then need to call [method@Gtk.TreeListModel.get_row]
to get the custom `GtkTreeListRow`s.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the model is passing through original row items</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row" c:identifier="gtk_tree_list_model_get_row">
<doc xml:space="preserve">Gets the row object for the given row.
If @position is greater than the number of items in @self,
%NULL is returned.
The row object can be used to expand and collapse rows as
well as to inspect its position in the tree. See its
documentation for details.
This row object is persistent and will refer to the current
item as long as the row is present in @self, independent of
other rows being added or removed.
If @self is set to not be passthrough, this function is
equivalent to calling g_list_model_get_item().
Do not confuse this function with [method@Gtk.TreeListModel.get_child_row].</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The row item</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">the position of the row to fetch</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_autoexpand" c:identifier="gtk_tree_list_model_set_autoexpand" glib:set-property="autoexpand">
<attribute name="org.gtk.Method.set_property" value="autoexpand"/>
<doc xml:space="preserve">Sets whether the model should autoexpand.
If set to %TRUE, the model will recursively expand all rows that
get added to the model. This can be either rows added by changes
to the underlying models or via [method@Gtk.TreeListRow.set_expanded].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListModel`</doc>
<type name="TreeListModel" c:type="GtkTreeListModel*"/>
</instance-parameter>
<parameter name="autoexpand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the model autoexpand its rows</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="autoexpand" writable="1" transfer-ownership="none" setter="set_autoexpand" getter="get_autoexpand">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_model_get_autoexpand"/>
<attribute name="org.gtk.Property.set" value="gtk_tree_list_model_set_autoexpand"/>
<doc xml:space="preserve">If all rows should be expanded by default.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="model" transfer-ownership="none" getter="get_model">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_model_get_model"/>
<doc xml:space="preserve">The root model displayed.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="passthrough" writable="1" construct-only="1" transfer-ownership="none" getter="get_passthrough">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_model_get_passthrough"/>
<doc xml:space="preserve">Gets whether the model is in passthrough mode.
If %FALSE, the `GListModel` functions for this object return custom
[class@Gtk.TreeListRow] objects. If %TRUE, the values of the child
models are pass through unmodified.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<record name="TreeListModelClass" c:type="GtkTreeListModelClass" glib:is-gtype-struct-for="TreeListModel">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<callback name="TreeListModelCreateModelFunc" c:type="GtkTreeListModelCreateModelFunc">
<doc xml:space="preserve">Prototype of the function called to create new child models when
gtk_tree_list_row_set_expanded() is called.
This function can return %NULL to indicate that @item is guaranteed to be
a leaf node and will never have children. If it does not have children but
may get children later, it should return an empty model that is filled once
children arrive.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The model tracking the children of
@item or %NULL if @item can never have children</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<parameter name="item" transfer-ownership="none">
<doc xml:space="preserve">The item that is being expanded</doc>
<type name="GObject.Object" c:type="gpointer"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">User data passed when registering the function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<class name="TreeListRow" c:symbol-prefix="tree_list_row" c:type="GtkTreeListRow" parent="GObject.Object" glib:type-name="GtkTreeListRow" glib:get-type="gtk_tree_list_row_get_type" glib:type-struct="TreeListRowClass">
<doc xml:space="preserve">`GtkTreeListRow` is used by `GtkTreeListModel` to represent items.
It allows navigating the model as a tree and modify the state of rows.
`GtkTreeListRow` instances are created by a `GtkTreeListModel` only
when the [property@Gtk.TreeListModel:passthrough] property is not set.
There are various support objects that can make use of `GtkTreeListRow`
objects, such as the [class@Gtk.TreeExpander] widget that allows displaying
an icon to expand or collapse a row or [class@Gtk.TreeListRowSorter] that
makes it possible to sort trees properly.</doc>
<method name="get_child_row" c:identifier="gtk_tree_list_row_get_child_row">
<doc xml:space="preserve">If @self is not expanded or @position is greater than the
number of children, %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">the child in @position</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position of the child to get</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="get_children" c:identifier="gtk_tree_list_row_get_children" glib:get-property="children">
<attribute name="org.gtk.Method.get_property" value="children"/>
<doc xml:space="preserve">If the row is expanded, gets the model holding the children of @self.
This model is the model created by the
[callback@Gtk.TreeListModelCreateModelFunc]
and contains the original items, no matter what value
[property@Gtk.TreeListModel:passthrough] is set to.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The model containing the children</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_depth" c:identifier="gtk_tree_list_row_get_depth" glib:get-property="depth">
<attribute name="org.gtk.Method.get_property" value="depth"/>
<doc xml:space="preserve">Gets the depth of this row.
Rows that correspond to items in the root model have a depth
of zero, rows corresponding to items of models of direct children
of the root model have a depth of 1 and so on.
The depth of a row never changes until the row is destroyed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The depth of this row</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expanded" c:identifier="gtk_tree_list_row_get_expanded" glib:get-property="expanded">
<attribute name="org.gtk.Method.get_property" value="expanded"/>
<doc xml:space="preserve">Gets if a row is currently expanded.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row is expanded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_item" c:identifier="gtk_tree_list_row_get_item" glib:get-property="item">
<attribute name="org.gtk.Method.get_property" value="item"/>
<doc xml:space="preserve">Gets the item corresponding to this row,
The value returned by this function never changes until the
row is destroyed.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The item
of this row or %NULL when the row was destroyed</doc>
<type name="GObject.Object" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_parent" c:identifier="gtk_tree_list_row_get_parent">
<doc xml:space="preserve">Gets the row representing the parent for @self.
That is the row that would need to be collapsed
to make this row disappear.
If @self is a row corresponding to the root model,
%NULL is returned.
The value returned by this function never changes
until the row is destroyed.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">The parent of @self</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_position" c:identifier="gtk_tree_list_row_get_position">
<doc xml:space="preserve">Returns the position in the `GtkTreeListModel` that @self occupies
at the moment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The position in the model</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_expandable" c:identifier="gtk_tree_list_row_is_expandable">
<attribute name="org.gtk.Method.get_property" value="expandable"/>
<doc xml:space="preserve">Checks if a row can be expanded.
This does not mean that the row is actually expanded,
this can be checked with [method@Gtk.TreeListRow.get_expanded].
If a row is expandable never changes until the row is destroyed.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row is expandable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_expanded" c:identifier="gtk_tree_list_row_set_expanded" glib:set-property="expanded">
<attribute name="org.gtk.Method.set_property" value="expanded"/>
<doc xml:space="preserve">Expands or collapses a row.
If a row is expanded, the model of calling the
[callback@Gtk.TreeListModelCreateModelFunc] for the row's
item will be inserted after this row. If a row is collapsed,
those items will be removed from the model.
If the row is not expandable, this function does nothing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRow`</doc>
<type name="TreeListRow" c:type="GtkTreeListRow*"/>
</instance-parameter>
<parameter name="expanded" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row should be expanded</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="children" transfer-ownership="none" getter="get_children">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_row_get_children"/>
<doc xml:space="preserve">The model holding the row's children.</doc>
<type name="Gio.ListModel"/>
</property>
<property name="depth" transfer-ownership="none" getter="get_depth">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_row_get_depth"/>
<doc xml:space="preserve">The depth in the tree of this row.</doc>
<type name="guint" c:type="guint"/>
</property>
<property name="expandable" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_row_is_expandable"/>
<doc xml:space="preserve">If this row can ever be expanded.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="expanded" writable="1" transfer-ownership="none" setter="set_expanded" getter="get_expanded">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_row_get_expanded"/>
<attribute name="org.gtk.Property.set" value="gtk_tree_list_row_set_expanded"/>
<doc xml:space="preserve">If this row is currently expanded.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="item" transfer-ownership="none" getter="get_item">
<attribute name="org.gtk.Property.get" value="gtk_tree_list_row_get_item"/>
<doc xml:space="preserve">The item held in this row.</doc>
<type name="GObject.Object"/>
</property>
</class>
<record name="TreeListRowClass" c:type="GtkTreeListRowClass" glib:is-gtype-struct-for="TreeListRow">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<class name="TreeListRowSorter" c:symbol-prefix="tree_list_row_sorter" c:type="GtkTreeListRowSorter" parent="Sorter" glib:type-name="GtkTreeListRowSorter" glib:get-type="gtk_tree_list_row_sorter_get_type" glib:type-struct="TreeListRowSorterClass">
<doc xml:space="preserve">`GtkTreeListRowSorter` is a special-purpose sorter that will apply a given
sorter to the levels in a tree.
Here is an example for setting up a column view with a tree model and
a `GtkTreeListSorter`:
```c
column_sorter = gtk_column_view_get_sorter (view);
sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
sort_model = gtk_sort_list_model_new (tree_model, sorter);
selection = gtk_single_selection_new (sort_model);
gtk_column_view_set_model (view, G_LIST_MODEL (selection));
```</doc>
<constructor name="new" c:identifier="gtk_tree_list_row_sorter_new">
<doc xml:space="preserve">Create a special-purpose sorter that applies the sorting
of @sorter to the levels of a `GtkTreeListModel`.
Note that this sorter relies on [property@Gtk.TreeListModel:passthrough]
being %FALSE as it can only sort [class@Gtk.TreeListRow]s.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTreeListRowSorter`</doc>
<type name="TreeListRowSorter" c:type="GtkTreeListRowSorter*"/>
</return-value>
<parameters>
<parameter name="sorter" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkSorter`</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</constructor>
<method name="get_sorter" c:identifier="gtk_tree_list_row_sorter_get_sorter" glib:get-property="sorter">
<doc xml:space="preserve">Returns the sorter used by @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the sorter used</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRowSorter`</doc>
<type name="TreeListRowSorter" c:type="GtkTreeListRowSorter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_sorter" c:identifier="gtk_tree_list_row_sorter_set_sorter" glib:set-property="sorter">
<doc xml:space="preserve">Sets the sorter to use for items with the same parent.
This sorter will be passed the [property@Gtk.TreeListRow:item] of
the tree list rows passed to @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeListRowSorter`</doc>
<type name="TreeListRowSorter" c:type="GtkTreeListRowSorter*"/>
</instance-parameter>
<parameter name="sorter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The sorter to use</doc>
<type name="Sorter" c:type="GtkSorter*"/>
</parameter>
</parameters>
</method>
<property name="sorter" writable="1" transfer-ownership="none" setter="set_sorter" getter="get_sorter">
<doc xml:space="preserve">The underlying sorter</doc>
<type name="Sorter"/>
</property>
</class>
<record name="TreeListRowSorterClass" c:type="GtkTreeListRowSorterClass" glib:is-gtype-struct-for="TreeListRowSorter">
<field name="parent_class">
<type name="SorterClass" c:type="GtkSorterClass"/>
</field>
</record>
<interface name="TreeModel" c:symbol-prefix="tree_model" c:type="GtkTreeModel" glib:type-name="GtkTreeModel" glib:get-type="gtk_tree_model_get_type" glib:type-struct="TreeModelIface">
<doc xml:space="preserve">The tree interface used by GtkTreeView
The `GtkTreeModel` interface defines a generic tree interface for
use by the `GtkTreeView` widget. It is an abstract interface, and
is designed to be usable with any appropriate data structure. The
programmer just has to implement this interface on their own data
type for it to be viewable by a `GtkTreeView` widget.
The model is represented as a hierarchical tree of strongly-typed,
columned data. In other words, the model can be seen as a tree where
every node has different values depending on which column is being
queried. The type of data found in a column is determined by using
the GType system (ie. %G_TYPE_INT, %GTK_TYPE_BUTTON, %G_TYPE_POINTER,
etc). The types are homogeneous per column across all nodes. It is
important to note that this interface only provides a way of examining
a model and observing changes. The implementation of each individual
model decides how and if changes are made.
In order to make life simpler for programmers who do not need to
write their own specialized model, two generic models are provided
&#x2014; the `GtkTreeStore` and the `GtkListStore`. To use these, the
developer simply pushes data into these models as necessary. These
models provide the data structure as well as all appropriate tree
interfaces. As a result, implementing drag and drop, sorting, and
storing data is trivial. For the vast majority of trees and lists,
these two models are sufficient.
Models are accessed on a node/column level of granularity. One can
query for the value of a model at a certain node and a certain
column on that node. There are two structures used to reference a
particular node in a model. They are the [struct@Gtk.TreePath] and
the [struct@Gtk.TreeIter] (&#x201C;iter&#x201D; is short for iterator). Most of the
interface consists of operations on a [struct@Gtk.TreeIter].
A path is essentially a potential node. It is a location on a model
that may or may not actually correspond to a node on a specific
model. A [struct@Gtk.TreePath] can be converted into either an
array of unsigned integers or a string. The string form is a list
of numbers separated by a colon. Each number refers to the offset
at that level. Thus, the path `0` refers to the root
node and the path `2:4` refers to the fifth child of
the third node.
By contrast, a [struct@Gtk.TreeIter] is a reference to a specific node on
a specific model. It is a generic struct with an integer and three
generic pointers. These are filled in by the model in a model-specific
way. One can convert a path to an iterator by calling
gtk_tree_model_get_iter(). These iterators are the primary way
of accessing a model and are similar to the iterators used by
`GtkTextBuffer`. They are generally statically allocated on the
stack and only used for a short time. The model interface defines
a set of operations using them for navigating the model.
It is expected that models fill in the iterator with private data.
For example, the `GtkListStore` model, which is internally a simple
linked list, stores a list node in one of the pointers. The
`GtkTreeModel`Sort stores an array and an offset in two of the
pointers. Additionally, there is an integer field. This field is
generally filled with a unique stamp per model. This stamp is for
catching errors resulting from using invalid iterators with a model.
The lifecycle of an iterator can be a little confusing at first.
Iterators are expected to always be valid for as long as the model
is unchanged (and doesn&#x2019;t emit a signal). The model is considered
to own all outstanding iterators and nothing needs to be done to
free them from the user&#x2019;s point of view. Additionally, some models
guarantee that an iterator is valid for as long as the node it refers
to is valid (most notably the `GtkTreeStore` and `GtkListStore`).
Although generally uninteresting, as one always has to allow for
the case where iterators do not persist beyond a signal, some very
important performance enhancements were made in the sort model.
As a result, the %GTK_TREE_MODEL_ITERS_PERSIST flag was added to
indicate this behavior.
To help show some common operation of a model, some examples are
provided. The first example shows three ways of getting the iter at
the location `3:2:5`. While the first method shown is
easier, the second is much more common, as you often get paths from
callbacks.
## Acquiring a `GtkTreeIter`
```c
// Three ways of getting the iter pointing to the location
GtkTreePath *path;
GtkTreeIter iter;
GtkTreeIter parent_iter;
// get the iterator from a string
gtk_tree_model_get_iter_from_string (model,
&amp;iter,
"3:2:5");
// get the iterator from a path
path = gtk_tree_path_new_from_string ("3:2:5");
gtk_tree_model_get_iter (model, &amp;iter, path);
gtk_tree_path_free (path);
// walk the tree to find the iterator
gtk_tree_model_iter_nth_child (model, &amp;iter,
NULL, 3);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &amp;iter,
&amp;parent_iter, 2);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &amp;iter,
&amp;parent_iter, 5);
```
This second example shows a quick way of iterating through a list
and getting a string and an integer from each row. The
populate_model() function used below is not
shown, as it is specific to the `GtkListStore`. For information on
how to write such a function, see the `GtkListStore` documentation.
## Reading data from a `GtkTreeModel`
```c
enum
{
STRING_COLUMN,
INT_COLUMN,
N_COLUMNS
};
...
GtkTreeModel *list_store;
GtkTreeIter iter;
gboolean valid;
int row_count = 0;
// make a new list_store
list_store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_INT);
// Fill the list store with data
populate_model (list_store);
// Get the first iter in the list, check it is valid and walk
// through the list, reading each row.
valid = gtk_tree_model_get_iter_first (list_store,
&amp;iter);
while (valid)
{
char *str_data;
int int_data;
// Make sure you terminate calls to gtk_tree_model_get() with a &#x201C;-1&#x201D; value
gtk_tree_model_get (list_store, &amp;iter,
STRING_COLUMN, &amp;str_data,
INT_COLUMN, &amp;int_data,
-1);
// Do something with the data
g_print ("Row %d: (%s,%d)\n",
row_count, str_data, int_data);
g_free (str_data);
valid = gtk_tree_model_iter_next (list_store,
&amp;iter);
row_count++;
}
```
The `GtkTreeModel` interface contains two methods for reference
counting: gtk_tree_model_ref_node() and gtk_tree_model_unref_node().
These two methods are optional to implement. The reference counting
is meant as a way for views to let models know when nodes are being
displayed. `GtkTreeView` will take a reference on a node when it is
visible, which means the node is either in the toplevel or expanded.
Being displayed does not mean that the node is currently directly
visible to the user in the viewport. Based on this reference counting
scheme a caching model, for example, can decide whether or not to cache
a node based on the reference count. A file-system based model would
not want to keep the entire file hierarchy in memory, but just the
folders that are currently expanded in every current view.
When working with reference counting, the following rules must be taken
into account:
- Never take a reference on a node without owning a reference on its parent.
This means that all parent nodes of a referenced node must be referenced
as well.
- Outstanding references on a deleted node are not released. This is not
possible because the node has already been deleted by the time the
row-deleted signal is received.
- Models are not obligated to emit a signal on rows of which none of its
siblings are referenced. To phrase this differently, signals are only
required for levels in which nodes are referenced. For the root level
however, signals must be emitted at all times (however the root level
is always referenced when any view is attached).</doc>
<virtual-method name="get_column_type" invoker="get_column_type">
<doc xml:space="preserve">Returns the type of the column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the type of the column</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the column index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_flags" invoker="get_flags">
<doc xml:space="preserve">Returns a set of flags supported by this interface.
The flags are a bitwise combination of `GtkTreeModel`Flags.
The flags supported should not change during the lifetime
of the @tree_model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the flags supported by this interface</doc>
<type name="TreeModelFlags" c:type="GtkTreeModelFlags"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_iter" invoker="get_iter">
<doc xml:space="preserve">Sets @iter to a valid iterator pointing to @path.
If @path does not exist, @iter is set to an invalid
iterator and %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_n_columns" invoker="get_n_columns">
<doc xml:space="preserve">Returns the number of columns supported by @tree_model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of columns</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="get_path" invoker="get_path">
<doc xml:space="preserve">Returns a newly-created `GtkTreePath` referenced by @iter.
This path should be freed with gtk_tree_path_free().</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_value" invoker="get_value">
<doc xml:space="preserve">Initializes and sets @value to that at @column.
When done with @value, g_value_unset() needs to be called
to free any allocated memory.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column to lookup the value at</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">an empty `GValue` to set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_children" invoker="iter_children">
<doc xml:space="preserve">Sets @iter to point to the first child of @parent.
If @parent has no children, %FALSE is returned and @iter is
set to be invalid. @parent will remain a valid node after this
function has been called.
If @parent is %NULL returns the first node, equivalent to
`gtk_tree_model_get_iter_first (tree_model, iter);`</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter has been set to the first child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to be set to the child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_has_child" invoker="iter_has_child">
<doc xml:space="preserve">Returns %TRUE if @iter has children, %FALSE otherwise.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to test for children</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_n_children" invoker="iter_n_children">
<doc xml:space="preserve">Returns the number of children that @iter has.
As a special case, if @iter is %NULL, then the number
of toplevel nodes is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of children of @iter</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_next" invoker="iter_next">
<doc xml:space="preserve">Sets @iter to point to the node following it at the current level.
If there is no next @iter, %FALSE is returned and @iter is set
to be invalid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the next node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_nth_child" invoker="iter_nth_child">
<doc xml:space="preserve">Sets @iter to be the child of @parent, using the given index.
The first index is 0. If @n is too big, or @parent has no children,
@iter is set to an invalid iterator and %FALSE is returned. @parent
will remain a valid node after this function has been called. As a
special case, if @parent is %NULL, then the @n-th root node
is set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @parent has an @n-th child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to set to the nth child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter` to get the child from</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="n" transfer-ownership="none">
<doc xml:space="preserve">the index of the desired child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_parent" invoker="iter_parent">
<doc xml:space="preserve">Sets @iter to be the parent of @child.
If @child is at the toplevel, and doesn&#x2019;t have a parent, then
@iter is set to an invalid iterator and %FALSE is returned.
@child will remain a valid node after this function has been
called.
@iter will be initialized before the lookup is performed, so @child
and @iter cannot point to the same memory location.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter is set to the parent of @child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to set to the parent</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="iter_previous" invoker="iter_previous">
<doc xml:space="preserve">Sets @iter to point to the previous node at the current level.
If there is no previous @iter, %FALSE is returned and @iter is
set to be invalid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the previous node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="ref_node" invoker="ref_node">
<doc xml:space="preserve">Lets the tree ref the node.
This is an optional method for models to implement.
To be more specific, models may ignore this call as it exists
primarily for performance reasons.
This function is primarily meant as a way for views to let
caching models know when nodes are being displayed (and hence,
whether or not to cache that node). Being displayed means a node
is in an expanded branch, regardless of whether the node is currently
visible in the viewport. For example, a file-system based model
would not want to keep the entire file-hierarchy in memory,
just the sections that are currently being displayed by
every current view.
A model should be expected to be able to get an iter independent
of its reffed state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_changed" invoker="row_changed">
<doc xml:space="preserve">Emits the ::row-changed signal on @tree_model.
See [signal@Gtk.TreeModel::row-changed].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_deleted" invoker="row_deleted">
<doc xml:space="preserve">Emits the ::row-deleted signal on @tree_model.
See [signal@Gtk.TreeModel::row-deleted].
This should be called by models after a row has been removed.
The location pointed to by @path should be the location that
the row previously was at. It may not be a valid location anymore.
Nodes that are deleted are not unreffed, this means that any
outstanding references on the deleted node should not be released.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the previous location of
the deleted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_has_child_toggled" invoker="row_has_child_toggled">
<doc xml:space="preserve">Emits the ::row-has-child-toggled signal on @tree_model.
See [signal@Gtk.TreeModel::row-has-child-toggled].
This should be called by models after the child
state of a node changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_inserted" invoker="row_inserted">
<doc xml:space="preserve">Emits the ::row-inserted signal on @tree_model.
See [signal@Gtk.TreeModel::row-inserted].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the inserted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the inserted row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="rows_reordered" invoker="rows_reordered" introspectable="0">
<doc xml:space="preserve">Emits the ::rows-reordered signal on @tree_model.
See [signal@Gtk.TreeModel::rows-reordered].
This should be called by models when their rows have been
reordered.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the tree node whose children
have been reordered</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the node whose children
have been reordered, or %NULL if the depth of @path is 0</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers mapping the current position of
each child to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unref_node" invoker="unref_node">
<doc xml:space="preserve">Lets the tree unref the node.
This is an optional method for models to implement.
To be more specific, models may ignore this call as it exists
primarily for performance reasons. For more information on what
this means, see gtk_tree_model_ref_node().
Please note that nodes that are deleted are not unreffed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<method name="filter_new" c:identifier="gtk_tree_model_filter_new">
<doc xml:space="preserve">Creates a new `GtkTreeModel`, with @child_model as the child_model
and @root as the virtual root.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkTreeModel`.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="child_model" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModel`.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="root" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="foreach" c:identifier="gtk_tree_model_foreach">
<doc xml:space="preserve">Calls @func on each node in model in a depth-first fashion.
If @func returns %TRUE, then the tree ceases to be walked,
and gtk_tree_model_foreach() returns.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">a function to be called on each row</doc>
<type name="TreeModelForeachFunc" c:type="GtkTreeModelForeachFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to passed to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="get" c:identifier="gtk_tree_model_get" introspectable="0">
<doc xml:space="preserve">Gets the value of one or more cells in the row referenced by @iter.
The variable argument list should contain integer column numbers,
each column number followed by a place to store the value being
retrieved. The list is terminated by a -1. For example, to get a
value from column 0 with type %G_TYPE_STRING, you would
write: `gtk_tree_model_get (model, iter, 0, &amp;place_string_here, -1)`,
where `place_string_here` is a #gchararray
to be filled with the string.
Returned values with type %G_TYPE_OBJECT have to be unreferenced,
values with type %G_TYPE_STRING or %G_TYPE_BOXED have to be freed.
Other values are passed by value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a row in @tree_model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">pairs of column number and value return locations,
terminated by -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="get_column_type" c:identifier="gtk_tree_model_get_column_type">
<doc xml:space="preserve">Returns the type of the column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the type of the column</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the column index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_flags" c:identifier="gtk_tree_model_get_flags">
<doc xml:space="preserve">Returns a set of flags supported by this interface.
The flags are a bitwise combination of `GtkTreeModel`Flags.
The flags supported should not change during the lifetime
of the @tree_model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the flags supported by this interface</doc>
<type name="TreeModelFlags" c:type="GtkTreeModelFlags"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_iter" c:identifier="gtk_tree_model_get_iter">
<doc xml:space="preserve">Sets @iter to a valid iterator pointing to @path.
If @path does not exist, @iter is set to an invalid
iterator and %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_iter_first" c:identifier="gtk_tree_model_get_iter_first">
<doc xml:space="preserve">Initializes @iter with the first iterator in the tree
(the one at the path "0").
Returns %FALSE if the tree is empty, %TRUE otherwise.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_iter_from_string" c:identifier="gtk_tree_model_get_iter_from_string">
<doc xml:space="preserve">Sets @iter to a valid iterator pointing to @path_string, if it
exists.
Otherwise, @iter is left invalid and %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">an uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path_string" transfer-ownership="none">
<doc xml:space="preserve">a string representation of a `GtkTreePath`</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_n_columns" c:identifier="gtk_tree_model_get_n_columns">
<doc xml:space="preserve">Returns the number of columns supported by @tree_model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of columns</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_path" c:identifier="gtk_tree_model_get_path">
<doc xml:space="preserve">Returns a newly-created `GtkTreePath` referenced by @iter.
This path should be freed with gtk_tree_path_free().</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_string_from_iter" c:identifier="gtk_tree_model_get_string_from_iter">
<doc xml:space="preserve">Generates a string representation of the iter.
This string is a &#x201C;:&#x201D; separated list of numbers.
For example, &#x201C;4:10:0:3&#x201D; would be an acceptable
return value for this string.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly-allocated string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_valist" c:identifier="gtk_tree_model_get_valist" introspectable="0">
<doc xml:space="preserve">Gets the value of one or more cells in the row referenced by @iter.
See [method@Gtk.TreeModel.get], this version takes a va_list
for language bindings to use.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a row in @tree_model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="var_args" transfer-ownership="none">
<doc xml:space="preserve">va_list of column/return location pairs</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="get_value" c:identifier="gtk_tree_model_get_value">
<doc xml:space="preserve">Initializes and sets @value to that at @column.
When done with @value, g_value_unset() needs to be called
to free any allocated memory.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column to lookup the value at</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">an empty `GValue` to set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="iter_children" c:identifier="gtk_tree_model_iter_children">
<doc xml:space="preserve">Sets @iter to point to the first child of @parent.
If @parent has no children, %FALSE is returned and @iter is
set to be invalid. @parent will remain a valid node after this
function has been called.
If @parent is %NULL returns the first node, equivalent to
`gtk_tree_model_get_iter_first (tree_model, iter);`</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter has been set to the first child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to be set to the child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_has_child" c:identifier="gtk_tree_model_iter_has_child">
<doc xml:space="preserve">Returns %TRUE if @iter has children, %FALSE otherwise.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to test for children</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_n_children" c:identifier="gtk_tree_model_iter_n_children">
<doc xml:space="preserve">Returns the number of children that @iter has.
As a special case, if @iter is %NULL, then the number
of toplevel nodes is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of children of @iter</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_next" c:identifier="gtk_tree_model_iter_next">
<doc xml:space="preserve">Sets @iter to point to the node following it at the current level.
If there is no next @iter, %FALSE is returned and @iter is set
to be invalid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the next node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_nth_child" c:identifier="gtk_tree_model_iter_nth_child">
<doc xml:space="preserve">Sets @iter to be the child of @parent, using the given index.
The first index is 0. If @n is too big, or @parent has no children,
@iter is set to an invalid iterator and %FALSE is returned. @parent
will remain a valid node after this function has been called. As a
special case, if @parent is %NULL, then the @n-th root node
is set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @parent has an @n-th child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to set to the nth child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter` to get the child from</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="n" transfer-ownership="none">
<doc xml:space="preserve">the index of the desired child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="iter_parent" c:identifier="gtk_tree_model_iter_parent">
<doc xml:space="preserve">Sets @iter to be the parent of @child.
If @child is at the toplevel, and doesn&#x2019;t have a parent, then
@iter is set to an invalid iterator and %FALSE is returned.
@child will remain a valid node after this function has been
called.
@iter will be initialized before the lookup is performed, so @child
and @iter cannot point to the same memory location.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter is set to the parent of @child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to set to the parent</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_previous" c:identifier="gtk_tree_model_iter_previous">
<doc xml:space="preserve">Sets @iter to point to the previous node at the current level.
If there is no previous @iter, %FALSE is returned and @iter is
set to be invalid.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the previous node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="ref_node" c:identifier="gtk_tree_model_ref_node">
<doc xml:space="preserve">Lets the tree ref the node.
This is an optional method for models to implement.
To be more specific, models may ignore this call as it exists
primarily for performance reasons.
This function is primarily meant as a way for views to let
caching models know when nodes are being displayed (and hence,
whether or not to cache that node). Being displayed means a node
is in an expanded branch, regardless of whether the node is currently
visible in the viewport. For example, a file-system based model
would not want to keep the entire file-hierarchy in memory,
just the sections that are currently being displayed by
every current view.
A model should be expected to be able to get an iter independent
of its reffed state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="row_changed" c:identifier="gtk_tree_model_row_changed">
<doc xml:space="preserve">Emits the ::row-changed signal on @tree_model.
See [signal@Gtk.TreeModel::row-changed].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="row_deleted" c:identifier="gtk_tree_model_row_deleted">
<doc xml:space="preserve">Emits the ::row-deleted signal on @tree_model.
See [signal@Gtk.TreeModel::row-deleted].
This should be called by models after a row has been removed.
The location pointed to by @path should be the location that
the row previously was at. It may not be a valid location anymore.
Nodes that are deleted are not unreffed, this means that any
outstanding references on the deleted node should not be released.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the previous location of
the deleted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="row_has_child_toggled" c:identifier="gtk_tree_model_row_has_child_toggled">
<doc xml:space="preserve">Emits the ::row-has-child-toggled signal on @tree_model.
See [signal@Gtk.TreeModel::row-has-child-toggled].
This should be called by models after the child
state of a node changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="row_inserted" c:identifier="gtk_tree_model_row_inserted">
<doc xml:space="preserve">Emits the ::row-inserted signal on @tree_model.
See [signal@Gtk.TreeModel::row-inserted].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the inserted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the inserted row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="rows_reordered" c:identifier="gtk_tree_model_rows_reordered" shadowed-by="rows_reordered_with_length" introspectable="0">
<doc xml:space="preserve">Emits the ::rows-reordered signal on @tree_model.
See [signal@Gtk.TreeModel::rows-reordered].
This should be called by models when their rows have been
reordered.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the tree node whose children
have been reordered</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the node whose children
have been reordered, or %NULL if the depth of @path is 0</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers mapping the current position of
each child to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="rows_reordered_with_length" c:identifier="gtk_tree_model_rows_reordered_with_length" shadows="rows_reordered">
<doc xml:space="preserve">Emits the ::rows-reordered signal on @tree_model.
See [signal@Gtk.TreeModel::rows-reordered].
This should be called by models when their rows have been
reordered.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the tree node whose children
have been reordered</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the node
whose children have been reordered, or %NULL if the depth
of @path is 0</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers
mapping the current position of each child to its old
position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`</doc>
<array length="3" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">length of @new_order array</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="unref_node" c:identifier="gtk_tree_model_unref_node">
<doc xml:space="preserve">Lets the tree unref the node.
This is an optional method for models to implement.
To be more specific, models may ignore this call as it exists
primarily for performance reasons. For more information on what
this means, see gtk_tree_model_ref_node().
Please note that nodes that are deleted are not unreffed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<glib:signal name="row-changed" when="last">
<doc xml:space="preserve">This signal is emitted when a row in the model has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` identifying the changed row</doc>
<type name="TreePath"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-deleted" when="first">
<doc xml:space="preserve">This signal is emitted when a row has been deleted.
Note that no iterator is passed to the signal handler,
since the row is already deleted.
This should be called by models after a row has been removed.
The location pointed to by @path should be the location that
the row previously was at. It may not be a valid location anymore.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` identifying the row</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-has-child-toggled" when="last">
<doc xml:space="preserve">This signal is emitted when a row has gotten the first child
row or lost its last child row.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` identifying the row</doc>
<type name="TreePath"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the row</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-inserted" when="first">
<doc xml:space="preserve">This signal is emitted when a new row has been inserted in
the model.
Note that the row may still be empty at this point, since
it is a common pattern to first insert an empty row, and
then fill it with the desired values.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` identifying the new row</doc>
<type name="TreePath"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the new row</doc>
<type name="TreeIter"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="rows-reordered" when="first" introspectable="0">
<doc xml:space="preserve">This signal is emitted when the children of a node in the
`GtkTreeModel` have been reordered.
Note that this signal is not emitted
when rows are reordered by DND, since this is implemented
by removing and then reinserting the row.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` identifying the tree node whose children
have been reordered</doc>
<type name="TreePath"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the node whose children
have been reordered, or %NULL if the depth of @path is 0</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="new_order" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an array of integers mapping the current position
of each child to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</glib:signal>
</interface>
<class name="TreeModelFilter" c:symbol-prefix="tree_model_filter" c:type="GtkTreeModelFilter" parent="GObject.Object" glib:type-name="GtkTreeModelFilter" glib:get-type="gtk_tree_model_filter_get_type" glib:type-struct="TreeModelFilterClass">
<doc xml:space="preserve">A `GtkTreeModel` which hides parts of an underlying tree model
A `GtkTreeModelFilter` is a tree model which wraps another tree model,
and can do the following things:
- Filter specific rows, based on data from a &#x201C;visible column&#x201D;, a column
storing booleans indicating whether the row should be filtered or not,
or based on the return value of a &#x201C;visible function&#x201D;, which gets a
model, iter and user_data and returns a boolean indicating whether the
row should be filtered or not.
- Modify the &#x201C;appearance&#x201D; of the model, using a modify function.
This is extremely powerful and allows for just changing some
values and also for creating a completely different model based
on the given child model.
- Set a different root node, also known as a &#x201C;virtual root&#x201D;. You can pass
in a `GtkTreePath` indicating the root node for the filter at construction
time.
The basic API is similar to `GtkTreeModelSort`. For an example on its usage,
see the section on `GtkTreeModelSort`.
When using `GtkTreeModelFilter`, it is important to realize that
`GtkTreeModelFilter` maintains an internal cache of all nodes which are
visible in its clients. The cache is likely to be a subtree of the tree
exposed by the child model. `GtkTreeModelFilter` will not cache the entire
child model when unnecessary to not compromise the caching mechanism
that is exposed by the reference counting scheme. If the child model
implements reference counting, unnecessary signals may not be emitted
because of reference counting rule 3, see the `GtkTreeModel`
documentation. (Note that e.g. `GtkTreeStore` does not implement
reference counting and will always emit all signals, even when
the receiving node is not visible).
Because of this, limitations for possible visible functions do apply.
In general, visible functions should only use data or properties from
the node for which the visibility state must be determined, its siblings
or its parents. Usually, having a dependency on the state of any child
node is not possible, unless references are taken on these explicitly.
When no such reference exists, no signals may be received for these child
nodes (see reference counting rule number 3 in the `GtkTreeModel` section).
Determining the visibility state of a given node based on the state
of its child nodes is a frequently occurring use case. Therefore,
`GtkTreeModelFilter` explicitly supports this. For example, when a node
does not have any children, you might not want the node to be visible.
As soon as the first row is added to the node&#x2019;s child level (or the
last row removed), the node&#x2019;s visibility should be updated.
This introduces a dependency from the node on its child nodes. In order
to accommodate this, `GtkTreeModelFilter` must make sure the necessary
signals are received from the child model. This is achieved by building,
for all nodes which are exposed as visible nodes to `GtkTreeModelFilter`'s
clients, the child level (if any) and take a reference on the first node
in this level. Furthermore, for every row-inserted, row-changed or
row-deleted signal (also these which were not handled because the node
was not cached), `GtkTreeModelFilter` will check if the visibility state
of any parent node has changed.
Beware, however, that this explicit support is limited to these two
cases. For example, if you want a node to be visible only if two nodes
in a child&#x2019;s child level (2 levels deeper) are visible, you are on your
own. In this case, either rely on `GtkTreeStore` to emit all signals
because it does not implement reference counting, or for models that
do implement reference counting, obtain references on these child levels
yourself.</doc>
<implements name="TreeDragSource"/>
<implements name="TreeModel"/>
<virtual-method name="modify">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="child_model" transfer-ownership="none">
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="visible">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="child_model" transfer-ownership="none">
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</virtual-method>
<method name="clear_cache" c:identifier="gtk_tree_model_filter_clear_cache">
<doc xml:space="preserve">This function should almost never be called. It clears the @filter
of any cached iterators that haven&#x2019;t been reffed with
gtk_tree_model_ref_node(). This might be useful if the child model
being filtered is static (and doesn&#x2019;t change often) and there has been
a lot of unreffed access to nodes. As a side effect of this function,
all unreffed iters will be invalid.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="convert_child_iter_to_iter" c:identifier="gtk_tree_model_filter_convert_child_iter_to_iter">
<doc xml:space="preserve">Sets @filter_iter to point to the row in @filter that corresponds to the
row pointed at by @child_iter. If @filter_iter was not set, %FALSE is
returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @filter_iter was set, i.e. if @child_iter is a
valid iterator pointing to a visible row in child model.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="filter_iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="child_iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` pointing to a row on the child model.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="convert_child_path_to_path" c:identifier="gtk_tree_model_filter_convert_child_path_to_path">
<doc xml:space="preserve">Converts @child_path to a path relative to @filter. That is, @child_path
points to a path in the child model. The rerturned path will point to the
same row in the filtered model. If @child_path isn&#x2019;t a valid path on the
child model or points to a row which is not visible in @filter, then %NULL
is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly allocated `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="child_path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to convert.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="convert_iter_to_child_iter" c:identifier="gtk_tree_model_filter_convert_iter_to_child_iter">
<doc xml:space="preserve">Sets @child_iter to point to the row pointed to by @filter_iter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="child_iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="filter_iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` pointing to a row on @filter.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="convert_path_to_child_path" c:identifier="gtk_tree_model_filter_convert_path_to_child_path">
<doc xml:space="preserve">Converts @filter_path to a path on the child model of @filter. That is,
@filter_path points to a location in @filter. The returned path will
point to the same location in the model not being filtered. If @filter_path
does not point to a location in the child model, %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly allocated `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="filter_path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to convert.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_tree_model_filter_get_model">
<doc xml:space="preserve">Returns a pointer to the child model of @filter.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A pointer to a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="refilter" c:identifier="gtk_tree_model_filter_refilter">
<doc xml:space="preserve">Emits ::row_changed for each row in the child model, which causes
the filter to re-evaluate whether a row is visible or not.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_modify_func" c:identifier="gtk_tree_model_filter_set_modify_func">
<doc xml:space="preserve">With the @n_columns and @types parameters, you give an array of column
types for this model (which will be exposed to the parent model/view).
The @func, @data and @destroy parameters are for specifying the modify
function. The modify function will get called for each
data access, the goal of the modify function is to return the data which
should be displayed at the location specified using the parameters of the
modify function.
Note that gtk_tree_model_filter_set_modify_func()
can only be called once for a given filter model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">The number of columns in the filter model.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="types" transfer-ownership="none">
<doc xml:space="preserve">The `GType`s of the columns.</doc>
<array length="0" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
<parameter name="func" transfer-ownership="none" scope="notified" closure="3" destroy="4">
<doc xml:space="preserve">A `GtkTreeModelFilterModifyFunc`</doc>
<type name="TreeModelFilterModifyFunc" c:type="GtkTreeModelFilterModifyFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to pass to the modify function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_visible_column" c:identifier="gtk_tree_model_filter_set_visible_column">
<doc xml:space="preserve">Sets @column of the child_model to be the column where @filter should
look for visibility information. @columns should be a column of type
%G_TYPE_BOOLEAN, where %TRUE means that a row is visible, and %FALSE
if not.
Note that gtk_tree_model_filter_set_visible_func() or
gtk_tree_model_filter_set_visible_column() can only be called
once for a given filter model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">A `int` which is the column containing the visible information</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_visible_func" c:identifier="gtk_tree_model_filter_set_visible_func">
<doc xml:space="preserve">Sets the visible function used when filtering the @filter to be @func.
The function should return %TRUE if the given row should be visible and
%FALSE otherwise.
If the condition calculated by the function changes over time (e.g.
because it depends on some global parameters), you must call
gtk_tree_model_filter_refilter() to keep the visibility information
of the model up-to-date.
Note that @func is called whenever a row is inserted, when it may still
be empty. The visible function should therefore take special care of empty
rows, like in the example below.
|[&lt;!-- language="C" --&gt;
static gboolean
visible_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
// Visible if row is non-empty and first column is &#x201C;HI&#x201D;
char *str;
gboolean visible = FALSE;
gtk_tree_model_get (model, iter, 0, &amp;str, -1);
if (str &amp;&amp; strcmp (str, "HI") == 0)
visible = TRUE;
g_free (str);
return visible;
}
]|
Note that gtk_tree_model_filter_set_visible_func() or
gtk_tree_model_filter_set_visible_column() can only be called
once for a given filter model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="filter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelFilter`</doc>
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">A `GtkTreeModelFilterVisibleFunc`, the visible function</doc>
<type name="TreeModelFilterVisibleFunc" c:type="GtkTreeModelFilterVisibleFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to pass to the visible function</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<property name="child-model" writable="1" construct-only="1" transfer-ownership="none">
<type name="TreeModel"/>
</property>
<property name="virtual-root" writable="1" construct-only="1" transfer-ownership="none">
<type name="TreePath"/>
</property>
<field name="parent">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv" readable="0" private="1">
<type name="TreeModelFilterPrivate" c:type="GtkTreeModelFilterPrivate*"/>
</field>
</class>
<record name="TreeModelFilterClass" c:type="GtkTreeModelFilterClass" glib:is-gtype-struct-for="TreeModelFilter">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="visible">
<callback name="visible">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</parameter>
<parameter name="child_model" transfer-ownership="none">
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="modify">
<callback name="modify">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="self" transfer-ownership="none">
<type name="TreeModelFilter" c:type="GtkTreeModelFilter*"/>
</parameter>
<parameter name="child_model" transfer-ownership="none">
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<callback name="TreeModelFilterModifyFunc" c:type="GtkTreeModelFilterModifyFunc">
<doc xml:space="preserve">A function which calculates display values from raw values in the model.
It must fill @value with the display value for the column @column in the
row indicated by @iter.
Since this function is called for each data access, it&#x2019;s not a
particularly efficient operation.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModelFilter`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` pointing to the row whose display values are determined</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">A `GValue` which is already initialized for
with the correct type for the column @column.</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column whose display value is determined</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data given to gtk_tree_model_filter_set_modify_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="TreeModelFilterPrivate" c:type="GtkTreeModelFilterPrivate" disguised="1"/>
<callback name="TreeModelFilterVisibleFunc" c:type="GtkTreeModelFilterVisibleFunc">
<doc xml:space="preserve">A function which decides whether the row indicated by @iter is visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the row indicated by @iter is visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the child model of the `GtkTreeModelFilter`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` pointing to the row in @model whose visibility
is determined</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data given to gtk_tree_model_filter_set_visible_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<bitfield name="TreeModelFlags" glib:type-name="GtkTreeModelFlags" glib:get-type="gtk_tree_model_flags_get_type" c:type="GtkTreeModelFlags">
<doc xml:space="preserve">These flags indicate various properties of a `GtkTreeModel`.
They are returned by [method@Gtk.TreeModel.get_flags], and must be
static for the lifetime of the object. A more complete description
of %GTK_TREE_MODEL_ITERS_PERSIST can be found in the overview of
this section.</doc>
<member name="iters_persist" value="1" c:identifier="GTK_TREE_MODEL_ITERS_PERSIST" glib:nick="iters-persist" glib:name="GTK_TREE_MODEL_ITERS_PERSIST">
<doc xml:space="preserve">iterators survive all signals
emitted by the tree</doc>
</member>
<member name="list_only" value="2" c:identifier="GTK_TREE_MODEL_LIST_ONLY" glib:nick="list-only" glib:name="GTK_TREE_MODEL_LIST_ONLY">
<doc xml:space="preserve">the model is a list only, and never
has children</doc>
</member>
</bitfield>
<callback name="TreeModelForeachFunc" c:type="GtkTreeModelForeachFunc">
<doc xml:space="preserve">Type of the callback passed to gtk_tree_model_foreach() to
iterate over the rows in a tree model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop iterating, %FALSE to continue</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` being iterated</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the current `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the current `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">The user data passed to gtk_tree_model_foreach()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<record name="TreeModelIface" c:type="GtkTreeModelIface" glib:is-gtype-struct-for="TreeModel">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="row_changed">
<callback name="row_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_inserted">
<callback name="row_inserted">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the inserted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the inserted row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_has_child_toggled">
<callback name="row_has_child_toggled">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the changed row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the changed row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_deleted">
<callback name="row_deleted">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the previous location of
the deleted row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="rows_reordered">
<callback name="rows_reordered">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` pointing to the tree node whose children
have been reordered</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreeIter` pointing to the node whose children
have been reordered, or %NULL if the depth of @path is 0</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers mapping the current position of
each child to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_flags">
<callback name="get_flags">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the flags supported by this interface</doc>
<type name="TreeModelFlags" c:type="GtkTreeModelFlags"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_n_columns">
<callback name="get_n_columns">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of columns</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_column_type">
<callback name="get_column_type">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the type of the column</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the column index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_iter">
<callback name="get_iter">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter was set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_path">
<callback name="get_path">
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_value">
<callback name="get_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column to lookup the value at</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">an empty `GValue` to set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_next">
<callback name="iter_next">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the next node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_previous">
<callback name="iter_previous">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has been changed to the previous node</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_children">
<callback name="iter_children">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter has been set to the first child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to be set to the child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_has_child">
<callback name="iter_has_child">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter has children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to test for children</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_n_children">
<callback name="iter_n_children">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of children of @iter</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_nth_child">
<callback name="iter_nth_child">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @parent has an @n-th child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter` to set to the nth child</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeIter` to get the child from</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="n" transfer-ownership="none">
<doc xml:space="preserve">the index of the desired child</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="iter_parent">
<callback name="iter_parent">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter is set to the parent of @child</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the new `GtkTreeIter` to set to the parent</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="ref_node">
<callback name="ref_node">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unref_node">
<callback name="unref_node">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="TreeModelSort" c:symbol-prefix="tree_model_sort" c:type="GtkTreeModelSort" parent="GObject.Object" glib:type-name="GtkTreeModelSort" glib:get-type="gtk_tree_model_sort_get_type" glib:type-struct="TreeModelSortClass">
<doc xml:space="preserve">A GtkTreeModel which makes an underlying tree model sortable
The `GtkTreeModelSort` is a model which implements the `GtkTreeSortable`
interface. It does not hold any data itself, but rather is created with
a child model and proxies its data. It has identical column types to
this child model, and the changes in the child are propagated. The
primary purpose of this model is to provide a way to sort a different
model without modifying it. Note that the sort function used by
`GtkTreeModelSort` is not guaranteed to be stable.
The use of this is best demonstrated through an example. In the
following sample code we create two `GtkTreeView` widgets each with a
view of the same data. As the model is wrapped here by a
`GtkTreeModelSort`, the two `GtkTreeView`s can each sort their
view of the data without affecting the other. By contrast, if we
simply put the same model in each widget, then sorting the first would
sort the second.
## Using a `GtkTreeModelSort`
|[&lt;!-- language="C" --&gt;
{
GtkTreeView *tree_view1;
GtkTreeView *tree_view2;
GtkTreeModel *sort_model1;
GtkTreeModel *sort_model2;
GtkTreeModel *child_model;
// get the child model
child_model = get_my_model ();
// Create the first tree
sort_model1 = gtk_tree_model_sort_new_with_model (child_model);
tree_view1 = gtk_tree_view_new_with_model (sort_model1);
// Create the second tree
sort_model2 = gtk_tree_model_sort_new_with_model (child_model);
tree_view2 = gtk_tree_view_new_with_model (sort_model2);
// Now we can sort the two models independently
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model1),
COLUMN_1, GTK_SORT_ASCENDING);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model2),
COLUMN_1, GTK_SORT_DESCENDING);
}
]|
To demonstrate how to access the underlying child model from the sort
model, the next example will be a callback for the `GtkTreeSelection`
`GtkTreeSelection::changed` signal. In this callback, we get a string
from COLUMN_1 of the model. We then modify the string, find the same
selected row on the child model, and change the row there.
## Accessing the child model of in a selection changed callback
|[&lt;!-- language="C" --&gt;
void
selection_changed (GtkTreeSelection *selection, gpointer data)
{
GtkTreeModel *sort_model = NULL;
GtkTreeModel *child_model;
GtkTreeIter sort_iter;
GtkTreeIter child_iter;
char *some_data = NULL;
char *modified_data;
// Get the current selected row and the model.
if (! gtk_tree_selection_get_selected (selection,
&amp;sort_model,
&amp;sort_iter))
return;
// Look up the current value on the selected row and get
// a new value to change it to.
gtk_tree_model_get (GTK_TREE_MODEL (sort_model), &amp;sort_iter,
COLUMN_1, &amp;some_data,
-1);
modified_data = change_the_data (some_data);
g_free (some_data);
// Get an iterator on the child model, instead of the sort model.
gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (sort_model),
&amp;child_iter,
&amp;sort_iter);
// Get the child model and change the value of the row. In this
// example, the child model is a GtkListStore. It could be any other
// type of model, though.
child_model = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model));
gtk_list_store_set (GTK_LIST_STORE (child_model), &amp;child_iter,
COLUMN_1, &amp;modified_data,
-1);
g_free (modified_data);
}
]|</doc>
<implements name="TreeDragSource"/>
<implements name="TreeModel"/>
<implements name="TreeSortable"/>
<constructor name="new_with_model" c:identifier="gtk_tree_model_sort_new_with_model">
<doc xml:space="preserve">Creates a new `GtkTreeModelSort`, with @child_model as the child model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkTreeModelSort`.</doc>
<type name="TreeModelSort" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<parameter name="child_model" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</constructor>
<method name="clear_cache" c:identifier="gtk_tree_model_sort_clear_cache">
<doc xml:space="preserve">This function should almost never be called. It clears the @tree_model_sort
of any cached iterators that haven&#x2019;t been reffed with
gtk_tree_model_ref_node(). This might be useful if the child model being
sorted is static (and doesn&#x2019;t change often) and there has been a lot of
unreffed access to nodes. As a side effect of this function, all unreffed
iters will be invalid.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
</parameters>
</method>
<method name="convert_child_iter_to_iter" c:identifier="gtk_tree_model_sort_convert_child_iter_to_iter">
<doc xml:space="preserve">Sets @sort_iter to point to the row in @tree_model_sort that corresponds to
the row pointed at by @child_iter. If @sort_iter was not set, %FALSE
is returned. Note: a boolean is only returned since 2.14.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @sort_iter was set, i.e. if @sort_iter is a
valid iterator pointer to a visible row in the child model.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
<parameter name="sort_iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="child_iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` pointing to a row on the child model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="convert_child_path_to_path" c:identifier="gtk_tree_model_sort_convert_child_path_to_path">
<doc xml:space="preserve">Converts @child_path to a path relative to @tree_model_sort. That is,
@child_path points to a path in the child model. The returned path will
point to the same row in the sorted model. If @child_path isn&#x2019;t a valid
path on the child model, then %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly allocated `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
<parameter name="child_path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to convert</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="convert_iter_to_child_iter" c:identifier="gtk_tree_model_sort_convert_iter_to_child_iter">
<doc xml:space="preserve">Sets @child_iter to point to the row pointed to by @sorted_iter.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
<parameter name="child_iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An uninitialized `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="sorted_iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` pointing to a row on @tree_model_sort.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="convert_path_to_child_path" c:identifier="gtk_tree_model_sort_convert_path_to_child_path">
<doc xml:space="preserve">Converts @sorted_path to a path on the child model of @tree_model_sort.
That is, @sorted_path points to a location in @tree_model_sort. The
returned path will point to the same location in the model not being
sorted. If @sorted_path does not point to a location in the child model,
%NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly allocated `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
<parameter name="sorted_path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to convert</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_tree_model_sort_get_model" glib:get-property="model">
<doc xml:space="preserve">Returns the model the `GtkTreeModelSort` is sorting.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the "child model" being sorted</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
</parameters>
</method>
<method name="iter_is_valid" c:identifier="gtk_tree_model_sort_iter_is_valid">
<doc xml:space="preserve">&gt; This function is slow. Only use it for debugging and/or testing
&gt; purposes.
Checks if the given iter is a valid iter for this `GtkTreeModelSort`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the iter is valid, %FALSE if the iter is invalid.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`.</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="reset_default_sort_func" c:identifier="gtk_tree_model_sort_reset_default_sort_func">
<doc xml:space="preserve">This resets the default sort function to be in the &#x201C;unsorted&#x201D; state. That
is, it is in the same order as the child model. It will re-sort the model
to be in the same order as the child model only if the `GtkTreeModelSort`
is in &#x201C;unsorted&#x201D; state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_model_sort" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModelSort`</doc>
<type name="TreeModelSort" c:type="GtkTreeModelSort*"/>
</instance-parameter>
</parameters>
</method>
<property name="model" writable="1" construct-only="1" transfer-ownership="none" getter="get_model">
<type name="TreeModel"/>
</property>
<field name="parent">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv" readable="0" private="1">
<type name="TreeModelSortPrivate" c:type="GtkTreeModelSortPrivate*"/>
</field>
</class>
<record name="TreeModelSortClass" c:type="GtkTreeModelSortClass" glib:is-gtype-struct-for="TreeModelSort">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="TreeModelSortPrivate" c:type="GtkTreeModelSortPrivate" disguised="1"/>
<record name="TreePath" c:type="GtkTreePath" glib:type-name="GtkTreePath" glib:get-type="gtk_tree_path_get_type" c:symbol-prefix="tree_path">
<doc xml:space="preserve">An opaque structure representing a path to a row in a model.</doc>
<constructor name="new" c:identifier="gtk_tree_path_new">
<doc xml:space="preserve">Creates a new `GtkTreePath`
This refers to a row.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkTreePath`.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
</constructor>
<constructor name="new_first" c:identifier="gtk_tree_path_new_first">
<doc xml:space="preserve">Creates a new `GtkTreePath`.
The string representation of this path is &#x201C;0&#x201D;.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A new `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
</constructor>
<constructor name="new_from_indices" c:identifier="gtk_tree_path_new_from_indices" shadowed-by="new_from_indicesv" introspectable="0">
<doc xml:space="preserve">Creates a new path with @first_index and @varargs as indices.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<parameter name="first_index" transfer-ownership="none">
<doc xml:space="preserve">first integer</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">list of integers terminated by -1</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_indicesv" c:identifier="gtk_tree_path_new_from_indicesv" shadows="new_from_indices">
<doc xml:space="preserve">Creates a new path with the given @indices array of @length.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A newly created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<parameter name="indices" transfer-ownership="none">
<doc xml:space="preserve">array of indices</doc>
<array length="1" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="length" transfer-ownership="none">
<doc xml:space="preserve">length of @indices array</doc>
<type name="gsize" c:type="gsize"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_from_string" c:identifier="gtk_tree_path_new_from_string">
<doc xml:space="preserve">Creates a new `GtkTreePath` initialized to @path.
@path is expected to be a colon separated list of numbers.
For example, the string &#x201C;10:4:0&#x201D; would create a path of depth
3 pointing to the 11th child of the root node, the 5th
child of that 11th child, and the 1st child of that 5th child.
If an invalid path string is passed in, %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly-created `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The string representation of a path</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="append_index" c:identifier="gtk_tree_path_append_index">
<doc xml:space="preserve">Appends a new index to a path.
As a result, the depth of the path is increased.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="compare" c:identifier="gtk_tree_path_compare">
<doc xml:space="preserve">Compares two paths.
If @a appears before @b in a tree, then -1 is returned.
If @b appears before @a, then 1 is returned.
If the two nodes are equal, then 0 is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the relative positions of @a and @b</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="a" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="const GtkTreePath*"/>
</instance-parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` to compare with</doc>
<type name="TreePath" c:type="const GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="copy" c:identifier="gtk_tree_path_copy">
<doc xml:space="preserve">Creates a new `GtkTreePath` as a copy of @path.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="const GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="down" c:identifier="gtk_tree_path_down">
<doc xml:space="preserve">Moves @path to point to the first child of the current path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_tree_path_free">
<doc xml:space="preserve">Frees @path. If @path is %NULL, it simply returns.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_depth" c:identifier="gtk_tree_path_get_depth">
<doc xml:space="preserve">Returns the current depth of @path.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The depth of @path</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_indices" c:identifier="gtk_tree_path_get_indices" shadowed-by="get_indices_with_depth" introspectable="0">
<doc xml:space="preserve">Returns the current indices of @path.
This is an array of integers, each representing a node in a tree.
This value should not be freed.
The length of the array can be obtained with gtk_tree_path_get_depth().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current indices</doc>
<type name="gint" c:type="int*"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_indices_with_depth" c:identifier="gtk_tree_path_get_indices_with_depth" shadows="get_indices">
<doc xml:space="preserve">Returns the current indices of @path.
This is an array of integers, each representing a node in a tree.
It also returns the number of elements in the array.
The array should not be freed.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current
indices</doc>
<array length="0" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
<parameter name="depth" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for number of elements
returned in the integer array</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="is_ancestor" c:identifier="gtk_tree_path_is_ancestor">
<doc xml:space="preserve">Returns %TRUE if @descendant is a descendant of @path.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @descendant is contained inside @path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
<parameter name="descendant" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="is_descendant" c:identifier="gtk_tree_path_is_descendant">
<doc xml:space="preserve">Returns %TRUE if @path is a descendant of @ancestor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @ancestor contains @path somewhere below it</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
<parameter name="ancestor" transfer-ownership="none">
<doc xml:space="preserve">another `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="next" c:identifier="gtk_tree_path_next">
<doc xml:space="preserve">Moves the @path to point to the next node at the current depth.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="prepend_index" c:identifier="gtk_tree_path_prepend_index">
<doc xml:space="preserve">Prepends a new index to a path.
As a result, the depth of the path is increased.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">the index</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="prev" c:identifier="gtk_tree_path_prev">
<doc xml:space="preserve">Moves the @path to point to the previous node at the
current depth, if it exists.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @path has a previous node, and
the move was made</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="to_string" c:identifier="gtk_tree_path_to_string">
<doc xml:space="preserve">Generates a string representation of the path.
This string is a &#x201C;:&#x201D; separated list of numbers.
For example, &#x201C;4:10:0:3&#x201D; would be an acceptable
return value for this string. If the path has
depth 0, %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">A newly-allocated string</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
<method name="up" c:identifier="gtk_tree_path_up">
<doc xml:space="preserve">Moves the @path to point to its parent node, if it has a parent.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @path has a parent, and the move was made</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</instance-parameter>
</parameters>
</method>
</record>
<glib:boxed glib:name="TreeRowData" c:symbol-prefix="tree_row_data" glib:type-name="GtkTreeRowData" glib:get-type="gtk_tree_row_data_get_type">
</glib:boxed>
<record name="TreeRowReference" c:type="GtkTreeRowReference" glib:type-name="GtkTreeRowReference" glib:get-type="gtk_tree_row_reference_get_type" c:symbol-prefix="tree_row_reference">
<doc xml:space="preserve">A GtkTreeRowReference tracks model changes so that it always refers to the
same row (a `GtkTreePath` refers to a position, not a fixed row). Create a
new GtkTreeRowReference with gtk_tree_row_reference_new().</doc>
<constructor name="new" c:identifier="gtk_tree_row_reference_new">
<doc xml:space="preserve">Creates a row reference based on @path.
This reference will keep pointing to the node pointed to
by @path, so long as it exists. Any changes that occur on @model are
propagated, and the path is updated appropriately. If
@path isn&#x2019;t a valid path in @model, then %NULL is returned.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly allocated `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreePath` to monitor</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_proxy" c:identifier="gtk_tree_row_reference_new_proxy">
<doc xml:space="preserve">You do not need to use this function.
Creates a row reference based on @path.
This reference will keep pointing to the node pointed to
by @path, so long as it exists. If @path isn&#x2019;t a valid
path in @model, then %NULL is returned. However, unlike
references created with gtk_tree_row_reference_new(), it
does not listen to the model for changes. The creator of
the row reference must do this explicitly using
gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(),
gtk_tree_row_reference_reordered().
These functions must be called exactly once per proxy when the
corresponding signal on the model is emitted. This single call
updates all row references for that proxy. Since built-in GTK
objects like `GtkTreeView` already use this mechanism internally,
using them as the proxy object will produce unpredictable results.
Further more, passing the same object as @model and @proxy
doesn&#x2019;t work for reasons of internal implementation.
This type of row reference is primarily meant by structures that
need to carefully monitor exactly when a row reference updates
itself, and is not generally needed by most applications.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly allocated `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a proxy `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a valid `GtkTreePath` to monitor</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</constructor>
<method name="copy" c:identifier="gtk_tree_row_reference_copy">
<doc xml:space="preserve">Copies a `GtkTreeRowReference`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a copy of @reference</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</return-value>
<parameters>
<instance-parameter name="reference" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</instance-parameter>
</parameters>
</method>
<method name="free" c:identifier="gtk_tree_row_reference_free">
<doc xml:space="preserve">Free&#x2019;s @reference. @reference may be %NULL</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="reference" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_tree_row_reference_get_model">
<doc xml:space="preserve">Returns the model that the row reference is monitoring.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the model</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="reference" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_path" c:identifier="gtk_tree_row_reference_get_path">
<doc xml:space="preserve">Returns a path that the row reference currently points to,
or %NULL if the path pointed to is no longer valid.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a current path</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</return-value>
<parameters>
<instance-parameter name="reference" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</instance-parameter>
</parameters>
</method>
<method name="valid" c:identifier="gtk_tree_row_reference_valid">
<doc xml:space="preserve">Returns %TRUE if the @reference is non-%NULL and refers to
a current valid path.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @reference points to a valid path</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="reference" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeRowReference`</doc>
<type name="TreeRowReference" c:type="GtkTreeRowReference*"/>
</instance-parameter>
</parameters>
</method>
<function name="deleted" c:identifier="gtk_tree_row_reference_deleted">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-deleted signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the path position that was deleted</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</function>
<function name="inserted" c:identifier="gtk_tree_row_reference_inserted">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-inserted signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the row position that was inserted</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</function>
<function name="reordered" c:identifier="gtk_tree_row_reference_reordered" introspectable="0">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::rows-reordered signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the parent path of the reordered signal</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the iter pointing to the parent of the reordered</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">the new order of rows</doc>
<array zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
</parameters>
</function>
</record>
<class name="TreeSelection" c:symbol-prefix="tree_selection" c:type="GtkTreeSelection" parent="GObject.Object" glib:type-name="GtkTreeSelection" glib:get-type="gtk_tree_selection_get_type">
<doc xml:space="preserve">The selection object for GtkTreeView
The `GtkTreeSelection` object is a helper object to manage the selection
for a `GtkTreeView` widget. The `GtkTreeSelection` object is
automatically created when a new `GtkTreeView` widget is created, and
cannot exist independently of this widget. The primary reason the
`GtkTreeSelection` objects exists is for cleanliness of code and API.
That is, there is no conceptual reason all these functions could not be
methods on the `GtkTreeView` widget instead of a separate function.
The `GtkTreeSelection` object is gotten from a `GtkTreeView` by calling
gtk_tree_view_get_selection(). It can be manipulated to check the
selection status of the tree, as well as select and deselect individual
rows. Selection is done completely view side. As a result, multiple
views of the same model can have completely different selections.
Additionally, you cannot change the selection of a row on the model that
is not currently displayed by the view without expanding its parents
first.
One of the important things to remember when monitoring the selection of
a view is that the `GtkTreeSelection`::changed signal is mostly a hint.
That is, it may only emit one signal when a range of rows is selected.
Additionally, it may on occasion emit a `GtkTreeSelection`::changed signal
when nothing has happened (mostly as a result of programmers calling
select_row on an already selected row).</doc>
<method name="count_selected_rows" c:identifier="gtk_tree_selection_count_selected_rows">
<doc xml:space="preserve">Returns the number of rows that have been selected in @tree.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of rows selected.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mode" c:identifier="gtk_tree_selection_get_mode" glib:get-property="mode">
<doc xml:space="preserve">Gets the selection mode for @selection. See
gtk_tree_selection_set_mode().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current selection mode</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeSelection`</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_select_function" c:identifier="gtk_tree_selection_get_select_function" introspectable="0">
<doc xml:space="preserve">Returns the current selection function.</doc>
<return-value>
<doc xml:space="preserve">The function.</doc>
<type name="TreeSelectionFunc" c:type="GtkTreeSelectionFunc"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selected" c:identifier="gtk_tree_selection_get_selected">
<doc xml:space="preserve">Sets @iter to the currently selected node if @selection is set to
%GTK_SELECTION_SINGLE or %GTK_SELECTION_BROWSE. @iter may be NULL if you
just want to test if @selection has any selected nodes. @model is filled
with the current model as a convenience. This function will not work if you
use @selection is %GTK_SELECTION_MULTIPLE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">TRUE, if there is a selected node.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="model" direction="out" caller-allocates="0" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to set to the `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel**"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_selected_rows" c:identifier="gtk_tree_selection_get_selected_rows">
<doc xml:space="preserve">Creates a list of path of all selected rows. Additionally, if you are
planning on modifying the model after calling this function, you may
want to convert the returned list into a list of `GtkTreeRowReference`s.
To do this, you can use gtk_tree_row_reference_new().
To free the return value, use:
|[&lt;!-- language="C" --&gt;
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
]|</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">A `GList` containing a `GtkTreePath` for each selected row.</doc>
<type name="GLib.List" c:type="GList*">
<type name="TreePath"/>
</type>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="model" direction="out" caller-allocates="0" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to set to the `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel**"/>
</parameter>
</parameters>
</method>
<method name="get_tree_view" c:identifier="gtk_tree_selection_get_tree_view">
<doc xml:space="preserve">Returns the tree view associated with @selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_user_data" c:identifier="gtk_tree_selection_get_user_data" introspectable="0">
<doc xml:space="preserve">Returns the user data for the selection function.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The user data.</doc>
<type name="gpointer" c:type="gpointer"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="iter_is_selected" c:identifier="gtk_tree_selection_iter_is_selected">
<doc xml:space="preserve">Returns %TRUE if the row at @iter is currently selected.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter is selected</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="path_is_selected" c:identifier="gtk_tree_selection_path_is_selected">
<doc xml:space="preserve">Returns %TRUE if the row pointed to by @path is currently selected. If @path
does not point to a valid location, %FALSE is returned</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @path is selected.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to check selection on.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="select_all" c:identifier="gtk_tree_selection_select_all">
<doc xml:space="preserve">Selects all the nodes. @selection must be set to %GTK_SELECTION_MULTIPLE
mode.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="select_iter" c:identifier="gtk_tree_selection_select_iter">
<doc xml:space="preserve">Selects the specified iterator.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeIter` to be selected.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="select_path" c:identifier="gtk_tree_selection_select_path">
<doc xml:space="preserve">Select the row at @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be selected.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="select_range" c:identifier="gtk_tree_selection_select_range">
<doc xml:space="preserve">Selects a range of nodes, determined by @start_path and @end_path inclusive.
@selection must be set to %GTK_SELECTION_MULTIPLE mode.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="start_path" transfer-ownership="none">
<doc xml:space="preserve">The initial node of the range.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="end_path" transfer-ownership="none">
<doc xml:space="preserve">The final node of the range.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="selected_foreach" c:identifier="gtk_tree_selection_selected_foreach">
<doc xml:space="preserve">Calls a function for each selected node. Note that you cannot modify
the tree or selection from within this function. As a result,
gtk_tree_selection_get_selected_rows() might be more useful.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">The function to call for each selected node.</doc>
<type name="TreeSelectionForeachFunc" c:type="GtkTreeSelectionForeachFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to the function.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="set_mode" c:identifier="gtk_tree_selection_set_mode" glib:set-property="mode">
<doc xml:space="preserve">Sets the selection mode of the @selection. If the previous type was
%GTK_SELECTION_MULTIPLE, then the anchor is kept selected, if it was
previously selected.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The selection mode</doc>
<type name="SelectionMode" c:type="GtkSelectionMode"/>
</parameter>
</parameters>
</method>
<method name="set_select_function" c:identifier="gtk_tree_selection_set_select_function">
<doc xml:space="preserve">Sets the selection function.
If set, this function is called before any node is selected or unselected,
giving some control over which nodes are selected. The select function
should return %TRUE if the state of the node may be toggled, and %FALSE
if the state of the node should be left unchanged.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">The selection function. May be %NULL</doc>
<type name="TreeSelectionFunc" c:type="GtkTreeSelectionFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The selection function&#x2019;s data. May be %NULL</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">The destroy function for user data. May be %NULL</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="unselect_all" c:identifier="gtk_tree_selection_unselect_all">
<doc xml:space="preserve">Unselects all the nodes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
</parameters>
</method>
<method name="unselect_iter" c:identifier="gtk_tree_selection_unselect_iter">
<doc xml:space="preserve">Unselects the specified iterator.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeIter` to be unselected.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="unselect_path" c:identifier="gtk_tree_selection_unselect_path">
<doc xml:space="preserve">Unselects the row at @path.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be unselected.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="unselect_range" c:identifier="gtk_tree_selection_unselect_range">
<doc xml:space="preserve">Unselects a range of nodes, determined by @start_path and @end_path
inclusive.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</instance-parameter>
<parameter name="start_path" transfer-ownership="none">
<doc xml:space="preserve">The initial node of the range.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="end_path" transfer-ownership="none">
<doc xml:space="preserve">The initial node of the range.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<property name="mode" writable="1" transfer-ownership="none" setter="set_mode" getter="get_mode">
<doc xml:space="preserve">Selection mode.
See gtk_tree_selection_set_mode() for more information on this property.</doc>
<type name="SelectionMode"/>
</property>
<glib:signal name="changed" when="first">
<doc xml:space="preserve">Emitted whenever the selection has (possibly) changed. Please note that
this signal is mostly a hint. It may only be emitted once when a range
of rows are selected, and it may occasionally be emitted when nothing
has happened.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="TreeSelectionForeachFunc" c:type="GtkTreeSelectionForeachFunc">
<doc xml:space="preserve">A function used by gtk_tree_selection_selected_foreach() to map all
selected rows. It will be called on every selected row in the view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeModel` being viewed</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` of a selected row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter` pointing to a selected row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="TreeSelectionFunc" c:type="GtkTreeSelectionFunc">
<doc xml:space="preserve">A function used by gtk_tree_selection_set_select_function() to filter
whether or not a row may be selected. It is called whenever a row's
state might change.
A return value of %TRUE indicates to @selection that it is okay to
change the selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the selection state of the row can be toggled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="selection" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection`</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</parameter>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeModel` being viewed</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` of the row in question</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="path_currently_selected" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the path is currently selected</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<interface name="TreeSortable" c:symbol-prefix="tree_sortable" c:type="GtkTreeSortable" glib:type-name="GtkTreeSortable" glib:get-type="gtk_tree_sortable_get_type" glib:type-struct="TreeSortableIface">
<doc xml:space="preserve">The interface for sortable models used by GtkTreeView
`GtkTreeSortable` is an interface to be implemented by tree models which
support sorting. The `GtkTreeView` uses the methods provided by this interface
to sort the model.</doc>
<prerequisite name="TreeModel"/>
<virtual-method name="get_sort_column_id" invoker="get_sort_column_id">
<doc xml:space="preserve">Fills in @sort_column_id and @order with the current sort column and the
order. It returns %TRUE unless the @sort_column_id is
%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
%GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the sort column is not one of the special sort
column ids.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The sort column id to be filled in</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="order" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The `GtkSortType` to be filled in</doc>
<type name="SortType" c:type="GtkSortType*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="has_default_sort_func" invoker="has_default_sort_func">
<doc xml:space="preserve">Returns %TRUE if the model has a default sort function. This is used
primarily by GtkTreeViewColumns in order to determine if a model can
go back to the default state, or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the model has a default sort function</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_default_sort_func" invoker="set_default_sort_func">
<doc xml:space="preserve">Sets the default comparison function used when sorting to be @sort_func.
If the current sort column id of @sortable is
%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
this function.
If @sort_func is %NULL, then there will be no default comparison function.
This means that once the model has been sorted, it can&#x2019;t go back to the
default state. In this case, when the current sort column id of @sortable
is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="1">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_sort_column_id" invoker="set_sort_column_id">
<doc xml:space="preserve">Sets the current sort column to be @sort_column_id. The @sortable will
resort itself to reflect this change, after emitting a
`GtkTreeSortable::sort-column-changed` signal. @sort_column_id may either be
a regular column id, or one of the following special values:
- %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function
will be used, if it is set
- %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="order" transfer-ownership="none">
<doc xml:space="preserve">The sort order of the column</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="set_sort_func" invoker="set_sort_func">
<doc xml:space="preserve">Sets the comparison function used when sorting to be @sort_func. If the
current sort column id of @sortable is the same as @sort_column_id, then
the model will sort using this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set the function for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="sort_column_changed" invoker="sort_column_changed">
<doc xml:space="preserve">Emits a `GtkTreeSortable::sort-column-changed` signal on @sortable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="get_sort_column_id" c:identifier="gtk_tree_sortable_get_sort_column_id">
<doc xml:space="preserve">Fills in @sort_column_id and @order with the current sort column and the
order. It returns %TRUE unless the @sort_column_id is
%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
%GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the sort column is not one of the special sort
column ids.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The sort column id to be filled in</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="order" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The `GtkSortType` to be filled in</doc>
<type name="SortType" c:type="GtkSortType*"/>
</parameter>
</parameters>
</method>
<method name="has_default_sort_func" c:identifier="gtk_tree_sortable_has_default_sort_func">
<doc xml:space="preserve">Returns %TRUE if the model has a default sort function. This is used
primarily by GtkTreeViewColumns in order to determine if a model can
go back to the default state, or not.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the model has a default sort function</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_default_sort_func" c:identifier="gtk_tree_sortable_set_default_sort_func">
<doc xml:space="preserve">Sets the default comparison function used when sorting to be @sort_func.
If the current sort column id of @sortable is
%GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using
this function.
If @sort_func is %NULL, then there will be no default comparison function.
This means that once the model has been sorted, it can&#x2019;t go back to the
default state. In this case, when the current sort column id of @sortable
is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_sort_column_id" c:identifier="gtk_tree_sortable_set_sort_column_id">
<doc xml:space="preserve">Sets the current sort column to be @sort_column_id. The @sortable will
resort itself to reflect this change, after emitting a
`GtkTreeSortable::sort-column-changed` signal. @sort_column_id may either be
a regular column id, or one of the following special values:
- %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: the default sort function
will be used, if it is set
- %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: no sorting will occur</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="order" transfer-ownership="none">
<doc xml:space="preserve">The sort order of the column</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</method>
<method name="set_sort_func" c:identifier="gtk_tree_sortable_set_sort_func">
<doc xml:space="preserve">Sets the comparison function used when sorting to be @sort_func. If the
current sort column id of @sortable is the same as @sort_column_id, then
the model will sort using this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set the function for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="sort_column_changed" c:identifier="gtk_tree_sortable_sort_column_changed">
<doc xml:space="preserve">Emits a `GtkTreeSortable::sort-column-changed` signal on @sortable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</instance-parameter>
</parameters>
</method>
<glib:signal name="sort-column-changed" when="last">
<doc xml:space="preserve">The ::sort-column-changed signal is emitted when the sort column
or sort order of @sortable is changed. The signal is emitted before
the contents of @sortable are resorted.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</interface>
<record name="TreeSortableIface" c:type="GtkTreeSortableIface" glib:is-gtype-struct-for="TreeSortable">
<field name="g_iface" readable="0" private="1">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="sort_column_changed">
<callback name="sort_column_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_sort_column_id">
<callback name="get_sort_column_id">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the sort column is not one of the special sort
column ids.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
<parameter name="sort_column_id" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The sort column id to be filled in</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="order" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">The `GtkSortType` to be filled in</doc>
<type name="SortType" c:type="GtkSortType*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_sort_column_id">
<callback name="set_sort_column_id">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="order" transfer-ownership="none">
<doc xml:space="preserve">The sort order of the column</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_sort_func">
<callback name="set_sort_func">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">the sort column id to set the function for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="3" destroy="4">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="3">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_default_sort_func">
<callback name="set_default_sort_func">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
<parameter name="sort_func" transfer-ownership="none" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">The comparison function</doc>
<type name="TreeIterCompareFunc" c:type="GtkTreeIterCompareFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">User data to pass to @sort_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier of @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</callback>
</field>
<field name="has_default_sort_func">
<callback name="has_default_sort_func">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the model has a default sort function</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="sortable" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSortable`</doc>
<type name="TreeSortable" c:type="GtkTreeSortable*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="TreeStore" c:symbol-prefix="tree_store" c:type="GtkTreeStore" parent="GObject.Object" glib:type-name="GtkTreeStore" glib:get-type="gtk_tree_store_get_type" glib:type-struct="TreeStoreClass">
<doc xml:space="preserve">A tree-like data structure that can be used with the GtkTreeView
The `GtkTreeStore` object is a list model for use with a `GtkTreeView`
widget. It implements the `GtkTreeModel` interface, and consequently,
can use all of the methods available there. It also implements the
`GtkTreeSortable` interface so it can be sorted by the view. Finally,
it also implements the tree
[drag and drop][gtk3-GtkTreeView-drag-and-drop]
interfaces.
# GtkTreeStore as GtkBuildable
The GtkTreeStore implementation of the `GtkBuildable` interface allows
to specify the model columns with a &lt;columns&gt; element that may contain
multiple &lt;column&gt; elements, each specifying one model column. The &#x201C;type&#x201D;
attribute specifies the data type for the column.
An example of a UI Definition fragment for a tree store:
|[
&lt;object class="GtkTreeStore"&gt;
&lt;columns&gt;
&lt;column type="gchararray"/&gt;
&lt;column type="gchararray"/&gt;
&lt;column type="gint"/&gt;
&lt;/columns&gt;
&lt;/object&gt;
]|</doc>
<implements name="Buildable"/>
<implements name="TreeDragDest"/>
<implements name="TreeDragSource"/>
<implements name="TreeModel"/>
<implements name="TreeSortable"/>
<constructor name="new" c:identifier="gtk_tree_store_new" shadowed-by="newv" introspectable="0">
<doc xml:space="preserve">Creates a new tree store as with @n_columns columns each of the types passed
in. Note that only types derived from standard GObject fundamental types
are supported.
As an example,
```
gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_TEXTURE);
```
will create a new `GtkTreeStore` with three columns, of type
`int`, `gchararray`, and `GdkTexture` respectively.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</return-value>
<parameters>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">number of columns in the tree store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">all `GType` types for the columns, from first to last</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<constructor name="newv" c:identifier="gtk_tree_store_newv" shadows="new">
<doc xml:space="preserve">Non vararg creation function. Used primarily by language bindings.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</return-value>
<parameters>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">number of columns in the tree store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="types" transfer-ownership="none">
<doc xml:space="preserve">an array of `GType` types for the columns, from first to last</doc>
<array length="0" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="append" c:identifier="gtk_tree_store_append">
<doc xml:space="preserve">Appends a new row to @tree_store. If @parent is non-%NULL, then it will append the
new row after the last child of @parent, otherwise it will append a row to
the top level. @iter will be changed to point to this new row. The row will
be empty after this function is called. To fill in values, you need to call
gtk_tree_store_set() or gtk_tree_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the appended row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="clear" c:identifier="gtk_tree_store_clear">
<doc xml:space="preserve">Removes all rows from @tree_store</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_tree_store_insert">
<doc xml:space="preserve">Creates a new row at @position. If parent is non-%NULL, then the row will be
made a child of @parent. Otherwise, the row will be created at the toplevel.
If @position is -1 or is larger than the number of rows at that level, then
the new row will be inserted to the end of the list. @iter will be changed
to point to this new row. The row will be empty after this function is
called. To fill in values, you need to call gtk_tree_store_set() or
gtk_tree_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 for last</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_after" c:identifier="gtk_tree_store_insert_after">
<doc xml:space="preserve">Inserts a new row after @sibling. If @sibling is %NULL, then the row will be
prepended to @parent &#x2019;s children. If @parent and @sibling are %NULL, then
the row will be prepended to the toplevel. If both @sibling and @parent are
set, then @parent must be the parent of @sibling. When @sibling is set,
@parent is optional.
@iter will be changed to point to this new row. The row will be empty after
this function is called. To fill in values, you need to call
gtk_tree_store_set() or gtk_tree_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="insert_before" c:identifier="gtk_tree_store_insert_before">
<doc xml:space="preserve">Inserts a new row before @sibling. If @sibling is %NULL, then the row will
be appended to @parent &#x2019;s children. If @parent and @sibling are %NULL, then
the row will be appended to the toplevel. If both @sibling and @parent are
set, then @parent must be the parent of @sibling. When @sibling is set,
@parent is optional.
@iter will be changed to point to this new row. The row will be empty after
this function is called. To fill in values, you need to call
gtk_tree_store_set() or gtk_tree_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="insert_with_values" c:identifier="gtk_tree_store_insert_with_values" shadowed-by="insert_with_valuesv" introspectable="0">
<doc xml:space="preserve">Creates a new row at @position. @iter will be changed to point to this
new row. If @position is -1, or larger than the number of rows on the list, then
the new row will be appended to the list. The row will be filled with
the values given to this function.
Calling
`gtk_tree_store_insert_with_values (tree_store, iter, position, ...)`
has the same effect as calling
|[&lt;!-- language="C" --&gt;
gtk_tree_store_insert (tree_store, iter, position);
gtk_tree_store_set (tree_store, iter, ...);
]|
with the different that the former will only emit a row_inserted signal,
while the latter will emit row_inserted, row_changed and if the tree store
is sorted, rows_reordered. Since emitting the rows_reordered signal
repeatedly can affect the performance of the program,
gtk_tree_store_insert_with_values() should generally be preferred when
inserting rows in a sorted tree store.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">An unset `GtkTreeIter` to set the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 to append after existing rows</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">pairs of column number and value, terminated with -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="insert_with_valuesv" c:identifier="gtk_tree_store_insert_with_valuesv" shadows="insert_with_values">
<doc xml:space="preserve">A variant of gtk_tree_store_insert_with_values() which takes
the columns and values as two arrays, instead of varargs. This
function is mainly intended for language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">An unset `GtkTreeIter` to set the new row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">position to insert the new row, or -1 for last</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="columns" transfer-ownership="none">
<doc xml:space="preserve">an array of column numbers</doc>
<array length="5" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of GValues</doc>
<array length="5" zero-terminated="0" c:type="GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
<parameter name="n_values" transfer-ownership="none">
<doc xml:space="preserve">the length of the @columns and @values arrays</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="is_ancestor" c:identifier="gtk_tree_store_is_ancestor">
<doc xml:space="preserve">Returns %TRUE if @iter is an ancestor of @descendant. That is, @iter is the
parent (or grandparent or great-grandparent) of @descendant.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @iter is an ancestor of @descendant</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="descendant" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_depth" c:identifier="gtk_tree_store_iter_depth">
<doc xml:space="preserve">Returns the depth of @iter. This will be 0 for anything on the root level, 1
for anything down a level, etc.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The depth of @iter</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="iter_is_valid" c:identifier="gtk_tree_store_iter_is_valid">
<doc xml:space="preserve">Checks if the given iter is a valid iter for this `GtkTreeStore`.
This function is slow. Only use it for debugging and/or testing
purposes.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the iter is valid, %FALSE if the iter is invalid.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">a tree store</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the iterator to check</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="move_after" c:identifier="gtk_tree_store_move_after">
<doc xml:space="preserve">Moves @iter in @tree_store to the position after @position. @iter and
@position should be in the same level. Note that this function only
works with unsorted stores. If @position is %NULL, @iter will be moved
to the start of the level.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeIter`.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="move_before" c:identifier="gtk_tree_store_move_before">
<doc xml:space="preserve">Moves @iter in @tree_store to the position before @position. @iter and
@position should be in the same level. Note that this function only
works with unsorted stores. If @position is %NULL, @iter will be
moved to the end of the level.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="position" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="prepend" c:identifier="gtk_tree_store_prepend">
<doc xml:space="preserve">Prepends a new row to @tree_store. If @parent is non-%NULL, then it will prepend
the new row before the first child of @parent, otherwise it will prepend a row
to the top level. @iter will be changed to point to this new row. The row
will be empty after this function is called. To fill in values, you need to
call gtk_tree_store_set() or gtk_tree_store_set_value().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">An unset `GtkTreeIter` to set to the prepended row</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_tree_store_remove">
<doc xml:space="preserve">Removes @iter from @tree_store. After being removed, @iter is set to the
next valid row at that level, or invalidated if it previously pointed to the
last one.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @iter is still valid, %FALSE if not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="reorder" c:identifier="gtk_tree_store_reorder" introspectable="0">
<doc xml:space="preserve">Reorders the children of @parent in @tree_store to follow the order
indicated by @new_order. Note that this function only works with
unsorted stores.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">an array of integers mapping the new position of each child
to its old position before the re-ordering,
i.e. @new_order`[newpos] = oldpos`.</doc>
<array zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
</parameters>
</method>
<method name="set" c:identifier="gtk_tree_store_set" shadowed-by="set_valuesv" introspectable="0">
<doc xml:space="preserve">Sets the value of one or more cells in the row referenced by @iter.
The variable argument list should contain integer column numbers,
each column number followed by the value to be set.
The list is terminated by a -1. For example, to set column 0 with type
%G_TYPE_STRING to &#x201C;Foo&#x201D;, you would write
`gtk_tree_store_set (store, iter, 0, "Foo", -1)`.
The value will be referenced by the store if it is a %G_TYPE_OBJECT, and it
will be copied if it is a %G_TYPE_STRING or %G_TYPE_BOXED.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">pairs of column number and value, terminated with -1</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="set_column_types" c:identifier="gtk_tree_store_set_column_types">
<doc xml:space="preserve">This function is meant primarily for `GObjects` that inherit from
`GtkTreeStore`, and should only be used when constructing a new
`GtkTreeStore`. It will not function after a row has been added,
or a method on the `GtkTreeModel` interface is called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="n_columns" transfer-ownership="none">
<doc xml:space="preserve">Number of columns for the tree store</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="types" transfer-ownership="none">
<doc xml:space="preserve">An array of `GType` types, one for each column</doc>
<array length="0" zero-terminated="0" c:type="GType*">
<type name="GType" c:type="GType"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_valist" c:identifier="gtk_tree_store_set_valist" introspectable="0">
<doc xml:space="preserve">See gtk_tree_store_set(); this version takes a va_list for
use by language bindings.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="var_args" transfer-ownership="none">
<doc xml:space="preserve">va_list of column/value pairs</doc>
<type name="va_list" c:type="va_list"/>
</parameter>
</parameters>
</method>
<method name="set_value" c:identifier="gtk_tree_store_set_value">
<doc xml:space="preserve">Sets the data in the cell specified by @iter and @column.
The type of @value must be convertible to the type of the
column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">column number to modify</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">new value for the cell</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</method>
<method name="set_valuesv" c:identifier="gtk_tree_store_set_valuesv" shadows="set">
<doc xml:space="preserve">A variant of gtk_tree_store_set_valist() which takes
the columns and values as two arrays, instead of varargs. This
function is mainly intended for language bindings or in case
the number of columns to change is not known until run-time.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">A valid `GtkTreeIter` for the row being modified</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="columns" transfer-ownership="none">
<doc xml:space="preserve">an array of column numbers</doc>
<array length="3" zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
<parameter name="values" transfer-ownership="none">
<doc xml:space="preserve">an array of GValues</doc>
<array length="3" zero-terminated="0" c:type="GValue*">
<type name="GObject.Value" c:type="GValue"/>
</array>
</parameter>
<parameter name="n_values" transfer-ownership="none">
<doc xml:space="preserve">the length of the @columns and @values arrays</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="swap" c:identifier="gtk_tree_store_swap">
<doc xml:space="preserve">Swaps @a and @b in the same level of @tree_store. Note that this function
only works with unsorted stores.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_store" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeStore`.</doc>
<type name="TreeStore" c:type="GtkTreeStore*"/>
</instance-parameter>
<parameter name="a" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeIter`.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">Another `GtkTreeIter`.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<field name="parent">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv">
<type name="TreeStorePrivate" c:type="GtkTreeStorePrivate*"/>
</field>
</class>
<record name="TreeStoreClass" c:type="GtkTreeStoreClass" glib:is-gtype-struct-for="TreeStore">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<record name="TreeStorePrivate" c:type="GtkTreeStorePrivate" disguised="1"/>
<class name="TreeView" c:symbol-prefix="tree_view" c:type="GtkTreeView" parent="Widget" glib:type-name="GtkTreeView" glib:get-type="gtk_tree_view_get_type" glib:type-struct="TreeViewClass">
<doc xml:space="preserve">A widget for displaying both trees and lists
Widget that displays any object that implements the [iface@Gtk.TreeModel] interface.
Please refer to the [tree widget conceptual overview](section-tree-widget.html)
for an overview of all the objects and data types related to the tree
widget and how they work together.
## Coordinate systems in GtkTreeView API
Several different coordinate systems are exposed in the `GtkTreeView` API.
These are:
![](tree-view-coordinates.png)
- Widget coordinates: Coordinates relative to the widget (usually `widget-&gt;window`).
- Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
- Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These
coordinates start at (0, 0) for row 0 of the tree.
Several functions are available for converting between the different
coordinate systems. The most common translations are between widget and bin
window coordinates and between bin window and tree coordinates. For the
former you can use [method@Gtk.TreeView.convert_widget_to_bin_window_coords]
(and vice versa), for the latter [method@Gtk.TreeView.convert_bin_window_to_tree_coords]
(and vice versa).
## `GtkTreeView` as `GtkBuildable`
The `GtkTreeView` implementation of the `GtkBuildable` interface accepts
[class@Gtk.TreeViewColumn] objects as `&lt;child&gt;` elements and exposes the
internal [class@Gtk.TreeSelection] in UI definitions.
An example of a UI definition fragment with `GtkTreeView`:
```xml
&lt;object class="GtkTreeView" id="treeview"&gt;
&lt;property name="model"&gt;liststore1&lt;/property&gt;
&lt;child&gt;
&lt;object class="GtkTreeViewColumn" id="test-column"&gt;
&lt;property name="title"&gt;Test&lt;/property&gt;
&lt;child&gt;
&lt;object class="GtkCellRendererText" id="test-renderer"/&gt;
&lt;attributes&gt;
&lt;attribute name="text"&gt;1&lt;/attribute&gt;
&lt;/attributes&gt;
&lt;/child&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child internal-child="selection"&gt;
&lt;object class="GtkTreeSelection" id="selection"&gt;
&lt;signal name="changed" handler="on_treeview_selection_changed"/&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
## CSS nodes
```
treeview.view
&#x251C;&#x2500;&#x2500; header
&#x2502; &#x251C;&#x2500;&#x2500; button
&#x2502; &#x2502; &#x2570;&#x2500;&#x2500; [sort-indicator]
&#x250A; &#x250A;
&#x2502; &#x2570;&#x2500;&#x2500; button
&#x2502; &#x2570;&#x2500;&#x2500; [sort-indicator]
&#x2502;
&#x251C;&#x2500;&#x2500; [rubberband]
&#x2570;&#x2500;&#x2500; [dndtarget]
```
`GtkTreeView` has a main CSS node with name `treeview` and style class `.view`.
It has a subnode with name `header`, which is the parent for all the column
header widgets' CSS nodes.
Each column header consists of a `button`, which among other content, has a
child with name `sort-indicator`, which carries the `.ascending` or `.descending`
style classes when the column header should show a sort indicator. The CSS
is expected to provide a suitable image using the `-gtk-icon-source` property.
For rubberband selection, a subnode with name `rubberband` is used.
For the drop target location during DND, a subnode with name `dndtarget` is used.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_tree_view_new">
<doc xml:space="preserve">Creates a new `GtkTreeView` widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkTreeView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_with_model" c:identifier="gtk_tree_view_new_with_model">
<doc xml:space="preserve">Creates a new `GtkTreeView` widget with the model initialized to @model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkTreeView` widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the model.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</constructor>
<virtual-method name="columns_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="cursor_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="expand_collapse_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="logical" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="open_all" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="move_cursor">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="step" transfer-ownership="none">
<type name="MovementStep" c:type="GtkMovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="modify" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_activated" invoker="row_activated">
<doc xml:space="preserve">Activates the cell determined by @path and @column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be activated.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be activated.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_collapsed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="row_expanded">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="select_all">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="select_cursor_parent">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="select_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="start_editing" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="start_interactive_search">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="test_collapse_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="test_expand_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="toggle_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="unselect_all">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="append_column" c:identifier="gtk_tree_view_append_column">
<doc xml:space="preserve">Appends @column to the list of columns. If @tree_view has &#x201C;fixed_height&#x201D;
mode enabled, then @column must have its &#x201C;sizing&#x201D; property set to be
GTK_TREE_VIEW_COLUMN_FIXED.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of columns in @tree_view after appending.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn` to add.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="collapse_all" c:identifier="gtk_tree_view_collapse_all">
<doc xml:space="preserve">Recursively collapses all visible, expanded nodes in @tree_view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="collapse_row" c:identifier="gtk_tree_view_collapse_row">
<doc xml:space="preserve">Collapses a row (hides its child rows, if they exist).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row was collapsed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">path to a row in the @tree_view</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="columns_autosize" c:identifier="gtk_tree_view_columns_autosize">
<doc xml:space="preserve">Resizes all columns to their optimal width. Only works after the
treeview has been realized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="convert_bin_window_to_tree_coords" c:identifier="gtk_tree_view_convert_bin_window_to_tree_coords">
<doc xml:space="preserve">Converts bin_window coordinates to coordinates for the
tree (the full scrollable area of the tree).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="bx" transfer-ownership="none">
<doc xml:space="preserve">X coordinate relative to bin_window</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="by" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate relative to bin_window</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="tx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for tree X coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="ty" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for tree Y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="convert_bin_window_to_widget_coords" c:identifier="gtk_tree_view_convert_bin_window_to_widget_coords">
<doc xml:space="preserve">Converts bin_window coordinates to widget relative coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="bx" transfer-ownership="none">
<doc xml:space="preserve">bin_window X coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="by" transfer-ownership="none">
<doc xml:space="preserve">bin_window Y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="wx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for widget X coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="wy" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for widget Y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="convert_tree_to_bin_window_coords" c:identifier="gtk_tree_view_convert_tree_to_bin_window_coords">
<doc xml:space="preserve">Converts tree coordinates (coordinates in full scrollable area of the tree)
to bin_window coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="tx" transfer-ownership="none">
<doc xml:space="preserve">tree X coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="ty" transfer-ownership="none">
<doc xml:space="preserve">tree Y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="bx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for X coordinate relative to bin_window</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="by" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for Y coordinate relative to bin_window</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="convert_tree_to_widget_coords" c:identifier="gtk_tree_view_convert_tree_to_widget_coords">
<doc xml:space="preserve">Converts tree coordinates (coordinates in full scrollable area of the tree)
to widget coordinates.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="tx" transfer-ownership="none">
<doc xml:space="preserve">X coordinate relative to the tree</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="ty" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate relative to the tree</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="wx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for widget X coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="wy" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for widget Y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="convert_widget_to_bin_window_coords" c:identifier="gtk_tree_view_convert_widget_to_bin_window_coords">
<doc xml:space="preserve">Converts widget coordinates to coordinates for the bin_window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="wx" transfer-ownership="none">
<doc xml:space="preserve">X coordinate relative to the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="wy" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate relative to the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="bx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for bin_window X coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="by" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for bin_window Y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="convert_widget_to_tree_coords" c:identifier="gtk_tree_view_convert_widget_to_tree_coords">
<doc xml:space="preserve">Converts widget coordinates to coordinates for the
tree (the full scrollable area of the tree).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="wx" transfer-ownership="none">
<doc xml:space="preserve">X coordinate relative to the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="wy" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate relative to the widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="tx" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for tree X coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="ty" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">return location for tree Y coordinate</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="create_row_drag_icon" c:identifier="gtk_tree_view_create_row_drag_icon">
<doc xml:space="preserve">Creates a `cairo_surface_t` representation of the row at @path.
This image is used for a drag icon.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a newly-allocated surface of the drag icon.</doc>
<type name="Gdk.Paintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath` in @tree_view</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="enable_model_drag_dest" c:identifier="gtk_tree_view_enable_model_drag_dest">
<doc xml:space="preserve">Turns @tree_view into a drop destination for automatic DND. Calling
this method sets `GtkTreeView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="formats" transfer-ownership="none">
<doc xml:space="preserve">the target formats that the drag will support</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the bitmask of possible actions for a drag from this
widget</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="enable_model_drag_source" c:identifier="gtk_tree_view_enable_model_drag_source">
<doc xml:space="preserve">Turns @tree_view into a drag source for automatic DND. Calling this
method sets `GtkTreeView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="start_button_mask" transfer-ownership="none">
<doc xml:space="preserve">Mask of allowed buttons to start drag</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="formats" transfer-ownership="none">
<doc xml:space="preserve">the target formats that the drag will support</doc>
<type name="Gdk.ContentFormats" c:type="GdkContentFormats*"/>
</parameter>
<parameter name="actions" transfer-ownership="none">
<doc xml:space="preserve">the bitmask of possible actions for a drag from this
widget</doc>
<type name="Gdk.DragAction" c:type="GdkDragAction"/>
</parameter>
</parameters>
</method>
<method name="expand_all" c:identifier="gtk_tree_view_expand_all">
<doc xml:space="preserve">Recursively expands all nodes in the @tree_view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="expand_row" c:identifier="gtk_tree_view_expand_row">
<doc xml:space="preserve">Opens the row so its children are visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row existed and had children</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">path to a row</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="open_all" transfer-ownership="none">
<doc xml:space="preserve">whether to recursively expand, or just expand immediate children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="expand_to_path" c:identifier="gtk_tree_view_expand_to_path">
<doc xml:space="preserve">Expands the row at @path. This will also expand all parent rows of
@path as necessary.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">path to a row.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="get_activate_on_single_click" c:identifier="gtk_tree_view_get_activate_on_single_click" glib:get-property="activate-on-single-click">
<doc xml:space="preserve">Gets the setting set by gtk_tree_view_set_activate_on_single_click().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if row-activated will be emitted on a single click</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_background_area" c:identifier="gtk_tree_view_get_background_area">
<doc xml:space="preserve">Fills the bounding rectangle in bin_window coordinates for the cell at the
row specified by @path and the column specified by @column. If @path is
%NULL, or points to a node not found in the tree, the @y and @height fields of
the rectangle will be filled with 0. If @column is %NULL, the @x and @width
fields will be filled with 0. The returned rectangle is equivalent to the
@background_area passed to gtk_cell_renderer_render(). These background
areas tile to cover the entire bin window. Contrast with the @cell_area,
returned by gtk_tree_view_get_cell_area(), which returns only the cell
itself, excluding surrounding borders and the tree expander area.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreePath` for the row, or %NULL to get only horizontal coordinates</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeViewColumn` for the column, or %NULL to get only vertical coordinates</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">rectangle to fill with cell background rect</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_cell_area" c:identifier="gtk_tree_view_get_cell_area">
<doc xml:space="preserve">Fills the bounding rectangle in bin_window coordinates for the cell at the
row specified by @path and the column specified by @column. If @path is
%NULL, or points to a path not currently displayed, the @y and @height fields
of the rectangle will be filled with 0. If @column is %NULL, the @x and @width
fields will be filled with 0. The sum of all cell rects does not cover the
entire tree; there are extra pixels in between rows, for example. The
returned rectangle is equivalent to the @cell_area passed to
gtk_cell_renderer_render(). This function is only valid if @tree_view is
realized.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreePath` for the row, or %NULL to get only horizontal coordinates</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeViewColumn` for the column, or %NULL to get only vertical coordinates</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">rectangle to fill with cell rect</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="get_column" c:identifier="gtk_tree_view_get_column">
<doc xml:space="preserve">Gets the `GtkTreeViewColumn` at the given position in the #tree_view.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The `GtkTreeViewColumn`, or %NULL if the
position is outside the range of columns.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="n" transfer-ownership="none">
<doc xml:space="preserve">The position of the column, counting from 0.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="get_columns" c:identifier="gtk_tree_view_get_columns">
<doc xml:space="preserve">Returns a `GList` of all the `GtkTreeViewColumn`s currently in @tree_view.
The returned list must be freed with g_list_free ().</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">A list of `GtkTreeViewColumn`s</doc>
<type name="GLib.List" c:type="GList*">
<type name="TreeViewColumn"/>
</type>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cursor" c:identifier="gtk_tree_view_get_cursor">
<doc xml:space="preserve">Fills in @path and @focus_column with the current path and focus column. If
the cursor isn&#x2019;t currently set, then *@path will be %NULL. If no column
currently has focus, then *@focus_column will be %NULL.
The returned `GtkTreePath` must be freed with gtk_tree_path_free() when
you are done with it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to be
filled with the current cursor path</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="focus_column" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A
pointer to be filled with the current focus column</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn**"/>
</parameter>
</parameters>
</method>
<method name="get_dest_row_at_pos" c:identifier="gtk_tree_view_get_dest_row_at_pos">
<doc xml:space="preserve">Determines the destination row for a given position. @drag_x and
@drag_y are expected to be in widget coordinates. This function is only
meaningful if @tree_view is realized. Therefore this function will always
return %FALSE if @tree_view is not realized or does not have a model.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether there is a row at the given position, %TRUE if this
is indeed the case.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="drag_x" transfer-ownership="none">
<doc xml:space="preserve">the position to determine the destination row for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="drag_y" transfer-ownership="none">
<doc xml:space="preserve">the position to determine the destination row for</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the path of
the highlighted row</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the drop position, or
%NULL</doc>
<type name="TreeViewDropPosition" c:type="GtkTreeViewDropPosition*"/>
</parameter>
</parameters>
</method>
<method name="get_drag_dest_row" c:identifier="gtk_tree_view_get_drag_dest_row">
<doc xml:space="preserve">Gets information about the row that is highlighted for feedback.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the path of the highlighted row</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="pos" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for the drop position</doc>
<type name="TreeViewDropPosition" c:type="GtkTreeViewDropPosition*"/>
</parameter>
</parameters>
</method>
<method name="get_enable_search" c:identifier="gtk_tree_view_get_enable_search" glib:get-property="enable-search">
<doc xml:space="preserve">Returns whether or not the tree allows to start interactive searching
by typing in text.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether or not to let the user search interactively</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_enable_tree_lines" c:identifier="gtk_tree_view_get_enable_tree_lines" glib:get-property="enable-tree-lines">
<doc xml:space="preserve">Returns whether or not tree lines are drawn in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if tree lines are drawn in @tree_view, %FALSE
otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expander_column" c:identifier="gtk_tree_view_get_expander_column" glib:get-property="expander-column">
<doc xml:space="preserve">Returns the column that is the current expander column,
or %NULL if none has been set.
This column has the expander arrow drawn next to it.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The expander column.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fixed_height_mode" c:identifier="gtk_tree_view_get_fixed_height_mode" glib:get-property="fixed-height-mode">
<doc xml:space="preserve">Returns whether fixed height mode is turned on for @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @tree_view is in fixed height mode</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_grid_lines" c:identifier="gtk_tree_view_get_grid_lines">
<doc xml:space="preserve">Returns which grid lines are enabled in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`GridLines value indicating which grid lines
are enabled.</doc>
<type name="TreeViewGridLines" c:type="GtkTreeViewGridLines"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_headers_clickable" c:identifier="gtk_tree_view_get_headers_clickable" glib:get-property="headers-clickable">
<doc xml:space="preserve">Returns whether all header columns are clickable.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if all header columns are clickable, otherwise %FALSE</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_headers_visible" c:identifier="gtk_tree_view_get_headers_visible" glib:get-property="headers-visible">
<doc xml:space="preserve">Returns %TRUE if the headers on the @tree_view are visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">Whether the headers are visible or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hover_expand" c:identifier="gtk_tree_view_get_hover_expand" glib:get-property="hover-expand">
<doc xml:space="preserve">Returns whether hover expansion mode is turned on for @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @tree_view is in hover expansion mode</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hover_selection" c:identifier="gtk_tree_view_get_hover_selection" glib:get-property="hover-selection">
<doc xml:space="preserve">Returns whether hover selection mode is turned on for @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @tree_view is in hover selection mode</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_level_indentation" c:identifier="gtk_tree_view_get_level_indentation" glib:get-property="level-indentation">
<doc xml:space="preserve">Returns the amount, in pixels, of extra indentation for child levels
in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the amount of extra indentation for child levels in
@tree_view. A return value of 0 means that this feature is disabled.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_model" c:identifier="gtk_tree_view_get_model" glib:get-property="model">
<doc xml:space="preserve">Returns the model the `GtkTreeView` is based on. Returns %NULL if the
model is unset.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_n_columns" c:identifier="gtk_tree_view_get_n_columns">
<doc xml:space="preserve">Queries the number of columns in the given @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of columns in the @tree_view</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_path_at_pos" c:identifier="gtk_tree_view_get_path_at_pos">
<doc xml:space="preserve">Finds the path at the point (@x, @y), relative to bin_window coordinates.
That is, @x and @y are relative to an events coordinates. Widget-relative
coordinates must be converted using
gtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for
things like popup menus. If @path is non-%NULL, then it will be filled
with the `GtkTreePath` at that point. This path should be freed with
gtk_tree_path_free(). If @column is non-%NULL, then it will be filled
with the column at that point. @cell_x and @cell_y return the coordinates
relative to the cell background (i.e. the @background_area passed to
gtk_cell_renderer_render()). This function is only meaningful if
@tree_view is realized. Therefore this function will always return %FALSE
if @tree_view is not realized or does not have a model.
For converting widget coordinates (eg. the ones you get from
GtkWidget::query-tooltip), please see
gtk_tree_view_convert_widget_to_bin_window_coords().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a row exists at that coordinate.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The x position to be identified (relative to bin_window).</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The y position to be identified (relative to bin_window).</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to a `GtkTreePath`
pointer to be filled in</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="column" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to
a `GtkTreeViewColumn` pointer to be filled in</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn**"/>
</parameter>
<parameter name="cell_x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer where the X coordinate
relative to the cell can be placed</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="cell_y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer where the Y coordinate
relative to the cell can be placed</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_reorderable" c:identifier="gtk_tree_view_get_reorderable" glib:get-property="reorderable">
<doc xml:space="preserve">Retrieves whether the user can reorder the tree via drag-and-drop. See
gtk_tree_view_set_reorderable().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tree can be reordered.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_row_separator_func" c:identifier="gtk_tree_view_get_row_separator_func" introspectable="0">
<doc xml:space="preserve">Returns the current row separator function.</doc>
<return-value>
<doc xml:space="preserve">the current row separator function.</doc>
<type name="TreeViewRowSeparatorFunc" c:type="GtkTreeViewRowSeparatorFunc"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_rubber_banding" c:identifier="gtk_tree_view_get_rubber_banding" glib:get-property="rubber-banding">
<doc xml:space="preserve">Returns whether rubber banding is turned on for @tree_view. If the
selection mode is %GTK_SELECTION_MULTIPLE, rubber banding will allow the
user to select multiple rows by dragging the mouse.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if rubber banding in @tree_view is enabled.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search_column" c:identifier="gtk_tree_view_get_search_column" glib:get-property="search-column">
<doc xml:space="preserve">Gets the column searched on by the interactive search code.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the column the interactive search code searches in.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search_entry" c:identifier="gtk_tree_view_get_search_entry">
<doc xml:space="preserve">Returns the `GtkEntry` which is currently in use as interactive search
entry for @tree_view. In case the built-in entry is being used, %NULL
will be returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the entry currently in use as search entry.</doc>
<type name="Editable" c:type="GtkEditable*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_search_equal_func" c:identifier="gtk_tree_view_get_search_equal_func" introspectable="0">
<doc xml:space="preserve">Returns the compare function currently in use.</doc>
<return-value>
<doc xml:space="preserve">the currently used compare function for the search code.</doc>
<type name="TreeViewSearchEqualFunc" c:type="GtkTreeViewSearchEqualFunc"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_selection" c:identifier="gtk_tree_view_get_selection">
<doc xml:space="preserve">Gets the `GtkTreeSelection` associated with @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeSelection` object.</doc>
<type name="TreeSelection" c:type="GtkTreeSelection*"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_show_expanders" c:identifier="gtk_tree_view_get_show_expanders" glib:get-property="show-expanders">
<doc xml:space="preserve">Returns whether or not expanders are drawn in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if expanders are drawn in @tree_view, %FALSE
otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tooltip_column" c:identifier="gtk_tree_view_get_tooltip_column" glib:get-property="tooltip-column">
<doc xml:space="preserve">Returns the column of @tree_view&#x2019;s model which is being used for
displaying tooltips on @tree_view&#x2019;s rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the index of the tooltip column that is currently being
used, or -1 if this is disabled.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tooltip_context" c:identifier="gtk_tree_view_get_tooltip_context">
<doc xml:space="preserve">This function is supposed to be used in a ::query-tooltip
signal handler for `GtkTreeView`. The @x, @y and @keyboard_tip values
which are received in the signal handler, should be passed to this
function without modification.
The return value indicates whether there is a tree view row at the given
coordinates (%TRUE) or not (%FALSE) for mouse tooltips. For keyboard
tooltips the row returned will be the cursor row. When %TRUE, then any of
@model, @path and @iter which have been provided will be set to point to
that row and the corresponding model. @x and @y will always be converted
to be relative to @tree_view&#x2019;s bin_window if @keyboard_tooltip is %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether or not the given tooltip context points to a row</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate (relative to widget coordinates)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate (relative to widget coordinates)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="keyboard_tip" transfer-ownership="none">
<doc xml:space="preserve">whether this is a keyboard tooltip or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="model" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to
receive a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel**"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to receive a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">a pointer to receive a `GtkTreeIter`</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
</parameters>
</method>
<method name="get_visible_range" c:identifier="gtk_tree_view_get_visible_range">
<doc xml:space="preserve">Sets @start_path and @end_path to be the first and last visible path.
Note that there may be invisible paths in between.
The paths should be freed with gtk_tree_path_free() after use.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if valid paths were placed in @start_path and @end_path.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="start_path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for start of region</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="end_path" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Return location for end of region</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
</parameters>
</method>
<method name="get_visible_rect" c:identifier="gtk_tree_view_get_visible_rect">
<doc xml:space="preserve">Fills @visible_rect with the currently-visible region of the
buffer, in tree coordinates. Convert to bin_window coordinates with
gtk_tree_view_convert_tree_to_bin_window_coords().
Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire
scrollable area of the tree.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="visible_rect" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">rectangle to fill</doc>
<type name="Gdk.Rectangle" c:type="GdkRectangle*"/>
</parameter>
</parameters>
</method>
<method name="insert_column" c:identifier="gtk_tree_view_insert_column">
<doc xml:space="preserve">This inserts the @column into the @tree_view at @position. If @position is
-1, then the column is inserted at the end. If @tree_view has
&#x201C;fixed_height&#x201D; mode enabled, then @column must have its &#x201C;sizing&#x201D; property
set to be GTK_TREE_VIEW_COLUMN_FIXED.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of columns in @tree_view after insertion.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be inserted.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">The position to insert @column in.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="insert_column_with_attributes" c:identifier="gtk_tree_view_insert_column_with_attributes" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkTreeViewColumn` and inserts it into the @tree_view at
@position. If @position is -1, then the newly created column is inserted at
the end. The column is initialized with the attributes given. If @tree_view
has &#x201C;fixed_height&#x201D; mode enabled, then the new column will have its sizing
property set to be GTK_TREE_VIEW_COLUMN_FIXED.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of columns in @tree_view after insertion.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">The position to insert the new column in</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">The title to set the header to</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">A %NULL-terminated list of attributes</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="insert_column_with_data_func" c:identifier="gtk_tree_view_insert_column_with_data_func">
<doc xml:space="preserve">Convenience function that inserts a new column into the `GtkTreeView`
with the given cell renderer and a `GtkTreeCellDataFunc` to set cell renderer
attributes (normally using data from the model). See also
gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start().
If @tree_view has &#x201C;fixed_height&#x201D; mode enabled, then the new column will have its
&#x201C;sizing&#x201D; property set to be GTK_TREE_VIEW_COLUMN_FIXED.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">number of columns in the tree view post-insert</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="position" transfer-ownership="none">
<doc xml:space="preserve">Position to insert, -1 for append</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">column title</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">cell renderer for column</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="func" transfer-ownership="none" scope="notified" closure="4" destroy="5">
<doc xml:space="preserve">function to set attributes of cell renderer</doc>
<type name="TreeCellDataFunc" c:type="GtkTreeCellDataFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">data for @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="dnotify" transfer-ownership="none" scope="async">
<doc xml:space="preserve">destroy notifier for @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="is_blank_at_pos" c:identifier="gtk_tree_view_is_blank_at_pos">
<doc xml:space="preserve">Determine whether the point (@x, @y) in @tree_view is blank, that is no
cell content nor an expander arrow is drawn at the location. If so, the
location can be considered as the background. You might wish to take
special action on clicks on the background, such as clearing a current
selection, having a custom context menu or starting rubber banding.
The @x and @y coordinate that are provided must be relative to bin_window
coordinates. Widget-relative coordinates must be converted using
gtk_tree_view_convert_widget_to_bin_window_coords().
For converting widget coordinates (eg. the ones you get from
GtkWidget::query-tooltip), please see
gtk_tree_view_convert_widget_to_bin_window_coords().
The @path, @column, @cell_x and @cell_y arguments will be filled in
likewise as for gtk_tree_view_get_path_at_pos(). Please see
gtk_tree_view_get_path_at_pos() for more information.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the area at the given coordinates is blank,
%FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">The x position to be identified (relative to bin_window)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">The y position to be identified (relative to bin_window)</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to a `GtkTreePath` pointer to
be filled in</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
<parameter name="column" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer to a
`GtkTreeViewColumn` pointer to be filled in</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn**"/>
</parameter>
<parameter name="cell_x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer where the X coordinate relative to the
cell can be placed</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="cell_y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">A pointer where the Y coordinate relative to the
cell can be placed</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="is_rubber_banding_active" c:identifier="gtk_tree_view_is_rubber_banding_active">
<doc xml:space="preserve">Returns whether a rubber banding operation is currently being done
in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a rubber banding operation is currently being
done in @tree_view.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="map_expanded_rows" c:identifier="gtk_tree_view_map_expanded_rows">
<doc xml:space="preserve">Calls @func on all expanded rows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" scope="call" closure="1">
<doc xml:space="preserve">A function to be called</doc>
<type name="TreeViewMappingFunc" c:type="GtkTreeViewMappingFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to be passed to the function.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</method>
<method name="move_column_after" c:identifier="gtk_tree_view_move_column_after">
<doc xml:space="preserve">Moves @column to be after to @base_column. If @base_column is %NULL, then
@column is placed in the first position.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be moved.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="base_column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be moved relative to</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="remove_column" c:identifier="gtk_tree_view_remove_column">
<doc xml:space="preserve">Removes @column from @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The number of columns in @tree_view after removing.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn` to remove.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="row_activated" c:identifier="gtk_tree_view_row_activated">
<doc xml:space="preserve">Activates the cell determined by @path and @column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be activated.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be activated.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="row_expanded" c:identifier="gtk_tree_view_row_expanded">
<doc xml:space="preserve">Returns %TRUE if the node pointed to by @path is expanded in @tree_view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if #path is expanded.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath` to test expansion state.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="scroll_to_cell" c:identifier="gtk_tree_view_scroll_to_cell">
<doc xml:space="preserve">Moves the alignments of @tree_view to the position specified by @column and
@path. If @column is %NULL, then no horizontal scrolling occurs. Likewise,
if @path is %NULL no vertical scrolling occurs. At a minimum, one of @column
or @path need to be non-%NULL. @row_align determines where the row is
placed, and @col_align determines where @column is placed. Both are expected
to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means
right/bottom alignment, 0.5 means center.
If @use_align is %FALSE, then the alignment arguments are ignored, and the
tree does the minimum amount of work to scroll the cell onto the screen.
This means that the cell will be scrolled to the edge closest to its current
position. If the cell is currently visible on the screen, nothing is done.
This function only works if the model is set, and @path is a valid row on the
model. If the model changes before the @tree_view is realized, the centered
path will be modified to reflect this change.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The path of the row to move to</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeViewColumn` to move horizontally to</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="use_align" transfer-ownership="none">
<doc xml:space="preserve">whether to use alignment arguments, or %FALSE.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="row_align" transfer-ownership="none">
<doc xml:space="preserve">The vertical alignment of the row specified by @path.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="col_align" transfer-ownership="none">
<doc xml:space="preserve">The horizontal alignment of the column specified by @column.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="scroll_to_point" c:identifier="gtk_tree_view_scroll_to_point">
<doc xml:space="preserve">Scrolls the tree view such that the top-left corner of the visible
area is @tree_x, @tree_y, where @tree_x and @tree_y are specified
in tree coordinates. The @tree_view must be realized before
this function is called. If it isn't, you probably want to be
using gtk_tree_view_scroll_to_cell().
If either @tree_x or @tree_y are -1, then that direction isn&#x2019;t scrolled.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="tree_x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate of new top-left pixel of visible area, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="tree_y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate of new top-left pixel of visible area, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_activate_on_single_click" c:identifier="gtk_tree_view_set_activate_on_single_click" glib:set-property="activate-on-single-click">
<doc xml:space="preserve">Cause the `GtkTreeView`::row-activated signal to be emitted
on a single click instead of a double click.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="single" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to emit row-activated on a single click</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_column_drag_function" c:identifier="gtk_tree_view_set_column_drag_function">
<doc xml:space="preserve">Sets a user function for determining where a column may be dropped when
dragged. This function is called on every column pair in turn at the
beginning of a column drag to determine where a drop can take place. The
arguments passed to @func are: the @tree_view, the `GtkTreeViewColumn` being
dragged, the two `GtkTreeViewColumn`s determining the drop spot, and
@user_data. If either of the `GtkTreeViewColumn` arguments for the drop spot
are %NULL, then they indicate an edge. If @func is set to be %NULL, then
@tree_view reverts to the default behavior of allowing all columns to be
dropped everywhere.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">A function to determine which columns are reorderable</doc>
<type name="TreeViewColumnDropFunc" c:type="GtkTreeViewColumnDropFunc"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">User data to be passed to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier for @user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_cursor" c:identifier="gtk_tree_view_set_cursor">
<doc xml:space="preserve">Sets the current keyboard focus to be at @path, and selects it. This is
useful when you want to focus the user&#x2019;s attention on a particular row. If
@focus_column is not %NULL, then focus is given to the column specified by
it. Additionally, if @focus_column is specified, and @start_editing is
%TRUE, then editing should be started in the specified cell.
This function is often followed by @gtk_widget_grab_focus (@tree_view)
in order to give keyboard focus to the widget. Please note that editing
can only happen when the widget is realized.
If @path is invalid for @model, the current cursor (if any) will be unset
and the function will return without failing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="focus_column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="start_editing" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the specified cell should start being edited.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_cursor_on_cell" c:identifier="gtk_tree_view_set_cursor_on_cell">
<doc xml:space="preserve">Sets the current keyboard focus to be at @path, and selects it. This is
useful when you want to focus the user&#x2019;s attention on a particular row. If
@focus_column is not %NULL, then focus is given to the column specified by
it. If @focus_column and @focus_cell are not %NULL, and @focus_column
contains 2 or more editable or activatable cells, then focus is given to
the cell specified by @focus_cell. Additionally, if @focus_column is
specified, and @start_editing is %TRUE, then editing should be started in
the specified cell. This function is often followed by
@gtk_widget_grab_focus (@tree_view) in order to give keyboard focus to the
widget. Please note that editing can only happen when the widget is
realized.
If @path is invalid for @model, the current cursor (if any) will be unset
and the function will return without failing.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="focus_column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="focus_cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="start_editing" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the specified cell should start being edited.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_drag_dest_row" c:identifier="gtk_tree_view_set_drag_dest_row">
<doc xml:space="preserve">Sets the row that is highlighted for feedback.
If @path is %NULL, an existing highlight is removed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The path of the row to highlight</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="pos" transfer-ownership="none">
<doc xml:space="preserve">Specifies whether to drop before, after or into the row</doc>
<type name="TreeViewDropPosition" c:type="GtkTreeViewDropPosition"/>
</parameter>
</parameters>
</method>
<method name="set_enable_search" c:identifier="gtk_tree_view_set_enable_search" glib:set-property="enable-search">
<doc xml:space="preserve">If @enable_search is set, then the user can type in text to search through
the tree interactively (this is sometimes called "typeahead find").
Note that even if this is %FALSE, the user can still initiate a search
using the &#x201C;start-interactive-search&#x201D; key binding.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="enable_search" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the user can search interactively</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_enable_tree_lines" c:identifier="gtk_tree_view_set_enable_tree_lines" glib:set-property="enable-tree-lines">
<doc xml:space="preserve">Sets whether to draw lines interconnecting the expanders in @tree_view.
This does not have any visible effects for lists.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable tree line drawing, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_expander_column" c:identifier="gtk_tree_view_set_expander_column" glib:set-property="expander-column">
<doc xml:space="preserve">Sets the column to draw the expander arrow at. It must be in @tree_view.
If @column is %NULL, then the expander arrow is always at the first
visible column.
If you do not want expander arrow to appear in your tree, set the
expander column to a hidden column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">%NULL, or the column to draw the expander arrow at.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</method>
<method name="set_fixed_height_mode" c:identifier="gtk_tree_view_set_fixed_height_mode" glib:set-property="fixed-height-mode">
<doc xml:space="preserve">Enables or disables the fixed height mode of @tree_view.
Fixed height mode speeds up `GtkTreeView` by assuming that all
rows have the same height.
Only enable this option if all rows are the same height and all
columns are of type %GTK_TREE_VIEW_COLUMN_FIXED.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="enable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable fixed height mode</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_grid_lines" c:identifier="gtk_tree_view_set_grid_lines">
<doc xml:space="preserve">Sets which grid lines to draw in @tree_view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="grid_lines" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`GridLines value indicating which grid lines to
enable.</doc>
<type name="TreeViewGridLines" c:type="GtkTreeViewGridLines"/>
</parameter>
</parameters>
</method>
<method name="set_headers_clickable" c:identifier="gtk_tree_view_set_headers_clickable" glib:set-property="headers-clickable">
<doc xml:space="preserve">Allow the column title buttons to be clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the columns are clickable.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_headers_visible" c:identifier="gtk_tree_view_set_headers_visible" glib:set-property="headers-visible">
<doc xml:space="preserve">Sets the visibility state of the headers.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="headers_visible" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the headers are visible</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_hover_expand" c:identifier="gtk_tree_view_set_hover_expand" glib:set-property="hover-expand">
<doc xml:space="preserve">Enables or disables the hover expansion mode of @tree_view.
Hover expansion makes rows expand or collapse if the pointer
moves over them.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable hover selection mode</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_hover_selection" c:identifier="gtk_tree_view_set_hover_selection" glib:set-property="hover-selection">
<doc xml:space="preserve">Enables or disables the hover selection mode of @tree_view.
Hover selection makes the selected row follow the pointer.
Currently, this works only for the selection modes
%GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="hover" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable hover selection mode</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_level_indentation" c:identifier="gtk_tree_view_set_level_indentation" glib:set-property="level-indentation">
<doc xml:space="preserve">Sets the amount of extra indentation for child levels to use in @tree_view
in addition to the default indentation. The value should be specified in
pixels, a value of 0 disables this feature and in this case only the default
indentation will be used.
This does not have any visible effects for lists.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="indentation" transfer-ownership="none">
<doc xml:space="preserve">the amount, in pixels, of extra indentation in @tree_view.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_model" c:identifier="gtk_tree_view_set_model" glib:set-property="model">
<doc xml:space="preserve">Sets the model for a `GtkTreeView`. If the @tree_view already has a model
set, it will remove it before setting the new model. If @model is %NULL,
then it will unset the old model.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="model" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The model.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
</parameters>
</method>
<method name="set_reorderable" c:identifier="gtk_tree_view_set_reorderable" glib:set-property="reorderable">
<doc xml:space="preserve">This function is a convenience function to allow you to reorder
models that support the `GtkTreeDragSourceIface` and the
`GtkTreeDragDestIface`. Both `GtkTreeStore` and `GtkListStore` support
these. If @reorderable is %TRUE, then the user can reorder the
model by dragging and dropping rows. The developer can listen to
these changes by connecting to the model&#x2019;s `GtkTreeModel::row-inserted`
and `GtkTreeModel::row-deleted` signals. The reordering is implemented
by setting up the tree view as a drag source and destination.
Therefore, drag and drop can not be used in a reorderable view for any
other purpose.
This function does not give you any degree of control over the order -- any
reordering is allowed. If more control is needed, you should probably
handle drag and drop manually.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`.</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="reorderable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the tree can be reordered.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_row_separator_func" c:identifier="gtk_tree_view_set_row_separator_func">
<doc xml:space="preserve">Sets the row separator function, which is used to determine
whether a row should be drawn as a separator. If the row separator
function is %NULL, no separators are drawn. This is the default value.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">a `GtkTreeView`RowSeparatorFunc</doc>
<type name="TreeViewRowSeparatorFunc" c:type="GtkTreeViewRowSeparatorFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">destroy notifier for @data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_rubber_banding" c:identifier="gtk_tree_view_set_rubber_banding" glib:set-property="rubber-banding">
<doc xml:space="preserve">Enables or disables rubber banding in @tree_view. If the selection mode
is %GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select
multiple rows by dragging the mouse.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="enable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable rubber banding</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_search_column" c:identifier="gtk_tree_view_set_search_column" glib:set-property="search-column">
<doc xml:space="preserve">Sets @column as the column where the interactive search code should
search in for the current model.
If the search column is set, users can use the &#x201C;start-interactive-search&#x201D;
key binding to bring up search popup. The enable-search property controls
whether simply typing text will also start an interactive search.
Note that @column refers to a column of the current model. The search
column is reset to -1 when the model is changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the column of the model to search in, or -1 to disable searching</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_search_entry" c:identifier="gtk_tree_view_set_search_entry">
<doc xml:space="preserve">Sets the entry which the interactive search code will use for this
@tree_view. This is useful when you want to provide a search entry
in our interface at all time at a fixed position. Passing %NULL for
@entry will make the interactive search code use the built-in popup
entry again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="entry" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the entry the interactive search code of @tree_view should use</doc>
<type name="Editable" c:type="GtkEditable*"/>
</parameter>
</parameters>
</method>
<method name="set_search_equal_func" c:identifier="gtk_tree_view_set_search_equal_func">
<doc xml:space="preserve">Sets the compare function for the interactive search capabilities; note
that somewhat like strcmp() returning 0 for equality
`GtkTreeView`SearchEqualFunc returns %FALSE on matches.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="search_equal_func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">the compare function to use during the search</doc>
<type name="TreeViewSearchEqualFunc" c:type="GtkTreeViewSearchEqualFunc"/>
</parameter>
<parameter name="search_user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @search_equal_func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="search_destroy" transfer-ownership="none" nullable="1" allow-none="1" scope="async">
<doc xml:space="preserve">Destroy notifier for @search_user_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_show_expanders" c:identifier="gtk_tree_view_set_show_expanders" glib:set-property="show-expanders">
<doc xml:space="preserve">Sets whether to draw and enable expanders and indent child rows in
@tree_view. When disabled there will be no expanders visible in trees
and there will be no way to expand and collapse rows by default. Also
note that hiding the expanders will disable the default indentation. You
can set a custom indentation in this case using
gtk_tree_view_set_level_indentation().
This does not have any visible effects for lists.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable expander drawing, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_cell" c:identifier="gtk_tree_view_set_tooltip_cell">
<doc xml:space="preserve">Sets the tip area of @tooltip to the area @path, @column and @cell have
in common. For example if @path is %NULL and @column is set, the tip
area will be set to the full area covered by @column. See also
gtk_tooltip_set_tip_area().
Note that if @path is not specified and @cell is set and part of a column
containing the expander, the tooltip might not show and hide at the correct
position. In such cases @path must be set to the current node under the
mouse cursor for this function to operate correctly.
See also gtk_tree_view_set_tooltip_column() for a simpler alternative.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
<parameter name="path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="cell" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_column" c:identifier="gtk_tree_view_set_tooltip_column" glib:set-property="tooltip-column">
<doc xml:space="preserve">If you only plan to have simple (text-only) tooltips on full rows, you
can use this function to have `GtkTreeView` handle these automatically
for you. @column should be set to the column in @tree_view&#x2019;s model
containing the tooltip texts, or -1 to disable this feature.
When enabled, `GtkWidget:has-tooltip` will be set to %TRUE and
@tree_view will connect a `GtkWidget::query-tooltip` signal handler.
Note that the signal handler sets the text with gtk_tooltip_set_markup(),
so &amp;, &lt;, etc have to be escaped in the text.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">an integer, which is a valid column number for @tree_view&#x2019;s model</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_row" c:identifier="gtk_tree_view_set_tooltip_row">
<doc xml:space="preserve">Sets the tip area of @tooltip to be the area covered by the row at @path.
See also gtk_tree_view_set_tooltip_column() for a simpler alternative.
See also gtk_tooltip_set_tip_area().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
<parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreePath`</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</method>
<method name="unset_rows_drag_dest" c:identifier="gtk_tree_view_unset_rows_drag_dest">
<doc xml:space="preserve">Undoes the effect of
gtk_tree_view_enable_model_drag_dest(). Calling this method sets
`GtkTreeView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<method name="unset_rows_drag_source" c:identifier="gtk_tree_view_unset_rows_drag_source">
<doc xml:space="preserve">Undoes the effect of
gtk_tree_view_enable_model_drag_source(). Calling this method sets
`GtkTreeView`:reorderable to %FALSE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</instance-parameter>
</parameters>
</method>
<property name="activate-on-single-click" writable="1" transfer-ownership="none" setter="set_activate_on_single_click" getter="get_activate_on_single_click">
<doc xml:space="preserve">The activate-on-single-click property specifies whether the "row-activated" signal
will be emitted after a single click.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="enable-grid-lines" writable="1" transfer-ownership="none">
<type name="TreeViewGridLines"/>
</property>
<property name="enable-search" writable="1" transfer-ownership="none" setter="set_enable_search" getter="get_enable_search">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="enable-tree-lines" writable="1" transfer-ownership="none" setter="set_enable_tree_lines" getter="get_enable_tree_lines">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="expander-column" writable="1" transfer-ownership="none" setter="set_expander_column" getter="get_expander_column">
<type name="TreeViewColumn"/>
</property>
<property name="fixed-height-mode" writable="1" transfer-ownership="none" setter="set_fixed_height_mode" getter="get_fixed_height_mode">
<doc xml:space="preserve">Setting the ::fixed-height-mode property to %TRUE speeds up
`GtkTreeView` by assuming that all rows have the same height.
Only enable this option if all rows are the same height.
Please see gtk_tree_view_set_fixed_height_mode() for more
information on this option.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="headers-clickable" writable="1" transfer-ownership="none" setter="set_headers_clickable" getter="get_headers_clickable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="headers-visible" writable="1" transfer-ownership="none" setter="set_headers_visible" getter="get_headers_visible">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="hover-expand" writable="1" transfer-ownership="none" setter="set_hover_expand" getter="get_hover_expand">
<doc xml:space="preserve">Enables or disables the hover expansion mode of @tree_view.
Hover expansion makes rows expand or collapse if the pointer moves
over them.
This mode is primarily intended for treeviews in popups, e.g.
in `GtkComboBox` or `GtkEntryCompletion`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="hover-selection" writable="1" transfer-ownership="none" setter="set_hover_selection" getter="get_hover_selection">
<doc xml:space="preserve">Enables or disables the hover selection mode of @tree_view.
Hover selection makes the selected row follow the pointer.
Currently, this works only for the selection modes
%GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
This mode is primarily intended for treeviews in popups, e.g.
in `GtkComboBox` or `GtkEntryCompletion`.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="level-indentation" writable="1" transfer-ownership="none" setter="set_level_indentation" getter="get_level_indentation">
<doc xml:space="preserve">Extra indentation for each level.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="model" writable="1" transfer-ownership="none" setter="set_model" getter="get_model">
<type name="TreeModel"/>
</property>
<property name="reorderable" writable="1" transfer-ownership="none" setter="set_reorderable" getter="get_reorderable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="rubber-banding" writable="1" transfer-ownership="none" setter="set_rubber_banding" getter="get_rubber_banding">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="search-column" writable="1" transfer-ownership="none" setter="set_search_column" getter="get_search_column">
<type name="gint" c:type="gint"/>
</property>
<property name="show-expanders" writable="1" transfer-ownership="none" setter="set_show_expanders" getter="get_show_expanders">
<doc xml:space="preserve">%TRUE if the view has expanders.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tooltip-column" writable="1" transfer-ownership="none" setter="set_tooltip_column" getter="get_tooltip_column">
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="columns-changed" when="last">
<doc xml:space="preserve">The number of columns of the treeview has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="cursor-changed" when="last">
<doc xml:space="preserve">The position of the cursor (focused cell) has changed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="expand-collapse-cursor-row" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="p0" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="p1" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-cursor" when="last" action="1">
<doc xml:space="preserve">The `GtkTreeView`::move-cursor signal is a [keybinding
signal][class@Gtk.SignalAction] which gets emitted when the user
presses one of the cursor keys.
Applications should not connect to it, but may emit it with
g_signal_emit_by_name() if they need to control the cursor
programmatically. In contrast to gtk_tree_view_set_cursor() and
gtk_tree_view_set_cursor_on_cell() when moving horizontally
`GtkTreeView`::move-cursor does not reset the current selection.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @step is supported, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="step" transfer-ownership="none">
<doc xml:space="preserve">the granularity of the move, as a `GtkMovementStep`.
%GTK_MOVEMENT_LOGICAL_POSITIONS, %GTK_MOVEMENT_VISUAL_POSITIONS,
%GTK_MOVEMENT_DISPLAY_LINES, %GTK_MOVEMENT_PAGES and
%GTK_MOVEMENT_BUFFER_ENDS are supported.
%GTK_MOVEMENT_LOGICAL_POSITIONS and %GTK_MOVEMENT_VISUAL_POSITIONS
are treated identically.</doc>
<type name="MovementStep"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the direction to move: +1 to move forwards; -1 to move
backwards. The resulting movement is undefined for all other values.</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<doc xml:space="preserve">whether to extend the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="modify" transfer-ownership="none">
<doc xml:space="preserve">whether to modify the selection</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-activated" when="last" action="1">
<doc xml:space="preserve">The "row-activated" signal is emitted when the method
[`method@Gtk.TreeView.row_activated`] is called.
This signal is emitted when the user double-clicks a treeview row with the
[property@Gtk.TreeView:activate-on-single-click] property set to %FALSE,
or when the user single-clicks a row when that property set to %TRUE.
This signal is also emitted when a non-editable row is selected and one
of the keys: &lt;kbd&gt;Space&lt;/kbd&gt;, &lt;kbd&gt;Shift&lt;/kbd&gt;+&lt;kbd&gt;Space&lt;/kbd&gt;,
&lt;kbd&gt;Return&lt;/kbd&gt; or &lt;kbd&gt;Enter&lt;/kbd&gt; is pressed.
For selection handling refer to the
[tree widget conceptual overview](section-tree-widget.html)
as well as `GtkTreeSelection`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreePath` for the activated row</doc>
<type name="TreePath"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GtkTreeViewColumn` in which the activation occurred</doc>
<type name="TreeViewColumn"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-collapsed" when="last">
<doc xml:space="preserve">The given row has been collapsed (child nodes are hidden).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the tree iter of the collapsed row</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a tree path that points to the row</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="row-expanded" when="last">
<doc xml:space="preserve">The given row has been expanded (child nodes are shown).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the tree iter of the expanded row</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a tree path that points to the row</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="select-all" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="select-cursor-parent" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="select-cursor-row" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="start-interactive-search" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="test-collapse-row" when="last">
<doc xml:space="preserve">The given row is about to be collapsed (hide its children nodes). Use this
signal if you need to control the collapsibility of individual rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE to allow collapsing, %TRUE to reject</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the tree iter of the row to collapse</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a tree path that points to the row</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="test-expand-row" when="last">
<doc xml:space="preserve">The given row is about to be expanded (show its children nodes). Use this
signal if you need to control the expandability of individual rows.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE to allow expansion, %TRUE to reject</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the tree iter of the row to expand</doc>
<type name="TreeIter"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a tree path that points to the row</doc>
<type name="TreePath"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="toggle-cursor-row" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="unselect-all" when="last" action="1">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
</class>
<record name="TreeViewClass" c:type="GtkTreeViewClass" glib:is-gtype-struct-for="TreeView">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="row_activated">
<callback name="row_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreePath` to be activated.</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="column" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The `GtkTreeViewColumn` to be activated.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="test_expand_row">
<callback name="test_expand_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="test_collapse_row">
<callback name="test_collapse_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_expanded">
<callback name="row_expanded">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="row_collapsed">
<callback name="row_collapsed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="columns_changed">
<callback name="columns_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="cursor_changed">
<callback name="cursor_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="move_cursor">
<callback name="move_cursor">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="step" transfer-ownership="none">
<type name="MovementStep" c:type="GtkMovementStep"/>
</parameter>
<parameter name="count" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="extend" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="modify" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_all">
<callback name="select_all">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unselect_all">
<callback name="unselect_all">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_cursor_row">
<callback name="select_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="start_editing" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="toggle_cursor_row">
<callback name="toggle_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="expand_collapse_cursor_row">
<callback name="expand_collapse_cursor_row">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="logical" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="open_all" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="select_cursor_parent">
<callback name="select_cursor_parent">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="start_interactive_search">
<callback name="start_interactive_search">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="_reserved" readable="0" private="1">
<array zero-terminated="0" fixed-size="16">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="TreeViewColumn" c:symbol-prefix="tree_view_column" c:type="GtkTreeViewColumn" parent="GObject.InitiallyUnowned" glib:type-name="GtkTreeViewColumn" glib:get-type="gtk_tree_view_column_get_type">
<doc xml:space="preserve">A visible column in a [class@Gtk.TreeView] widget
The `GtkTreeViewColumn` object represents a visible column in a `GtkTreeView` widget.
It allows to set properties of the column header, and functions as a holding pen
for the cell renderers which determine how the data in the column is displayed.
Please refer to the [tree widget conceptual overview](section-tree-widget.html)
for an overview of all the objects and data types related to the tree widget and
how they work together, and to the [class@Gtk.TreeView] documentation for specifics
about the CSS node structure for treeviews and their headers.</doc>
<implements name="Buildable"/>
<implements name="CellLayout"/>
<constructor name="new" c:identifier="gtk_tree_view_column_new">
<doc xml:space="preserve">Creates a new `GtkTreeViewColumn`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</return-value>
</constructor>
<constructor name="new_with_area" c:identifier="gtk_tree_view_column_new_with_area">
<doc xml:space="preserve">Creates a new `GtkTreeViewColumn` using @area to render its cells.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</return-value>
<parameters>
<parameter name="area" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellArea` that the newly created column should use to layout cells.</doc>
<type name="CellArea" c:type="GtkCellArea*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_with_attributes" c:identifier="gtk_tree_view_column_new_with_attributes" introspectable="0">
<doc xml:space="preserve">Creates a new `GtkTreeViewColumn` with a number of default values.
This is equivalent to calling gtk_tree_view_column_set_title(),
gtk_tree_view_column_pack_start(), and
gtk_tree_view_column_set_attributes() on the newly created `GtkTreeViewColumn`.
Here&#x2019;s a simple example:
|[&lt;!-- language="C" --&gt;
enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS };
// ...
{
GtkTreeViewColumn *column;
GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Title",
renderer,
"text", TEXT_COLUMN,
"foreground", COLOR_COLUMN,
NULL);
}
]|</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">A newly created `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</return-value>
<parameters>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">The title to set the header to</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">A %NULL-terminated list of attributes</doc>
<varargs/>
</parameter>
</parameters>
</constructor>
<method name="add_attribute" c:identifier="gtk_tree_view_column_add_attribute">
<doc xml:space="preserve">Adds an attribute mapping to the list in @tree_column.
The @column is the
column of the model to get a value from, and the @attribute is the
parameter on @cell_renderer to be set from the value. So for example
if column 2 of the model contains strings, you could have the
&#x201C;text&#x201D; attribute of a `GtkCellRendererText` get its values from
column 2.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell_renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` to set attributes on</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="attribute" transfer-ownership="none">
<doc xml:space="preserve">An attribute on the renderer</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The column position on the model to get the attribute from.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="cell_get_position" c:identifier="gtk_tree_view_column_cell_get_position">
<doc xml:space="preserve">Obtains the horizontal position and size of a cell in a column.
If the cell is not found in the column, @start_pos and @width
are not changed and %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell belongs to @tree_column</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell_renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="x_offset" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the horizontal
position of @cell within @tree_column</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for the width of @cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="cell_get_size" c:identifier="gtk_tree_view_column_cell_get_size">
<doc xml:space="preserve">Obtains the width and height needed to render the column. This is used
primarily by the `GtkTreeView`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="x_offset" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to return x offset of a cell relative to @cell_area</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="y_offset" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to return y offset of a cell relative to @cell_area</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to return width needed to render a cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to return height needed to render a cell</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="cell_is_visible" c:identifier="gtk_tree_view_column_cell_is_visible">
<doc xml:space="preserve">Returns %TRUE if any of the cells packed into the @tree_column are visible.
For this to be meaningful, you must first initialize the cells with
gtk_tree_view_column_cell_set_cell_data()</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if any of the cells packed into the @tree_column are currently visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="cell_set_cell_data" c:identifier="gtk_tree_view_column_cell_set_cell_data">
<doc xml:space="preserve">Sets the cell renderer based on the @tree_model and @iter. That is, for
every attribute mapping in @tree_column, it will get a value from the set
column on the @iter, and use that value to set the attribute on the cell
renderer. This is used primarily by the `GtkTreeView`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeModel` to get the cell renderers attributes from.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeIter` to get the cell renderer&#x2019;s attributes from.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="is_expander" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the row has children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="is_expanded" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the row has visible children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="clear" c:identifier="gtk_tree_view_column_clear">
<doc xml:space="preserve">Unsets all the mappings on all renderers on the @tree_column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="clear_attributes" c:identifier="gtk_tree_view_column_clear_attributes">
<doc xml:space="preserve">Clears all existing attributes previously set with
gtk_tree_view_column_set_attributes().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell_renderer" transfer-ownership="none">
<doc xml:space="preserve">a `GtkCellRenderer` to clear the attribute mapping on.</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="clicked" c:identifier="gtk_tree_view_column_clicked">
<doc xml:space="preserve">Emits the &#x201C;clicked&#x201D; signal on the column. This function will only work if
@tree_column is clickable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="focus_cell" c:identifier="gtk_tree_view_column_focus_cell">
<doc xml:space="preserve">Sets the current keyboard focus to be at @cell, if the column contains
2 or more editable and activatable cells.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
</parameters>
</method>
<method name="get_alignment" c:identifier="gtk_tree_view_column_get_alignment" glib:get-property="alignment">
<doc xml:space="preserve">Returns the current x alignment of @tree_column. This value can range
between 0.0 and 1.0.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current alignent of @tree_column.</doc>
<type name="gfloat" c:type="float"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_button" c:identifier="gtk_tree_view_column_get_button">
<doc xml:space="preserve">Returns the button used in the treeview column header</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The button for the column header.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_clickable" c:identifier="gtk_tree_view_column_get_clickable" glib:get-property="clickable">
<doc xml:space="preserve">Returns %TRUE if the user can click on the header for the column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if user can click the column header.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_expand" c:identifier="gtk_tree_view_column_get_expand" glib:get-property="expand">
<doc xml:space="preserve">Returns %TRUE if the column expands to fill available space.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the column expands to fill available space.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_fixed_width" c:identifier="gtk_tree_view_column_get_fixed_width" glib:get-property="fixed-width">
<doc xml:space="preserve">Gets the fixed width of the column. This may not be the actual displayed
width of the column; for that, use gtk_tree_view_column_get_width().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The fixed width of the column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_max_width" c:identifier="gtk_tree_view_column_get_max_width" glib:get-property="max-width">
<doc xml:space="preserve">Returns the maximum width in pixels of the @tree_column, or -1 if no maximum
width is set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The maximum width of the @tree_column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_min_width" c:identifier="gtk_tree_view_column_get_min_width" glib:get-property="min-width">
<doc xml:space="preserve">Returns the minimum width in pixels of the @tree_column, or -1 if no minimum
width is set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The minimum width of the @tree_column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_reorderable" c:identifier="gtk_tree_view_column_get_reorderable" glib:get-property="reorderable">
<doc xml:space="preserve">Returns %TRUE if the @tree_column can be reordered by the user.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @tree_column can be reordered by the user.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resizable" c:identifier="gtk_tree_view_column_get_resizable" glib:get-property="resizable">
<doc xml:space="preserve">Returns %TRUE if the @tree_column can be resized by the end user.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the @tree_column can be resized.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sizing" c:identifier="gtk_tree_view_column_get_sizing" glib:get-property="sizing">
<doc xml:space="preserve">Returns the current type of @tree_column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The type of @tree_column.</doc>
<type name="TreeViewColumnSizing" c:type="GtkTreeViewColumnSizing"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sort_column_id" c:identifier="gtk_tree_view_column_get_sort_column_id" glib:get-property="sort-column-id">
<doc xml:space="preserve">Gets the logical @sort_column_id that the model sorts on
when this column is selected for sorting.
See [method@Gtk.TreeViewColumn.set_sort_column_id].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current @sort_column_id for this column, or -1 if
this column can&#x2019;t be used for sorting</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sort_indicator" c:identifier="gtk_tree_view_column_get_sort_indicator" glib:get-property="sort-indicator">
<doc xml:space="preserve">Gets the value set by gtk_tree_view_column_set_sort_indicator().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the sort indicator arrow is displayed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sort_order" c:identifier="gtk_tree_view_column_get_sort_order" glib:get-property="sort-order">
<doc xml:space="preserve">Gets the value set by gtk_tree_view_column_set_sort_order().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the sort order the sort indicator is indicating</doc>
<type name="SortType" c:type="GtkSortType"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_spacing" c:identifier="gtk_tree_view_column_get_spacing" glib:get-property="spacing">
<doc xml:space="preserve">Returns the spacing of @tree_column.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the spacing of @tree_column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_tree_view_column_get_title" glib:get-property="title">
<doc xml:space="preserve">Returns the title of the widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the title of the column. This string should not be
modified or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tree_view" c:identifier="gtk_tree_view_column_get_tree_view">
<doc xml:space="preserve">Returns the `GtkTreeView` wherein @tree_column has been inserted.
If @column is currently not inserted in any tree view, %NULL is
returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The tree view wherein @column
has been inserted</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_tree_view_column_get_visible" glib:get-property="visible">
<doc xml:space="preserve">Returns %TRUE if @tree_column is visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the column is visible or not. If it is visible, then
the tree will show the column.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_widget" c:identifier="gtk_tree_view_column_get_widget" glib:get-property="widget">
<doc xml:space="preserve">Returns the `GtkWidget` in the button on the column header.
If a custom widget has not been set then %NULL is returned.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The `GtkWidget` in the column header</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width" c:identifier="gtk_tree_view_column_get_width" glib:get-property="width">
<doc xml:space="preserve">Returns the current size of @tree_column in pixels.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current width of @tree_column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_x_offset" c:identifier="gtk_tree_view_column_get_x_offset" glib:get-property="x-offset">
<doc xml:space="preserve">Returns the current X offset of @tree_column in pixels.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The current X offset of @tree_column.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="pack_end" c:identifier="gtk_tree_view_column_pack_end">
<doc xml:space="preserve">Adds the @cell to end of the column. If @expand is %FALSE, then the @cell
is allocated no more space than it needs. Any unused space is divided
evenly between cells for which @expand is %TRUE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @tree_column.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="pack_start" c:identifier="gtk_tree_view_column_pack_start">
<doc xml:space="preserve">Packs the @cell into the beginning of the column. If @expand is %FALSE, then
the @cell is allocated no more space than it needs. Any unused space is divided
evenly between cells for which @expand is %TRUE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @cell is to be given extra space allocated to @tree_column.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="queue_resize" c:identifier="gtk_tree_view_column_queue_resize">
<doc xml:space="preserve">Flags the column, and the cell renderers added to this column, to have
their sizes renegotiated.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_alignment" c:identifier="gtk_tree_view_column_set_alignment" glib:set-property="alignment">
<doc xml:space="preserve">Sets the alignment of the title or custom widget inside the column header.
The alignment determines its location inside the button -- 0.0 for left, 0.5
for center, 1.0 for right.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="xalign" transfer-ownership="none">
<doc xml:space="preserve">The alignment, which is between [0.0 and 1.0] inclusive.</doc>
<type name="gfloat" c:type="float"/>
</parameter>
</parameters>
</method>
<method name="set_attributes" c:identifier="gtk_tree_view_column_set_attributes" introspectable="0">
<doc xml:space="preserve">Sets the attributes in the list as the attributes of @tree_column.
The attributes should be in attribute/column order, as in
gtk_tree_view_column_add_attribute(). All existing attributes
are removed, and replaced with the new attributes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell_renderer" transfer-ownership="none">
<doc xml:space="preserve">the `GtkCellRenderer` we&#x2019;re setting the attributes of</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">A %NULL-terminated list of attributes</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="set_cell_data_func" c:identifier="gtk_tree_view_column_set_cell_data_func">
<doc xml:space="preserve">Sets the `GtkTreeCellDataFunc` to use for the column.
This
function is used instead of the standard attributes mapping for
setting the column value, and should set the value of @tree_column's
cell renderer as appropriate. @func may be %NULL to remove an
older one.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="cell_renderer" transfer-ownership="none">
<doc xml:space="preserve">A `GtkCellRenderer`</doc>
<type name="CellRenderer" c:type="GtkCellRenderer*"/>
</parameter>
<parameter name="func" transfer-ownership="none" nullable="1" allow-none="1" scope="notified" closure="2" destroy="3">
<doc xml:space="preserve">The `GtkTreeCellDataFunc` to use.</doc>
<type name="TreeCellDataFunc" c:type="GtkTreeCellDataFunc"/>
</parameter>
<parameter name="func_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The user data for @func.</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">The destroy notification for @func_data</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="set_clickable" c:identifier="gtk_tree_view_column_set_clickable" glib:set-property="clickable">
<doc xml:space="preserve">Sets the header to be active if @clickable is %TRUE. When the header is
active, then it can take keyboard focus, and can be clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="clickable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the header is active.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_expand" c:identifier="gtk_tree_view_column_set_expand" glib:set-property="expand">
<doc xml:space="preserve">Sets the column to take available extra space. This space is shared equally
amongst all columns that have the expand set to %TRUE. If no column has this
option set, then the last column gets all extra space. By default, every
column is created with this %FALSE.
Along with &#x201C;fixed-width&#x201D;, the &#x201C;expand&#x201D; property changes when the column is
resized by the user.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the column should expand to fill available space.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_fixed_width" c:identifier="gtk_tree_view_column_set_fixed_width" glib:set-property="fixed-width">
<doc xml:space="preserve">If @fixed_width is not -1, sets the fixed width of @tree_column; otherwise
unsets it. The effective value of @fixed_width is clamped between the
minimum and maximum width of the column; however, the value stored in the
&#x201C;fixed-width&#x201D; property is not clamped. If the column sizing is
%GTK_TREE_VIEW_COLUMN_GROW_ONLY or %GTK_TREE_VIEW_COLUMN_AUTOSIZE, setting
a fixed width overrides the automatically calculated width. Note that
@fixed_width is only a hint to GTK; the width actually allocated to the
column may be greater or less than requested.
Along with &#x201C;expand&#x201D;, the &#x201C;fixed-width&#x201D; property changes when the column is
resized by the user.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="fixed_width" transfer-ownership="none">
<doc xml:space="preserve">The new fixed width, in pixels, or -1.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_max_width" c:identifier="gtk_tree_view_column_set_max_width" glib:set-property="max-width">
<doc xml:space="preserve">Sets the maximum width of the @tree_column. If @max_width is -1, then the
maximum width is unset. Note, the column can actually be wider than max
width if it&#x2019;s the last column in a view. In this case, the column expands to
fill any extra space.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="max_width" transfer-ownership="none">
<doc xml:space="preserve">The maximum width of the column in pixels, or -1.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_min_width" c:identifier="gtk_tree_view_column_set_min_width" glib:set-property="min-width">
<doc xml:space="preserve">Sets the minimum width of the @tree_column. If @min_width is -1, then the
minimum width is unset.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="min_width" transfer-ownership="none">
<doc xml:space="preserve">The minimum width of the column in pixels, or -1.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_reorderable" c:identifier="gtk_tree_view_column_set_reorderable" glib:set-property="reorderable">
<doc xml:space="preserve">If @reorderable is %TRUE, then the column can be reordered by the end user
dragging the header.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="reorderable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the column can be reordered.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_resizable" c:identifier="gtk_tree_view_column_set_resizable" glib:set-property="resizable">
<doc xml:space="preserve">If @resizable is %TRUE, then the user can explicitly resize the column by
grabbing the outer edge of the column button.
If resizable is %TRUE and
sizing mode of the column is %GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
mode is changed to %GTK_TREE_VIEW_COLUMN_GROW_ONLY.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="resizable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if the column can be resized</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_sizing" c:identifier="gtk_tree_view_column_set_sizing" glib:set-property="sizing">
<doc xml:space="preserve">Sets the growth behavior of @tree_column to @type.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn`Sizing.</doc>
<type name="TreeViewColumnSizing" c:type="GtkTreeViewColumnSizing"/>
</parameter>
</parameters>
</method>
<method name="set_sort_column_id" c:identifier="gtk_tree_view_column_set_sort_column_id" glib:set-property="sort-column-id">
<doc xml:space="preserve">Sets the logical @sort_column_id that this column sorts on when this column
is selected for sorting. Doing so makes the column header clickable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="sort_column_id" transfer-ownership="none">
<doc xml:space="preserve">The @sort_column_id of the model to sort on.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_sort_indicator" c:identifier="gtk_tree_view_column_set_sort_indicator" glib:set-property="sort-indicator">
<doc xml:space="preserve">Call this function with a @setting of %TRUE to display an arrow in
the header button indicating the column is sorted. Call
gtk_tree_view_column_set_sort_order() to change the direction of
the arrow.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to display an indicator that the column is sorted</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_sort_order" c:identifier="gtk_tree_view_column_set_sort_order" glib:set-property="sort-order">
<doc xml:space="preserve">Changes the appearance of the sort indicator.
This does not actually sort the model. Use
gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
support. This function is primarily for custom sorting behavior, and should
be used in conjunction with gtk_tree_sortable_set_sort_column_id() to do
that. For custom models, the mechanism will vary.
The sort indicator changes direction to indicate normal sort or reverse sort.
Note that you must have the sort indicator enabled to see anything when
calling this function; see gtk_tree_view_column_set_sort_indicator().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeViewColumn`</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="order" transfer-ownership="none">
<doc xml:space="preserve">sort order that the sort indicator should indicate</doc>
<type name="SortType" c:type="GtkSortType"/>
</parameter>
</parameters>
</method>
<method name="set_spacing" c:identifier="gtk_tree_view_column_set_spacing" glib:set-property="spacing">
<doc xml:space="preserve">Sets the spacing field of @tree_column, which is the number of pixels to
place between cell renderers packed into it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="spacing" transfer-ownership="none">
<doc xml:space="preserve">distance between cell renderers in pixels.</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_tree_view_column_set_title" glib:set-property="title">
<doc xml:space="preserve">Sets the title of the @tree_column. If a custom widget has been set, then
this value is ignored.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none">
<doc xml:space="preserve">The title of the @tree_column.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_tree_view_column_set_visible" glib:set-property="visible">
<doc xml:space="preserve">Sets the visibility of @tree_column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @tree_column is visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_widget" c:identifier="gtk_tree_view_column_set_widget" glib:set-property="widget">
<doc xml:space="preserve">Sets the widget in the header to be @widget. If widget is %NULL, then the
header button is set with a `GtkLabel` set to the title of @tree_column.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="tree_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn`.</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">A child `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="alignment" writable="1" transfer-ownership="none" setter="set_alignment" getter="get_alignment">
<type name="gfloat" c:type="gfloat"/>
</property>
<property name="cell-area" writable="1" construct-only="1" transfer-ownership="none">
<doc xml:space="preserve">The `GtkCellArea` used to layout cell renderers for this column.
If no area is specified when creating the tree view column with gtk_tree_view_column_new_with_area()
a horizontally oriented `GtkCellAreaBox` will be used.</doc>
<type name="CellArea"/>
</property>
<property name="clickable" writable="1" transfer-ownership="none" setter="set_clickable" getter="get_clickable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="expand" writable="1" transfer-ownership="none" setter="set_expand" getter="get_expand">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="fixed-width" writable="1" transfer-ownership="none" setter="set_fixed_width" getter="get_fixed_width">
<type name="gint" c:type="gint"/>
</property>
<property name="max-width" writable="1" transfer-ownership="none" setter="set_max_width" getter="get_max_width">
<type name="gint" c:type="gint"/>
</property>
<property name="min-width" writable="1" transfer-ownership="none" setter="set_min_width" getter="get_min_width">
<type name="gint" c:type="gint"/>
</property>
<property name="reorderable" writable="1" transfer-ownership="none" setter="set_reorderable" getter="get_reorderable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="resizable" writable="1" transfer-ownership="none" setter="set_resizable" getter="get_resizable">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sizing" writable="1" transfer-ownership="none" setter="set_sizing" getter="get_sizing">
<type name="TreeViewColumnSizing"/>
</property>
<property name="sort-column-id" writable="1" transfer-ownership="none" setter="set_sort_column_id" getter="get_sort_column_id">
<doc xml:space="preserve">Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header
clickable. Set to -1 to make the column unsortable.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="sort-indicator" writable="1" transfer-ownership="none" setter="set_sort_indicator" getter="get_sort_indicator">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="sort-order" writable="1" transfer-ownership="none" setter="set_sort_order" getter="get_sort_order">
<type name="SortType"/>
</property>
<property name="spacing" writable="1" transfer-ownership="none" setter="set_spacing" getter="get_spacing">
<type name="gint" c:type="gint"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" setter="set_visible" getter="get_visible">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="widget" writable="1" transfer-ownership="none" setter="set_widget" getter="get_widget">
<type name="Widget"/>
</property>
<property name="width" transfer-ownership="none" getter="get_width">
<type name="gint" c:type="gint"/>
</property>
<property name="x-offset" transfer-ownership="none" getter="get_x_offset">
<type name="gint" c:type="gint"/>
</property>
<glib:signal name="clicked" when="last">
<doc xml:space="preserve">Emitted when the column's header has been clicked.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="TreeViewColumnDropFunc" c:type="GtkTreeViewColumnDropFunc">
<doc xml:space="preserve">Function type for determining whether @column can be dropped in a
particular spot (as determined by @prev_column and @next_column). In
left to right locales, @prev_column is on the left of the potential drop
spot, and @next_column is on the right. In right to left mode, this is
reversed. This function should return %TRUE if the spot is a valid drop
spot. Please note that returning %TRUE does not actually indicate that
the column drop was made, but is meant only to indicate a possible drop
spot to the user.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE, if @column can be dropped in this spot</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">The `GtkTreeViewColumn` being dragged</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="prev_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn` on one side of @column</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="next_column" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeViewColumn` on the other side of @column</doc>
<type name="TreeViewColumn" c:type="GtkTreeViewColumn*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="TreeViewColumnSizing" glib:type-name="GtkTreeViewColumnSizing" glib:get-type="gtk_tree_view_column_sizing_get_type" c:type="GtkTreeViewColumnSizing">
<doc xml:space="preserve">The sizing method the column uses to determine its width. Please note
that %GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and
can make columns appear choppy.</doc>
<member name="grow_only" value="0" c:identifier="GTK_TREE_VIEW_COLUMN_GROW_ONLY" glib:nick="grow-only" glib:name="GTK_TREE_VIEW_COLUMN_GROW_ONLY">
<doc xml:space="preserve">Columns only get bigger in reaction to changes in the model</doc>
</member>
<member name="autosize" value="1" c:identifier="GTK_TREE_VIEW_COLUMN_AUTOSIZE" glib:nick="autosize" glib:name="GTK_TREE_VIEW_COLUMN_AUTOSIZE">
<doc xml:space="preserve">Columns resize to be the optimal size every time the model changes.</doc>
</member>
<member name="fixed" value="2" c:identifier="GTK_TREE_VIEW_COLUMN_FIXED" glib:nick="fixed" glib:name="GTK_TREE_VIEW_COLUMN_FIXED">
<doc xml:space="preserve">Columns are a fixed numbers of pixels wide.</doc>
</member>
</enumeration>
<enumeration name="TreeViewDropPosition" glib:type-name="GtkTreeViewDropPosition" glib:get-type="gtk_tree_view_drop_position_get_type" c:type="GtkTreeViewDropPosition">
<doc xml:space="preserve">An enum for determining where a dropped row goes.</doc>
<member name="before" value="0" c:identifier="GTK_TREE_VIEW_DROP_BEFORE" glib:nick="before" glib:name="GTK_TREE_VIEW_DROP_BEFORE">
<doc xml:space="preserve">dropped row is inserted before</doc>
</member>
<member name="after" value="1" c:identifier="GTK_TREE_VIEW_DROP_AFTER" glib:nick="after" glib:name="GTK_TREE_VIEW_DROP_AFTER">
<doc xml:space="preserve">dropped row is inserted after</doc>
</member>
<member name="into_or_before" value="2" c:identifier="GTK_TREE_VIEW_DROP_INTO_OR_BEFORE" glib:nick="into-or-before" glib:name="GTK_TREE_VIEW_DROP_INTO_OR_BEFORE">
<doc xml:space="preserve">dropped row becomes a child or is inserted before</doc>
</member>
<member name="into_or_after" value="3" c:identifier="GTK_TREE_VIEW_DROP_INTO_OR_AFTER" glib:nick="into-or-after" glib:name="GTK_TREE_VIEW_DROP_INTO_OR_AFTER">
<doc xml:space="preserve">dropped row becomes a child or is inserted after</doc>
</member>
</enumeration>
<enumeration name="TreeViewGridLines" glib:type-name="GtkTreeViewGridLines" glib:get-type="gtk_tree_view_grid_lines_get_type" c:type="GtkTreeViewGridLines">
<doc xml:space="preserve">Used to indicate which grid lines to draw in a tree view.</doc>
<member name="none" value="0" c:identifier="GTK_TREE_VIEW_GRID_LINES_NONE" glib:nick="none" glib:name="GTK_TREE_VIEW_GRID_LINES_NONE">
<doc xml:space="preserve">No grid lines.</doc>
</member>
<member name="horizontal" value="1" c:identifier="GTK_TREE_VIEW_GRID_LINES_HORIZONTAL" glib:nick="horizontal" glib:name="GTK_TREE_VIEW_GRID_LINES_HORIZONTAL">
<doc xml:space="preserve">Horizontal grid lines.</doc>
</member>
<member name="vertical" value="2" c:identifier="GTK_TREE_VIEW_GRID_LINES_VERTICAL" glib:nick="vertical" glib:name="GTK_TREE_VIEW_GRID_LINES_VERTICAL">
<doc xml:space="preserve">Vertical grid lines.</doc>
</member>
<member name="both" value="3" c:identifier="GTK_TREE_VIEW_GRID_LINES_BOTH" glib:nick="both" glib:name="GTK_TREE_VIEW_GRID_LINES_BOTH">
<doc xml:space="preserve">Horizontal and vertical grid lines.</doc>
</member>
</enumeration>
<callback name="TreeViewMappingFunc" c:type="GtkTreeViewMappingFunc">
<doc xml:space="preserve">Function used for gtk_tree_view_map_expanded_rows().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="tree_view" transfer-ownership="none">
<doc xml:space="preserve">A `GtkTreeView`</doc>
<type name="TreeView" c:type="GtkTreeView*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">The path that&#x2019;s expanded</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="TreeViewRowSeparatorFunc" c:type="GtkTreeViewRowSeparatorFunc">
<doc xml:space="preserve">Function type for determining whether the row pointed to by @iter should
be rendered as a separator. A common way to implement this is to have a
boolean column in the model, whose values the `GtkTreeViewRowSeparatorFunc`
returns.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the row is a separator</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` pointing at a row in @model</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1" closure="2">
<doc xml:space="preserve">user data</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<callback name="TreeViewSearchEqualFunc" c:type="GtkTreeViewSearchEqualFunc">
<doc xml:space="preserve">A function used for checking whether a row in @model matches
a search key string entered by the user. Note the return value
is reversed from what you would normally expect, though it
has some similarity to strcmp() returning 0 for equal strings.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if the row matches, %TRUE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="model" transfer-ownership="none">
<doc xml:space="preserve">the `GtkTreeModel` being searched</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="column" transfer-ownership="none">
<doc xml:space="preserve">the search column set by gtk_tree_view_set_search_column()</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="key" transfer-ownership="none">
<doc xml:space="preserve">the key string to compare with</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeIter` pointing the row of @model that should be compared
with @key.</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="search_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">user data from gtk_tree_view_set_search_equal_func()</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</callback>
<enumeration name="Unit" glib:type-name="GtkUnit" glib:get-type="gtk_unit_get_type" c:type="GtkUnit">
<doc xml:space="preserve">See also gtk_print_settings_set_paper_width().</doc>
<member name="none" value="0" c:identifier="GTK_UNIT_NONE" glib:nick="none" glib:name="GTK_UNIT_NONE">
<doc xml:space="preserve">No units.</doc>
</member>
<member name="points" value="1" c:identifier="GTK_UNIT_POINTS" glib:nick="points" glib:name="GTK_UNIT_POINTS">
<doc xml:space="preserve">Dimensions in points.</doc>
</member>
<member name="inch" value="2" c:identifier="GTK_UNIT_INCH" glib:nick="inch" glib:name="GTK_UNIT_INCH">
<doc xml:space="preserve">Dimensions in inches.</doc>
</member>
<member name="mm" value="3" c:identifier="GTK_UNIT_MM" glib:nick="mm" glib:name="GTK_UNIT_MM">
<doc xml:space="preserve">Dimensions in millimeters</doc>
</member>
</enumeration>
<function-macro name="VALUE_HOLDS_EXPRESSION" c:identifier="GTK_VALUE_HOLDS_EXPRESSION" introspectable="0">
<doc xml:space="preserve">Evaluates to %TRUE if @value was initialized with %GTK_TYPE_EXPRESSION.</doc>
<parameters>
<parameter name="value">
<doc xml:space="preserve">a `GValue`</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="VIEWPORT" c:identifier="GTK_VIEWPORT" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="VOLUME_BUTTON" c:identifier="GTK_VOLUME_BUTTON" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="Video" c:symbol-prefix="video" c:type="GtkVideo" parent="Widget" glib:type-name="GtkVideo" glib:get-type="gtk_video_get_type" glib:type-struct="VideoClass">
<doc xml:space="preserve">`GtkVideo` is a widget to show a `GtkMediaStream` with media controls.
![An example GtkVideo](video.png)
The controls are available separately as [class@Gtk.MediaControls].
If you just want to display a video without controls, you can treat it
like any other paintable and for example put it into a [class@Gtk.Picture].
`GtkVideo` aims to cover use cases such as previews, embedded animations,
etc. It supports autoplay, looping, and simple media controls. It does
not have support for video overlays, multichannel audio, device
selection, or input. If you are writing a full-fledged video player,
you may want to use the [iface@Gdk.Paintable] API and a media framework
such as Gstreamer directly.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_video_new">
<doc xml:space="preserve">Creates a new empty `GtkVideo`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVideo`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<constructor name="new_for_file" c:identifier="gtk_video_new_for_file">
<doc xml:space="preserve">Creates a `GtkVideo` to play back the given @file.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVideo`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GFile`</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_filename" c:identifier="gtk_video_new_for_filename">
<doc xml:space="preserve">Creates a `GtkVideo` to play back the given @filename.
This is a utility function that calls [ctor@Gtk.Video.new_for_file],
See that function for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVideo`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">filename to play back</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_media_stream" c:identifier="gtk_video_new_for_media_stream">
<doc xml:space="preserve">Creates a `GtkVideo` to play back the given @stream.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVideo`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="stream" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkMediaStream`</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</constructor>
<constructor name="new_for_resource" c:identifier="gtk_video_new_for_resource">
<doc xml:space="preserve">Creates a `GtkVideo` to play back the resource at the
given @resource_path.
This is a utility function that calls [ctor@Gtk.Video.new_for_file].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVideo`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">resource path to play back</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</constructor>
<method name="get_autoplay" c:identifier="gtk_video_get_autoplay" glib:get-property="autoplay">
<attribute name="org.gtk.Method.get_property" value="autoplay"/>
<doc xml:space="preserve">Returns %TRUE if videos have been set to loop.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if streams should autoplay</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_file" c:identifier="gtk_video_get_file" glib:get-property="file">
<attribute name="org.gtk.Method.get_propert" value="file"/>
<doc xml:space="preserve">Gets the file played by @self or %NULL if not playing back
a file.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The file played by @self</doc>
<type name="Gio.File" c:type="GFile*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_loop" c:identifier="gtk_video_get_loop" glib:get-property="loop">
<attribute name="org.gtk.Method.get_property" value="loop"/>
<doc xml:space="preserve">Returns %TRUE if videos have been set to loop.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if streams should loop</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_media_stream" c:identifier="gtk_video_get_media_stream" glib:get-property="media-stream">
<attribute name="org.gtk.Method.get_property" value="media-stream"/>
<doc xml:space="preserve">Gets the media stream managed by @self or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The media stream managed by @self</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_autoplay" c:identifier="gtk_video_set_autoplay" glib:set-property="autoplay">
<attribute name="org.gtk.Method.set_property" value="autoplay"/>
<doc xml:space="preserve">Sets whether @self automatically starts playback when it
becomes visible or when a new file gets loaded.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="autoplay" transfer-ownership="none">
<doc xml:space="preserve">whether media streams should autoplay</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_file" c:identifier="gtk_video_set_file" glib:set-property="file">
<attribute name="org.gtk.Method.set_property" value="file"/>
<doc xml:space="preserve">Makes @self play the given @file.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="file" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the file to play</doc>
<type name="Gio.File" c:type="GFile*"/>
</parameter>
</parameters>
</method>
<method name="set_filename" c:identifier="gtk_video_set_filename">
<doc xml:space="preserve">Makes @self play the given @filename.
This is a utility function that calls gtk_video_set_file(),</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="filename" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the filename to play</doc>
<type name="filename" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_loop" c:identifier="gtk_video_set_loop" glib:set-property="loop">
<attribute name="org.gtk.Method.set_property" value="loop"/>
<doc xml:space="preserve">Sets whether new files loaded by @self should be set to loop.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="loop" transfer-ownership="none">
<doc xml:space="preserve">whether media streams should loop</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_media_stream" c:identifier="gtk_video_set_media_stream" glib:set-property="media-stream">
<attribute name="org.gtk.Method.set_property" value="media-stream"/>
<doc xml:space="preserve">Sets the media stream to be played back.
@self will take full control of managing the media stream. If you
want to manage a media stream yourself, consider using a
[class@Gtk.Picture] for display.
If you want to display a file, consider using [method@Gtk.Video.set_file]
instead.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="stream" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The media stream to play or %NULL to unset</doc>
<type name="MediaStream" c:type="GtkMediaStream*"/>
</parameter>
</parameters>
</method>
<method name="set_resource" c:identifier="gtk_video_set_resource">
<doc xml:space="preserve">Makes @self play the resource at the given @resource_path.
This is a utility function that calls [method@Gtk.Video.set_file].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkVideo`</doc>
<type name="Video" c:type="GtkVideo*"/>
</instance-parameter>
<parameter name="resource_path" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the resource to set</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<property name="autoplay" writable="1" transfer-ownership="none" setter="set_autoplay" getter="get_autoplay">
<attribute name="org.gtk.Property.get" value="gtk_video_get_autoplay"/>
<attribute name="org.gtk.Property.set" value="gtk_video_set_autoplay"/>
<doc xml:space="preserve">If the video should automatically begin playing.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="file" writable="1" transfer-ownership="none" setter="set_file" getter="get_file">
<attribute name="org.gtk.Property.get" value="gtk_video_get_file"/>
<attribute name="org.gtk.Property.set" value="gtk_video_set_file"/>
<doc xml:space="preserve">The file played by this video if the video is playing a file.</doc>
<type name="Gio.File"/>
</property>
<property name="loop" writable="1" transfer-ownership="none" setter="set_loop" getter="get_loop">
<attribute name="org.gtk.Property.get" value="gtk_video_get_loop"/>
<attribute name="org.gtk.Property.set" value="gtk_video_set_loop"/>
<doc xml:space="preserve">If new media files should be set to loop.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="media-stream" writable="1" transfer-ownership="none" setter="set_media_stream" getter="get_media_stream">
<attribute name="org.gtk.Property.get" value="gtk_video_get_media_stream"/>
<attribute name="org.gtk.Property.set" value="gtk_video_set_media_stream"/>
<doc xml:space="preserve">The media-stream played</doc>
<type name="MediaStream"/>
</property>
</class>
<record name="VideoClass" c:type="GtkVideoClass" glib:is-gtype-struct-for="Video">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<class name="Viewport" c:symbol-prefix="viewport" c:type="GtkViewport" parent="Widget" glib:type-name="GtkViewport" glib:get-type="gtk_viewport_get_type">
<doc xml:space="preserve">`GtkViewport` implements scrollability for widgets that lack their
own scrolling capabilities.
Use `GtkViewport` to scroll child widgets such as `GtkGrid`,
`GtkBox`, and so on.
The `GtkViewport` will start scrolling content only if allocated
less than the child widget&#x2019;s minimum size in a given orientation.
# CSS nodes
`GtkViewport` has a single CSS node with name `viewport`.
# Accessibility
`GtkViewport` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Scrollable"/>
<constructor name="new" c:identifier="gtk_viewport_new">
<doc xml:space="preserve">Creates a new `GtkViewport`.
The new viewport uses the given adjustments, or default
adjustments if none are given.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkViewport`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="hadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">horizontal adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
<parameter name="vadjustment" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">vertical adjustment</doc>
<type name="Adjustment" c:type="GtkAdjustment*"/>
</parameter>
</parameters>
</constructor>
<method name="get_child" c:identifier="gtk_viewport_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @viewport.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @viewport</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="viewport" transfer-ownership="none">
<doc xml:space="preserve">a `GtkViewport`</doc>
<type name="Viewport" c:type="GtkViewport*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scroll_to_focus" c:identifier="gtk_viewport_get_scroll_to_focus" glib:get-property="scroll-to-focus">
<attribute name="org.gtk.Method.get_property" value="scroll-to-focus"/>
<doc xml:space="preserve">Gets whether the viewport is scrolling to keep the focused
child in view.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the viewport keeps the focus child scrolled to view</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="viewport" transfer-ownership="none">
<doc xml:space="preserve">a `GtkViewport`</doc>
<type name="Viewport" c:type="GtkViewport*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_viewport_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @viewport.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="viewport" transfer-ownership="none">
<doc xml:space="preserve">a `GtkViewport`</doc>
<type name="Viewport" c:type="GtkViewport*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_scroll_to_focus" c:identifier="gtk_viewport_set_scroll_to_focus" glib:set-property="scroll-to-focus">
<attribute name="org.gtk.Method.set_property" value="scroll-to-focus"/>
<doc xml:space="preserve">Sets whether the viewport should automatically scroll
to keep the focused child in view.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="viewport" transfer-ownership="none">
<doc xml:space="preserve">a `GtkViewport`</doc>
<type name="Viewport" c:type="GtkViewport*"/>
</instance-parameter>
<parameter name="scroll_to_focus" transfer-ownership="none">
<doc xml:space="preserve">whether to keep the focus widget scrolled to view</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_viewport_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_viewport_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="scroll-to-focus" writable="1" transfer-ownership="none" setter="set_scroll_to_focus" getter="get_scroll_to_focus">
<attribute name="org.gtk.Property.get" value="gtk_viewport_get_scroll_to_focus"/>
<attribute name="org.gtk.Property.set" value="gtk_viewport_set_scroll_to_focus"/>
<doc xml:space="preserve">Whether to scroll when the focus changes.
Before 4.6.2, this property was mistakenly defaulting to FALSE, so if your
code needs to work with older versions, consider setting it explicitly to
TRUE.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
</class>
<class name="VolumeButton" c:symbol-prefix="volume_button" c:type="GtkVolumeButton" parent="ScaleButton" glib:type-name="GtkVolumeButton" glib:get-type="gtk_volume_button_get_type">
<doc xml:space="preserve">`GtkVolumeButton` is a `GtkScaleButton` subclass tailored for
volume control.
![An example GtkVolumeButton](volumebutton.png)</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Orientable"/>
<constructor name="new" c:identifier="gtk_volume_button_new">
<doc xml:space="preserve">Creates a `GtkVolumeButton`.
The button has a range between 0.0 and 1.0, with a stepping of 0.02.
Volume values can be obtained and modified using the functions from
[class@Gtk.ScaleButton].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkVolumeButton`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<property name="use-symbolic" writable="1" construct="1" transfer-ownership="none">
<doc xml:space="preserve">Whether to use symbolic icons as the icons.
Note that if the symbolic icons are not available in your installed
theme, then the normal (potentially colorful) icons will be used.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<field name="parent">
<type name="ScaleButton" c:type="GtkScaleButton"/>
</field>
</class>
<function-macro name="WIDGET" c:identifier="GTK_WIDGET" introspectable="0">
<parameters>
<parameter name="widget">
</parameter>
</parameters>
</function-macro>
<function-macro name="WIDGET_CLASS" c:identifier="GTK_WIDGET_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="WIDGET_GET_CLASS" c:identifier="GTK_WIDGET_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW" c:identifier="GTK_WINDOW" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW_CLASS" c:identifier="GTK_WINDOW_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW_GET_CLASS" c:identifier="GTK_WINDOW_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW_GROUP" c:identifier="GTK_WINDOW_GROUP" introspectable="0">
<parameters>
<parameter name="object">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW_GROUP_CLASS" c:identifier="GTK_WINDOW_GROUP_CLASS" introspectable="0">
<parameters>
<parameter name="klass">
</parameter>
</parameters>
</function-macro>
<function-macro name="WINDOW_GROUP_GET_CLASS" c:identifier="GTK_WINDOW_GROUP_GET_CLASS" introspectable="0">
<parameters>
<parameter name="obj">
</parameter>
</parameters>
</function-macro>
<class name="Widget" c:symbol-prefix="widget" c:type="GtkWidget" parent="GObject.InitiallyUnowned" abstract="1" glib:type-name="GtkWidget" glib:get-type="gtk_widget_get_type" glib:type-struct="WidgetClass">
<doc xml:space="preserve">The base class for all widgets.
`GtkWidget` is the base class all widgets in GTK derive from. It manages the
widget lifecycle, layout, states and style.
### Height-for-width Geometry Management
GTK uses a height-for-width (and width-for-height) geometry management
system. Height-for-width means that a widget can change how much
vertical space it needs, depending on the amount of horizontal space
that it is given (and similar for width-for-height). The most common
example is a label that reflows to fill up the available width, wraps
to fewer lines, and therefore needs less height.
Height-for-width geometry management is implemented in GTK by way
of two virtual methods:
- [vfunc@Gtk.Widget.get_request_mode]
- [vfunc@Gtk.Widget.measure]
There are some important things to keep in mind when implementing
height-for-width and when using it in widget implementations.
If you implement a direct `GtkWidget` subclass that supports
height-for-width or width-for-height geometry management for itself
or its child widgets, the [vfunc@Gtk.Widget.get_request_mode] virtual
function must be implemented as well and return the widget's preferred
request mode. The default implementation of this virtual function
returns %GTK_SIZE_REQUEST_CONSTANT_SIZE, which means that the widget will
only ever get -1 passed as the for_size value to its
[vfunc@Gtk.Widget.measure] implementation.
The geometry management system will query a widget hierarchy in
only one orientation at a time. When widgets are initially queried
for their minimum sizes it is generally done in two initial passes
in the [enum@Gtk.SizeRequestMode] chosen by the toplevel.
For example, when queried in the normal %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH mode:
First, the default minimum and natural width for each widget
in the interface will be computed using [id@gtk_widget_measure] with an
orientation of %GTK_ORIENTATION_HORIZONTAL and a for_size of -1.
Because the preferred widths for each widget depend on the preferred
widths of their children, this information propagates up the hierarchy,
and finally a minimum and natural width is determined for the entire
toplevel. Next, the toplevel will use the minimum width to query for the
minimum height contextual to that width using [id@gtk_widget_measure] with an
orientation of %GTK_ORIENTATION_VERTICAL and a for_size of the just computed
width. This will also be a highly recursive operation. The minimum height
for the minimum width is normally used to set the minimum size constraint
on the toplevel.
After the toplevel window has initially requested its size in both
dimensions it can go on to allocate itself a reasonable size (or a size
previously specified with [method@Gtk.Window.set_default_size]). During the
recursive allocation process it&#x2019;s important to note that request cycles
will be recursively executed while widgets allocate their children.
Each widget, once allocated a size, will go on to first share the
space in one orientation among its children and then request each child's
height for its target allocated width or its width for allocated height,
depending. In this way a `GtkWidget` will typically be requested its size
a number of times before actually being allocated a size. The size a
widget is finally allocated can of course differ from the size it has
requested. For this reason, `GtkWidget` caches a small number of results
to avoid re-querying for the same sizes in one allocation cycle.
If a widget does move content around to intelligently use up the
allocated size then it must support the request in both
`GtkSizeRequestMode`s even if the widget in question only
trades sizes in a single orientation.
For instance, a [class@Gtk.Label] that does height-for-width word wrapping
will not expect to have [vfunc@Gtk.Widget.measure] with an orientation of
%GTK_ORIENTATION_VERTICAL called because that call is specific to a
width-for-height request. In this case the label must return the height
required for its own minimum possible width. By following this rule any
widget that handles height-for-width or width-for-height requests will
always be allocated at least enough space to fit its own content.
Here are some examples of how a %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH widget
generally deals with width-for-height requests:
```c
static void
foo_widget_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum_size,
int *natural_size,
int *minimum_baseline,
int *natural_baseline)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
// Calculate minimum and natural width
}
else // VERTICAL
{
if (i_am_in_height_for_width_mode)
{
int min_width, dummy;
// First, get the minimum width of our widget
GTK_WIDGET_GET_CLASS (widget)-&gt;measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
&amp;min_width, &amp;dummy, &amp;dummy, &amp;dummy);
// Now use the minimum width to retrieve the minimum and natural height to display
// that width.
GTK_WIDGET_GET_CLASS (widget)-&gt;measure (widget, GTK_ORIENTATION_VERTICAL, min_width,
minimum_size, natural_size, &amp;dummy, &amp;dummy);
}
else
{
// ... some widgets do both.
}
}
}
```
Often a widget needs to get its own request during size request or
allocation. For example, when computing height it may need to also
compute width. Or when deciding how to use an allocation, the widget
may need to know its natural size. In these cases, the widget should
be careful to call its virtual methods directly, like in the code
example above.
It will not work to use the wrapper function [method@Gtk.Widget.measure]
inside your own [vfunc@Gtk.Widget.size_allocate] implementation.
These return a request adjusted by [class@Gtk.SizeGroup], the widget's
align and expand flags, as well as its CSS style.
If a widget used the wrappers inside its virtual method implementations,
then the adjustments (such as widget margins) would be applied
twice. GTK therefore does not allow this and will warn if you try
to do it.
Of course if you are getting the size request for another widget, such
as a child widget, you must use [id@gtk_widget_measure]; otherwise, you
would not properly consider widget margins, [class@Gtk.SizeGroup], and
so forth.
GTK also supports baseline vertical alignment of widgets. This
means that widgets are positioned such that the typographical baseline of
widgets in the same row are aligned. This happens if a widget supports
baselines, has a vertical alignment of %GTK_ALIGN_BASELINE, and is inside
a widget that supports baselines and has a natural &#x201C;row&#x201D; that it aligns to
the baseline, or a baseline assigned to it by the grandparent.
Baseline alignment support for a widget is also done by the
[vfunc@Gtk.Widget.measure] virtual function. It allows you to report
both a minimum and natural size.
If a widget ends up baseline aligned it will be allocated all the space in
the parent as if it was %GTK_ALIGN_FILL, but the selected baseline can be
found via [id@gtk_widget_get_allocated_baseline]. If the baseline has a
value other than -1 you need to align the widget such that the baseline
appears at the position.
### GtkWidget as GtkBuildable
The `GtkWidget` implementation of the `GtkBuildable` interface
supports various custom elements to specify additional aspects of widgets
that are not directly expressed as properties.
If the widget uses a [class@Gtk.LayoutManager], `GtkWidget` supports
a custom `&lt;layout&gt;` element, used to define layout properties:
```xml
&lt;object class="GtkGrid" id="my_grid"&gt;
&lt;child&gt;
&lt;object class="GtkLabel" id="label1"&gt;
&lt;property name="label"&gt;Description&lt;/property&gt;
&lt;layout&gt;
&lt;property name="column"&gt;0&lt;/property&gt;
&lt;property name="row"&gt;0&lt;/property&gt;
&lt;property name="row-span"&gt;1&lt;/property&gt;
&lt;property name="column-span"&gt;1&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkEntry" id="description_entry"&gt;
&lt;layout&gt;
&lt;property name="column"&gt;1&lt;/property&gt;
&lt;property name="row"&gt;0&lt;/property&gt;
&lt;property name="row-span"&gt;1&lt;/property&gt;
&lt;property name="column-span"&gt;1&lt;/property&gt;
&lt;/layout&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
`GtkWidget` allows style information such as style classes to
be associated with widgets, using the custom `&lt;style&gt;` element:
```xml
&lt;object class="GtkButton" id="button1"&gt;
&lt;style&gt;
&lt;class name="my-special-button-class"/&gt;
&lt;class name="dark-button"/&gt;
&lt;/style&gt;
&lt;/object&gt;
```
`GtkWidget` allows defining accessibility information, such as properties,
relations, and states, using the custom `&lt;accessibility&gt;` element:
```xml
&lt;object class="GtkButton" id="button1"&gt;
&lt;accessibility&gt;
&lt;property name="label"&gt;Download&lt;/property&gt;
&lt;relation name="labelled-by"&gt;label1&lt;/relation&gt;
&lt;/accessibility&gt;
&lt;/object&gt;
```
### Building composite widgets from template XML
`GtkWidget `exposes some facilities to automate the procedure
of creating composite widgets using "templates".
To create composite widgets with `GtkBuilder` XML, one must associate
the interface description with the widget class at class initialization
time using [method@Gtk.WidgetClass.set_template].
The interface description semantics expected in composite template descriptions
is slightly different from regular [class@Gtk.Builder] XML.
Unlike regular interface descriptions, [method@Gtk.WidgetClass.set_template] will
expect a `&lt;template&gt;` tag as a direct child of the toplevel `&lt;interface&gt;`
tag. The `&lt;template&gt;` tag must specify the &#x201C;class&#x201D; attribute which must be
the type name of the widget. Optionally, the &#x201C;parent&#x201D; attribute may be
specified to specify the direct parent type of the widget type, this is
ignored by `GtkBuilder` but required for UI design tools like
[Glade](https://glade.gnome.org/) to introspect what kind of properties and
internal children exist for a given type when the actual type does not exist.
The XML which is contained inside the `&lt;template&gt;` tag behaves as if it were
added to the `&lt;object&gt;` tag defining the widget itself. You may set properties
on a widget by inserting `&lt;property&gt;` tags into the `&lt;template&gt;` tag, and also
add `&lt;child&gt;` tags to add children and extend a widget in the normal way you
would with `&lt;object&gt;` tags.
Additionally, `&lt;object&gt;` tags can also be added before and after the initial
`&lt;template&gt;` tag in the normal way, allowing one to define auxiliary objects
which might be referenced by other widgets declared as children of the
`&lt;template&gt;` tag.
An example of a template definition:
```xml
&lt;interface&gt;
&lt;template class="FooWidget" parent="GtkBox"&gt;
&lt;property name="orientation"&gt;horizontal&lt;/property&gt;
&lt;property name="spacing"&gt;4&lt;/property&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="hello_button"&gt;
&lt;property name="label"&gt;Hello World&lt;/property&gt;
&lt;signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;child&gt;
&lt;object class="GtkButton" id="goodbye_button"&gt;
&lt;property name="label"&gt;Goodbye World&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/template&gt;
&lt;/interface&gt;
```
Typically, you'll place the template fragment into a file that is
bundled with your project, using `GResource`. In order to load the
template, you need to call [method@Gtk.WidgetClass.set_template_from_resource]
from the class initialization of your `GtkWidget` type:
```c
static void
foo_widget_class_init (FooWidgetClass *klass)
{
// ...
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui");
}
```
You will also need to call [method@Gtk.Widget.init_template] from the
instance initialization function:
```c
static void
foo_widget_init (FooWidget *self)
{
// ...
gtk_widget_init_template (GTK_WIDGET (self));
}
```
You can access widgets defined in the template using the
[id@gtk_widget_get_template_child] function, but you will typically declare
a pointer in the instance private data structure of your type using the same
name as the widget in the template definition, and call
[method@Gtk.WidgetClass.bind_template_child_full] (or one of its wrapper macros
[func@Gtk.widget_class_bind_template_child] and [func@Gtk.widget_class_bind_template_child_private])
with that name, e.g.
```c
typedef struct {
GtkWidget *hello_button;
GtkWidget *goodbye_button;
} FooWidgetPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX)
static void
foo_widget_class_init (FooWidgetClass *klass)
{
// ...
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui");
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
FooWidget, hello_button);
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
FooWidget, goodbye_button);
}
static void
foo_widget_init (FooWidget *widget)
{
}
```
You can also use [method@Gtk.WidgetClass.bind_template_callback_full] (or
is wrapper macro [func@Gtk.widget_class_bind_template_callback]) to connect
a signal callback defined in the template with a function visible in the
scope of the class, e.g.
```c
// the signal handler has the instance and user data swapped
// because of the swapped="yes" attribute in the template XML
static void
hello_button_clicked (FooWidget *self,
GtkButton *button)
{
g_print ("Hello, world!\n");
}
static void
foo_widget_class_init (FooWidgetClass *klass)
{
// ...
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui");
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
}
```</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<function name="get_default_direction" c:identifier="gtk_widget_get_default_direction">
<doc xml:space="preserve">Obtains the current default reading direction.
See [func@Gtk.Widget.set_default_direction].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the current default direction.</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</return-value>
</function>
<function name="set_default_direction" c:identifier="gtk_widget_set_default_direction">
<doc xml:space="preserve">Sets the default reading direction for widgets.
See [method@Gtk.Widget.set_direction].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="dir" transfer-ownership="none">
<doc xml:space="preserve">the new default direction. This cannot be %GTK_TEXT_DIR_NONE.</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
</parameters>
</function>
<virtual-method name="compute_expand">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="hexpand_p" transfer-ownership="none">
<type name="gboolean" c:type="gboolean*"/>
</parameter>
<parameter name="vexpand_p" transfer-ownership="none">
<type name="gboolean" c:type="gboolean*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="contains" invoker="contains">
<doc xml:space="preserve">Tests if the point at (@x, @y) is contained in @widget.
The coordinates for (@x, @y) must be in widget coordinates, so
(0, 0) is assumed to be the top left of @widget's content area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget contains (@x, @y).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="css_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="change" transfer-ownership="none">
<type name="CssStyleChange" c:type="GtkCssStyleChange*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="direction_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="previous_direction" transfer-ownership="none">
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="focus">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="get_request_mode" invoker="get_request_mode">
<doc xml:space="preserve">Gets whether the widget prefers a height-for-width layout
or a width-for-height layout.
Single-child widgets generally propagate the preference of
their child, more complex widgets need to request something
either in context of their children or in context of their
allocation capabilities.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @widget.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="grab_focus" invoker="grab_focus">
<doc xml:space="preserve">Causes @widget to have the keyboard focus for the `GtkWindow` it's inside.
If @widget is not focusable, or its [vfunc@Gtk.Widget.grab_focus]
implementation cannot transfer the focus to a descendant of @widget
that is focusable, it will not take focus and %FALSE will be returned.
Calling [method@Gtk.Widget.grab_focus] on an already focused widget
is allowed, should not have an effect, and return %TRUE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is now inside @widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="hide" invoker="hide">
<doc xml:space="preserve">Reverses the effects of gtk_widget_show().
This is causing the widget to be hidden (invisible to the user).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="keynav_failed" invoker="keynav_failed">
<doc xml:space="preserve">Emits the `::keynav-failed` signal on the widget.
This function should be called whenever keyboard navigation
within a single widget hits a boundary.
The return value of this function should be interpreted
in a way similar to the return value of
[method@Gtk.Widget.child_focus]. When %TRUE is returned,
stay in the widget, the failed keyboard navigation is OK
and/or there is nowhere we can/should move the focus to.
When %FALSE is returned, the caller should continue with
keyboard navigation outside the widget, e.g. by calling
[method@Gtk.Widget.child_focus] on the widget&#x2019;s toplevel.
The default [signal@Gtk.Widget::keynav-failed] handler returns
%FALSE for %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD.
For the other values of `GtkDirectionType` it returns %TRUE.
Whenever the default handler returns %TRUE, it also calls
[method@Gtk.Widget.error_bell] to notify the user of the
failed keyboard navigation.
A use case for providing an own implementation of ::keynav-failed
(either by connecting to it or by overriding it) would be a row of
[class@Gtk.Entry] widgets where the user should be able to navigate
the entire row with the cursor keys, as e.g. known from user
interfaces that require entering license keys.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if stopping keyboard navigation is fine, %FALSE
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">direction of focus movement</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="map" invoker="map">
<doc xml:space="preserve">Causes a widget to be mapped if it isn&#x2019;t already.
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="measure" invoker="measure">
<doc xml:space="preserve">Measures @widget in the orientation @orientation and for the given @for_size.
As an example, if @orientation is %GTK_ORIENTATION_HORIZONTAL and @for_size
is 300, this functions will compute the minimum and natural width of @widget
if it is allocated at a height of 300 pixels.
See [GtkWidget&#x2019;s geometry management section](class.Widget.html#height-for-width-geometry-management) for
a more details on implementing `GtkWidgetClass.measure()`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation, i.e.
if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is
the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL
case is analogous. This way, both height-for-width and width-for-height
requests can be implemented. If no size is known, -1 can be passed.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the minimum size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the natural size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="mnemonic_activate" invoker="mnemonic_activate">
<doc xml:space="preserve">Emits the ::mnemonic-activate signal.
See [signal@Gtk.Widget::mnemonic-activate].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="group_cycling" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there are other widgets with the same mnemonic</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="move_focus">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="query_tooltip">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="keyboard_tooltip" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="tooltip" transfer-ownership="none">
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="realize" invoker="realize">
<doc xml:space="preserve">Creates the GDK resources associated with a widget.
Normally realization happens implicitly; if you show a widget
and all its parent containers, then the widget will be realized
and mapped automatically.
Realizing a widget requires all the widget&#x2019;s parent widgets to be
realized; calling this function realizes the widget&#x2019;s parents
in addition to @widget itself. If a widget is not yet inside a
toplevel window when you realize it, bad things will happen.
This function is primarily used in widget implementations, and
isn&#x2019;t very useful otherwise. Many times when you think you might
need it, a better approach is to connect to a signal that will be
called after the widget is realized automatically, such as
[signal@Gtk.Widget::realize].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="root">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="set_focus_child" invoker="set_focus_child">
<doc xml:space="preserve">Set @child as the current focus child of @widget.
This function is only suitable for widget implementations.
If you want a certain widget to get the input focus, call
[method@Gtk.Widget.grab_focus] on it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a direct child widget of @widget or %NULL
to unset the focus child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="show" invoker="show">
<doc xml:space="preserve">Flags a widget to be displayed.
Any widget that isn&#x2019;t shown will not appear on the screen.
Remember that you have to show the containers containing a widget,
in addition to the widget itself, before it will appear onscreen.
When a toplevel container is shown, it is immediately realized and
mapped; other shown widgets are realized and mapped when their
toplevel container is realized and mapped.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="size_allocate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="snapshot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="snapshot" transfer-ownership="none">
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="state_flags_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="previous_state_flags" transfer-ownership="none">
<type name="StateFlags" c:type="GtkStateFlags"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="system_setting_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="settings" transfer-ownership="none">
<type name="SystemSetting" c:type="GtkSystemSetting"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unmap" invoker="unmap">
<doc xml:space="preserve">Causes a widget to be unmapped if it&#x2019;s currently mapped.
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="unrealize" invoker="unrealize">
<doc xml:space="preserve">Causes a widget to be unrealized (frees all GDK resources
associated with the widget).
This function is only useful in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="unroot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="action_set_enabled" c:identifier="gtk_widget_action_set_enabled">
<doc xml:space="preserve">Enable or disable an action installed with
gtk_widget_class_install_action().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">action name, such as "clipboard.paste"</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">whether the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="activate" c:identifier="gtk_widget_activate">
<doc xml:space="preserve">For widgets that can be &#x201C;activated&#x201D; (buttons, menu items, etc.),
this function activates them.
The activation will emit the signal set using
[method@Gtk.WidgetClass.set_activate_signal] during class initialization.
Activation is what happens when you press &lt;kbd&gt;Enter&lt;/kbd&gt;
on a widget during key navigation.
If you wish to handle the activation keybinding yourself, it is
recommended to use [method@Gtk.WidgetClass.add_shortcut] with an action
created with [ctor@Gtk.SignalAction.new].
If @widget isn't activatable, the function returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget was activatable</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` that&#x2019;s activatable</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="activate_action" c:identifier="gtk_widget_activate_action" shadowed-by="activate_action_variant" introspectable="0">
<doc xml:space="preserve">Looks up the action in the action groups associated
with @widget and its ancestors, and activates it.
This is a wrapper around [method@Gtk.Widget.activate_action_variant]
that constructs the @args variant according to @format_string.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action was activated, %FALSE if the action
does not exist</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action to activate</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="format_string" transfer-ownership="none">
<doc xml:space="preserve">GVariant format string for arguments or %NULL
for no arguments</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments, as given by format string</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="activate_action_variant" c:identifier="gtk_widget_activate_action_variant" shadows="activate_action">
<doc xml:space="preserve">Looks up the action in the action groups associated with
@widget and its ancestors, and activates it.
If the action is in an action group added with
[method@Gtk.Widget.insert_action_group], the @name is expected
to be prefixed with the prefix that was used when the group was
inserted.
The arguments must match the actions expected parameter type,
as returned by `g_action_get_parameter_type()`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action was activated, %FALSE if the
action does not exist.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action to activate</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="args" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">parameters to use</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="activate_default" c:identifier="gtk_widget_activate_default">
<doc xml:space="preserve">Activates the `default.activate` action from @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="add_controller" c:identifier="gtk_widget_add_controller">
<doc xml:space="preserve">Adds @controller to @widget so that it will receive events.
You will usually want to call this function right after
creating any kind of [class@Gtk.EventController].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="controller" transfer-ownership="full">
<doc xml:space="preserve">a `GtkEventController` that hasn't been
added to a widget yet</doc>
<type name="EventController" c:type="GtkEventController*"/>
</parameter>
</parameters>
</method>
<method name="add_css_class" c:identifier="gtk_widget_add_css_class">
<doc xml:space="preserve">Adds a style class to @widget.
After calling this function, the widgets style will match
for @css_class, according to CSS matching rules.
Use [method@Gtk.Widget.remove_css_class] to remove the
style again.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="css_class" transfer-ownership="none">
<doc xml:space="preserve">The style class to add to @widget, without
the leading '.' used for notation of style classes</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="add_mnemonic_label" c:identifier="gtk_widget_add_mnemonic_label">
<doc xml:space="preserve">Adds a widget to the list of mnemonic labels for this widget.
See [method@Gtk.Widget.list_mnemonic_labels]. Note the
list of mnemonic labels for the widget is cleared when the
widget is destroyed, so the caller must make sure to update
its internal state at this point as well.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` that acts as a mnemonic label for @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="add_tick_callback" c:identifier="gtk_widget_add_tick_callback">
<doc xml:space="preserve">Queues an animation frame update and adds a callback to be called
before each frame.
Until the tick callback is removed, it will be called frequently
(usually at the frame rate of the output device or as quickly as
the application can be repainted, whichever is slower). For this
reason, is most suitable for handling graphics that change every
frame or every few frames. The tick callback does not automatically
imply a relayout or repaint. If you want a repaint or relayout, and
aren&#x2019;t changing widget properties that would trigger that (for example,
changing the text of a `GtkLabel`), then you will have to call
[method@Gtk.Widget.queue_resize] or [method@Gtk.Widget.queue_draw]
yourself.
[method@Gdk.FrameClock.get_frame_time] should generally be used
for timing continuous animations and
[method@Gdk.FrameTimings.get_predicted_presentation_time] if you are
trying to display isolated frames at particular times.
This is a more convenient alternative to connecting directly to the
[signal@Gdk.FrameClock::update] signal of `GdkFrameClock`, since you
don't have to worry about when a `GdkFrameClock` is assigned to a widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">an id for the connection of this callback. Remove the callback
by passing the id returned from this function to
[method@Gtk.Widget.remove_tick_callback]</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="callback" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">function to call for updating animations</doc>
<type name="TickCallback" c:type="GtkTickCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">data to pass to @callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="notify" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function to call to free @user_data when the callback is removed.</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
</parameters>
</method>
<method name="allocate" c:identifier="gtk_widget_allocate">
<doc xml:space="preserve">This function is only used by `GtkWidget` subclasses, to
assign a size, position and (optionally) baseline to their
child widgets.
In this function, the allocation and baseline may be adjusted.
The given allocation will be forced to be bigger than the
widget's minimum size, as well as at least 0&#xD7;0 in size.
For a version that does not take a transform, see
[method@Gtk.Widget.size_allocate].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">New width of @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">New height of @widget</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">New baseline of @widget, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="transform" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">Transformation to be applied to @widget</doc>
<type name="Gsk.Transform" c:type="GskTransform*"/>
</parameter>
</parameters>
</method>
<method name="child_focus" c:identifier="gtk_widget_child_focus">
<doc xml:space="preserve">Called by widgets as the user moves around the window using
keyboard shortcuts.
The @direction argument indicates what kind of motion is taking place (up,
down, left, right, tab forward, tab backward).
This function calls the [vfunc@Gtk.Widget.focus] virtual function; widgets
can override the virtual function in order to implement appropriate focus
behavior.
The default `focus()` virtual function for a widget should return `TRUE` if
moving in @direction left the focus on a focusable location inside that
widget, and `FALSE` if moving in @direction moved the focus outside the
widget. When returning `TRUE`, widgets normallycall [method@Gtk.Widget.grab_focus]
to place the focus accordingly; when returning `FALSE`, they don&#x2019;t modify
the current focus location.
This function is used by custom widget implementations; if you're
writing an app, you&#x2019;d use [method@Gtk.Widget.grab_focus] to move
the focus to a particular widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus ended up inside @widget</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">direction of focus movement</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</method>
<method name="compute_bounds" c:identifier="gtk_widget_compute_bounds">
<doc xml:space="preserve">Computes the bounds for @widget in the coordinate space of @target.
FIXME: Explain what "bounds" are.
If the operation is successful, %TRUE is returned. If @widget has no
bounds or the bounds cannot be expressed in @target's coordinate space
(for example if both widgets are in different windows), %FALSE is
returned and @bounds is set to the zero rectangle.
It is valid for @widget and @target to be the same widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the bounds could be computed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="out_bounds" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">the rectangle taking the bounds</doc>
<type name="Graphene.Rect" c:type="graphene_rect_t*"/>
</parameter>
</parameters>
</method>
<method name="compute_expand" c:identifier="gtk_widget_compute_expand">
<doc xml:space="preserve">Computes whether a container should give this widget
extra space when possible.
Containers should check this, rather than looking at
[method@Gtk.Widget.get_hexpand] or [method@Gtk.Widget.get_vexpand].
This function already checks whether the widget is visible, so
visibility does not need to be checked separately. Non-visible
widgets are not expanded.
The computed expand value uses either the expand setting explicitly
set on the widget itself, or, if none has been explicitly set,
the widget may expand if some of its children do.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether widget tree rooted here should be expanded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">expand direction</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<method name="compute_point" c:identifier="gtk_widget_compute_point">
<doc xml:space="preserve">Translates the given @point in @widget's coordinates to coordinates
relative to @target&#x2019;s coordinate system.
In order to perform this operation, both widgets must share a
common ancestor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the point could be determined, %FALSE on failure.
In this case, 0 is stored in @out_point.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWidget` to transform into</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="point" transfer-ownership="none">
<doc xml:space="preserve">a point in @widget's coordinate system</doc>
<type name="Graphene.Point" c:type="const graphene_point_t*"/>
</parameter>
<parameter name="out_point" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">Set to the corresponding coordinates in
@target's coordinate system</doc>
<type name="Graphene.Point" c:type="graphene_point_t*"/>
</parameter>
</parameters>
</method>
<method name="compute_transform" c:identifier="gtk_widget_compute_transform">
<doc xml:space="preserve">Computes a matrix suitable to describe a transformation from
@widget's coordinate system into @target's coordinate system.
The transform can not be computed in certain cases, for example
when @widget and @target do not share a common ancestor. In that
case @out_transform gets set to the identity matrix.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the transform could be computed, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">the target widget that the matrix will transform to</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="out_transform" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">location to
store the final transformation</doc>
<type name="Graphene.Matrix" c:type="graphene_matrix_t*"/>
</parameter>
</parameters>
</method>
<method name="contains" c:identifier="gtk_widget_contains">
<doc xml:space="preserve">Tests if the point at (@x, @y) is contained in @widget.
The coordinates for (@x, @y) must be in widget coordinates, so
(0, 0) is assumed to be the top left of @widget's content area.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget contains (@x, @y).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="create_pango_context" c:identifier="gtk_widget_create_pango_context">
<doc xml:space="preserve">Creates a new `PangoContext` with the appropriate font map,
font options, font description, and base direction for drawing
text for this widget.
See also [method@Gtk.Widget.get_pango_context].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `PangoContext`</doc>
<type name="Pango.Context" c:type="PangoContext*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="create_pango_layout" c:identifier="gtk_widget_create_pango_layout">
<doc xml:space="preserve">Creates a new `PangoLayout` with the appropriate font map,
font description, and base direction for drawing text for
this widget.
If you keep a `PangoLayout` created in this way around,
you need to re-create it when the widget `PangoContext`
is replaced. This can be tracked by listening to changes
of the [property@Gtk.Widget:root] property on the widget.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the new `PangoLayout`</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">text to set on the layout</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="drag_check_threshold" c:identifier="gtk_drag_check_threshold">
<doc xml:space="preserve">Checks to see if a drag movement has passed the GTK drag threshold.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the drag threshold has been passed.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="start_x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate of start of drag</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="start_y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate of start of drag</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="current_x" transfer-ownership="none">
<doc xml:space="preserve">current X coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="current_y" transfer-ownership="none">
<doc xml:space="preserve">current Y coordinate</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="error_bell" c:identifier="gtk_widget_error_bell">
<doc xml:space="preserve">Notifies the user about an input-related error on this widget.
If the [property@Gtk.Settings:gtk-error-bell] setting is %TRUE,
it calls [method@Gdk.Surface.beep], otherwise it does nothing.
Note that the effect of [method@Gdk.Surface.beep] can be configured
in many ways, depending on the windowing backend and the desktop
environment or window manager that is used.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_allocated_baseline" c:identifier="gtk_widget_get_allocated_baseline">
<doc xml:space="preserve">Returns the baseline that has currently been allocated to @widget.
This function is intended to be used when implementing handlers
for the `GtkWidget`Class.snapshot() function, and when allocating
child widgets in `GtkWidget`Class.size_allocate().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the baseline of the @widget, or -1 if none</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_allocated_height" c:identifier="gtk_widget_get_allocated_height">
<doc xml:space="preserve">Returns the height that has currently been allocated to @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the height of the @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_allocated_width" c:identifier="gtk_widget_get_allocated_width">
<doc xml:space="preserve">Returns the width that has currently been allocated to @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the width of the @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_allocation" c:identifier="gtk_widget_get_allocation">
<doc xml:space="preserve">Retrieves the widget&#x2019;s allocation.
Note, when implementing a layout container: a widget&#x2019;s allocation
will be its &#x201C;adjusted&#x201D; allocation, that is, the widget&#x2019;s parent
typically calls [method@Gtk.Widget.size_allocate] with an allocation,
and that allocation is then adjusted (to handle margin
and alignment for example) before assignment to the widget.
[method@Gtk.Widget.get_allocation] returns the adjusted allocation that
was actually assigned to the widget. The adjusted allocation is
guaranteed to be completely contained within the
[method@Gtk.Widget.size_allocate] allocation, however.
So a layout container is guaranteed that its children stay inside
the assigned bounds, but not that they have exactly the bounds the
container assigned.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="allocation" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to a `GtkAllocation` to copy to</doc>
<type name="Allocation" c:type="GtkAllocation*"/>
</parameter>
</parameters>
</method>
<method name="get_ancestor" c:identifier="gtk_widget_get_ancestor">
<doc xml:space="preserve">Gets the first ancestor of @widget with type @widget_type.
For example, `gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)`
gets the first `GtkBox` that&#x2019;s an ancestor of @widget. No
reference will be added to the returned widget; it should
not be unreferenced.
Note that unlike [method@Gtk.Widget.is_ancestor], this function
considers @widget to be an ancestor of itself.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the ancestor widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="widget_type" transfer-ownership="none">
<doc xml:space="preserve">ancestor type</doc>
<type name="GType" c:type="GType"/>
</parameter>
</parameters>
</method>
<method name="get_can_focus" c:identifier="gtk_widget_get_can_focus" glib:get-property="can-focus">
<attribute name="org.gtk.Method.get_property" value="can-focus"/>
<doc xml:space="preserve">Determines whether the input focus can enter @widget or any
of its children.
See [method@Gtk.Widget.set_focusable].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the input focus can enter @widget, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_can_target" c:identifier="gtk_widget_get_can_target" glib:get-property="can-target">
<attribute name="org.gtk.Method.get_property" value="can-target"/>
<doc xml:space="preserve">Queries whether @widget can be the target of pointer events.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget can receive pointer events</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child_visible" c:identifier="gtk_widget_get_child_visible">
<doc xml:space="preserve">Gets the value set with gtk_widget_set_child_visible().
If you feel a need to use this function, your code probably
needs reorganization.
This function is only useful for container implementations
and should never be called by an application.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is mapped with the parent.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_clipboard" c:identifier="gtk_widget_get_clipboard">
<doc xml:space="preserve">Gets the clipboard object for @widget.
This is a utility function to get the clipboard object for the
`GdkDisplay` that @widget is using.
Note that this function always works, even when @widget is not
realized yet.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the appropriate clipboard object</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_css_classes" c:identifier="gtk_widget_get_css_classes" glib:get-property="css-classes">
<attribute name="org.gtk.Method.get_property" value="css-classes"/>
<doc xml:space="preserve">Returns the list of style classes applied to @widget.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a %NULL-terminated list of
css classes currently applied to @widget. The returned
list must freed using g_strfreev().</doc>
<array c:type="char**">
<type name="utf8"/>
</array>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_css_name" c:identifier="gtk_widget_get_css_name" glib:get-property="css-name">
<attribute name="org.gtk.Method.get_property" value="css-name"/>
<doc xml:space="preserve">Returns the CSS name that is used for @self.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the CSS name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_cursor" c:identifier="gtk_widget_get_cursor" glib:get-property="cursor">
<attribute name="org.gtk.Method.get_property" value="cursor"/>
<doc xml:space="preserve">Queries the cursor set on @widget.
See [method@Gtk.Widget.set_cursor] for details.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the cursor
currently in use or %NULL if the cursor is inherited</doc>
<type name="Gdk.Cursor" c:type="GdkCursor*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_direction" c:identifier="gtk_widget_get_direction">
<doc xml:space="preserve">Gets the reading direction for a particular widget.
See [method@Gtk.Widget.set_direction].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the reading direction for the widget.</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_display" c:identifier="gtk_widget_get_display">
<doc xml:space="preserve">Get the `GdkDisplay` for the toplevel window associated with
this widget.
This function can only be called after the widget has been
added to a widget hierarchy with a `GtkWindow` at the top.
In general, you should only create display specific
resources when a widget has been realized, and you should
free those resources when the widget is unrealized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GdkDisplay` for the toplevel
for this widget.</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_first_child" c:identifier="gtk_widget_get_first_child">
<doc xml:space="preserve">Returns the widgets first child.
This API is primarily meant for widget implementations.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The widget's first child</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus_child" c:identifier="gtk_widget_get_focus_child">
<doc xml:space="preserve">Returns the current focus child of @widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The current focus
child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus_on_click" c:identifier="gtk_widget_get_focus_on_click" glib:get-property="focus-on-click">
<attribute name="org.gtk.Method.get_property" value="focus-on-click"/>
<doc xml:space="preserve">Returns whether the widget should grab focus when it is clicked
with the mouse.
See [method@Gtk.Widget.set_focus_on_click].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget should grab focus when it is
clicked with the mouse</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focusable" c:identifier="gtk_widget_get_focusable" glib:get-property="focusable">
<attribute name="org.gtk.Method.get_property" value="focusable"/>
<doc xml:space="preserve">Determines whether @widget can own the input focus.
See [method@Gtk.Widget.set_focusable].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget can own the input focus, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_map" c:identifier="gtk_widget_get_font_map">
<doc xml:space="preserve">Gets the font map of @widget.
See [method@Gtk.Widget.set_font_map].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">A `PangoFontMap`</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_font_options" c:identifier="gtk_widget_get_font_options">
<doc xml:space="preserve">Returns the `cairo_font_options_t` of widget.
Seee [method@Gtk.Widget.set_font_options].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `cairo_font_options_t`
of widget</doc>
<type name="cairo.FontOptions" c:type="const cairo_font_options_t*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_frame_clock" c:identifier="gtk_widget_get_frame_clock">
<doc xml:space="preserve">Obtains the frame clock for a widget.
The frame clock is a global &#x201C;ticker&#x201D; that can be used to drive
animations and repaints. The most common reason to get the frame
clock is to call [method@Gdk.FrameClock.get_frame_time], in order
to get a time to use for animating. For example you might record
the start of the animation with an initial value from
[method@Gdk.FrameClock.get_frame_time], and then update the animation
by calling [method@Gdk.FrameClock.get_frame_time] again during each repaint.
[method@Gdk.FrameClock.request_phase] will result in a new frame on the
clock, but won&#x2019;t necessarily repaint any widgets. To repaint a
widget, you have to use [method@Gtk.Widget.queue_draw] which invalidates
the widget (thus scheduling it to receive a draw on the next
frame). gtk_widget_queue_draw() will also end up requesting a frame
on the appropriate frame clock.
A widget&#x2019;s frame clock will not change while the widget is
mapped. Reparenting a widget (which implies a temporary unmap) can
change the widget&#x2019;s frame clock.
Unrealized widgets do not have a frame clock.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GdkFrameClock`</doc>
<type name="Gdk.FrameClock" c:type="GdkFrameClock*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_halign" c:identifier="gtk_widget_get_halign" glib:get-property="halign">
<attribute name="org.gtk.Method.get_property" value="halign"/>
<doc xml:space="preserve">Gets the horizontal alignment of @widget.
For backwards compatibility reasons this method will never return
%GTK_ALIGN_BASELINE, but instead it will convert it to
%GTK_ALIGN_FILL. Baselines are not supported for horizontal
alignment.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the horizontal alignment of @widget</doc>
<type name="Align" c:type="GtkAlign"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_tooltip" c:identifier="gtk_widget_get_has_tooltip" glib:get-property="has-tooltip">
<attribute name="org.gtk.Method.get_property" value="has-tooltip"/>
<doc xml:space="preserve">Returns the current value of the `has-tooltip` property.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">current value of `has-tooltip` on @widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_height" c:identifier="gtk_widget_get_height">
<doc xml:space="preserve">Returns the content height of the widget.
This function returns the height passed to its
size-allocate implementation, which is the height you
should be using in [vfunc@Gtk.Widget.snapshot].
For pointer events, see [method@Gtk.Widget.contains].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The height of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hexpand" c:identifier="gtk_widget_get_hexpand" glib:get-property="hexpand">
<attribute name="org.gtk.Method.get_property" value="hexpand"/>
<doc xml:space="preserve">Gets whether the widget would like any available extra horizontal
space.
When a user resizes a `GtkWindow`, widgets with expand=TRUE
generally receive the extra space. For example, a list or
scrollable area or document in your window would often be set to
expand.
Containers should use [method@Gtk.Widget.compute_expand] rather
than this function, to see whether a widget, or any of its children,
has the expand flag set. If any child of a widget wants to
expand, the parent may ask to expand also.
This function only looks at the widget&#x2019;s own hexpand flag, rather
than computing whether the entire widget tree rooted at this widget
wants to expand.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether hexpand flag is set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hexpand_set" c:identifier="gtk_widget_get_hexpand_set" glib:get-property="hexpand-set">
<attribute name="org.gtk.Method.get_property" value="hexpand-set"/>
<doc xml:space="preserve">Gets whether gtk_widget_set_hexpand() has been used
to explicitly set the expand flag on this widget.
If [property@Gtk.Widget:hexpand] property is set, then it
overrides any computed expand value based on child widgets.
If `hexpand` is not set, then the expand value depends on
whether any children of the widget would like to expand.
There are few reasons to use this function, but it&#x2019;s here
for completeness and consistency.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether hexpand has been explicitly set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_last_child" c:identifier="gtk_widget_get_last_child">
<doc xml:space="preserve">Returns the widgets last child.
This API is primarily meant for widget implementations.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The widget's last child</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout_manager" c:identifier="gtk_widget_get_layout_manager" glib:get-property="layout-manager">
<attribute name="org.gtk.Method.get_property" value="layout-manager"/>
<doc xml:space="preserve">Retrieves the layout manager used by @widget.
See [method@Gtk.Widget.set_layout_manager].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mapped" c:identifier="gtk_widget_get_mapped">
<doc xml:space="preserve">Whether the widget is mapped.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is mapped, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin_bottom" c:identifier="gtk_widget_get_margin_bottom" glib:get-property="margin-bottom">
<attribute name="org.gtk.Method.get_property" value="margin-bottom"/>
<doc xml:space="preserve">Gets the bottom margin of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The bottom margin of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin_end" c:identifier="gtk_widget_get_margin_end" glib:get-property="margin-end">
<attribute name="org.gtk.Method.get_property" value="margin-end"/>
<doc xml:space="preserve">Gets the end margin of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The end margin of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin_start" c:identifier="gtk_widget_get_margin_start" glib:get-property="margin-start">
<attribute name="org.gtk.Method.get_property" value="margin-start"/>
<doc xml:space="preserve">Gets the start margin of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The start margin of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_margin_top" c:identifier="gtk_widget_get_margin_top" glib:get-property="margin-top">
<attribute name="org.gtk.Method.get_property" value="margin-top"/>
<doc xml:space="preserve">Gets the top margin of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The top margin of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_name" c:identifier="gtk_widget_get_name" glib:get-property="name">
<attribute name="org.gtk.Method.get_property" value="name"/>
<doc xml:space="preserve">Retrieves the name of a widget.
See [method@Gtk.Widget.set_name] for the significance of widget names.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">name of the widget. This string is owned by GTK and
should not be modified or freed</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_native" c:identifier="gtk_widget_get_native">
<doc xml:space="preserve">Returns the nearest `GtkNative` ancestor of @widget.
This function will return %NULL if the widget is not
contained inside a widget tree with a native ancestor.
`GtkNative` widgets will return themselves here.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkNative` ancestor of @widget</doc>
<type name="Native" c:type="GtkNative*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_next_sibling" c:identifier="gtk_widget_get_next_sibling">
<doc xml:space="preserve">Returns the widgets next sibling.
This API is primarily meant for widget implementations.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The widget's next sibling</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_opacity" c:identifier="gtk_widget_get_opacity" glib:get-property="opacity">
<attribute name="org.gtk.Method.get_property" value="opacity"/>
<doc xml:space="preserve">#Fetches the requested opacity for this widget.
See [method@Gtk.Widget.set_opacity].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the requested opacity for this widget.</doc>
<type name="gdouble" c:type="double"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_overflow" c:identifier="gtk_widget_get_overflow" glib:get-property="overflow">
<attribute name="org.gtk.Method.get_property" value="overflow"/>
<doc xml:space="preserve">Returns the widgets overflow value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The widget's overflow.</doc>
<type name="Overflow" c:type="GtkOverflow"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_pango_context" c:identifier="gtk_widget_get_pango_context">
<doc xml:space="preserve">Gets a `PangoContext` with the appropriate font map, font description,
and base direction for this widget.
Unlike the context returned by [method@Gtk.Widget.create_pango_context],
this context is owned by the widget (it can be used until the screen
for the widget changes or the widget is removed from its toplevel),
and will be updated to match any changes to the widget&#x2019;s attributes.
This can be tracked by listening to changes of the
[property@Gtk.Widget:root] property on the widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `PangoContext` for the widget.</doc>
<type name="Pango.Context" c:type="PangoContext*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_parent" c:identifier="gtk_widget_get_parent" glib:get-property="parent">
<attribute name="org.gtk.Method.get_property" value="parent"/>
<doc xml:space="preserve">Returns the parent widget of @widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the parent widget of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_preferred_size" c:identifier="gtk_widget_get_preferred_size">
<doc xml:space="preserve">Retrieves the minimum and natural size of a widget, taking
into account the widget&#x2019;s preference for height-for-width management.
This is used to retrieve a suitable size by container widgets which do
not impose any restrictions on the child placement. It can be used
to deduce toplevel window and menu sizes as well as child widgets in
free-form containers such as `GtkFixed`.
Handle with care. Note that the natural height of a height-for-width
widget will generally be a smaller size than the minimum height, since
the required height for the natural width is generally smaller than the
required height for the minimum width.
Use [id@gtk_widget_measure] if you want to support baseline alignment.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="minimum_size" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the minimum size</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</parameter>
<parameter name="natural_size" direction="out" caller-allocates="1" transfer-ownership="none" optional="1" allow-none="1">
<doc xml:space="preserve">location for storing the natural size</doc>
<type name="Requisition" c:type="GtkRequisition*"/>
</parameter>
</parameters>
</method>
<method name="get_prev_sibling" c:identifier="gtk_widget_get_prev_sibling">
<doc xml:space="preserve">Returns the widgets previous sibling.
This API is primarily meant for widget implementations.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The widget's previous sibling</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_primary_clipboard" c:identifier="gtk_widget_get_primary_clipboard">
<doc xml:space="preserve">Gets the primary clipboard of @widget.
This is a utility function to get the primary clipboard object
for the `GdkDisplay` that @widget is using.
Note that this function always works, even when @widget is not
realized yet.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the appropriate clipboard object</doc>
<type name="Gdk.Clipboard" c:type="GdkClipboard*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_realized" c:identifier="gtk_widget_get_realized">
<doc xml:space="preserve">Determines whether @widget is realized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget is realized, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_receives_default" c:identifier="gtk_widget_get_receives_default" glib:get-property="receives-default">
<attribute name="org.gtk.Method.get_property" value="receives-default"/>
<doc xml:space="preserve">Determines whether @widget is always treated as the default widget
within its toplevel when it has the focus, even if another widget
is the default.
See [method@Gtk.Widget.set_receives_default].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget acts as the default widget when focused,
%FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_request_mode" c:identifier="gtk_widget_get_request_mode">
<doc xml:space="preserve">Gets whether the widget prefers a height-for-width layout
or a width-for-height layout.
Single-child widgets generally propagate the preference of
their child, more complex widgets need to request something
either in context of their children or in context of their
allocation capabilities.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @widget.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_root" c:identifier="gtk_widget_get_root" glib:get-property="root">
<attribute name="org.gtk.Method.get_property" value="root"/>
<doc xml:space="preserve">Returns the `GtkRoot` widget of @widget.
This function will return %NULL if the widget is not contained
inside a widget tree with a root widget.
`GtkRoot` widgets will return themselves here.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the root widget of @widget</doc>
<type name="Root" c:type="GtkRoot*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_scale_factor" c:identifier="gtk_widget_get_scale_factor" glib:get-property="scale-factor">
<attribute name="org.gtk.Method.get_property" value="scale-factor"/>
<doc xml:space="preserve">Retrieves the internal scale factor that maps from window
coordinates to the actual device pixels.
On traditional systems this is 1, on high density outputs,
it can be a higher value (typically 2).
See [method@Gdk.Surface.get_scale_factor].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the scale factor for @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sensitive" c:identifier="gtk_widget_get_sensitive" glib:get-property="sensitive">
<attribute name="org.gtk.Method.get_property" value="sensitive"/>
<doc xml:space="preserve">Returns the widget&#x2019;s sensitivity.
This function returns the value that has been set using
[method@Gtk.Widget.set_sensitive]).
The effective sensitivity of a widget is however determined
by both its own and its parent widget&#x2019;s sensitivity.
See [method@Gtk.Widget.is_sensitive].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_settings" c:identifier="gtk_widget_get_settings">
<doc xml:space="preserve">Gets the settings object holding the settings used for this widget.
Note that this function can only be called when the `GtkWidget`
is attached to a toplevel, since the settings object is specific
to a particular `GdkDisplay`. If you want to monitor the widget for
changes in its settings, connect to the `notify::display` signal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the relevant `GtkSettings` object</doc>
<type name="Settings" c:type="GtkSettings*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_size" c:identifier="gtk_widget_get_size">
<doc xml:space="preserve">Returns the content width or height of the widget.
Which dimension is returned depends on @orientation.
This is equivalent to calling [method@Gtk.Widget.get_width]
for %GTK_ORIENTATION_HORIZONTAL or [method@Gtk.Widget.get_height]
for %GTK_ORIENTATION_VERTICAL, but can be used when
writing orientation-independent code, such as when
implementing [iface@Gtk.Orientable] widgets.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The size of @widget in @orientation.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to query</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
</parameters>
</method>
<method name="get_size_request" c:identifier="gtk_widget_get_size_request">
<doc xml:space="preserve">Gets the size request that was explicitly set for the widget using
gtk_widget_set_size_request().
A value of -1 stored in @width or @height indicates that that
dimension has not been set explicitly and the natural requisition
of the widget will be used instead. See
[method@Gtk.Widget.set_size_request]. To get the size a widget will
actually request, call [method@Gtk.Widget.measure] instead of
this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_state_flags" c:identifier="gtk_widget_get_state_flags">
<doc xml:space="preserve">Returns the widget state as a flag set.
It is worth mentioning that the effective %GTK_STATE_FLAG_INSENSITIVE
state will be returned, that is, also based on parent insensitivity,
even if @widget itself is sensitive.
Also note that if you are looking for a way to obtain the
[flags@Gtk.StateFlags] to pass to a [class@Gtk.StyleContext]
method, you should look at [method@Gtk.StyleContext.get_state].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The state flags for widget</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_style_context" c:identifier="gtk_widget_get_style_context">
<doc xml:space="preserve">Returns the style context associated to @widget.
The returned object is guaranteed to be the same
for the lifetime of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the widgets `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_template_child" c:identifier="gtk_widget_get_template_child">
<doc xml:space="preserve">Fetch an object build from the template XML for @widget_type in
this @widget instance.
This will only report children which were previously declared
with [method@Gtk.WidgetClass.bind_template_child_full] or one of its
variants.
This function is only meant to be called for code which is private
to the @widget_type which declared the child and is meant for language
bindings which cannot easily make use of the GObject structure offsets.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The object built in the template XML with
the id @name</doc>
<type name="GObject.Object" c:type="GObject*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="widget_type" transfer-ownership="none">
<doc xml:space="preserve">The `GType` to get a template child for</doc>
<type name="GType" c:type="GType"/>
</parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">The &#x201C;id&#x201D; of the child defined in the template XML</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="get_tooltip_markup" c:identifier="gtk_widget_get_tooltip_markup" glib:get-property="tooltip-markup">
<attribute name="org.gtk.Method.get_property" value="tooltip-markup"/>
<doc xml:space="preserve">Gets the contents of the tooltip for @widget.
If the tooltip has not been set using
[method@Gtk.Widget.set_tooltip_markup], this
function returns %NULL.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the tooltip text</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_tooltip_text" c:identifier="gtk_widget_get_tooltip_text" glib:get-property="tooltip-text">
<attribute name="org.gtk.Method.get_property" value="tooltip-text"/>
<doc xml:space="preserve">Gets the contents of the tooltip for @widget.
If the @widget's tooltip was set using
[method@Gtk.Widget.set_tooltip_markup],
this function will return the escaped text.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the tooltip text</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_valign" c:identifier="gtk_widget_get_valign" glib:get-property="valign">
<attribute name="org.gtk.Method.get_property" value="valign"/>
<doc xml:space="preserve">Gets the vertical alignment of @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the vertical alignment of @widget</doc>
<type name="Align" c:type="GtkAlign"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vexpand" c:identifier="gtk_widget_get_vexpand" glib:get-property="vexpand">
<attribute name="org.gtk.Method.get_property" value="vexpand"/>
<doc xml:space="preserve">Gets whether the widget would like any available extra vertical
space.
See [method@Gtk.Widget.get_hexpand] for more detail.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether vexpand flag is set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_vexpand_set" c:identifier="gtk_widget_get_vexpand_set" glib:get-property="vexpand-set">
<attribute name="org.gtk.Method.get_property" value="vexpand-set"/>
<doc xml:space="preserve">Gets whether gtk_widget_set_vexpand() has been used to
explicitly set the expand flag on this widget.
See [method@Gtk.Widget.get_hexpand_set] for more detail.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether vexpand has been explicitly set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible" c:identifier="gtk_widget_get_visible" glib:get-property="visible">
<attribute name="org.gtk.Method.get_property" value="visible"/>
<doc xml:space="preserve">Determines whether the widget is visible.
If you want to take into account whether the widget&#x2019;s
parent is also marked as visible, use
[method@Gtk.Widget.is_visible] instead.
This function does not check if the widget is
obscured in any way.
See [method@Gtk.Widget.set_visible].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_width" c:identifier="gtk_widget_get_width">
<doc xml:space="preserve">Returns the content width of the widget.
This function returns the width passed to its
size-allocate implementation, which is the width you
should be using in [vfunc@Gtk.Widget.snapshot].
For pointer events, see [method@Gtk.Widget.contains].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The width of @widget</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="grab_focus" c:identifier="gtk_widget_grab_focus">
<doc xml:space="preserve">Causes @widget to have the keyboard focus for the `GtkWindow` it's inside.
If @widget is not focusable, or its [vfunc@Gtk.Widget.grab_focus]
implementation cannot transfer the focus to a descendant of @widget
that is focusable, it will not take focus and %FALSE will be returned.
Calling [method@Gtk.Widget.grab_focus] on an already focused widget
is allowed, should not have an effect, and return %TRUE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is now inside @widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_css_class" c:identifier="gtk_widget_has_css_class">
<doc xml:space="preserve">Returns whether @css_class is currently applied to @widget.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @css_class is currently applied to @widget,
%FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="css_class" transfer-ownership="none">
<doc xml:space="preserve">A style class, without the leading '.'
used for notation of style classes</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="has_default" c:identifier="gtk_widget_has_default" glib:get-property="has-default">
<attribute name="org.gtk.Method.get_property" value="has-default"/>
<doc xml:space="preserve">Determines whether @widget is the current default widget
within its toplevel.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget is the current default widget
within its toplevel, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_focus" c:identifier="gtk_widget_has_focus" glib:get-property="has-focus">
<attribute name="org.gtk.Method.get_property" value="has-focus"/>
<doc xml:space="preserve">Determines if the widget has the global input focus.
See [method@Gtk.Widget.is_focus] for the difference between
having the global input focus, and only having the focus
within a toplevel.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget has the global input focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_visible_focus" c:identifier="gtk_widget_has_visible_focus">
<doc xml:space="preserve">Determines if the widget should show a visible indication that
it has the global input focus.
This is a convenience function that takes into account whether
focus indication should currently be shown in the toplevel window
of @widget. See [method@Gtk.Window.get_focus_visible] for more
information about focus indication.
To find out if the widget has the global input focus, use
[method@Gtk.Widget.has_focus].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget should display a &#x201C;focus rectangle&#x201D;</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="hide" c:identifier="gtk_widget_hide">
<doc xml:space="preserve">Reverses the effects of gtk_widget_show().
This is causing the widget to be hidden (invisible to the user).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="in_destruction" c:identifier="gtk_widget_in_destruction">
<doc xml:space="preserve">Returns whether the widget is currently being destroyed.
This information can sometimes be used to avoid doing
unnecessary work.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget is being destroyed</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="init_template" c:identifier="gtk_widget_init_template">
<doc xml:space="preserve">Creates and initializes child widgets defined in templates.
This function must be called in the instance initializer
for any class which assigned itself a template using
[method@Gtk.WidgetClass.set_template].
It is important to call this function in the instance initializer
of a `GtkWidget` subclass and not in `GObject.constructed()` or
`GObject.constructor()` for two reasons:
- derived widgets will assume that the composite widgets
defined by its parent classes have been created in their
relative instance initializers
- when calling `g_object_new()` on a widget with composite templates,
it&#x2019;s important to build the composite widgets before the construct
properties are set. Properties passed to `g_object_new()` should
take precedence over properties set in the private template XML
A good rule of thumb is to call this function as the first thing in
an instance initialization function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="insert_action_group" c:identifier="gtk_widget_insert_action_group">
<doc xml:space="preserve">Inserts @group into @widget.
Children of @widget that implement [iface@Gtk.Actionable] can
then be associated with actions in @group by setting their
&#x201C;action-name&#x201D; to @prefix.`action-name`.
Note that inheritance is defined for individual actions. I.e.
even if you insert a group with prefix @prefix, actions with
the same prefix will still be inherited from the parent, unless
the group contains an action with the same name.
If @group is %NULL, a previously inserted group for @name is
removed from @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the prefix for actions in @group</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="group" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GActionGroup`, or %NULL to remove
the previously inserted group for @name</doc>
<type name="Gio.ActionGroup" c:type="GActionGroup*"/>
</parameter>
</parameters>
</method>
<method name="insert_after" c:identifier="gtk_widget_insert_after">
<doc xml:space="preserve">Inserts @widget into the child widget list of @parent.
It will be placed after @previous_sibling, or at the beginning if
@previous_sibling is %NULL.
After calling this function, `gtk_widget_get_prev_sibling(widget)`
will return @previous_sibling.
If @parent is already set as the parent widget of @widget, this
function can also be used to reorder @widget in the child widget
list of @parent.
This API is primarily meant for widget implementations; if you are
just using a widget, you *must* use its own API for adding children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none">
<doc xml:space="preserve">the parent `GtkWidget` to insert @widget into</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="previous_sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new previous sibling of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="insert_before" c:identifier="gtk_widget_insert_before">
<doc xml:space="preserve">Inserts @widget into the child widget list of @parent.
It will be placed before @next_sibling, or at the end if
@next_sibling is %NULL.
After calling this function, `gtk_widget_get_next_sibling(widget)`
will return @next_sibling.
If @parent is already set as the parent widget of @widget, this function
can also be used to reorder @widget in the child widget list of @parent.
This API is primarily meant for widget implementations; if you are
just using a widget, you *must* use its own API for adding children.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none">
<doc xml:space="preserve">the parent `GtkWidget` to insert @widget into</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="next_sibling" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new next sibling of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="is_ancestor" c:identifier="gtk_widget_is_ancestor">
<doc xml:space="preserve">Determines whether @widget is somewhere inside @ancestor,
possibly with intermediate containers.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @ancestor contains @widget as a child,
grandchild, great grandchild, etc.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="ancestor" transfer-ownership="none">
<doc xml:space="preserve">another `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="is_drawable" c:identifier="gtk_widget_is_drawable">
<doc xml:space="preserve">Determines whether @widget can be drawn to.
A widget can be drawn if it is mapped and visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget is drawable, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_focus" c:identifier="gtk_widget_is_focus">
<doc xml:space="preserve">Determines if the widget is the focus widget within its
toplevel.
This does not mean that the [property@Gtk.Widget:has-focus]
property is necessarily set; [property@Gtk.Widget:has-focus]
will only be set if the toplevel widget additionally has the
global input focus.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is the focus widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_sensitive" c:identifier="gtk_widget_is_sensitive">
<doc xml:space="preserve">Returns the widget&#x2019;s effective sensitivity.
This means it is sensitive itself and also its
parent widget is sensitive.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget is effectively sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_visible" c:identifier="gtk_widget_is_visible">
<doc xml:space="preserve">Determines whether the widget and all its parents are marked as
visible.
This function does not check if the widget is obscured in any way.
See also [method@Gtk.Widget.get_visible] and
[method@Gtk.Widget.set_visible].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget and all its parents are visible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="keynav_failed" c:identifier="gtk_widget_keynav_failed">
<doc xml:space="preserve">Emits the `::keynav-failed` signal on the widget.
This function should be called whenever keyboard navigation
within a single widget hits a boundary.
The return value of this function should be interpreted
in a way similar to the return value of
[method@Gtk.Widget.child_focus]. When %TRUE is returned,
stay in the widget, the failed keyboard navigation is OK
and/or there is nowhere we can/should move the focus to.
When %FALSE is returned, the caller should continue with
keyboard navigation outside the widget, e.g. by calling
[method@Gtk.Widget.child_focus] on the widget&#x2019;s toplevel.
The default [signal@Gtk.Widget::keynav-failed] handler returns
%FALSE for %GTK_DIR_TAB_FORWARD and %GTK_DIR_TAB_BACKWARD.
For the other values of `GtkDirectionType` it returns %TRUE.
Whenever the default handler returns %TRUE, it also calls
[method@Gtk.Widget.error_bell] to notify the user of the
failed keyboard navigation.
A use case for providing an own implementation of ::keynav-failed
(either by connecting to it or by overriding it) would be a row of
[class@Gtk.Entry] widgets where the user should be able to navigate
the entire row with the cursor keys, as e.g. known from user
interfaces that require entering license keys.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if stopping keyboard navigation is fine, %FALSE
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">direction of focus movement</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</method>
<method name="list_mnemonic_labels" c:identifier="gtk_widget_list_mnemonic_labels">
<doc xml:space="preserve">Returns the widgets for which this widget is the target of a
mnemonic.
Typically, these widgets will be labels. See, for example,
[method@Gtk.Label.set_mnemonic_widget].
The widgets in the list are not individually referenced.
If you want to iterate through the list and perform actions
involving callbacks that might destroy the widgets, you
must call `g_list_foreach (result, (GFunc)g_object_ref, NULL)`
first, and then unref all the widgets afterwards.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">the list
of mnemonic labels; free this list with g_list_free() when you
are done with it.</doc>
<type name="GLib.List" c:type="GList*">
<type name="Widget"/>
</type>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="map" c:identifier="gtk_widget_map">
<doc xml:space="preserve">Causes a widget to be mapped if it isn&#x2019;t already.
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="measure" c:identifier="gtk_widget_measure">
<doc xml:space="preserve">Measures @widget in the orientation @orientation and for the given @for_size.
As an example, if @orientation is %GTK_ORIENTATION_HORIZONTAL and @for_size
is 300, this functions will compute the minimum and natural width of @widget
if it is allocated at a height of 300 pixels.
See [GtkWidget&#x2019;s geometry management section](class.Widget.html#height-for-width-geometry-management) for
a more details on implementing `GtkWidgetClass.measure()`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation, i.e.
if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is
the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL
case is analogous. This way, both height-for-width and width-for-height
requests can be implemented. If no size is known, -1 can be passed.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the minimum size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the natural size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="mnemonic_activate" c:identifier="gtk_widget_mnemonic_activate">
<doc xml:space="preserve">Emits the ::mnemonic-activate signal.
See [signal@Gtk.Widget::mnemonic-activate].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="group_cycling" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there are other widgets with the same mnemonic</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="observe_children" c:identifier="gtk_widget_observe_children">
<doc xml:space="preserve">Returns a `GListModel` to track the children of @widget.
Calling this function will enable extra internal bookkeeping
to track children and emit signals on the returned listmodel.
It may slow down operations a lot.
Applications should try hard to avoid calling this function
because of the slowdowns.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkWidget"/>
<doc xml:space="preserve">
a `GListModel` tracking @widget's children</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="observe_controllers" c:identifier="gtk_widget_observe_controllers">
<doc xml:space="preserve">Returns a `GListModel` to track the [class@Gtk.EventController]s
of @widget.
Calling this function will enable extra internal bookkeeping
to track controllers and emit signals on the returned listmodel.
It may slow down operations a lot.
Applications should try hard to avoid calling this function
because of the slowdowns.</doc>
<return-value transfer-ownership="full">
<attribute name="element-type" value="GtkEventController"/>
<doc xml:space="preserve">
a `GListModel` tracking @widget's controllers</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="pick" c:identifier="gtk_widget_pick">
<doc xml:space="preserve">Finds the descendant of @widget closest to the point (@x, @y).
The point must be given in widget coordinates, so (0, 0) is assumed
to be the top left of @widget's content area.
Usually widgets will return %NULL if the given coordinate is not
contained in @widget checked via [method@Gtk.Widget.contains].
Otherwise they will recursively try to find a child that does
not return %NULL. Widgets are however free to customize their
picking algorithm.
This function is used on the toplevel to determine the widget
below the mouse cursor for purposes of hover highlighting and
delivering events.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">The widget descendant at
the given point</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">Flags to influence what is picked</doc>
<type name="PickFlags" c:type="GtkPickFlags"/>
</parameter>
</parameters>
</method>
<method name="queue_allocate" c:identifier="gtk_widget_queue_allocate">
<doc xml:space="preserve">Flags the widget for a rerun of the [vfunc@Gtk.Widget.size_allocate]
function.
Use this function instead of [method@Gtk.Widget.queue_resize]
when the @widget's size request didn't change but it wants to
reposition its contents.
An example user of this function is [method@Gtk.Widget.set_halign].
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="queue_draw" c:identifier="gtk_widget_queue_draw">
<doc xml:space="preserve">Schedules this widget to be redrawn in the paint phase
of the current or the next frame.
This means @widget's [vfunc@Gtk.Widget.snapshot]
implementation will be called.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="queue_resize" c:identifier="gtk_widget_queue_resize">
<doc xml:space="preserve">Flags a widget to have its size renegotiated.
This should be called when a widget for some reason has a new
size request. For example, when you change the text in a
[class@Gtk.Label], the label queues a resize to ensure there&#x2019;s
enough space for the new text.
Note that you cannot call gtk_widget_queue_resize() on a widget
from inside its implementation of the [vfunc@Gtk.Widget.size_allocate]
virtual method. Calls to gtk_widget_queue_resize() from inside
[vfunc@Gtk.Widget.size_allocate] will be silently ignored.
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="realize" c:identifier="gtk_widget_realize">
<doc xml:space="preserve">Creates the GDK resources associated with a widget.
Normally realization happens implicitly; if you show a widget
and all its parent containers, then the widget will be realized
and mapped automatically.
Realizing a widget requires all the widget&#x2019;s parent widgets to be
realized; calling this function realizes the widget&#x2019;s parents
in addition to @widget itself. If a widget is not yet inside a
toplevel window when you realize it, bad things will happen.
This function is primarily used in widget implementations, and
isn&#x2019;t very useful otherwise. Many times when you think you might
need it, a better approach is to connect to a signal that will be
called after the widget is realized automatically, such as
[signal@Gtk.Widget::realize].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_controller" c:identifier="gtk_widget_remove_controller">
<doc xml:space="preserve">Removes @controller from @widget, so that it doesn't process
events anymore.
It should not be used again.
Widgets will remove all event controllers automatically when they
are destroyed, there is normally no need to call this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="controller" transfer-ownership="none">
<doc xml:space="preserve">a `GtkEventController`</doc>
<type name="EventController" c:type="GtkEventController*"/>
</parameter>
</parameters>
</method>
<method name="remove_css_class" c:identifier="gtk_widget_remove_css_class">
<doc xml:space="preserve">Removes a style from @widget.
After this, the style of @widget will stop matching for @css_class.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="css_class" transfer-ownership="none">
<doc xml:space="preserve">The style class to remove from @widget, without
the leading '.' used for notation of style classes</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="remove_mnemonic_label" c:identifier="gtk_widget_remove_mnemonic_label">
<doc xml:space="preserve">Removes a widget from the list of mnemonic labels for this widget.
See [method@Gtk.Widget.list_mnemonic_labels]. The widget must
have previously been added to the list with
[method@Gtk.Widget.add_mnemonic_label].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="label" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` that was previously set as a mnemonic
label for @widget with [method@Gtk.Widget.add_mnemonic_label]</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="remove_tick_callback" c:identifier="gtk_widget_remove_tick_callback">
<doc xml:space="preserve">Removes a tick callback previously registered with
gtk_widget_add_tick_callback().</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="id" transfer-ownership="none">
<doc xml:space="preserve">an id returned by [method@Gtk.Widget.add_tick_callback]</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_can_focus" c:identifier="gtk_widget_set_can_focus" glib:set-property="can-focus">
<attribute name="org.gtk.Method.set_property" value="can-focus"/>
<doc xml:space="preserve">Specifies whether the input focus can enter the widget
or any of its children.
Applications should set @can_focus to %FALSE to mark a
widget as for pointer/touch use only.
Note that having @can_focus be %TRUE is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and focusable and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See [method@Gtk.Widget.grab_focus] for actually setting
the input focus on a widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="can_focus" transfer-ownership="none">
<doc xml:space="preserve">whether or not the input focus can enter
the widget or any of its children</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_can_target" c:identifier="gtk_widget_set_can_target" glib:set-property="can-target">
<attribute name="org.gtk.Method.set_property" value="can-target"/>
<doc xml:space="preserve">Sets whether @widget can be the target of pointer events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="can_target" transfer-ownership="none">
<doc xml:space="preserve">whether this widget should be able to
receive pointer events</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_child_visible" c:identifier="gtk_widget_set_child_visible">
<doc xml:space="preserve">Sets whether @widget should be mapped along with its parent.
The child visibility can be set for widget before it is added
to a container with [method@Gtk.Widget.set_parent], to avoid
mapping children unnecessary before immediately unmapping them.
However it will be reset to its default state of %TRUE when the
widget is removed from a container.
Note that changing the child visibility of a widget does not
queue a resize on the widget. Most of the time, the size of
a widget is computed from all visible children, whether or
not they are mapped. If this is not the case, the container
can queue a resize itself.
This function is only useful for container implementations
and should never be called by an application.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="child_visible" transfer-ownership="none">
<doc xml:space="preserve">if %TRUE, @widget should be mapped along
with its parent.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_css_classes" c:identifier="gtk_widget_set_css_classes" glib:set-property="css-classes">
<attribute name="org.gtk.Method.set_property" value="css-classes"/>
<doc xml:space="preserve">Clear all style classes applied to @widget
and replace them with @classes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="classes" transfer-ownership="none">
<doc xml:space="preserve">
%NULL-terminated list of style classes to apply to @widget.</doc>
<array c:type="const char**">
<type name="utf8" c:type="char*"/>
</array>
</parameter>
</parameters>
</method>
<method name="set_cursor" c:identifier="gtk_widget_set_cursor" glib:set-property="cursor">
<attribute name="org.gtk.Method.set_property" value="cursor"/>
<doc xml:space="preserve">Sets the cursor to be shown when pointer devices point
towards @widget.
If the @cursor is NULL, @widget will use the cursor
inherited from the parent widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="cursor" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the new cursor</doc>
<type name="Gdk.Cursor" c:type="GdkCursor*"/>
</parameter>
</parameters>
</method>
<method name="set_cursor_from_name" c:identifier="gtk_widget_set_cursor_from_name">
<doc xml:space="preserve">Sets a named cursor to be shown when pointer devices point
towards @widget.
This is a utility function that creates a cursor via
[ctor@Gdk.Cursor.new_from_name] and then sets it on @widget
with [method@Gtk.Widget.set_cursor]. See those functions for
details.
On top of that, this function allows @name to be %NULL, which
will do the same as calling [method@Gtk.Widget.set_cursor]
with a %NULL cursor.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">The name of the cursor</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_direction" c:identifier="gtk_widget_set_direction">
<doc xml:space="preserve">Sets the reading direction on a particular widget.
This direction controls the primary direction for widgets
containing text, and also the direction in which the children
of a container are packed. The ability to set the direction is
present in order so that correct localization into languages with
right-to-left reading directions can be done. Generally, applications
will let the default reading direction present, except for containers
where the containers are arranged in an order that is explicitly
visual rather than logical (such as buttons for text justification).
If the direction is set to %GTK_TEXT_DIR_NONE, then the value
set by [func@Gtk.Widget.set_default_direction] will be used.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="dir" transfer-ownership="none">
<doc xml:space="preserve">the new direction</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
</parameters>
</method>
<method name="set_focus_child" c:identifier="gtk_widget_set_focus_child">
<doc xml:space="preserve">Set @child as the current focus child of @widget.
This function is only suitable for widget implementations.
If you want a certain widget to get the input focus, call
[method@Gtk.Widget.grab_focus] on it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a direct child widget of @widget or %NULL
to unset the focus child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_focus_on_click" c:identifier="gtk_widget_set_focus_on_click" glib:set-property="focus-on-click">
<attribute name="org.gtk.Method.set_property" value="focus-on-click"/>
<doc xml:space="preserve">Sets whether the widget should grab focus when it is clicked
with the mouse.
Making mouse clicks not grab focus is useful in places like
toolbars where you don&#x2019;t want the keyboard focus removed from
the main area of the application.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="focus_on_click" transfer-ownership="none">
<doc xml:space="preserve">whether the widget should grab focus when clicked
with the mouse</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_focusable" c:identifier="gtk_widget_set_focusable" glib:set-property="focusable">
<attribute name="org.gtk.Method.set_property" value="focusable"/>
<doc xml:space="preserve">Specifies whether @widget can own the input focus.
Widget implementations should set @focusable to %TRUE in
their init() function if they want to receive keyboard input.
Note that having @focusable be %TRUE is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and can-focus and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See [method@Gtk.Widget.grab_focus] for actually setting
the input focus on a widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="focusable" transfer-ownership="none">
<doc xml:space="preserve">whether or not @widget can own the input focus</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_font_map" c:identifier="gtk_widget_set_font_map">
<doc xml:space="preserve">Sets the font map to use for Pango rendering.
The font map is the object that is used to look up fonts.
Setting a custom font map can be useful in special situations,
e.g. when you need to add application-specific fonts to the set
of available fonts.
When not set, the widget will inherit the font map from its parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="font_map" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `PangoFontMap`, or %NULL to unset any
previously set font map</doc>
<type name="Pango.FontMap" c:type="PangoFontMap*"/>
</parameter>
</parameters>
</method>
<method name="set_font_options" c:identifier="gtk_widget_set_font_options">
<doc xml:space="preserve">Sets the `cairo_font_options_t` used for Pango rendering
in this widget.
When not set, the default font options for the `GdkDisplay`
will be used.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="options" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `cairo_font_options_t`
to unset any previously set default font options</doc>
<type name="cairo.FontOptions" c:type="const cairo_font_options_t*"/>
</parameter>
</parameters>
</method>
<method name="set_halign" c:identifier="gtk_widget_set_halign" glib:set-property="halign">
<attribute name="org.gtk.Method.set_property" value="halign"/>
<doc xml:space="preserve">Sets the horizontal alignment of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="align" transfer-ownership="none">
<doc xml:space="preserve">the horizontal alignment</doc>
<type name="Align" c:type="GtkAlign"/>
</parameter>
</parameters>
</method>
<method name="set_has_tooltip" c:identifier="gtk_widget_set_has_tooltip" glib:set-property="has-tooltip">
<attribute name="org.gtk.Method.set_property" value="has-tooltip"/>
<doc xml:space="preserve">Sets the `has-tooltip` property on @widget to @has_tooltip.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="has_tooltip" transfer-ownership="none">
<doc xml:space="preserve">whether or not @widget has a tooltip.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_hexpand" c:identifier="gtk_widget_set_hexpand" glib:set-property="hexpand">
<attribute name="org.gtk.Method.set_property" value="hexpand"/>
<doc xml:space="preserve">Sets whether the widget would like any available extra horizontal
space.
When a user resizes a `GtkWindow`, widgets with expand=TRUE
generally receive the extra space. For example, a list or
scrollable area or document in your window would often be set to
expand.
Call this function to set the expand flag if you would like your
widget to become larger horizontally when the window has extra
room.
By default, widgets automatically expand if any of their children
want to expand. (To see if a widget will automatically expand given
its current children and state, call [method@Gtk.Widget.compute_expand].
A container can decide how the expandability of children affects the
expansion of the container by overriding the compute_expand virtual
method on `GtkWidget`.).
Setting hexpand explicitly with this function will override the
automatic expand behavior.
This function forces the widget to expand or not to expand,
regardless of children. The override occurs because
[method@Gtk.Widget.set_hexpand] sets the hexpand-set property (see
[method@Gtk.Widget.set_hexpand_set]) which causes the widget&#x2019;s hexpand
value to be used, rather than looking at children and widget state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">whether to expand</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_hexpand_set" c:identifier="gtk_widget_set_hexpand_set" glib:set-property="hexpand-set">
<attribute name="org.gtk.Method.set_property" value="hexpand-set"/>
<doc xml:space="preserve">Sets whether the hexpand flag will be used.
The [property@Gtk.Widget:hexpand-set] property will be set
automatically when you call [method@Gtk.Widget.set_hexpand]
to set hexpand, so the most likely reason to use this function
would be to unset an explicit expand flag.
If hexpand is set, then it overrides any computed
expand value based on child widgets. If hexpand is not
set, then the expand value depends on whether any
children of the widget would like to expand.
There are few reasons to use this function, but it&#x2019;s here
for completeness and consistency.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">value for hexpand-set property</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_layout_manager" c:identifier="gtk_widget_set_layout_manager" glib:set-property="layout-manager">
<attribute name="org.gtk.Method.set_property" value="layout-manager"/>
<doc xml:space="preserve">Sets the layout manager delegate instance that provides an
implementation for measuring and allocating the children of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="layout_manager" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkLayoutManager`</doc>
<type name="LayoutManager" c:type="GtkLayoutManager*"/>
</parameter>
</parameters>
</method>
<method name="set_margin_bottom" c:identifier="gtk_widget_set_margin_bottom" glib:set-property="margin-bottom">
<attribute name="org.gtk.Method.set_property" value="margin-bottom"/>
<doc xml:space="preserve">Sets the bottom margin of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the bottom margin</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_margin_end" c:identifier="gtk_widget_set_margin_end" glib:set-property="margin-end">
<attribute name="org.gtk.Method.set_property" value="margin-end"/>
<doc xml:space="preserve">Sets the end margin of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the end margin</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_margin_start" c:identifier="gtk_widget_set_margin_start" glib:set-property="margin-start">
<attribute name="org.gtk.Method.set_property" value="margin-start"/>
<doc xml:space="preserve">Sets the start margin of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the start margin</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_margin_top" c:identifier="gtk_widget_set_margin_top" glib:set-property="margin-top">
<attribute name="org.gtk.Method.set_property" value="margin-top"/>
<doc xml:space="preserve">Sets the top margin of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="margin" transfer-ownership="none">
<doc xml:space="preserve">the top margin</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_name" c:identifier="gtk_widget_set_name" glib:set-property="name">
<attribute name="org.gtk.Method.set_property" value="name"/>
<doc xml:space="preserve">Sets a widgets name.
Setting a name allows you to refer to the widget from a
CSS file. You can apply a style to widgets with a particular name
in the CSS file. See the documentation for the CSS syntax (on the
same page as the docs for [class@Gtk.StyleContext].
Note that the CSS syntax has certain special characters to delimit
and represent elements in a selector (period, #, &gt;, *...), so using
these will make your widget impossible to match by name. Any combination
of alphanumeric symbols, dashes and underscores will suffice.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name for the widget</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_opacity" c:identifier="gtk_widget_set_opacity" glib:set-property="opacity">
<attribute name="org.gtk.Method.set_property" value="opacity"/>
<doc xml:space="preserve">Request the @widget to be rendered partially transparent.
An opacity of 0 is fully transparent and an opacity of 1
is fully opaque.
Opacity works on both toplevel widgets and child widgets, although
there are some limitations: For toplevel widgets, applying opacity
depends on the capabilities of the windowing system. On X11, this
has any effect only on X displays with a compositing manager,
see gdk_display_is_composited(). On Windows and Wayland it should
always work, although setting a window&#x2019;s opacity after the window
has been shown may cause some flicker.
Note that the opacity is inherited through inclusion &#x2014; if you set
a toplevel to be partially translucent, all of its content will
appear translucent, since it is ultimatively rendered on that
toplevel. The opacity value itself is not inherited by child
widgets (since that would make widgets deeper in the hierarchy
progressively more translucent). As a consequence, [class@Gtk.Popover]s
and other [iface@Gtk.Native] widgets with their own surface will use their
own opacity value, and thus by default appear non-translucent,
even if they are attached to a toplevel that is translucent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="opacity" transfer-ownership="none">
<doc xml:space="preserve">desired opacity, between 0 and 1</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</method>
<method name="set_overflow" c:identifier="gtk_widget_set_overflow" glib:set-property="overflow">
<attribute name="org.gtk.Method.set_property" value="overflow"/>
<doc xml:space="preserve">Sets how @widget treats content that is drawn outside the
widget's content area.
See the definition of [enum@Gtk.Overflow] for details.
This setting is provided for widget implementations and
should not be used by application code.
The default value is %GTK_OVERFLOW_VISIBLE.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="overflow" transfer-ownership="none">
<doc xml:space="preserve">desired overflow</doc>
<type name="Overflow" c:type="GtkOverflow"/>
</parameter>
</parameters>
</method>
<method name="set_parent" c:identifier="gtk_widget_set_parent">
<attribute name="org.gtk.Method.set_property" value="parent"/>
<doc xml:space="preserve">Sets @parent as the parent widget of @widget.
This takes care of details such as updating the state and style
of the child to reflect its new location and resizing the parent.
The opposite function is [method@Gtk.Widget.unparent].
This function is useful only when implementing subclasses of
`GtkWidget`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none">
<doc xml:space="preserve">parent widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_receives_default" c:identifier="gtk_widget_set_receives_default" glib:set-property="receives-default">
<attribute name="org.gtk.Method.set_property" value="receives-default"/>
<doc xml:space="preserve">Specifies whether @widget will be treated as the default
widget within its toplevel when it has the focus, even if
another widget is the default.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="receives_default" transfer-ownership="none">
<doc xml:space="preserve">whether or not @widget can be a default widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_sensitive" c:identifier="gtk_widget_set_sensitive" glib:set-property="sensitive">
<attribute name="org.gtk.Method.set_property" value="sensitive"/>
<doc xml:space="preserve">Sets the sensitivity of a widget.
A widget is sensitive if the user can interact with it.
Insensitive widgets are &#x201C;grayed out&#x201D; and the user can&#x2019;t
interact with them. Insensitive widgets are known as
&#x201C;inactive&#x201D;, &#x201C;disabled&#x201D;, or &#x201C;ghosted&#x201D; in some other toolkits.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="sensitive" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make the widget sensitive</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_size_request" c:identifier="gtk_widget_set_size_request">
<doc xml:space="preserve">Sets the minimum size of a widget.
That is, the widget&#x2019;s size request will be at least @width
by @height. You can use this function to force a widget to
be larger than it normally would be.
In most cases, [method@Gtk.Window.set_default_size] is a better
choice for toplevel windows than this function; setting the default
size will still allow users to shrink the window. Setting the size
request will force them to leave the window at least as large as
the size request.
Note the inherent danger of setting any fixed size - themes,
translations into other languages, different fonts, and user action
can all change the appropriate size for a given widget. So, it's
basically impossible to hardcode a size that will always be
correct.
The size request of a widget is the smallest size a widget can
accept while still functioning well and drawing itself correctly.
However in some strange cases a widget may be allocated less than
its requested size, and in many cases a widget may be allocated more
space than it requested.
If the size request in a given direction is -1 (unset), then
the &#x201C;natural&#x201D; size request of the widget will be used instead.
The size request set here does not include any margin from the
properties
[property@Gtk.Widget:margin-start],
[property@Gtk.Widget:margin-end],
[property@Gtk.Widget:margin-top], and
[property@Gtk.Widget:margin-bottom], but it does include pretty
much all other padding or border properties set by any subclass
of `GtkWidget`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width @widget should request, or -1 to unset</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height @widget should request, or -1 to unset</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_state_flags" c:identifier="gtk_widget_set_state_flags">
<doc xml:space="preserve">Turns on flag values in the current widget state.
Typical widget states are insensitive, prelighted, etc.
This function accepts the values %GTK_STATE_FLAG_DIR_LTR and
%GTK_STATE_FLAG_DIR_RTL but ignores them. If you want to set
the widget's direction, use [method@Gtk.Widget.set_direction].
This function is for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">State flags to turn on</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</parameter>
<parameter name="clear" transfer-ownership="none">
<doc xml:space="preserve">Whether to clear state before turning on @flags</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_markup" c:identifier="gtk_widget_set_tooltip_markup" glib:set-property="tooltip-markup">
<attribute name="org.gtk.Method.set_property" value="tooltip-markup"/>
<doc xml:space="preserve">Sets @markup as the contents of the tooltip, which is marked
up with Pango markup.
This function will take care of setting the
[property@Gtk.Widget:has-tooltip] as a side effect, and of the
default handler for the [signal@Gtk.Widget::query-tooltip] signal.
See also [method@Gtk.Tooltip.set_markup].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="markup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the contents of the tooltip for @widget</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_tooltip_text" c:identifier="gtk_widget_set_tooltip_text" glib:set-property="tooltip-text">
<attribute name="org.gtk.Method.set_property" value="tooltip-text"/>
<doc xml:space="preserve">Sets @text as the contents of the tooltip.
If @text contains any markup, it will be escaped.
This function will take care of setting
[property@Gtk.Widget:has-tooltip] as a side effect,
and of the default handler for the
[signal@Gtk.Widget::query-tooltip] signal.
See also [method@Gtk.Tooltip.set_text].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="text" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the contents of the tooltip for @widget</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_valign" c:identifier="gtk_widget_set_valign" glib:set-property="valign">
<attribute name="org.gtk.Method.set_property" value="valign"/>
<doc xml:space="preserve">Sets the vertical alignment of @widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="align" transfer-ownership="none">
<doc xml:space="preserve">the vertical alignment</doc>
<type name="Align" c:type="GtkAlign"/>
</parameter>
</parameters>
</method>
<method name="set_vexpand" c:identifier="gtk_widget_set_vexpand" glib:set-property="vexpand">
<attribute name="org.gtk.Method.set_property" value="vexpand"/>
<doc xml:space="preserve">Sets whether the widget would like any available extra vertical
space.
See [method@Gtk.Widget.set_hexpand] for more detail.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="expand" transfer-ownership="none">
<doc xml:space="preserve">whether to expand</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_vexpand_set" c:identifier="gtk_widget_set_vexpand_set" glib:set-property="vexpand-set">
<attribute name="org.gtk.Method.set_property" value="vexpand-set"/>
<doc xml:space="preserve">Sets whether the vexpand flag will be used.
See [method@Gtk.Widget.set_hexpand_set] for more detail.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">value for vexpand-set property</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_visible" c:identifier="gtk_widget_set_visible" glib:set-property="visible">
<attribute name="org.gtk.Method.set_property" value="visible"/>
<doc xml:space="preserve">Sets the visibility state of @widget.
Note that setting this to %TRUE doesn&#x2019;t mean the widget is
actually viewable, see [method@Gtk.Widget.get_visible].
This function simply calls [method@Gtk.Widget.show] or
[method@Gtk.Widget.hide] but is nicer to use when the
visibility of the widget depends on some condition.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="visible" transfer-ownership="none">
<doc xml:space="preserve">whether the widget should be shown or not</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="should_layout" c:identifier="gtk_widget_should_layout">
<doc xml:space="preserve">Returns whether @widget should contribute to
the measuring and allocation of its parent.
This is %FALSE for invisible children, but also
for children that have their own surface.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if child should be included in
measuring and allocating</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="show" c:identifier="gtk_widget_show">
<doc xml:space="preserve">Flags a widget to be displayed.
Any widget that isn&#x2019;t shown will not appear on the screen.
Remember that you have to show the containers containing a widget,
in addition to the widget itself, before it will appear onscreen.
When a toplevel container is shown, it is immediately realized and
mapped; other shown widgets are realized and mapped when their
toplevel container is realized and mapped.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="size_allocate" c:identifier="gtk_widget_size_allocate">
<doc xml:space="preserve">Allocates widget with a transformation that translates
the origin to the position in @allocation.
This is a simple form of [method@Gtk.Widget.allocate].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="allocation" transfer-ownership="none">
<doc xml:space="preserve">position and size to be allocated to @widget</doc>
<type name="Allocation" c:type="const GtkAllocation*"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<doc xml:space="preserve">The baseline of the child, or -1</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="snapshot_child" c:identifier="gtk_widget_snapshot_child">
<doc xml:space="preserve">Snapshot the a child of @widget.
When a widget receives a call to the snapshot function,
it must send synthetic [vfunc@Gtk.Widget.snapshot] calls
to all children. This function provides a convenient way
of doing this. A widget, when it receives a call to its
[vfunc@Gtk.Widget.snapshot] function, calls
gtk_widget_snapshot_child() once for each child, passing in
the @snapshot the widget received.
gtk_widget_snapshot_child() takes care of translating the origin of
@snapshot, and deciding whether the child needs to be snapshot.
This function does nothing for children that implement `GtkNative`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none">
<doc xml:space="preserve">a child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<doc xml:space="preserve">`GtkSnapshot` as passed to the widget. In particular, no
calls to gtk_snapshot_translate() or other transform calls should
have been made.</doc>
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
</parameters>
</method>
<method name="translate_coordinates" c:identifier="gtk_widget_translate_coordinates">
<doc xml:space="preserve">Translate coordinates relative to @src_widget&#x2019;s allocation
to coordinates relative to @dest_widget&#x2019;s allocations.
In order to perform this operation, both widget must share
a common ancestor.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%FALSE if @src_widget and @dest_widget have no common
ancestor. In this case, 0 is stored in *@dest_x and *@dest_y.
Otherwise %TRUE.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="src_widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="dest_widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="src_x" transfer-ownership="none">
<doc xml:space="preserve">X position relative to @src_widget</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="src_y" transfer-ownership="none">
<doc xml:space="preserve">Y position relative to @src_widget</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="dest_x" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store X position relative to @dest_widget</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
<parameter name="dest_y" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store Y position relative to @dest_widget</doc>
<type name="gdouble" c:type="double*"/>
</parameter>
</parameters>
</method>
<method name="trigger_tooltip_query" c:identifier="gtk_widget_trigger_tooltip_query">
<doc xml:space="preserve">Triggers a tooltip query on the display where the toplevel
of @widget is located.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="unmap" c:identifier="gtk_widget_unmap">
<doc xml:space="preserve">Causes a widget to be unmapped if it&#x2019;s currently mapped.
This function is only for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="unparent" c:identifier="gtk_widget_unparent">
<doc xml:space="preserve">Dissociate @widget from its parent.
This function is only for use in widget implementations,
typically in dispose.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="unrealize" c:identifier="gtk_widget_unrealize">
<doc xml:space="preserve">Causes a widget to be unrealized (frees all GDK resources
associated with the widget).
This function is only useful in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
</parameters>
</method>
<method name="unset_state_flags" c:identifier="gtk_widget_unset_state_flags">
<doc xml:space="preserve">Turns off flag values for the current widget state.
See [method@Gtk.Widget.set_state_flags].
This function is for use in widget implementations.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</instance-parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">State flags to turn off</doc>
<type name="StateFlags" c:type="GtkStateFlags"/>
</parameter>
</parameters>
</method>
<property name="can-focus" writable="1" transfer-ownership="none" setter="set_can_focus" getter="get_can_focus">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_can_focus"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_can_focus"/>
<doc xml:space="preserve">Whether the widget or any of its descendents can accept
the input focus.
This property is meant to be set by widget implementations,
typically in their instance init function.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="can-target" writable="1" transfer-ownership="none" setter="set_can_target" getter="get_can_target">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_can_target"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_can_target"/>
<doc xml:space="preserve">Whether the widget can receive pointer events.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="css-classes" writable="1" transfer-ownership="none" setter="set_css_classes" getter="get_css_classes">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_css_classes"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_css_classes"/>
<doc xml:space="preserve">A list of css classes applied to this widget.</doc>
<array>
<type name="utf8"/>
</array>
</property>
<property name="css-name" writable="1" construct-only="1" transfer-ownership="none" getter="get_css_name">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_css_name"/>
<doc xml:space="preserve">The name of this widget in the CSS tree.
This property is meant to be set by widget implementations,
typically in their instance init function.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="cursor" writable="1" transfer-ownership="none" setter="set_cursor" getter="get_cursor">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_cursor"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_cursor"/>
<doc xml:space="preserve">The cursor used by @widget.</doc>
<type name="Gdk.Cursor"/>
</property>
<property name="focus-on-click" writable="1" transfer-ownership="none" setter="set_focus_on_click" getter="get_focus_on_click">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_focus_on_click"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_focus_on_click"/>
<doc xml:space="preserve">Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="focusable" writable="1" transfer-ownership="none" setter="set_focusable" getter="get_focusable">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_focusable"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_focusable"/>
<doc xml:space="preserve">Whether this widget itself will accept the input focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="halign" writable="1" transfer-ownership="none" setter="set_halign" getter="get_halign">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_halign"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_halign"/>
<doc xml:space="preserve">How to distribute horizontal space if widget gets extra space.</doc>
<type name="Align"/>
</property>
<property name="has-default" transfer-ownership="none" getter="has_default">
<attribute name="org.gtk.Property.get" value="gtk_widget_has_default"/>
<doc xml:space="preserve">Whether the widget is the default widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-focus" transfer-ownership="none" getter="has_focus">
<attribute name="org.gtk.Property.get" value="gtk_widget_has_focus"/>
<doc xml:space="preserve">Whether the widget has the input focus.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="has-tooltip" writable="1" transfer-ownership="none" setter="set_has_tooltip" getter="get_has_tooltip">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_has_tooltip"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_has_tooltip"/>
<doc xml:space="preserve">Enables or disables the emission of the ::query-tooltip signal on @widget.
A value of %TRUE indicates that @widget can have a tooltip, in this case
the widget will be queried using [signal@Gtk.Widget::query-tooltip] to
determine whether it will provide a tooltip or not.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="height-request" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Override for height request of the widget.
If this is -1, the natural request will be used.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="hexpand" writable="1" transfer-ownership="none" setter="set_hexpand" getter="get_hexpand">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_hexpand"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_hexpand"/>
<doc xml:space="preserve">Whether to expand horizontally.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="hexpand-set" writable="1" transfer-ownership="none" setter="set_hexpand_set" getter="get_hexpand_set">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_hexpand_set"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_hexpand_set"/>
<doc xml:space="preserve">Whether to use the `hexpand` property.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="layout-manager" writable="1" transfer-ownership="none" setter="set_layout_manager" getter="get_layout_manager">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_layout_manager"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_layout_manager"/>
<doc xml:space="preserve">The `GtkLayoutManager` instance to use to compute the preferred size
of the widget, and allocate its children.
This property is meant to be set by widget implementations,
typically in their instance init function.</doc>
<type name="LayoutManager"/>
</property>
<property name="margin-bottom" writable="1" transfer-ownership="none" setter="set_margin_bottom" getter="get_margin_bottom">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_margin_bottom"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_margin_bottom"/>
<doc xml:space="preserve">Margin on bottom side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
[method@Gtk.Widget.set_size_request] for example.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="margin-end" writable="1" transfer-ownership="none" setter="set_margin_end" getter="get_margin_end">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_margin_end"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_margin_end"/>
<doc xml:space="preserve">Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text
directions.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
[method@Gtk.Widget.set_size_request] for example.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="margin-start" writable="1" transfer-ownership="none" setter="set_margin_start" getter="get_margin_start">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_margin_start"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_margin_start"/>
<doc xml:space="preserve">Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text
directions.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
[method@Gtk.Widget.set_size_request] for example.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="margin-top" writable="1" transfer-ownership="none" setter="set_margin_top" getter="get_margin_top">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_margin_top"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_margin_top"/>
<doc xml:space="preserve">Margin on top side of widget.
This property adds margin outside of the widget's normal size
request, the margin will be added in addition to the size from
[method@Gtk.Widget.set_size_request] for example.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="name" writable="1" transfer-ownership="none" setter="set_name" getter="get_name">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_name"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_name"/>
<doc xml:space="preserve">The name of the widget.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="opacity" writable="1" transfer-ownership="none" setter="set_opacity" getter="get_opacity">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_opacity"/>
<attribute name="org.gtk.Widget.set" value="gtk_widget_set_opacity"/>
<doc xml:space="preserve">The requested opacity of the widget.</doc>
<type name="gdouble" c:type="gdouble"/>
</property>
<property name="overflow" writable="1" transfer-ownership="none" setter="set_overflow" getter="get_overflow">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_overflow"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_overflow"/>
<doc xml:space="preserve">How content outside the widget's content area is treated.
This property is meant to be set by widget implementations,
typically in their instance init function.</doc>
<type name="Overflow"/>
</property>
<property name="parent" transfer-ownership="none" getter="get_parent">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_parent"/>
<doc xml:space="preserve">The parent widget of this widget.</doc>
<type name="Widget"/>
</property>
<property name="receives-default" writable="1" transfer-ownership="none" setter="set_receives_default" getter="get_receives_default">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_receives_default"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_receives_default"/>
<doc xml:space="preserve">Whether the widget will receive the default action when it is focused.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="root" transfer-ownership="none" getter="get_root">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_root"/>
<doc xml:space="preserve">The `GtkRoot` widget of the widget tree containing this widget.
This will be %NULL if the widget is not contained in a root widget.</doc>
<type name="Root"/>
</property>
<property name="scale-factor" transfer-ownership="none" getter="get_scale_factor">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_scale_factor"/>
<doc xml:space="preserve">The scale factor of the widget.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="sensitive" writable="1" transfer-ownership="none" setter="set_sensitive" getter="get_sensitive">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_sensitive"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_sensitive"/>
<doc xml:space="preserve">Whether the widget responds to input.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="tooltip-markup" writable="1" transfer-ownership="none" setter="set_tooltip_markup" getter="get_tooltip_markup">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_tooltip_markup"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_tooltip_markup"/>
<doc xml:space="preserve">Sets the text of tooltip to be the given string, which is marked up
with Pango markup.
Also see [method@Gtk.Tooltip.set_markup].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not %NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to %TRUE
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and
[property@Gtk.Widget:tooltip-markup] are set, the last one wins.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="tooltip-text" writable="1" transfer-ownership="none" setter="set_tooltip_text" getter="get_tooltip_text">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_tooltip_text"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_tooltip_text"/>
<doc xml:space="preserve">Sets the text of tooltip to be the given string.
Also see [method@Gtk.Tooltip.set_text].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not %NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to %TRUE
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and
[property@Gtk.Widget:tooltip-markup] are set, the last one wins.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="valign" writable="1" transfer-ownership="none" setter="set_valign" getter="get_valign">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_valign"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_valign"/>
<doc xml:space="preserve">How to distribute vertical space if widget gets extra space.</doc>
<type name="Align"/>
</property>
<property name="vexpand" writable="1" transfer-ownership="none" setter="set_vexpand" getter="get_vexpand">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_vexpand"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_vexpand"/>
<doc xml:space="preserve">Whether to expand vertically.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="vexpand-set" writable="1" transfer-ownership="none" setter="set_vexpand_set" getter="get_vexpand_set">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_vexpand_set"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_vexpand_set"/>
<doc xml:space="preserve">Whether to use the `vexpand` property.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visible" writable="1" transfer-ownership="none" setter="set_visible" getter="get_visible">
<attribute name="org.gtk.Property.get" value="gtk_widget_get_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_set_visible"/>
<doc xml:space="preserve">Whether the widget is visible.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="width-request" writable="1" transfer-ownership="none">
<doc xml:space="preserve">Override for width request of the widget.
If this is -1, the natural request will be used.</doc>
<type name="gint" c:type="gint"/>
</property>
<field name="parent_instance">
<type name="GObject.InitiallyUnowned" c:type="GInitiallyUnowned"/>
</field>
<field name="priv" readable="0" private="1">
<type name="WidgetPrivate" c:type="GtkWidgetPrivate*"/>
</field>
<glib:signal name="destroy" when="cleanup" no-recurse="1" no-hooks="1">
<doc xml:space="preserve">Signals that all holders of a reference to the widget should release
the reference that they hold.
May result in finalization of the widget if all references are released.
This signal is not suitable for saving widget state.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="direction-changed" when="first">
<doc xml:space="preserve">Emitted when the text direction of a widget changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="previous_direction" transfer-ownership="none">
<doc xml:space="preserve">the previous text direction of @widget</doc>
<type name="TextDirection"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="hide" when="first">
<doc xml:space="preserve">Emitted when @widget is hidden.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="keynav-failed" when="last">
<doc xml:space="preserve">Emitted if keyboard navigation fails.
See [method@Gtk.Widget.keynav_failed] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if stopping keyboard navigation is fine, %FALSE
if the emitting widget should try to handle the keyboard
navigation attempt in its parent widget(s).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the direction of movement</doc>
<type name="DirectionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="map" when="first">
<doc xml:space="preserve">Emitted when @widget is going to be mapped.
A widget is mapped when the widget is visible (which is controlled with
[property@Gtk.Widget:visible]) and all its parents up to the toplevel widget
are also visible.
The ::map signal can be used to determine whether a widget will be drawn,
for instance it can resume an animation that was stopped during the
emission of [signal@Gtk.Widget::unmap].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="mnemonic-activate" when="last">
<doc xml:space="preserve">Emitted when a widget is activated via a mnemonic.
The default handler for this signal activates @widget if @group_cycling
is %FALSE, or just makes @widget grab focus if @group_cycling is %TRUE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the event.
%FALSE to propagate the event further.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="group_cycling" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there are other widgets with the same mnemonic</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="move-focus" when="last" action="1">
<doc xml:space="preserve">Emitted when the focus is moved.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">the direction of the focus move</doc>
<type name="DirectionType"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="query-tooltip" when="last">
<doc xml:space="preserve">Emitted when the widgets tooltip is about to be shown.
This happens when the [property@Gtk.Widget:has-tooltip] property
is %TRUE and the hover timeout has expired with the cursor hovering
"above" @widget; or emitted when @widget got focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for @widget. If this is the case
%TRUE should be returned, %FALSE otherwise. Note that if
@keyboard_mode is %TRUE, the values of @x and @y are undefined and
should not be used.
The signal handler is free to manipulate @tooltip with the therefore
destined function calls.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @tooltip should be shown right now, %FALSE otherwise.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the cursor position where the request has
been emitted, relative to @widget's left side</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the cursor position where the request has
been emitted, relative to @widget's top</doc>
<type name="gint" c:type="gint"/>
</parameter>
<parameter name="keyboard_mode" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the tooltip was triggered using the keyboard</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="tooltip" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTooltip`</doc>
<type name="Tooltip"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="realize" when="first">
<doc xml:space="preserve">Emitted when @widget is associated with a `GdkSurface`.
This means that [method@Gtk.Widget.realize] has been called
or the widget has been mapped (that is, it is going to be drawn).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="show" when="first">
<doc xml:space="preserve">Emitted when @widget is shown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="state-flags-changed" when="first">
<doc xml:space="preserve">Emitted when the widget state changes.
See [method@Gtk.Widget.get_state_flags].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">The previous state flags.</doc>
<type name="StateFlags"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="unmap" when="first">
<doc xml:space="preserve">Emitted when @widget is going to be unmapped.
A widget is unmapped when either it or any of its parents up to the
toplevel widget have been set as hidden.
As ::unmap indicates that a widget will not be shown any longer,
it can be used to, for example, stop an animation on the widget.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="unrealize" when="last">
<doc xml:space="preserve">Emitted when the `GdkSurface` associated with @widget is destroyed.
This means that [method@Gtk.Widget.unrealize] has been called
or the widget has been unmapped (that is, it is going to be hidden).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<callback name="WidgetActionActivateFunc" c:type="GtkWidgetActionActivateFunc">
<doc xml:space="preserve">The type of the callback functions used for activating
actions installed with gtk_widget_class_install_action().
The @parameter must match the @parameter_type of the action.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to which the action belongs</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the action name</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parameter" transfer-ownership="none">
<doc xml:space="preserve">parameter for activation</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</callback>
<record name="WidgetClass" c:type="GtkWidgetClass" glib:is-gtype-struct-for="Widget">
<field name="parent_class">
<doc xml:space="preserve">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.</doc>
<type name="GObject.InitiallyUnownedClass" c:type="GInitiallyUnownedClass"/>
</field>
<field name="show">
<callback name="show">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="hide">
<callback name="hide">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="map">
<callback name="map">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unmap">
<callback name="unmap">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="realize">
<callback name="realize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unrealize">
<callback name="unrealize">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="root">
<callback name="root">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unroot">
<callback name="unroot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="size_allocate">
<callback name="size_allocate">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="baseline" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</callback>
</field>
<field name="state_flags_changed">
<callback name="state_flags_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="previous_state_flags" transfer-ownership="none">
<type name="StateFlags" c:type="GtkStateFlags"/>
</parameter>
</parameters>
</callback>
</field>
<field name="direction_changed">
<callback name="direction_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="previous_direction" transfer-ownership="none">
<type name="TextDirection" c:type="GtkTextDirection"/>
</parameter>
</parameters>
</callback>
</field>
<field name="get_request_mode">
<callback name="get_request_mode">
<return-value transfer-ownership="none">
<doc xml:space="preserve">The `GtkSizeRequestMode` preferred by @widget.</doc>
<type name="SizeRequestMode" c:type="GtkSizeRequestMode"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="measure">
<callback name="measure">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidget` instance</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="orientation" transfer-ownership="none">
<doc xml:space="preserve">the orientation to measure</doc>
<type name="Orientation" c:type="GtkOrientation"/>
</parameter>
<parameter name="for_size" transfer-ownership="none">
<doc xml:space="preserve">Size for the opposite of @orientation, i.e.
if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is
the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL
case is analogous. This way, both height-for-width and width-for-height
requests can be implemented. If no size is known, -1 can be passed.</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="minimum" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the minimum size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the natural size</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="minimum_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the minimum size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="natural_baseline" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the baseline
position for the natural size, or -1 to report no baseline</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="mnemonic_activate">
<callback name="mnemonic_activate">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the signal has been handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="group_cycling" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if there are other widgets with the same mnemonic</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="grab_focus">
<callback name="grab_focus">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if focus is now inside @widget.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="focus">
<callback name="focus">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="set_focus_child">
<callback name="set_focus_child">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a direct child widget of @widget or %NULL
to unset the focus child of @widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="move_focus">
<callback name="move_focus">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="keynav_failed">
<callback name="keynav_failed">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if stopping keyboard navigation is fine, %FALSE
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="direction" transfer-ownership="none">
<doc xml:space="preserve">direction of focus movement</doc>
<type name="DirectionType" c:type="GtkDirectionType"/>
</parameter>
</parameters>
</callback>
</field>
<field name="query_tooltip">
<callback name="query_tooltip">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="keyboard_tooltip" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="tooltip" transfer-ownership="none">
<type name="Tooltip" c:type="GtkTooltip*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="compute_expand">
<callback name="compute_expand">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="hexpand_p" transfer-ownership="none">
<type name="gboolean" c:type="gboolean*"/>
</parameter>
<parameter name="vexpand_p" transfer-ownership="none">
<type name="gboolean" c:type="gboolean*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="css_changed">
<callback name="css_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="change" transfer-ownership="none">
<type name="CssStyleChange" c:type="GtkCssStyleChange*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="system_setting_changed">
<callback name="system_setting_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<type name="SystemSetting" c:type="GtkSystemSetting"/>
</parameter>
</parameters>
</callback>
</field>
<field name="snapshot">
<callback name="snapshot">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="snapshot" transfer-ownership="none">
<type name="Snapshot" c:type="GtkSnapshot*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="contains">
<callback name="contains">
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @widget contains (@x, @y).</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to query</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate to test, relative to @widget's origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</callback>
</field>
<field name="priv" readable="0" private="1">
<type name="WidgetClassPrivate" c:type="GtkWidgetClassPrivate*"/>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
<method name="add_binding" c:identifier="gtk_widget_class_add_binding" introspectable="0">
<doc xml:space="preserve">Creates a new shortcut for @widget_class that calls the given @callback
with arguments read according to @format_string.
The arguments and format string must be provided in the same way as
with g_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@GtkWidgetClass.add_shortcut] with a custom
shortcut.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">the class to add the binding to</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">key value of binding to install</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="mods" transfer-ownership="none">
<doc xml:space="preserve">key modifier of binding to install</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="callback" transfer-ownership="none">
<doc xml:space="preserve">the callback to call upon activation</doc>
<type name="ShortcutFunc" c:type="GtkShortcutFunc"/>
</parameter>
<parameter name="format_string" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">GVariant format string for arguments
or %NULL for no arguments</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments, as given by format string</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="add_binding_action" c:identifier="gtk_widget_class_add_binding_action" introspectable="0">
<doc xml:space="preserve">Creates a new shortcut for @widget_class that activates the given
@action_name with arguments read according to @format_string.
The arguments and format string must be provided in the same way as
with g_variant_new().
This function is a convenience wrapper around
[method@Gtk.WidgetClass.add_shortcut] and must be called during class
initialization.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">the class to add the binding to</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">key value of binding to install</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="mods" transfer-ownership="none">
<doc xml:space="preserve">key modifier of binding to install</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the action to activate</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="format_string" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">GVariant format string for arguments
or %NULL for no arguments</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments, as given by format string</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="add_binding_signal" c:identifier="gtk_widget_class_add_binding_signal" introspectable="0">
<doc xml:space="preserve">Creates a new shortcut for @widget_class that emits the given action
@signal with arguments read according to @format_string.
The arguments and format string must be provided in the same way as
with g_variant_new().
This function is a convenience wrapper around
[method@Gtk.WidgetClass.add_shortcut] and must be called during class
initialization.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">the class to add the binding to</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">key value of binding to install</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="mods" transfer-ownership="none">
<doc xml:space="preserve">key modifier of binding to install</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
<parameter name="signal" transfer-ownership="none">
<doc xml:space="preserve">the signal to execute</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="format_string" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">GVariant format string for arguments
or %NULL for no arguments</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">arguments, as given by format string</doc>
<varargs/>
</parameter>
</parameters>
</method>
<method name="add_shortcut" c:identifier="gtk_widget_class_add_shortcut">
<doc xml:space="preserve">Installs a shortcut in @widget_class.
Every instance created for @widget_class or its subclasses will
inherit this shortcut and trigger it.
Shortcuts added this way will be triggered in the %GTK_PHASE_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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">the class to add the shortcut to</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="shortcut" transfer-ownership="none">
<doc xml:space="preserve">the `GtkShortcut` to add</doc>
<type name="Shortcut" c:type="GtkShortcut*"/>
</parameter>
</parameters>
</method>
<method name="bind_template_callback_full" c:identifier="gtk_widget_class_bind_template_callback_full">
<doc xml:space="preserve">Declares a @callback_symbol to handle @callback_name from
the template XML defined for @widget_type.
This function is not supported after [method@Gtk.WidgetClass.set_template_scope]
has been used on @widget_class. 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].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="callback_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the callback as expected in the template XML</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="callback_symbol" transfer-ownership="none" scope="async">
<doc xml:space="preserve">The callback symbol</doc>
<type name="GObject.Callback" c:type="GCallback"/>
</parameter>
</parameters>
</method>
<method name="bind_template_child_full" c:identifier="gtk_widget_class_bind_template_child_full">
<doc xml:space="preserve">Automatically assign an object declared in the class template XML to
be set to a location on a freshly built instance&#x2019;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 use `G_PRIVATE_OFFSET(WidgetType, member)`.
An explicit strong reference will be held automatically for the duration
of your instance&#x2019;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 [signal@Gtk.Widget::destroy].
If @internal_child is specified, [vfunc@Gtk.Buildable.get_internal_child]
will be automatically implemented by the `GtkWidget` 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].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">The &#x201C;id&#x201D; of the child defined in the template XML</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="internal_child" transfer-ownership="none">
<doc xml:space="preserve">Whether the child should be accessible as an &#x201C;internal-child&#x201D;
when this class is used in GtkBuilder XML</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="struct_offset" transfer-ownership="none">
<doc xml:space="preserve">The structure offset into the composite widget&#x2019;s instance
public or private structure where the automated child pointer should be set,
or 0 to not assign the pointer.</doc>
<type name="gssize" c:type="gssize"/>
</parameter>
</parameters>
</method>
<method name="get_accessible_role" c:identifier="gtk_widget_class_get_accessible_role">
<doc xml:space="preserve">Retrieves the accessible role used by the given `GtkWidget` class.
Different accessible roles have different states, and are rendered
differently by assistive technologies.
See also: [method@Gtk.Accessible.get_accessible_role].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the accessible role for the widget class</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_activate_signal" c:identifier="gtk_widget_class_get_activate_signal">
<doc xml:space="preserve">Retrieves the signal id for the activation signal.
the activation signal is set using
[method@Gtk.WidgetClass.set_activate_signal].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a signal id, or 0 if the widget class does not
specify an activation signal</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_css_name" c:identifier="gtk_widget_class_get_css_name">
<doc xml:space="preserve">Gets the name used by this class for matching in CSS code.
See [method@Gtk.WidgetClass.set_css_name] for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the CSS name of the given class</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">class to set the name on</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_layout_manager_type" c:identifier="gtk_widget_class_get_layout_manager_type">
<doc xml:space="preserve">Retrieves the type of the [class@Gtk.LayoutManager]
used by widgets of class @widget_class.
See also: [method@Gtk.WidgetClass.set_layout_manager_type].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">type of a `GtkLayoutManager` subclass, or %G_TYPE_INVALID</doc>
<type name="GType" c:type="GType"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
</parameters>
</method>
<method name="install_action" c:identifier="gtk_widget_class_install_action">
<doc xml:space="preserve">This should be called at class initialization time to specify
actions to be added for all instances of this class.
Actions installed by this function are stateless. The only state
they have is whether they are enabled or not.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">a prefixed action name, such as "clipboard.paste"</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="parameter_type" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the parameter type</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="activate" transfer-ownership="none" scope="notified">
<doc xml:space="preserve">callback to use when the action is activated</doc>
<type name="WidgetActionActivateFunc" c:type="GtkWidgetActionActivateFunc"/>
</parameter>
</parameters>
</method>
<method name="install_property_action" c:identifier="gtk_widget_class_install_property_action">
<doc xml:space="preserve">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 santity 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.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">name of the action</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="property_name" transfer-ownership="none">
<doc xml:space="preserve">name of the property in instances of @widget_class
or any parent class.</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="query_action" c:identifier="gtk_widget_class_query_action">
<doc xml:space="preserve">Returns details about the @index_-th action that has been
installed for @widget_class during class initialization.
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.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action was found, %FALSE if @index_
is out of range</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidget` class</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="index_" transfer-ownership="none">
<doc xml:space="preserve">position of the action to query</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="owner" direction="out" caller-allocates="0" transfer-ownership="none">
<doc xml:space="preserve">return location for the type where the action was defined</doc>
<type name="GType" c:type="GType*"/>
</parameter>
<parameter name="action_name" direction="out" caller-allocates="0" transfer-ownership="none">
<doc xml:space="preserve">return location for the action name</doc>
<type name="utf8" c:type="const char**"/>
</parameter>
<parameter name="parameter_type" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1">
<doc xml:space="preserve">return location for the parameter type</doc>
<type name="GLib.VariantType" c:type="const GVariantType**"/>
</parameter>
<parameter name="property_name" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1">
<doc xml:space="preserve">return location for the property name</doc>
<type name="utf8" c:type="const char**"/>
</parameter>
</parameters>
</method>
<method name="set_accessible_role" c:identifier="gtk_widget_class_set_accessible_role">
<doc xml:space="preserve">Sets the accessible role used by the given `GtkWidget` class.
Different accessible roles have different states, and are
rendered differently by assistive technologies.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="accessible_role" transfer-ownership="none">
<doc xml:space="preserve">the `GtkAccessibleRole` used by the @widget_class</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</parameter>
</parameters>
</method>
<method name="set_activate_signal" c:identifier="gtk_widget_class_set_activate_signal">
<doc xml:space="preserve">Sets the `GtkWidgetClass.activate_signal` field with the
given @signal_id.
The signal will be emitted when calling [method@Gtk.Widget.activate].
The @signal_id must have been registered with `g_signal_new()`
or g_signal_newv() before calling this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="signal_id" transfer-ownership="none">
<doc xml:space="preserve">the id for the activate signal</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</method>
<method name="set_activate_signal_from_name" c:identifier="gtk_widget_class_set_activate_signal_from_name">
<doc xml:space="preserve">Sets the `GtkWidgetClass.activate_signal` field with the signal id for
the given @signal_name.
The signal will be emitted when calling [method@Gtk.Widget.activate].
The @signal_name of @widget_type must have been registered with
g_signal_new() or g_signal_newv() before calling this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="signal_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the activate signal of @widget_type</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_css_name" c:identifier="gtk_widget_class_set_css_name">
<doc xml:space="preserve">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, `GtkWidget`
uses the name "widget".</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">class to set the name on</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">name to use</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_layout_manager_type" c:identifier="gtk_widget_class_set_layout_manager_type">
<doc xml:space="preserve">Sets the type to be used for creating layout managers for
widgets of @widget_class.
The given @type must be a subtype of [class@Gtk.LayoutManager].
This function should only be called from class init functions
of widgets.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="type" transfer-ownership="none">
<doc xml:space="preserve">The object type that implements the `GtkLayoutManager`
for @widget_class</doc>
<type name="GType" c:type="GType"/>
</parameter>
</parameters>
</method>
<method name="set_template" c:identifier="gtk_widget_class_set_template">
<doc xml:space="preserve">This should be called at class initialization time to specify
the `GtkBuilder` XML 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&#x2019;s instance initializer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="template_bytes" transfer-ownership="none">
<doc xml:space="preserve">A `GBytes` holding the `GtkBuilder` XML</doc>
<type name="GLib.Bytes" c:type="GBytes*"/>
</parameter>
</parameters>
</method>
<method name="set_template_from_resource" c:identifier="gtk_widget_class_set_template_from_resource">
<doc xml:space="preserve">A convenience function that calls [method@Gtk.WidgetClass.set_template]
with the contents of a `GResource`.
Note that any class that installs templates must call
[method@Gtk.Widget.init_template] in the widget&#x2019;s instance
initializer.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="resource_name" transfer-ownership="none">
<doc xml:space="preserve">The name of the resource to load the template from</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_template_scope" c:identifier="gtk_widget_class_set_template_scope">
<doc xml:space="preserve">For use in language bindings, this will override the default
`GtkBuilderScope` to be used when parsing GtkBuilder XML from
this class&#x2019;s template data.
Note that this must be called from a composite widget classes class
initializer after calling [method@GtkWidgetClass.set_template].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="widget_class" transfer-ownership="none">
<doc xml:space="preserve">A `GtkWidgetClass`</doc>
<type name="WidgetClass" c:type="GtkWidgetClass*"/>
</instance-parameter>
<parameter name="scope" transfer-ownership="none">
<doc xml:space="preserve">The `GtkBuilderScope` to use when loading
the class template</doc>
<type name="BuilderScope" c:type="GtkBuilderScope*"/>
</parameter>
</parameters>
</method>
</record>
<record name="WidgetClassPrivate" c:type="GtkWidgetClassPrivate" disguised="1"/>
<class name="WidgetPaintable" c:symbol-prefix="widget_paintable" c:type="GtkWidgetPaintable" parent="GObject.Object" glib:type-name="GtkWidgetPaintable" glib:get-type="gtk_widget_paintable_get_type" glib:type-struct="WidgetPaintableClass">
<doc xml:space="preserve">`GtkWidgetPaintable` is a `GdkPaintable` that displays the contents
of a widget.
`GtkWidgetPaintable` will also take care of the widget not being in a
state where it can be drawn (like when it isn't shown) and just draw
nothing or where it does not have a size (like when it is hidden) and
report no size in that case.
Of course, `GtkWidgetPaintable` allows you to monitor widgets for size
changes by emitting the [signal@Gdk.Paintable::invalidate-size] signal
whenever the size of the widget changes as well as for visual changes by
emitting the [signal@Gdk.Paintable::invalidate-contents] signal whenever
the widget changes.
You can use a `GtkWidgetPaintable` everywhere a `GdkPaintable` is allowed,
including using it on a `GtkPicture` (or one of its parents) that it was
set on itself via gtk_picture_set_paintable(). The paintable will take care
of recursion when this happens. If you do this however, ensure that the
[property@Gtk.Picture:can-shrink] property is set to %TRUE or you might
end up with an infinitely growing widget.</doc>
<implements name="Gdk.Paintable"/>
<constructor name="new" c:identifier="gtk_widget_paintable_new">
<doc xml:space="preserve">Creates a new widget paintable observing the given widget.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkWidgetPaintable`</doc>
<type name="WidgetPaintable" c:type="GdkPaintable*"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWidget`</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</constructor>
<method name="get_widget" c:identifier="gtk_widget_paintable_get_widget" glib:get-property="widget">
<attribute name="org.gtk.Method.get_property" value="widget"/>
<doc xml:space="preserve">Returns the widget that is observed or %NULL if none.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the observed widget.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetPaintable`</doc>
<type name="WidgetPaintable" c:type="GtkWidgetPaintable*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_widget" c:identifier="gtk_widget_paintable_set_widget" glib:set-property="widget">
<attribute name="org.gtk.Method.set_property" value="widget"/>
<doc xml:space="preserve">Sets the widget that should be observed.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWidgetPaintable`</doc>
<type name="WidgetPaintable" c:type="GtkWidgetPaintable*"/>
</instance-parameter>
<parameter name="widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the widget to observe</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="widget" writable="1" transfer-ownership="none" setter="set_widget" getter="get_widget">
<attribute name="org.gtk.Property.get" value="gtk_widget_paintable_get_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_widget_paintable_set_widget"/>
<doc xml:space="preserve">The observed widget or %NULL if none.</doc>
<type name="Widget"/>
</property>
</class>
<record name="WidgetPaintableClass" c:type="GtkWidgetPaintableClass" glib:is-gtype-struct-for="WidgetPaintable">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
</record>
<record name="WidgetPrivate" c:type="GtkWidgetPrivate" disguised="1"/>
<class name="Window" c:symbol-prefix="window" c:type="GtkWindow" parent="Widget" glib:type-name="GtkWindow" glib:get-type="gtk_window_get_type" glib:type-struct="WindowClass">
<doc xml:space="preserve">A `GtkWindow` is a toplevel window which can contain other widgets.
![An example GtkWindow](window.png)
Windows normally have decorations that are under the control
of the windowing system and allow the user to manipulate the window
(resize it, move it, close it,...).
# GtkWindow as GtkBuildable
The `GtkWindow` implementation of the [iface@Gtk.Buildable] interface supports
setting a child as the titlebar by specifying &#x201C;titlebar&#x201D; as the &#x201C;type&#x201D;
attribute of a &lt;child&gt; element.
# CSS nodes
```
window.background [.csd / .solid-csd / .ssd] [.maximized / .fullscreen / .tiled]
&#x251C;&#x2500;&#x2500; &lt;child&gt;
&#x2570;&#x2500;&#x2500; &lt;titlebar child&gt;.titlebar [.default-decoration]
```
`GtkWindow` has a main CSS node with name window and style class .background.
Style classes that are typically used with the main CSS node are .csd (when
client-side decorations are in use), .solid-csd (for client-side decorations
without invisible borders), .ssd (used by mutter when rendering server-side
decorations). GtkWindow also represents window states with the following
style classes on the main node: .maximized, .fullscreen, .tiled (when supported,
also .tiled-top, .tiled-left, .tiled-right, .tiled-bottom).
`GtkWindow` subclasses often add their own discriminating style classes,
such as .dialog, .popup or .tooltip.
Generally, some CSS properties don't make sense on the toplevel window node,
such as margins or padding. When client-side decorations without invisible
borders are in use (i.e. the .solid-csd style class is added to the
main window node), the CSS border of the toplevel window is used for
resize drags. In the .csd case, the shadow area outside of the window
can be used to resize it.
`GtkWindow` adds the .titlebar and .default-decoration style classes to the
widget that is added as a titlebar child.
# Accessibility
`GtkWindow` uses the %GTK_ACCESSIBLE_ROLE_WINDOW role.
# Actions
`GtkWindow` defines a set of built-in actions:
- `default.activate`: Activate the default widget.
- `window.minimize`: Minimize the window.
- `window.toggle-maximized`: Maximize or restore the window.
- `window.close`: Close the window.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<implements name="Native"/>
<implements name="Root"/>
<implements name="ShortcutManager"/>
<constructor name="new" c:identifier="gtk_window_new">
<doc xml:space="preserve">Creates a new `GtkWindow`.
To get an undecorated window (no window borders), use
[method@Gtk.Window.set_decorated].
All top-level windows created by gtk_window_new() are stored
in an internal top-level window list. This list can be obtained
from [func@Gtk.Window.list_toplevels]. Due to GTK keeping a
reference to the window internally, gtk_window_new() does not
return a reference to the caller.
To delete a `GtkWindow`, call [method@Gtk.Window.destroy].</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkWindow`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<function name="get_default_icon_name" c:identifier="gtk_window_get_default_icon_name">
<doc xml:space="preserve">Returns the fallback icon name for windows.
The returned string is owned by GTK and should not
be modified. It is only valid until the next call to
[func@Gtk.Window.set_default_icon_name].</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the fallback icon name for windows</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
</function>
<function name="get_toplevels" c:identifier="gtk_window_get_toplevels">
<doc xml:space="preserve">Returns a list of all existing toplevel windows.
If you want to iterate through the list and perform actions involving
callbacks that might destroy the widgets or add new ones, be aware that
the list of toplevels will change and emit the "items-changed" signal.</doc>
<return-value transfer-ownership="none">
<attribute name="element-type" value="GtkWindow"/>
<doc xml:space="preserve">the list
of toplevel widgets</doc>
<type name="Gio.ListModel" c:type="GListModel*"/>
</return-value>
</function>
<function name="list_toplevels" c:identifier="gtk_window_list_toplevels">
<doc xml:space="preserve">Returns a list of all existing toplevel windows.
The widgets in the list are not individually referenced.
If you want to iterate through the list and perform actions
involving callbacks that might destroy the widgets, you must
call `g_list_foreach (result, (GFunc)g_object_ref, NULL)` first,
and then unref all the widgets afterwards.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">list of
toplevel widgets</doc>
<type name="GLib.List" c:type="GList*">
<type name="Widget"/>
</type>
</return-value>
</function>
<function name="set_auto_startup_notification" c:identifier="gtk_window_set_auto_startup_notification">
<doc xml:space="preserve">Sets whether the window should request startup notification.
By default, after showing the first `GtkWindow`, GTK calls
[method@Gdk.Display.notify_startup_complete]. Call this function
to disable the automatic startup notification. You might do this
if your first window is a splash screen, and you want to delay
notification until after your real main window has been shown,
for example.
In that example, you would disable startup notification
temporarily, show your splash screen, then re-enable it so that
showing the main window would automatically result in notification.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to automatically do startup notification</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
<function name="set_default_icon_name" c:identifier="gtk_window_set_default_icon_name">
<doc xml:space="preserve">Sets an icon to be used as fallback.
The fallback icon is used for windows that
haven't had [method@Gtk.Window.set_icon_name]
called on them.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">the name of the themed icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</function>
<function name="set_interactive_debugging" c:identifier="gtk_window_set_interactive_debugging">
<doc xml:space="preserve">Opens or closes the [interactive debugger](running.html#interactive-debugging).
The debugger offers access to the widget hierarchy of the application
and to useful debugging tools.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="enable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to enable interactive debugging</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
<virtual-method name="activate_default">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="activate_focus">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="close_request">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</virtual-method>
<virtual-method name="enable_debugging">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="toggle" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="keys_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</virtual-method>
<method name="close" c:identifier="gtk_window_close">
<doc xml:space="preserve">Requests that the window is closed.
This is similar to what happens when a window manager
close button is clicked.
This function can be used with close buttons in custom
titlebars.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="destroy" c:identifier="gtk_window_destroy">
<doc xml:space="preserve">Drop the internal reference GTK holds on toplevel windows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">The window to destroy</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="fullscreen" c:identifier="gtk_window_fullscreen">
<doc xml:space="preserve">Asks to place @window in the fullscreen state.
Note that you shouldn&#x2019;t assume the window is definitely fullscreen
afterward, because other entities (e.g. the user or window manager
unfullscreen it again, and not all window managers honor requests
to fullscreen windows.
You can track the result of this operation via the
[property@Gdk.Toplevel:state] property, or by listening to
notifications of the [property@Gtk.Window:fullscreened] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="fullscreen_on_monitor" c:identifier="gtk_window_fullscreen_on_monitor">
<doc xml:space="preserve">Asks to place @window in the fullscreen state on the given @monitor.
Note that you shouldn't assume the window is definitely fullscreen
afterward, or that the windowing system allows fullscreen windows on
any given monitor.
You can track the result of this operation via the
[property@Gdk.Toplevel:state] property, or by listening to
notifications of the [property@Gtk.Window:fullscreened] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="monitor" transfer-ownership="none">
<doc xml:space="preserve">which monitor to go fullscreen on</doc>
<type name="Gdk.Monitor" c:type="GdkMonitor*"/>
</parameter>
</parameters>
</method>
<method name="get_application" c:identifier="gtk_window_get_application" glib:get-property="application">
<attribute name="org.gtk.Method.get_property" value="application"/>
<doc xml:space="preserve">Gets the `GtkApplication` associated with the window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkApplication`</doc>
<type name="Application" c:type="GtkApplication*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_child" c:identifier="gtk_window_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @window</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_decorated" c:identifier="gtk_window_get_decorated" glib:get-property="decorated">
<attribute name="org.gtk.Method.get_property" value="decorated"/>
<doc xml:space="preserve">Returns whether the window has been set to have decorations.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window has been set to have decorations</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_default_size" c:identifier="gtk_window_get_default_size">
<doc xml:space="preserve">Gets the default size of the window.
A value of 0 for the width or height indicates that a default
size has not been explicitly set for that dimension, so the
&#x201C;natural&#x201D; size of the window will be used.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="width" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the default width</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="height" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">location to store the default height</doc>
<type name="gint" c:type="int*"/>
</parameter>
</parameters>
</method>
<method name="get_default_widget" c:identifier="gtk_window_get_default_widget" glib:get-property="default-widget">
<attribute name="org.gtk.Property.get" value="default-widget"/>
<doc xml:space="preserve">Returns the default widget for @window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the default widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_deletable" c:identifier="gtk_window_get_deletable" glib:get-property="deletable">
<attribute name="org.gtk.Method.get_property" value="deletable"/>
<doc xml:space="preserve">Returns whether the window has been set to have a close button.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window has been set to have a close button</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_destroy_with_parent" c:identifier="gtk_window_get_destroy_with_parent" glib:get-property="destroy-with-parent">
<attribute name="org.gtk.Method.get_property" value="destroy-with-parent"/>
<doc xml:space="preserve">Returns whether the window will be destroyed with its transient parent.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window will be destroyed with its transient parent.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus" c:identifier="gtk_window_get_focus">
<attribute name="org.gtk.Property.get" value="focus-widget"/>
<doc xml:space="preserve">Retrieves the current focused widget within the window.
Note that this is the widget that would have the focus
if the toplevel window focused; if the toplevel window
is not focused then `gtk_widget_has_focus (widget)` will
not be %TRUE for the widget.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the currently focused widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_focus_visible" c:identifier="gtk_window_get_focus_visible" glib:get-property="focus-visible">
<attribute name="org.gtk.Method.get_property" value="focus-visible"/>
<doc xml:space="preserve">Gets whether &#x201C;focus rectangles&#x201D; are supposed to be visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if &#x201C;focus rectangles&#x201D; are supposed to be visible
in this window.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_group" c:identifier="gtk_window_get_group">
<doc xml:space="preserve">Returns the group for @window.
If the window has no group, then the default group is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkWindowGroup` for a window
or the default group</doc>
<type name="WindowGroup" c:type="GtkWindowGroup*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_handle_menubar_accel" c:identifier="gtk_window_get_handle_menubar_accel" glib:get-property="handle-menubar-accel" version="4.2">
<attribute name="org.gtk.Method.get_property" value="handle-menubar-accel"/>
<doc xml:space="preserve">Returns whether this window reacts to F10 key presses by
activating a menubar it contains.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window handles F10</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_hide_on_close" c:identifier="gtk_window_get_hide_on_close" glib:get-property="hide-on-close">
<attribute name="org.gtk.Method.get_property" value="hide-on-close"/>
<doc xml:space="preserve">Returns whether the window will be hidden when the close button is clicked.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window will be hidden</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon_name" c:identifier="gtk_window_get_icon_name" glib:get-property="icon-name">
<attribute name="org.gtk.Method.get_property" value="icon-name"/>
<doc xml:space="preserve">Returns the name of the themed icon for the window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the icon name</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_mnemonics_visible" c:identifier="gtk_window_get_mnemonics_visible" glib:get-property="mnemonics-visible">
<attribute name="org.gtk.Method.get_property" value="mnemonics-visible"/>
<doc xml:space="preserve">Gets whether mnemonics are supposed to be visible.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if mnemonics are supposed to be visible
in this window.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_modal" c:identifier="gtk_window_get_modal" glib:get-property="modal">
<attribute name="org.gtk.Method.get_property" value="modal"/>
<doc xml:space="preserve">Returns whether the window is modal.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window is set to be modal and
establishes a grab when shown</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_resizable" c:identifier="gtk_window_get_resizable" glib:get-property="resizable">
<attribute name="org.gtk.Method.get_property" value="resizable"/>
<doc xml:space="preserve">Gets the value set by gtk_window_set_resizable().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the user can resize the window</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_title" c:identifier="gtk_window_get_title" glib:get-property="title">
<attribute name="org.gtk.Method.get_property" value="title"/>
<doc xml:space="preserve">Retrieves the title of the window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the title of the window</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_titlebar" c:identifier="gtk_window_get_titlebar" glib:get-property="titlebar">
<attribute name="org.gtk.Method.get_property" value="titlebar"/>
<doc xml:space="preserve">Returns the custom titlebar that has been set with
gtk_window_set_titlebar().</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the custom titlebar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_transient_for" c:identifier="gtk_window_get_transient_for" glib:get-property="transient-for">
<attribute name="org.gtk.Method.get_property" value="transient-for"/>
<doc xml:space="preserve">Fetches the transient parent for this window.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the transient parent for this window</doc>
<type name="Window" c:type="GtkWindow*"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="has_group" c:identifier="gtk_window_has_group">
<doc xml:space="preserve">Returns whether @window has an explicit window group.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @window has an explicit window group.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_active" c:identifier="gtk_window_is_active" glib:get-property="is-active">
<attribute name="org.gtk.Method.get_property" value="is-active"/>
<doc xml:space="preserve">Returns whether the window is part of the current active toplevel.
The active toplevel is the window receiving keystrokes.
The return value is %TRUE if the window is active toplevel itself.
You might use this function if you wanted to draw a widget
differently in an active window from a widget in an inactive window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the window part of the current active window.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_fullscreen" c:identifier="gtk_window_is_fullscreen">
<attribute name="org.gtk.Property.get" value="fullscreened"/>
<doc xml:space="preserve">Retrieves the current fullscreen state of @window.
Note that since fullscreening is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn&#x2019;t assume the return value of this function changing
immediately (or at all), as an effect of calling
[method@Gtk.Window.fullscreen] or [method@Gtk.Window.unfullscreen].
If the window isn't yet mapped, the value returned will whether the
initial requested state is fullscreen.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the window has a fullscreen state.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="is_maximized" c:identifier="gtk_window_is_maximized">
<attribute name="org.gtk.Method.get_property" value="maximized"/>
<doc xml:space="preserve">Retrieves the current maximized state of @window.
Note that since maximization is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn&#x2019;t assume the return value of this function changing
immediately (or at all), as an effect of calling
[method@Gtk.Window.maximize] or [method@Gtk.Window.unmaximize].
If the window isn't yet mapped, the value returned will whether the
initial requested state is maximized.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">whether the window has a maximized state.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="maximize" c:identifier="gtk_window_maximize">
<doc xml:space="preserve">Asks to maximize @window, so that it fills the screen.
Note that you shouldn&#x2019;t assume the window is definitely maximized
afterward, because other entities (e.g. the user or window manager
could unmaximize it again, and not all window managers support
maximization.
It&#x2019;s permitted to call this function before showing a window,
in which case the window will be maximized when it appears onscreen
initially.
You can track the result of this operation via the
[property@Gdk.Toplevel:state] property, or by listening to
notifications on the [property@Gtk.Window:maximized]
property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="minimize" c:identifier="gtk_window_minimize">
<doc xml:space="preserve">Asks to minimize the specified @window.
Note that you shouldn&#x2019;t assume the window is definitely minimized
afterward, because the windowing system might not support this
functionality; other entities (e.g. the user or the window manager
could unminimize it again, or there may not be a window manager in
which case minimization isn&#x2019;t possible, etc.
It&#x2019;s permitted to call this function before showing a window,
in which case the window will be minimized before it ever appears
onscreen.
You can track result of this operation via the
[property@Gdk.Toplevel:state] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="present" c:identifier="gtk_window_present">
<doc xml:space="preserve">Presents a window to the user.
This function should not be used as when it is called,
it is too late to gather a valid timestamp to allow focus
stealing prevention to work correctly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="present_with_time" c:identifier="gtk_window_present_with_time">
<doc xml:space="preserve">Presents a window to the user.
This may mean raising the window in the stacking order,
unminimizing it, moving it to the current desktop, and/or
giving it the keyboard focus, possibly dependent on the user&#x2019;s
platform, window manager, and preferences.
If @window is hidden, this function calls [method@Gtk.Widget.show]
as well.
This function should be used when the user tries to open a window
that&#x2019;s already open. Say for example the preferences dialog is
currently open, and the user chooses Preferences from the menu
a second time; use [method@Gtk.Window.present] to move the
already-open dialog where the user can see it.
Presents a window to the user in response to a user interaction.
The timestamp should be gathered when the window was requested
to be shown (when clicking a link for example), rather than once
the window is ready to be shown.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">the timestamp of the user interaction (typically a
button or key press event) which triggered this call</doc>
<type name="guint32" c:type="guint32"/>
</parameter>
</parameters>
</method>
<method name="set_application" c:identifier="gtk_window_set_application" glib:set-property="application">
<attribute name="org.gtk.Method.set_property" value="application"/>
<doc xml:space="preserve">Sets or unsets the `GtkApplication` associated with the window.
The application will be kept alive for at least as long as it has
any windows associated with it (see g_application_hold() for a way
to keep it alive without windows).
Normally, the connection between the application and the window will
remain until the window is destroyed, but you can explicitly remove
it by setting the @application to %NULL.
This is equivalent to calling [method@Gtk.Application.remove_window]
and/or [method@Gtk.Application.add_window] on the old/new applications
as relevant.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="application" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkApplication`, or %NULL to unset</doc>
<type name="Application" c:type="GtkApplication*"/>
</parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_window_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @window.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_decorated" c:identifier="gtk_window_set_decorated" glib:set-property="decorated">
<attribute name="org.gtk.Method.set_property" value="decorated"/>
<doc xml:space="preserve">Sets whether the window should be decorated.
By default, windows are decorated with a title bar, resize
controls, etc. Some window managers allow GTK to disable these
decorations, creating a borderless window. If you set the decorated
property to %FALSE using this function, GTK will do its best to
convince the window manager not to decorate the window. Depending on
the system, this function may not have any effect when called on a
window that is already visible, so you should call it before calling
[method@Gtk.Widget.show].
On Windows, this function always works, since there&#x2019;s no window manager
policy involved.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to decorate the window</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_default_size" c:identifier="gtk_window_set_default_size">
<doc xml:space="preserve">Sets the default size of a window.
If the window&#x2019;s &#x201C;natural&#x201D; size (its size request) is larger than
the default, the default will be ignored.
Unlike [method@Gtk.Widget.set_size_request], which sets a size
request for a widget and thus would keep users from shrinking
the window, this function only sets the initial size, just as
if the user had resized the window themselves. Users can still
shrink the window again as they normally would. Setting a default
size of -1 means to use the &#x201C;natural&#x201D; default size (the size request
of the window).
The default size of a window only affects the first time a window is
shown; if a window is hidden and re-shown, it will remember the size
it had prior to hiding, rather than using the default size.
Windows can&#x2019;t actually be 0x0 in size, they must be at least 1x1, but
passing 0 for @width and @height is OK, resulting in a 1x1 default size.
If you use this function to reestablish a previously saved window size,
note that the appropriate size to save is the one returned by
[method@Gtk.Window.get_default_size]. Using the window allocation
directly will not work in all circumstances and can lead to growing
or shrinking windows.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">width in pixels, or -1 to unset the default width</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">height in pixels, or -1 to unset the default height</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</method>
<method name="set_default_widget" c:identifier="gtk_window_set_default_widget" glib:set-property="default-widget">
<attribute name="org.gtk.Property.set" value="default-widget"/>
<doc xml:space="preserve">Sets the default widget.
The default widget is the widget that is activated when the user
presses Enter in a dialog (for example).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="default_widget" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">widget to be the default
to unset the default widget for the toplevel</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_deletable" c:identifier="gtk_window_set_deletable" glib:set-property="deletable">
<attribute name="org.gtk.Method.set_property" value="deletable"/>
<doc xml:space="preserve">Sets whether the window should be deletable.
By default, windows have a close button in the window frame.
Some window managers allow GTK to disable this button. If you
set the deletable property to %FALSE using this function, GTK
will do its best to convince the window manager not to show a
close button. Depending on the system, this function may not
have any effect when called on a window that is already visible,
so you should call it before calling [method@Gtk.Widget.show].
On Windows, this function always works, since there&#x2019;s no window
manager policy involved.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to decorate the window as deletable</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_destroy_with_parent" c:identifier="gtk_window_set_destroy_with_parent" glib:set-property="destroy-with-parent">
<attribute name="org.gtk.Method.set_property" value="destroy-with-parent"/>
<doc xml:space="preserve">If @setting is %TRUE, then destroying the transient parent of @window
will also destroy @window itself.
This is useful for dialogs that shouldn&#x2019;t persist beyond the lifetime
of the main window they are associated with, for example.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">whether to destroy @window with its transient parent</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_display" c:identifier="gtk_window_set_display" glib:set-property="display">
<attribute name="org.gtk.Method.set_property" value="display"/>
<doc xml:space="preserve">Sets the `GdkDisplay` where the @window is displayed.
If the window is already mapped, it will be unmapped,
and then remapped on the new display.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="display" transfer-ownership="none">
<doc xml:space="preserve">a `GdkDisplay`</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
</parameters>
</method>
<method name="set_focus" c:identifier="gtk_window_set_focus">
<attribute name="org.gtk.Method.set_property" value="focus-widget"/>
<doc xml:space="preserve">Sets the focus widget.
If @focus is not the current focus widget, and is focusable,
sets it as the focus widget for the window. If @focus is %NULL,
unsets the focus widget for this window. To set the focus to a
particular widget in the toplevel, it is usually more convenient
to use [method@Gtk.Widget.grab_focus] instead of this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="focus" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">widget to be the new focus widget, or %NULL to unset
any focus widget for the toplevel window.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_focus_visible" c:identifier="gtk_window_set_focus_visible" glib:set-property="focus-visible">
<attribute name="org.gtk.MEthod.set_property" value="focus-visible"/>
<doc xml:space="preserve">Sets whether &#x201C;focus rectangles&#x201D; are supposed to be visible.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_handle_menubar_accel" c:identifier="gtk_window_set_handle_menubar_accel" glib:set-property="handle-menubar-accel" version="4.2">
<attribute name="org.gtk.Method.set_property" value="handle-menubar-accel"/>
<doc xml:space="preserve">Sets whether this window should react to F10 key presses
by activating a menubar it contains.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="handle_menubar_accel" transfer-ownership="none">
<doc xml:space="preserve">%TRUE to make @window handle F10</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_hide_on_close" c:identifier="gtk_window_set_hide_on_close" glib:set-property="hide-on-close">
<attribute name="org.gtk.Method.set_property" value="hide-on-close"/>
<doc xml:space="preserve">If @setting is %TRUE, then clicking the close button on the window
will not destroy it, but only hide it.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">whether to hide the window when it is closed</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_icon_name" c:identifier="gtk_window_set_icon_name" glib:set-property="icon-name">
<attribute name="org.gtk.Method.set_property" value="icon-name"/>
<doc xml:space="preserve">Sets the icon for the window from a named themed icon.
See the docs for [class@Gtk.IconTheme] for more details.
On some platforms, the window icon is not used at all.
Note that this has nothing to do with the WM_ICON_NAME
property which is mentioned in the ICCCM.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="name" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the name of the themed icon</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_mnemonics_visible" c:identifier="gtk_window_set_mnemonics_visible" glib:set-property="mnemonics-visible">
<attribute name="org.gtk.Method.set_property" value="mnemonics-visible"/>
<doc xml:space="preserve">Sets whether mnemonics are supposed to be visible.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="setting" transfer-ownership="none">
<doc xml:space="preserve">the new value</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_modal" c:identifier="gtk_window_set_modal" glib:set-property="modal">
<attribute name="org.gtk.Method.set_property" value="modal"/>
<doc xml:space="preserve">Sets a window modal or non-modal.
Modal windows prevent interaction with other windows in the same
application. To keep modal dialogs on top of main application windows,
use [method@Gtk.Window.set_transient_for] to make the dialog transient
for the parent; most window managers will then disallow lowering the
dialog below the parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="modal" transfer-ownership="none">
<doc xml:space="preserve">whether the window is modal</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_resizable" c:identifier="gtk_window_set_resizable" glib:set-property="resizable">
<attribute name="org.gtk.Method.set_property" value="resizable"/>
<doc xml:space="preserve">Sets whether the user can resize a window.
Windows are user resizable by default.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="resizable" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the user can resize this window</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="set_startup_id" c:identifier="gtk_window_set_startup_id" glib:set-property="startup-id">
<attribute name="org.gtk.Method.set_property" value="startup-id"/>
<doc xml:space="preserve">Sets the startup notification ID.
Startup notification identifiers are used by desktop environment
to track application startup, to provide user feedback and other
features. This function changes the corresponding property on the
underlying `GdkSurface`.
Normally, startup identifier is managed automatically and you should
only use this function in special cases like transferring focus from
other processes. You should use this function before calling
[method@Gtk.Window.present] or any equivalent function generating
a window map event.
This function is only useful on X11, not with other GTK targets.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="startup_id" transfer-ownership="none">
<doc xml:space="preserve">a string with startup-notification identifier</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_title" c:identifier="gtk_window_set_title" glib:set-property="title">
<attribute name="org.gtk.Method.set_property" value="title"/>
<doc xml:space="preserve">Sets the title of the `GtkWindow`.
The title of a window will be displayed in its title bar; on the
X Window System, the title bar is rendered by the window manager
so exactly how the title appears to users may vary according to a
user&#x2019;s exact configuration. The title should help a user distinguish
this window from other windows they may have open. A good title might
include the application name and current document filename, for example.
Passing %NULL does the same as setting the title to an empty string.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="title" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">title of the window</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_titlebar" c:identifier="gtk_window_set_titlebar" glib:set-property="titlebar">
<attribute name="org.gtk.Method.set_property" value="titlebar"/>
<doc xml:space="preserve">Sets a custom titlebar for @window.
A typical widget used here is [class@Gtk.HeaderBar], as it
provides various features expected of a titlebar while allowing
the addition of child widgets to it.
If you set a custom titlebar, GTK will do its best to convince
the window manager not to put its own titlebar on the window.
Depending on the system, this function may not work for a window
that is already visible, so you set the titlebar before calling
[method@Gtk.Widget.show].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="titlebar" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the widget to use as titlebar</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<method name="set_transient_for" c:identifier="gtk_window_set_transient_for" glib:set-property="transient-for">
<attribute name="org.gtk.Method.set_property" value="transient-for"/>
<doc xml:space="preserve">Dialog windows should be set transient for the main application
window they were spawned from. This allows window managers to e.g.
keep the dialog on top of the main window, or center the dialog
over the main window. [ctor@Gtk.Dialog.new_with_buttons] and other
convenience functions in GTK will sometimes call
gtk_window_set_transient_for() on your behalf.
Passing %NULL for @parent unsets the current transient window.
On Windows, this function puts the child window on top of the parent,
much as the window manager would have done on X.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">parent window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="unfullscreen" c:identifier="gtk_window_unfullscreen">
<doc xml:space="preserve">Asks to remove the fullscreen state for @window, and return to
its previous state.
Note that you shouldn&#x2019;t assume the window is definitely not
fullscreen afterward, because other entities (e.g. the user or
window manager could fullscreen it again, and not all window
managers honor requests to unfullscreen windows; normally the
window will end up restored to its normal state. Just don&#x2019;t
write code that crashes if not.
You can track the result of this operation via the
[property@Gdk.Toplevel:state] property, or by listening to
notifications of the [property@Gtk.Window:fullscreened] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="unmaximize" c:identifier="gtk_window_unmaximize">
<doc xml:space="preserve">Asks to unmaximize @window.
Note that you shouldn&#x2019;t assume the window is definitely unmaximized
afterward, because other entities (e.g. the user or window manager
maximize it again, and not all window managers honor requests to
unmaximize.
You can track the result of this operation via the
[property@Gdk.Toplevel:state] property, or by listening to
notifications on the [property@Gtk.Window:maximized] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<method name="unminimize" c:identifier="gtk_window_unminimize">
<doc xml:space="preserve">Asks to unminimize the specified @window.
Note that you shouldn&#x2019;t assume the window is definitely unminimized
afterward, because the windowing system might not support this
functionality; other entities (e.g. the user or the window manager
could minimize it again, or there may not be a window manager in
which case minimization isn&#x2019;t possible, etc.
You can track result of this operation via the
[property@Gdk.Toplevel:state] property.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindow`</doc>
<type name="Window" c:type="GtkWindow*"/>
</instance-parameter>
</parameters>
</method>
<property name="application" writable="1" transfer-ownership="none" setter="set_application" getter="get_application">
<attribute name="org.gtk.Property.get" value="gtk_window_get_application"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_application"/>
<doc xml:space="preserve">The `GtkApplication` associated with the window.
The application will be kept alive for at least as long as it
has any windows associated with it (see g_application_hold()
for a way to keep it alive without windows).
Normally, the connection between the application and the window
will remain until the window is destroyed, but you can explicitly
remove it by setting the :application property to %NULL.</doc>
<type name="Application"/>
</property>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_window_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
<property name="decorated" writable="1" transfer-ownership="none" setter="set_decorated" getter="get_decorated">
<attribute name="org.gtk.Property.get" value="gtk_window_get_decorated"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_decorated"/>
<doc xml:space="preserve">Whether the window should have a frame (also known as *decorations*).</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="default-height" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The default height of the window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="default-widget" writable="1" transfer-ownership="none" setter="set_default_widget" getter="get_default_widget">
<attribute name="org.gtk.Property.get" value="gtk_window_get_default_widget"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_default_widget"/>
<doc xml:space="preserve">The default widget.</doc>
<type name="Widget"/>
</property>
<property name="default-width" writable="1" transfer-ownership="none">
<doc xml:space="preserve">The default width of the window.</doc>
<type name="gint" c:type="gint"/>
</property>
<property name="deletable" writable="1" transfer-ownership="none" setter="set_deletable" getter="get_deletable">
<attribute name="org.gtk.Property.get" value="gtk_window_get_deletable"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_deletable"/>
<doc xml:space="preserve">Whether the window frame should have a close button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="destroy-with-parent" writable="1" transfer-ownership="none" setter="set_destroy_with_parent" getter="get_destroy_with_parent">
<attribute name="org.gtk.Property.get" value="gtk_window_get_destroy_with_parent"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_destroy_with_parent"/>
<doc xml:space="preserve">If this window should be destroyed when the parent is destroyed.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="display" writable="1" transfer-ownership="none" setter="set_display">
<attribute name="org.gtk.Property.set" value="gtk_window_set_display"/>
<doc xml:space="preserve">The display that will display this window.</doc>
<type name="Gdk.Display"/>
</property>
<property name="focus-visible" writable="1" transfer-ownership="none" setter="set_focus_visible" getter="get_focus_visible">
<attribute name="org.gtk.Property.get" value="gtk_window_get_focus_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_focus_visible"/>
<doc xml:space="preserve">Whether 'focus rectangles' are currently visible in this window.
This property is maintained by GTK based on user input
and should not be set by applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="focus-widget" writable="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_window_get_focus"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_focus"/>
<doc xml:space="preserve">The focus widget.</doc>
<type name="Widget"/>
</property>
<property name="fullscreened" writable="1" construct="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_window_is_fullscreen"/>
<doc xml:space="preserve">Whether the window is fullscreen.
Setting this property is the equivalent of calling
[method@Gtk.Window.fullscreen] or [method@Gtk.Window.unfullscreen];
either operation is asynchronous, which means you will need to
connect to the ::notify signal in order to know whether the
operation was successful.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="handle-menubar-accel" version="4.2" writable="1" transfer-ownership="none" setter="set_handle_menubar_accel" getter="get_handle_menubar_accel">
<attribute name="org.gtk.Property.get" value="gtk_window_get_handle_menubar_accel"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_handle_menubar_accel"/>
<doc xml:space="preserve">Whether the window frame should handle F10 for activating
menubars.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="hide-on-close" writable="1" transfer-ownership="none" setter="set_hide_on_close" getter="get_hide_on_close">
<attribute name="org.gtk.Property.get" value="gtk_window_get_hide_on_close"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_hide_on_close"/>
<doc xml:space="preserve">If this window should be hidden when the users clicks the close button.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="icon-name" writable="1" transfer-ownership="none" setter="set_icon_name" getter="get_icon_name">
<attribute name="org.gtk.Property.get" value="gtk_window_get_icon_name"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_icon_name"/>
<doc xml:space="preserve">Specifies the name of the themed icon to use as the window icon.
See [class@Gtk.IconTheme] for more details.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="is-active" transfer-ownership="none" getter="is_active">
<attribute name="org.gtk.Property.get" value="gtk_window_is_active"/>
<doc xml:space="preserve">Whether the toplevel is the currently active window.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="maximized" writable="1" construct="1" transfer-ownership="none">
<attribute name="org.gtk.Property.get" value="gtk_window_is_maximized"/>
<doc xml:space="preserve">Whether the window is maximized.
Setting this property is the equivalent of calling
[method@Gtk.Window.maximize] or [method@Gtk.Window.unmaximize];
either operation is asynchronous, which means you will need to
connect to the ::notify signal in order to know whether the
operation was successful.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="mnemonics-visible" writable="1" transfer-ownership="none" setter="set_mnemonics_visible" getter="get_mnemonics_visible">
<attribute name="org.gtk.Property.get" value="gtk_window_get_mnemonics_visible"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_mnemonics_visible"/>
<doc xml:space="preserve">Whether mnemonics are currently visible in this window.
This property is maintained by GTK based on user input,
and should not be set by applications.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="modal" writable="1" transfer-ownership="none" setter="set_modal" getter="get_modal">
<attribute name="org.gtk.Property.get" value="gtk_window_get_modal"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_modal"/>
<doc xml:space="preserve">If %TRUE, the window is modal.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="resizable" writable="1" transfer-ownership="none" setter="set_resizable" getter="get_resizable">
<attribute name="org.gtk.Property.get" value="gtk_window_get_resizable"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_resizable"/>
<doc xml:space="preserve">If %TRUE, users can resize the window.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="startup-id" readable="0" writable="1" transfer-ownership="none" setter="set_startup_id">
<attribute name="org.gtk.Property.set" value="gtk_window_set_startup_id"/>
<doc xml:space="preserve">A write-only property for setting window's startup notification identifier.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="title" writable="1" transfer-ownership="none" setter="set_title" getter="get_title">
<attribute name="org.gtk.Property.get" value="gtk_window_get_title"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_title"/>
<doc xml:space="preserve">The title of the window.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="titlebar" version="4.6" writable="1" transfer-ownership="none" setter="set_titlebar" getter="get_titlebar">
<attribute name="org.gtk.Property.get" value="gtk_window_get_titlebar"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_titlebar"/>
<doc xml:space="preserve">The titlebar widget.</doc>
<type name="Widget"/>
</property>
<property name="transient-for" writable="1" construct="1" transfer-ownership="none" setter="set_transient_for" getter="get_transient_for">
<attribute name="org.gtk.Property.get" value="gtk_window_get_transient_for"/>
<attribute name="org.gtk.Property.set" value="gtk_window_set_transient_for"/>
<doc xml:space="preserve">The transient parent of the window.</doc>
<type name="Window"/>
</property>
<field name="parent_instance">
<type name="Widget" c:type="GtkWidget"/>
</field>
<glib:signal name="activate-default" when="last" action="1">
<doc xml:space="preserve">Emitted when the user activates the default widget
of @window.
This is a [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="activate-focus" when="last" action="1">
<doc xml:space="preserve">Emitted when the user activates the currently focused
widget of @window.
This is a [keybinding signal](class.SignalAction.html).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
<glib:signal name="close-request" when="last">
<doc xml:space="preserve">Emitted when the user clicks on the close button of the window.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE to stop other handlers from being invoked for the signal</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</glib:signal>
<glib:signal name="enable-debugging" when="last" action="1">
<doc xml:space="preserve">Emitted when the user enables or disables interactive debugging.
When @toggle is %TRUE, interactive debugging is toggled on or off,
when it is %FALSE, the debugger will be pointed at the widget
under the pointer.
This is a [keybinding signal](class.SignalAction.html).
The default bindings for this signal are Ctrl-Shift-I
and Ctrl-Shift-D.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the key binding was handled</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="toggle" transfer-ownership="none">
<doc xml:space="preserve">toggle the debugger</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
<glib:signal name="keys-changed" when="first">
<doc xml:space="preserve">emitted when the set of accelerators or mnemonics that
are associated with @window changes.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</glib:signal>
</class>
<record name="WindowClass" c:type="GtkWindowClass" glib:is-gtype-struct-for="Window">
<field name="parent_class">
<doc xml:space="preserve">The parent class.</doc>
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
<field name="activate_focus">
<callback name="activate_focus">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="activate_default">
<callback name="activate_default">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="keys_changed">
<callback name="keys_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="enable_debugging">
<callback name="enable_debugging">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="toggle" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="close_request">
<callback name="close_request">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="window" transfer-ownership="none">
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="padding" readable="0" private="1">
<array zero-terminated="0" fixed-size="8">
<type name="gpointer" c:type="gpointer"/>
</array>
</field>
</record>
<class name="WindowControls" c:symbol-prefix="window_controls" c:type="GtkWindowControls" parent="Widget" glib:type-name="GtkWindowControls" glib:get-type="gtk_window_controls_get_type" glib:type-struct="WindowControlsClass">
<doc xml:space="preserve">`GtkWindowControls` shows window frame controls.
Typical window frame controls are minimize, maximize and close buttons,
and the window icon.
![An example GtkWindowControls](windowcontrols.png)
`GtkWindowControls` only displays start or end side of the controls (see
[property@Gtk.WindowControls:side]), so it's intended to be always used
in pair with another `GtkWindowControls` for the opposite side, for example:
```xml
&lt;object class="GtkBox"&gt;
&lt;child&gt;
&lt;object class="GtkWindowControls"&gt;
&lt;property name="side"&gt;start&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
...
&lt;child&gt;
&lt;object class="GtkWindowControls"&gt;
&lt;property name="side"&gt;end&lt;/property&gt;
&lt;/object&gt;
&lt;/child&gt;
&lt;/object&gt;
```
# CSS nodes
```
windowcontrols
&#x251C;&#x2500;&#x2500; [image.icon]
&#x251C;&#x2500;&#x2500; [button.minimize]
&#x251C;&#x2500;&#x2500; [button.maximize]
&#x2570;&#x2500;&#x2500; [button.close]
```
A `GtkWindowControls`' CSS node is called windowcontrols. It contains
subnodes corresponding to each title button. Which of the title buttons
exist and where they are placed exactly depends on the desktop environment
and [property@Gtk.WindowControls:decoration-layout] value.
When [property@Gtk.WindowControls:empty] is %TRUE, it gets the .empty
style class.
# Accessibility
`GtkWindowControls` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_window_controls_new">
<doc xml:space="preserve">Creates a new `GtkWindowControls`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkWindowControls`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<parameter name="side" transfer-ownership="none">
<doc xml:space="preserve">the side</doc>
<type name="PackType" c:type="GtkPackType"/>
</parameter>
</parameters>
</constructor>
<method name="get_decoration_layout" c:identifier="gtk_window_controls_get_decoration_layout" glib:get-property="decoration-layout">
<attribute name="org.gtk.Method.get_property" value="decoration-layout"/>
<doc xml:space="preserve">Gets the decoration layout of this `GtkWindowControls`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the decoration layout or %NULL if it is unset</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowControls`</doc>
<type name="WindowControls" c:type="GtkWindowControls*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_empty" c:identifier="gtk_window_controls_get_empty" glib:get-property="empty">
<attribute name="org.gtk.Method.get_property" value="empty"/>
<doc xml:space="preserve">Gets whether the widget has any window buttons.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the widget has window buttons, otherwise %FALSE</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowControls`</doc>
<type name="WindowControls" c:type="GtkWindowControls*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_side" c:identifier="gtk_window_controls_get_side" glib:get-property="side">
<attribute name="org.gtk.Method.get_property" value="side"/>
<doc xml:space="preserve">Gets the side to which this `GtkWindowControls` instance belongs.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the side</doc>
<type name="PackType" c:type="GtkPackType"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowControls`</doc>
<type name="WindowControls" c:type="GtkWindowControls*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_decoration_layout" c:identifier="gtk_window_controls_set_decoration_layout" glib:set-property="decoration-layout">
<attribute name="org.gtk.Method.set_property" value="decoration-layout"/>
<doc xml:space="preserve">Sets the decoration layout for the title buttons.
This overrides the [property@Gtk.Settings:gtk-decoration-layout]
setting.
The format of the string is button names, separated by commas.
A colon separates the buttons that should appear on the left
from those on the right. Recognized button names are minimize,
maximize, close and icon (the window icon).
For example, &#x201C;icon:minimize,maximize,close&#x201D; specifies a icon
on the left, and minimize, maximize and close buttons on the right.
If [property@Gtk.WindowControls:side] value is @GTK_PACK_START, @self
will display the part before the colon, otherwise after that.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowControls`</doc>
<type name="WindowControls" c:type="GtkWindowControls*"/>
</instance-parameter>
<parameter name="layout" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a decoration layout, or %NULL to unset the layout</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
</parameters>
</method>
<method name="set_side" c:identifier="gtk_window_controls_set_side" glib:set-property="side">
<attribute name="org.gtk.Method.set_property" value="side"/>
<doc xml:space="preserve">Determines which part of decoration layout the `GtkWindowControls` uses.
See [property@Gtk.WindowControls:decoration-layout].</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowControls`</doc>
<type name="WindowControls" c:type="GtkWindowControls*"/>
</instance-parameter>
<parameter name="side" transfer-ownership="none">
<doc xml:space="preserve">a side</doc>
<type name="PackType" c:type="GtkPackType"/>
</parameter>
</parameters>
</method>
<property name="decoration-layout" writable="1" transfer-ownership="none" setter="set_decoration_layout" getter="get_decoration_layout">
<attribute name="org.gtk.Property.get" value="gtk_window_controls_get_decoration_layout"/>
<attribute name="org.gtk.Property.set" value="gtk_window_controls_set_decoration_layout"/>
<doc xml:space="preserve">The decoration layout for window buttons.
If this property is not set, the
[property@Gtk.Settings:gtk-decoration-layout] setting is used.</doc>
<type name="utf8" c:type="gchar*"/>
</property>
<property name="empty" transfer-ownership="none" getter="get_empty">
<attribute name="org.gtk.Property.get" value="gtk_window_controls_get_empty"/>
<doc xml:space="preserve">Whether the widget has any window buttons.</doc>
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="side" writable="1" transfer-ownership="none" setter="set_side" getter="get_side">
<attribute name="org.gtk.Property.get" value="gtk_window_controls_get_side"/>
<attribute name="org.gtk.Property.set" value="gtk_window_controls_set_side"/>
<doc xml:space="preserve">Whether the widget shows start or end side of the decoration layout.
See [property@Gtk.WindowControls:decoration_layout].</doc>
<type name="PackType"/>
</property>
</class>
<record name="WindowControlsClass" c:type="GtkWindowControlsClass" glib:is-gtype-struct-for="WindowControls">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<class name="WindowGroup" c:symbol-prefix="window_group" c:type="GtkWindowGroup" parent="GObject.Object" glib:type-name="GtkWindowGroup" glib:get-type="gtk_window_group_get_type" glib:type-struct="WindowGroupClass">
<doc xml:space="preserve">`GtkWindowGroup` makes group of windows behave like separate applications.
It achieves this by limiting the effect of GTK grabs and modality
to windows in the same group.
A window can be a member in at most one window group at a time.
Windows that have not been explicitly assigned to a group are
implicitly treated like windows of the default window group.
`GtkWindowGroup` objects are referenced by each window in the group,
so once you have added all windows to a `GtkWindowGroup`, you can drop
the initial reference to the window group with g_object_unref(). If the
windows in the window group are subsequently destroyed, then they will
be removed from the window group and drop their references on the window
group; when all window have been removed, the window group will be
freed.</doc>
<constructor name="new" c:identifier="gtk_window_group_new">
<doc xml:space="preserve">Creates a new `GtkWindowGroup` object.
Modality of windows only affects windows
within the same `GtkWindowGroup`.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkWindowGroup`.</doc>
<type name="WindowGroup" c:type="GtkWindowGroup*"/>
</return-value>
</constructor>
<method name="add_window" c:identifier="gtk_window_group_add_window">
<doc xml:space="preserve">Adds a window to a `GtkWindowGroup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowGroup`</doc>
<type name="WindowGroup" c:type="GtkWindowGroup*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWindow` to add</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<method name="list_windows" c:identifier="gtk_window_group_list_windows">
<doc xml:space="preserve">Returns a list of the `GtkWindows` that belong to @window_group.</doc>
<return-value transfer-ownership="container">
<doc xml:space="preserve">A
newly-allocated list of windows inside the group.</doc>
<type name="GLib.List" c:type="GList*">
<type name="Window"/>
</type>
</return-value>
<parameters>
<instance-parameter name="window_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowGroup`</doc>
<type name="WindowGroup" c:type="GtkWindowGroup*"/>
</instance-parameter>
</parameters>
</method>
<method name="remove_window" c:identifier="gtk_window_group_remove_window">
<doc xml:space="preserve">Removes a window from a `GtkWindowGroup`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="window_group" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowGroup`</doc>
<type name="WindowGroup" c:type="GtkWindowGroup*"/>
</instance-parameter>
<parameter name="window" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWindow` to remove</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
</parameters>
</method>
<field name="parent_instance">
<type name="GObject.Object" c:type="GObject"/>
</field>
<field name="priv">
<type name="WindowGroupPrivate" c:type="GtkWindowGroupPrivate*"/>
</field>
</class>
<record name="WindowGroupClass" c:type="GtkWindowGroupClass" glib:is-gtype-struct-for="WindowGroup">
<field name="parent_class">
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
</field>
<field name="_gtk_reserved1" introspectable="0">
<callback name="_gtk_reserved1">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved2" introspectable="0">
<callback name="_gtk_reserved2">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved3" introspectable="0">
<callback name="_gtk_reserved3">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
<field name="_gtk_reserved4" introspectable="0">
<callback name="_gtk_reserved4">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</callback>
</field>
</record>
<record name="WindowGroupPrivate" c:type="GtkWindowGroupPrivate" disguised="1"/>
<class name="WindowHandle" c:symbol-prefix="window_handle" c:type="GtkWindowHandle" parent="Widget" glib:type-name="GtkWindowHandle" glib:get-type="gtk_window_handle_get_type" glib:type-struct="WindowHandleClass">
<doc xml:space="preserve">`GtkWindowHandle` is a titlebar area widget.
When added into a window, it can be dragged to move the window, and handles
right click, double click and middle click as expected of a titlebar.
# CSS nodes
`GtkWindowHandle` has a single CSS node with the name `windowhandle`.
# Accessibility
`GtkWindowHandle` uses the %GTK_ACCESSIBLE_ROLE_GROUP role.</doc>
<implements name="Accessible"/>
<implements name="Buildable"/>
<implements name="ConstraintTarget"/>
<constructor name="new" c:identifier="gtk_window_handle_new">
<doc xml:space="preserve">Creates a new `GtkWindowHandle`.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">a new `GtkWindowHandle`.</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
</constructor>
<method name="get_child" c:identifier="gtk_window_handle_get_child" glib:get-property="child">
<attribute name="org.gtk.Method.get_property" value="child"/>
<doc xml:space="preserve">Gets the child widget of @self.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the child widget of @self</doc>
<type name="Widget" c:type="GtkWidget*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowHandle`</doc>
<type name="WindowHandle" c:type="GtkWindowHandle*"/>
</instance-parameter>
</parameters>
</method>
<method name="set_child" c:identifier="gtk_window_handle_set_child" glib:set-property="child">
<attribute name="org.gtk.Method.set_property" value="child"/>
<doc xml:space="preserve">Sets the child widget of @self.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">a `GtkWindowHandle`</doc>
<type name="WindowHandle" c:type="GtkWindowHandle*"/>
</instance-parameter>
<parameter name="child" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the child widget</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</method>
<property name="child" writable="1" transfer-ownership="none" setter="set_child" getter="get_child">
<attribute name="org.gtk.Property.get" value="gtk_window_handle_get_child"/>
<attribute name="org.gtk.Property.set" value="gtk_window_handle_set_child"/>
<doc xml:space="preserve">The child widget.</doc>
<type name="Widget"/>
</property>
</class>
<record name="WindowHandleClass" c:type="GtkWindowHandleClass" glib:is-gtype-struct-for="WindowHandle">
<field name="parent_class">
<type name="WidgetClass" c:type="GtkWidgetClass"/>
</field>
</record>
<enumeration name="WrapMode" glib:type-name="GtkWrapMode" glib:get-type="gtk_wrap_mode_get_type" c:type="GtkWrapMode">
<doc xml:space="preserve">Describes a type of line wrapping.</doc>
<member name="none" value="0" c:identifier="GTK_WRAP_NONE" glib:nick="none" glib:name="GTK_WRAP_NONE">
<doc xml:space="preserve">do not wrap lines; just make the text area wider</doc>
</member>
<member name="char" value="1" c:identifier="GTK_WRAP_CHAR" glib:nick="char" glib:name="GTK_WRAP_CHAR">
<doc xml:space="preserve">wrap text, breaking lines anywhere the cursor can
appear (between characters, usually - if you want to be technical,
between graphemes, see pango_get_log_attrs())</doc>
</member>
<member name="word" value="2" c:identifier="GTK_WRAP_WORD" glib:nick="word" glib:name="GTK_WRAP_WORD">
<doc xml:space="preserve">wrap text, breaking lines in between words</doc>
</member>
<member name="word_char" value="3" c:identifier="GTK_WRAP_WORD_CHAR" glib:nick="word-char" glib:name="GTK_WRAP_WORD_CHAR">
<doc xml:space="preserve">wrap text, breaking lines in between words, or if
that is not enough, also between graphemes</doc>
</member>
</enumeration>
<function name="accelerator_get_default_mod_mask" c:identifier="gtk_accelerator_get_default_mod_mask">
<doc xml:space="preserve">Gets the modifier mask.
The modifier mask determines which modifiers are considered significant
for keyboard accelerators. This includes all keyboard modifiers except
for %GDK_LOCK_MASK.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the modifier mask for accelerators</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</return-value>
</function>
<function name="accelerator_get_label" c:identifier="gtk_accelerator_get_label">
<doc xml:space="preserve">Converts an accelerator keyval and modifier mask into a string
which can be used to represent the accelerator to the user.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated string representing the accelerator</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="accelerator_key" transfer-ownership="none">
<doc xml:space="preserve">accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="accelerator_mods" transfer-ownership="none">
<doc xml:space="preserve">accelerator modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</function>
<function name="accelerator_get_label_with_keycode" c:identifier="gtk_accelerator_get_label_with_keycode">
<doc xml:space="preserve">Converts an accelerator keyval and modifier mask
into a string that can be displayed to the user.
The string may be translated.
This function is similar to [func@Gtk.accelerator_get_label],
but handling keycodes. This is only useful for system-level
components, applications should use [func@Gtk.accelerator_get_label]
instead.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated string representing the accelerator</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkDisplay` or %NULL to use the default display</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="accelerator_key" transfer-ownership="none">
<doc xml:space="preserve">accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="keycode" transfer-ownership="none">
<doc xml:space="preserve">accelerator keycode</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="accelerator_mods" transfer-ownership="none">
<doc xml:space="preserve">accelerator modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</function>
<function name="accelerator_name" c:identifier="gtk_accelerator_name">
<doc xml:space="preserve">Converts an accelerator keyval and modifier mask into a string
parseable by gtk_accelerator_parse().
For example, if you pass in %GDK_KEY_q and %GDK_CONTROL_MASK,
this function returns `&lt;Control&gt;q`.
If you need to display accelerators in the user interface,
see [func@Gtk.accelerator_get_label].</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly-allocated accelerator name</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="accelerator_key" transfer-ownership="none">
<doc xml:space="preserve">accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="accelerator_mods" transfer-ownership="none">
<doc xml:space="preserve">accelerator modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</function>
<function name="accelerator_name_with_keycode" c:identifier="gtk_accelerator_name_with_keycode">
<doc xml:space="preserve">Converts an accelerator keyval and modifier mask
into a string parseable by gtk_accelerator_parse_with_keycode().
This is similar to [func@Gtk.accelerator_name] but handling keycodes.
This is only useful for system-level components, applications
should use [func@Gtk.accelerator_name] instead.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated accelerator name.</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="display" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GdkDisplay` or %NULL to use the default display</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="accelerator_key" transfer-ownership="none">
<doc xml:space="preserve">accelerator keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="keycode" transfer-ownership="none">
<doc xml:space="preserve">accelerator keycode</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="accelerator_mods" transfer-ownership="none">
<doc xml:space="preserve">accelerator modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</function>
<function name="accelerator_parse" c:identifier="gtk_accelerator_parse">
<doc xml:space="preserve">Parses a string representing an accelerator.
The format looks like &#x201C;`&lt;Control&gt;a`&#x201D; or &#x201C;`&lt;Shift&gt;&lt;Alt&gt;F1`&#x201D;.
The parser is fairly liberal and allows lower or upper case, and also
abbreviations such as &#x201C;`&lt;Ctl&gt;`&#x201D; and &#x201C;`&lt;Ctrl&gt;`&#x201D;.
Key names are parsed using [func@Gdk.keyval_from_name]. For character keys
the name is not the symbol, but the lowercase name, e.g. one would use
&#x201C;`&lt;Ctrl&gt;minus`&#x201D; instead of &#x201C;`&lt;Ctrl&gt;-`&#x201D;.
Modifiers are enclosed in angular brackets `&lt;&gt;`, and match the
[flags@Gdk.ModifierType] mask:
- `&lt;Shift&gt;` for `GDK_SHIFT_MASK`
- `&lt;Ctrl&gt;` for `GDK_CONTROL_MASK`
- `&lt;Alt&gt;` for `GDK_ALT_MASK`
- `&lt;Meta&gt;` for `GDK_META_MASK`
- `&lt;Super&gt;` for `GDK_SUPER_MASK`
- `&lt;Hyper&gt;` for `GDK_HYPER_MASK`
If the parse operation fails, @accelerator_key and @accelerator_mods will
be set to 0 (zero).</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accelerator" transfer-ownership="none">
<doc xml:space="preserve">string representing an accelerator</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="accelerator_key" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for accelerator keyval</doc>
<type name="guint" c:type="guint*"/>
</parameter>
<parameter name="accelerator_mods" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for accelerator
modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType*"/>
</parameter>
</parameters>
</function>
<function name="accelerator_parse_with_keycode" c:identifier="gtk_accelerator_parse_with_keycode">
<doc xml:space="preserve">Parses a string representing an accelerator.
This is similar to [func@Gtk.accelerator_parse] but handles keycodes as
well. This is only useful for system-level components, applications should
use [func@Gtk.accelerator_parse] instead.
If @accelerator_codes is given and the result stored in it is non-%NULL,
the result must be freed with g_free().
If a keycode is present in the accelerator and no @accelerator_codes
is given, the parse will fail.
If the parse fails, @accelerator_key, @accelerator_mods and
@accelerator_codes will be set to 0 (zero).</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if parsing succeeded</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accelerator" transfer-ownership="none">
<doc xml:space="preserve">string representing an accelerator</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="display" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the `GdkDisplay` to look up @accelerator_codes in</doc>
<type name="Gdk.Display" c:type="GdkDisplay*"/>
</parameter>
<parameter name="accelerator_key" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for accelerator keyval</doc>
<type name="guint" c:type="guint*"/>
</parameter>
<parameter name="accelerator_codes" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">
return location for accelerator keycodes</doc>
<array c:type="guint**">
<type name="guint" c:type="guint*"/>
</array>
</parameter>
<parameter name="accelerator_mods" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">return location for accelerator
modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType*"/>
</parameter>
</parameters>
</function>
<function name="accelerator_valid" c:identifier="gtk_accelerator_valid">
<doc xml:space="preserve">Determines whether a given keyval and modifier mask constitute
a valid keyboard accelerator.
For example, the %GDK_KEY_a keyval plus %GDK_CONTROL_MASK mark is valid,
and matches the &#x201C;Ctrl+a&#x201D; accelerator. But, you can't, for instance, use
the %GDK_KEY_Control_L keyval as an accelerator.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the accelerator is valid</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="keyval" transfer-ownership="none">
<doc xml:space="preserve">a GDK keyval</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="modifiers" transfer-ownership="none">
<doc xml:space="preserve">modifier mask</doc>
<type name="Gdk.ModifierType" c:type="GdkModifierType"/>
</parameter>
</parameters>
</function>
<function name="accessible_property_init_value" c:identifier="gtk_accessible_property_init_value" moved-to="AccessibleProperty.init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="property" transfer-ownership="none">
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
<function name="accessible_relation_init_value" c:identifier="gtk_accessible_relation_init_value" moved-to="AccessibleRelation.init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="relation" transfer-ownership="none">
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
<function name="accessible_state_init_value" c:identifier="gtk_accessible_state_init_value" moved-to="AccessibleState.init_value">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="state" transfer-ownership="none">
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
</parameters>
</function>
<function name="bitset_iter_init_at" c:identifier="gtk_bitset_iter_init_at" moved-to="BitsetIter.init_at">
<doc xml:space="preserve">Initializes @iter to point to @target.
If @target is not found, finds the next value after it.
If no value &gt;= @target exists in @set, this function returns %FALSE.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if a value was found.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="target" transfer-ownership="none">
<doc xml:space="preserve">target value to start iterating at</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the found value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="bitset_iter_init_first" c:identifier="gtk_bitset_iter_init_first" moved-to="BitsetIter.init_first">
<doc xml:space="preserve">Initializes an iterator for @set and points it to the first
value in @set.
If @set is empty, %FALSE is returned and @value is set to %G_MAXUINT.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @set isn't empty.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the first value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="bitset_iter_init_last" c:identifier="gtk_bitset_iter_init_last" moved-to="BitsetIter.init_last">
<doc xml:space="preserve">Initializes an iterator for @set and points it to the last
value in @set.
If @set is empty, %FALSE is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @set isn't empty.</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="iter" direction="out" caller-allocates="1" transfer-ownership="none">
<doc xml:space="preserve">a pointer to an uninitialized `GtkBitsetIter`</doc>
<type name="BitsetIter" c:type="GtkBitsetIter*"/>
</parameter>
<parameter name="set" transfer-ownership="none">
<doc xml:space="preserve">a `GtkBitset`</doc>
<type name="Bitset" c:type="const GtkBitset*"/>
</parameter>
<parameter name="value" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
<doc xml:space="preserve">Set to the last value in @set</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="builder_error_quark" c:identifier="gtk_builder_error_quark" moved-to="BuilderError.quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="check_version" c:identifier="gtk_check_version">
<doc xml:space="preserve">Checks that the GTK library in use is compatible with the
given version.
Generally you would pass in the constants %GTK_MAJOR_VERSION,
%GTK_MINOR_VERSION, %GTK_MICRO_VERSION as the three arguments
to this function; that produces a check that the library in
use is compatible with the version of GTK the application or
module was compiled against.
Compatibility is defined by two things: first the version
of the running library is newer than the version
@required_major.required_minor.@required_micro. Second
the running library must be binary compatible with the
version @required_major.required_minor.@required_micro
(same major version.)
This function is primarily for GTK modules; the module
can call this function to check that it wasn&#x2019;t loaded
into an incompatible version of GTK. However, such a
check isn&#x2019;t completely reliable, since the module may be
linked against an old version of GTK and calling the
old version of gtk_check_version(), but still get loaded
into an application using a newer version of GTK.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">%NULL if the GTK library is compatible with the
given version, or a string describing the version mismatch.
The returned string is owned by GTK and should not be modified
or freed.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
<parameters>
<parameter name="required_major" transfer-ownership="none">
<doc xml:space="preserve">the required major version</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="required_minor" transfer-ownership="none">
<doc xml:space="preserve">the required minor version</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="required_micro" transfer-ownership="none">
<doc xml:space="preserve">the required micro version</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</function>
<function name="constraint_vfl_parser_error_quark" c:identifier="gtk_constraint_vfl_parser_error_quark" moved-to="ConstraintVflParserError.quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="css_parser_error_quark" c:identifier="gtk_css_parser_error_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="css_parser_warning_quark" c:identifier="gtk_css_parser_warning_quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="disable_setlocale" c:identifier="gtk_disable_setlocale">
<doc xml:space="preserve">Prevents [id@gtk_init] and [id@gtk_init_check] from automatically calling
`setlocale (LC_ALL, "")`.
You would want to use this function if you wanted to set the locale for
your program to something other than the user&#x2019;s locale, or if
you wanted to set different values for different locale categories.
Most programs should not need to call this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
<function name="distribute_natural_allocation" c:identifier="gtk_distribute_natural_allocation">
<doc xml:space="preserve">Distributes @extra_space to child @sizes by bringing smaller
children up to natural size first.
The remaining space will be added to the @minimum_size member of the
`GtkRequestedSize` struct. If all sizes reach their natural size then
the remaining space is returned.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The remainder of @extra_space after redistributing space
to @sizes.</doc>
<type name="gint" c:type="int"/>
</return-value>
<parameters>
<parameter name="extra_space" transfer-ownership="none">
<doc xml:space="preserve">Extra space to redistribute among children after subtracting
minimum sizes and any child padding from the overall allocation</doc>
<type name="gint" c:type="int"/>
</parameter>
<parameter name="n_requested_sizes" transfer-ownership="none">
<doc xml:space="preserve">Number of requests to fit into the allocation</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="sizes" transfer-ownership="none">
<doc xml:space="preserve">An array of structs with a client pointer and a minimum/natural size
in the orientation of the allocation.</doc>
<array length="1" zero-terminated="0" c:type="GtkRequestedSize*">
<type name="RequestedSize" c:type="GtkRequestedSize"/>
</array>
</parameter>
</parameters>
</function>
<function name="editable_delegate_get_property" c:identifier="gtk_editable_delegate_get_property" moved-to="Editable.delegate_get_property">
<doc xml:space="preserve">Gets a property of the `GtkEditable` delegate for @object.
This is helper function that should be called in the `get_property`
function of your `GtkEditable` implementation, before handling your
own properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the property was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="prop_id" transfer-ownership="none">
<doc xml:space="preserve">a property ID</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to set</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</function>
<function name="editable_delegate_set_property" c:identifier="gtk_editable_delegate_set_property" moved-to="Editable.delegate_set_property">
<doc xml:space="preserve">Sets a property on the `GtkEditable` delegate for @object.
This is a helper function that should be called in the `set_property`
function of your `GtkEditable` implementation, before handling your
own properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the property was found</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="prop_id" transfer-ownership="none">
<doc xml:space="preserve">a property ID</doc>
<type name="guint" c:type="guint"/>
</parameter>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">value to set</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
<parameter name="pspec" transfer-ownership="none">
<doc xml:space="preserve">the `GParamSpec` for the property</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</parameter>
</parameters>
</function>
<function name="editable_install_properties" c:identifier="gtk_editable_install_properties" moved-to="Editable.install_properties">
<doc xml:space="preserve">Overrides the `GtkEditable` properties for @class.
This is a helper function that should be called in class_init,
after installing your own properties.
Note that your class must have "text", "cursor-position",
"selection-bound", "editable", "width-chars", "max-width-chars",
"xalign" and "enable-undo" properties for this function to work.
To handle the properties in your set_property and get_property
functions, you can either use [func@Gtk.Editable.delegate_set_property]
and [func@Gtk.Editable.delegate_get_property] (if you are using
a delegate), or remember the @first_prop offset and add it to the
values in the [enum@Gtk.EditableProperties] enumeration to get the
property IDs for these properties.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the number of properties that were installed</doc>
<type name="guint" c:type="guint"/>
</return-value>
<parameters>
<parameter name="object_class" transfer-ownership="none">
<doc xml:space="preserve">a `GObjectClass`</doc>
<type name="GObject.ObjectClass" c:type="GObjectClass*"/>
</parameter>
<parameter name="first_prop" transfer-ownership="none">
<doc xml:space="preserve">property ID to use for the first property</doc>
<type name="guint" c:type="guint"/>
</parameter>
</parameters>
</function>
<function name="enumerate_printers" c:identifier="gtk_enumerate_printers">
<doc xml:space="preserve">Calls a function for all `GtkPrinter`s.
If @func returns %TRUE, the enumeration is stopped.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="func" transfer-ownership="none" scope="notified" closure="1" destroy="2">
<doc xml:space="preserve">a function to call for each printer</doc>
<type name="PrinterFunc" c:type="GtkPrinterFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @func</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
<parameter name="destroy" transfer-ownership="none" scope="async">
<doc xml:space="preserve">function to call if @data is no longer needed</doc>
<type name="GLib.DestroyNotify" c:type="GDestroyNotify"/>
</parameter>
<parameter name="wait" transfer-ownership="none">
<doc xml:space="preserve">if %TRUE, wait in a recursive mainloop until
all printers are enumerated; otherwise return early</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
<function name="file_chooser_error_quark" c:identifier="gtk_file_chooser_error_quark" moved-to="FileChooserError.quark">
<doc xml:space="preserve">Registers an error quark for `GtkFileChooser` errors.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The error quark used for `GtkFileChooser` errors.</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="get_binary_age" c:identifier="gtk_get_binary_age">
<doc xml:space="preserve">Returns the binary age as passed to `libtool`.
If `libtool` means nothing to you, don't worry about it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the binary age of the GTK library</doc>
<type name="guint" c:type="guint"/>
</return-value>
</function>
<function name="get_debug_flags" c:identifier="gtk_get_debug_flags">
<doc xml:space="preserve">Returns the GTK debug flags that are currently active.
This function is intended for GTK modules that want
to adjust their debug output based on GTK debug flags.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the GTK debug flags.</doc>
<type name="DebugFlags" c:type="GtkDebugFlags"/>
</return-value>
</function>
<function name="get_default_language" c:identifier="gtk_get_default_language">
<doc xml:space="preserve">Returns the `PangoLanguage` for the default language
currently in effect.
Note that this can change over the life of an
application.
The default language is derived from the current
locale. It determines, for example, whether GTK uses
the right-to-left or left-to-right text direction.
This function is equivalent to
[func@Pango.Language.get_default].
See that function for details.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the default language as a
`PangoLanguage`</doc>
<type name="Pango.Language" c:type="PangoLanguage*"/>
</return-value>
</function>
<function name="get_interface_age" c:identifier="gtk_get_interface_age">
<doc xml:space="preserve">Returns the interface age as passed to `libtool`.
If `libtool` means nothing to you, don't worry about it.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the interface age of the GTK library</doc>
<type name="guint" c:type="guint"/>
</return-value>
</function>
<function name="get_locale_direction" c:identifier="gtk_get_locale_direction">
<doc xml:space="preserve">Get the direction of the current locale. This is the expected
reading direction for text and UI.
This function depends on the current locale being set with
setlocale() and will default to setting the %GTK_TEXT_DIR_LTR
direction otherwise. %GTK_TEXT_DIR_NONE will never be returned.
GTK sets the default text direction according to the locale
during gtk_init(), and you should normally use
gtk_widget_get_direction() or gtk_widget_get_default_direction()
to obtain the current direction.
This function is only needed rare cases when the locale is
changed after GTK has already been initialized. In this case,
you can use it to update the default text direction as follows:
|[&lt;!-- language="C" --&gt;
#include &lt;locale.h&gt;
static void
update_locale (const char *new_locale)
{
setlocale (LC_ALL, new_locale);
GtkTextDirection direction = gtk_get_locale_direction ();
gtk_widget_set_default_direction (direction);
}
]|</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the `GtkTextDirection` of the current locale</doc>
<type name="TextDirection" c:type="GtkTextDirection"/>
</return-value>
</function>
<function name="get_major_version" c:identifier="gtk_get_major_version">
<doc xml:space="preserve">Returns the major version number of the GTK library.
For example, in GTK version 3.1.5 this is 3.
This function is in the library, so it represents the GTK library
your code is running against. Contrast with the %GTK_MAJOR_VERSION
macro, which represents the major version of the GTK headers you
have included when compiling your code.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the major version number of the GTK library</doc>
<type name="guint" c:type="guint"/>
</return-value>
</function>
<function name="get_micro_version" c:identifier="gtk_get_micro_version">
<doc xml:space="preserve">Returns the micro version number of the GTK library.
For example, in GTK version 3.1.5 this is 5.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
%GTK_MICRO_VERSION macro, which represents the micro version of the
GTK headers you have included when compiling your code.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the micro version number of the GTK library</doc>
<type name="guint" c:type="guint"/>
</return-value>
</function>
<function name="get_minor_version" c:identifier="gtk_get_minor_version">
<doc xml:space="preserve">Returns the minor version number of the GTK library.
For example, in GTK version 3.1.5 this is 1.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
%GTK_MINOR_VERSION macro, which represents the minor version of the
GTK headers you have included when compiling your code.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the minor version number of the GTK library</doc>
<type name="guint" c:type="guint"/>
</return-value>
</function>
<docsection name="gtktreednd">
<doc xml:space="preserve">GTK supports Drag-and-Drop in tree views with a high-level and a low-level
API.
The low-level API consists of the GTK DND API, augmented by some treeview
utility functions: gtk_tree_view_set_drag_dest_row(),
gtk_tree_view_get_drag_dest_row(), gtk_tree_view_get_dest_row_at_pos(),
gtk_tree_view_create_row_drag_icon(), gtk_tree_set_row_drag_data() and
gtk_tree_get_row_drag_data(). This API leaves a lot of flexibility, but
nothing is done automatically, and implementing advanced features like
hover-to-open-rows or autoscrolling on top of this API is a lot of work.
On the other hand, if you write to the high-level API, then all the
bookkeeping of rows is done for you, as well as things like hover-to-open
and auto-scroll, but your models have to implement the
`GtkTreeDragSource` and `GtkTreeDragDest` interfaces.</doc>
</docsection>
<function name="hsv_to_rgb" c:identifier="gtk_hsv_to_rgb">
<doc xml:space="preserve">Converts a color from HSV space to RGB.
Input values must be in the [0.0, 1.0] range;
output values will be in the same range.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="h" transfer-ownership="none">
<doc xml:space="preserve">Hue</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="s" transfer-ownership="none">
<doc xml:space="preserve">Saturation</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="v" transfer-ownership="none">
<doc xml:space="preserve">Value</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="r" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the red component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
<parameter name="g" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the green component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
<parameter name="b" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the blue component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
</parameters>
</function>
<function name="icon_theme_error_quark" c:identifier="gtk_icon_theme_error_quark" moved-to="IconThemeError.quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="init" c:identifier="gtk_init">
<doc xml:space="preserve">Call this function before using any other GTK functions in your GUI
applications. It will initialize everything needed to operate the
toolkit.
If you are using `GtkApplication`, you don't have to call gtk_init()
or gtk_init_check(); the `GApplication::startup` handler
does it for you.
This function will terminate your program if it was unable to
initialize the windowing system for some reason. If you want
your program to fall back to a textual interface you want to
call gtk_init_check() instead.
GTK calls `signal (SIGPIPE, SIG_IGN)`
during initialization, to ignore SIGPIPE signals, since these are
almost never wanted in graphical applications. If you do need to
handle SIGPIPE for some reason, reset the handler after gtk_init(),
but notice that other libraries (e.g. libdbus or gvfs) might do
similar things.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
<function name="init_check" c:identifier="gtk_init_check">
<doc xml:space="preserve">This function does the same work as gtk_init() with only a single
change: It does not terminate the program if the windowing system
can&#x2019;t be initialized. Instead it returns %FALSE on failure.
This way the application can fall back to some other means of
communication with the user - for example a curses or command line
interface.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the windowing system has been successfully
initialized, %FALSE otherwise</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</function>
<function name="is_initialized" c:identifier="gtk_is_initialized">
<doc xml:space="preserve">Use this function to check if GTK has been initialized with gtk_init()
or gtk_init_check().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the initialization status</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
</function>
<function name="native_get_for_surface" c:identifier="gtk_native_get_for_surface" moved-to="Native.get_for_surface">
<doc xml:space="preserve">Finds the `GtkNative` associated with the surface.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">the `GtkNative` that is associated with @surface</doc>
<type name="Native" c:type="GtkNative*"/>
</return-value>
<parameters>
<parameter name="surface" transfer-ownership="none">
<doc xml:space="preserve">a `GdkSurface`</doc>
<type name="Gdk.Surface" c:type="GdkSurface*"/>
</parameter>
</parameters>
</function>
<function name="ordering_from_cmpfunc" c:identifier="gtk_ordering_from_cmpfunc" moved-to="Ordering.from_cmpfunc" version="4.2">
<doc xml:space="preserve">Converts the result of a `GCompareFunc` like strcmp() to a
`GtkOrdering` value.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the corresponding `GtkOrdering`</doc>
<type name="Ordering" c:type="GtkOrdering"/>
</return-value>
<parameters>
<parameter name="cmpfunc_result" transfer-ownership="none">
<doc xml:space="preserve">Result of a comparison function</doc>
<type name="gint" c:type="int"/>
</parameter>
</parameters>
</function>
<function name="paper_size_get_default" c:identifier="gtk_paper_size_get_default" moved-to="PaperSize.get_default">
<doc xml:space="preserve">Returns the name of the default paper size, which
depends on the current locale.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">the name of the default paper size. The string
is owned by GTK and should not be modified.</doc>
<type name="utf8" c:type="const char*"/>
</return-value>
</function>
<function name="paper_size_get_paper_sizes" c:identifier="gtk_paper_size_get_paper_sizes" moved-to="PaperSize.get_paper_sizes">
<doc xml:space="preserve">Creates a list of known paper sizes.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly allocated list of newly
allocated `GtkPaperSize` objects</doc>
<type name="GLib.List" c:type="GList*">
<type name="PaperSize"/>
</type>
</return-value>
<parameters>
<parameter name="include_custom" transfer-ownership="none">
<doc xml:space="preserve">whether to include custom paper sizes
as defined in the page setup dialog</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</function>
<function name="param_spec_expression" c:identifier="gtk_param_spec_expression">
<doc xml:space="preserve">Creates a new `GParamSpec` instance for a property holding a `GtkExpression`.
See `g_param_spec_internal()` for details on the property strings.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a newly created property specification</doc>
<type name="GObject.ParamSpec" c:type="GParamSpec*"/>
</return-value>
<parameters>
<parameter name="name" transfer-ownership="none">
<doc xml:space="preserve">canonical name of the property</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="nick" transfer-ownership="none">
<doc xml:space="preserve">a user-readable name for the property</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="blurb" transfer-ownership="none">
<doc xml:space="preserve">a user-readable description of the property</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">flags for the property</doc>
<type name="GObject.ParamFlags" c:type="GParamFlags"/>
</parameter>
</parameters>
</function>
<function name="print_error_quark" c:identifier="gtk_print_error_quark" moved-to="PrintError.quark">
<doc xml:space="preserve">Registers an error quark for `GtkPrintOperation` if necessary.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">The error quark used for `GtkPrintOperation` errors.</doc>
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="print_run_page_setup_dialog" c:identifier="gtk_print_run_page_setup_dialog">
<doc xml:space="preserve">Runs a page setup dialog, letting the user modify the values from
@page_setup. If the user cancels the dialog, the returned `GtkPageSetup`
is identical to the passed in @page_setup, otherwise it contains the
modifications done in the dialog.
Note that this function may use a recursive mainloop to show the page
setup dialog. See gtk_print_run_page_setup_dialog_async() if this is
a problem.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an existing `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
</parameters>
</function>
<function name="print_run_page_setup_dialog_async" c:identifier="gtk_print_run_page_setup_dialog_async">
<doc xml:space="preserve">Runs a page setup dialog, letting the user modify the values from @page_setup.
In contrast to gtk_print_run_page_setup_dialog(), this function returns after
showing the page setup dialog on platforms that support this, and calls @done_cb
from a signal handler for the ::response signal of the dialog.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">transient parent</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="page_setup" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">an existing `GtkPageSetup`</doc>
<type name="PageSetup" c:type="GtkPageSetup*"/>
</parameter>
<parameter name="settings" transfer-ownership="none">
<doc xml:space="preserve">a `GtkPrintSettings`</doc>
<type name="PrintSettings" c:type="GtkPrintSettings*"/>
</parameter>
<parameter name="done_cb" transfer-ownership="none" scope="async" closure="4">
<doc xml:space="preserve">a function to call when the user saves
the modified page setup</doc>
<type name="PageSetupDoneFunc" c:type="GtkPageSetupDoneFunc"/>
</parameter>
<parameter name="data" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">user data to pass to @done_cb</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="recent_manager_error_quark" c:identifier="gtk_recent_manager_error_quark" moved-to="RecentManagerError.quark">
<return-value transfer-ownership="none">
<type name="GLib.Quark" c:type="GQuark"/>
</return-value>
</function>
<function name="render_activity" c:identifier="gtk_render_activity">
<doc xml:space="preserve">Renders an activity indicator (such as in `GtkSpinner`).
The state %GTK_STATE_FLAG_CHECKED determines whether there is
activity going on.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_arrow" c:identifier="gtk_render_arrow">
<doc xml:space="preserve">Renders an arrow pointing to @angle.
Typical arrow rendering at 0, 1&#x2044;2 &#x3C0;;, &#x3C0;; and 3&#x2044;2 &#x3C0;:
![](arrows.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="angle" transfer-ownership="none">
<doc xml:space="preserve">arrow angle from 0 to 2 * %G_PI, being 0 the arrow pointing to the north</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the render area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the render area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="size" transfer-ownership="none">
<doc xml:space="preserve">square side for render area</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_background" c:identifier="gtk_render_background">
<doc xml:space="preserve">Renders the background of an element.
Typical background rendering, showing the effect of
`background-image`, `border-width` and `border-radius`:
![](background.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_check" c:identifier="gtk_render_check">
<doc xml:space="preserve">Renders a checkmark (as in a `GtkCheckButton`).
The %GTK_STATE_FLAG_CHECKED state determines whether the check is
on or off, and %GTK_STATE_FLAG_INCONSISTENT determines whether it
should be marked as undefined.
Typical checkmark rendering:
![](checks.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_expander" c:identifier="gtk_render_expander">
<doc xml:space="preserve">Renders an expander (as used in `GtkTreeView` and `GtkExpander`) in the area
defined by @x, @y, @width, @height. The state %GTK_STATE_FLAG_CHECKED
determines whether the expander is collapsed or expanded.
Typical expander rendering:
![](expanders.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_focus" c:identifier="gtk_render_focus">
<doc xml:space="preserve">Renders a focus indicator on the rectangle determined by @x, @y, @width, @height.
Typical focus rendering:
![](focus.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_frame" c:identifier="gtk_render_frame">
<doc xml:space="preserve">Renders a frame around the rectangle defined by @x, @y, @width, @height.
Examples of frame rendering, showing the effect of `border-image`,
`border-color`, `border-width`, `border-radius` and junctions:
![](frames.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_handle" c:identifier="gtk_render_handle">
<doc xml:space="preserve">Renders a handle (as in `GtkPaned` and `GtkWindow`&#x2019;s resize grip),
in the rectangle determined by @x, @y, @width, @height.
Handles rendered for the paned and grip classes:
![](handles.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_icon" c:identifier="gtk_render_icon">
<doc xml:space="preserve">Renders the icon in @texture at the specified @x and @y coordinates.
This function will render the icon in @texture at exactly its size,
regardless of scaling factors, which may not be appropriate when
drawing on displays with high pixel densities.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="texture" transfer-ownership="none">
<doc xml:space="preserve">a `GdkTexture` containing the icon to draw</doc>
<type name="Gdk.Texture" c:type="GdkTexture*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X position for the @texture</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y position for the @texture</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_layout" c:identifier="gtk_render_layout">
<doc xml:space="preserve">Renders @layout on the coordinates @x, @y</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="layout" transfer-ownership="none">
<doc xml:space="preserve">the `PangoLayout` to render</doc>
<type name="Pango.Layout" c:type="PangoLayout*"/>
</parameter>
</parameters>
</function>
<function name="render_line" c:identifier="gtk_render_line">
<doc xml:space="preserve">Renders a line from (x0, y0) to (x1, y1).</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x0" transfer-ownership="none">
<doc xml:space="preserve">X coordinate for the origin of the line</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y0" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate for the origin of the line</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="x1" transfer-ownership="none">
<doc xml:space="preserve">X coordinate for the end of the line</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y1" transfer-ownership="none">
<doc xml:space="preserve">Y coordinate for the end of the line</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="render_option" c:identifier="gtk_render_option">
<doc xml:space="preserve">Renders an option mark (as in a radio button), the %GTK_STATE_FLAG_CHECKED
state will determine whether the option is on or off, and
%GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.
Typical option mark rendering:
![](options.png)</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="context" transfer-ownership="none">
<doc xml:space="preserve">a `GtkStyleContext`</doc>
<type name="StyleContext" c:type="GtkStyleContext*"/>
</parameter>
<parameter name="cr" transfer-ownership="none">
<doc xml:space="preserve">a `cairo_t`</doc>
<type name="cairo.Context" c:type="cairo_t*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">X origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">Y origin of the rectangle</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">rectangle width</doc>
<type name="gdouble" c:type="double"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">rectangle height</doc>
<type name="gdouble" c:type="double"/>
</parameter>
</parameters>
</function>
<function name="rgb_to_hsv" c:identifier="gtk_rgb_to_hsv">
<doc xml:space="preserve">Converts a color from RGB space to HSV.
Input values must be in the [0.0, 1.0] range;
output values will be in the same range.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="r" transfer-ownership="none">
<doc xml:space="preserve">Red</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="g" transfer-ownership="none">
<doc xml:space="preserve">Green</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="b" transfer-ownership="none">
<doc xml:space="preserve">Blue</doc>
<type name="gfloat" c:type="float"/>
</parameter>
<parameter name="h" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the hue component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
<parameter name="s" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the saturation component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
<parameter name="v" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Return value for the value component</doc>
<type name="gfloat" c:type="float*"/>
</parameter>
</parameters>
</function>
<function name="set_debug_flags" c:identifier="gtk_set_debug_flags">
<doc xml:space="preserve">Sets the GTK debug flags.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="flags" transfer-ownership="none">
<doc xml:space="preserve">the debug flags to set</doc>
<type name="DebugFlags" c:type="GtkDebugFlags"/>
</parameter>
</parameters>
</function>
<function name="show_about_dialog" c:identifier="gtk_show_about_dialog" introspectable="0">
<doc xml:space="preserve">A convenience function for showing an application&#x2019;s about dialog.
The constructed dialog is associated with the parent window and
reused for future invocations of this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">the parent top-level window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="first_property_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the first property</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">value of first property, followed by more pairs of property
name and value, `NULL`-terminated</doc>
<varargs/>
</parameter>
</parameters>
</function>
<function name="show_uri" c:identifier="gtk_show_uri">
<doc xml:space="preserve">This function launches the default application for showing
a given uri, or shows an error dialog if that fails.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">parent window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the uri to show</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">timestamp from the event that triggered this call, or %GDK_CURRENT_TIME</doc>
<type name="guint32" c:type="guint32"/>
</parameter>
</parameters>
</function>
<function name="show_uri_full" c:identifier="gtk_show_uri_full">
<doc xml:space="preserve">This function launches the default application for showing
a given uri.
The @callback will be called when the launch is completed.
It should call gtk_show_uri_full_finish() to obtain the result.
This is the recommended call to be used as it passes information
necessary for sandbox helpers to parent their dialogs properly.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">parent window</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="uri" transfer-ownership="none">
<doc xml:space="preserve">the uri to show</doc>
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="timestamp" transfer-ownership="none">
<doc xml:space="preserve">timestamp from the event that triggered this call, or %GDK_CURRENT_TIME</doc>
<type name="guint32" c:type="guint32"/>
</parameter>
<parameter name="cancellable" transfer-ownership="none" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GCancellable` to cancel the launch</doc>
<type name="Gio.Cancellable" c:type="GCancellable*"/>
</parameter>
<parameter name="callback" transfer-ownership="none" nullable="1" allow-none="1" scope="async" closure="5">
<doc xml:space="preserve">a callback to call when the action is complete</doc>
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
</parameter>
<parameter name="user_data" transfer-ownership="none" nullable="1" allow-none="1" closure="4">
<doc xml:space="preserve">data to pass to @callback</doc>
<type name="gpointer" c:type="gpointer"/>
</parameter>
</parameters>
</function>
<function name="show_uri_full_finish" c:identifier="gtk_show_uri_full_finish" throws="1">
<doc xml:space="preserve">Finishes the gtk_show_uri() call and returns the result
of the operation.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the URI was shown successfully.
Otherwise, %FALSE is returned and @error is set</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none">
<doc xml:space="preserve">the `GtkWindow` passed to gtk_show_uri()</doc>
<type name="Window" c:type="GtkWindow*"/>
</parameter>
<parameter name="result" transfer-ownership="none">
<doc xml:space="preserve">`GAsyncResult` that was passed to @callback</doc>
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
</parameter>
</parameters>
</function>
<function-macro name="test_accessible_assert_role" c:identifier="gtk_test_accessible_assert_role" introspectable="0">
<doc xml:space="preserve">Checks whether a `GtkAccessible` implementation has the given @role,
and raises an assertion if the condition is failed.</doc>
<parameters>
<parameter name="accessible">
<doc xml:space="preserve">a `GtkAccessible`</doc>
</parameter>
<parameter name="role">
<doc xml:space="preserve">a `GtkAccessibleRole`</doc>
</parameter>
</parameters>
</function-macro>
<function name="test_accessible_assertion_message_role" c:identifier="gtk_test_accessible_assertion_message_role">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="domain" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="file" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="line" transfer-ownership="none">
<type name="gint" c:type="int"/>
</parameter>
<parameter name="func" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="expr" transfer-ownership="none">
<type name="utf8" c:type="const char*"/>
</parameter>
<parameter name="accessible" transfer-ownership="none">
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="expected_role" transfer-ownership="none">
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</parameter>
<parameter name="actual_role" transfer-ownership="none">
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</parameter>
</parameters>
</function>
<function name="test_accessible_check_property" c:identifier="gtk_test_accessible_check_property" introspectable="0">
<doc xml:space="preserve">Checks whether the accessible @property of @accessible is set to
a specific value.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the value of the accessible property</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="property" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleProperty`</doc>
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">the expected value of @property</doc>
<varargs/>
</parameter>
</parameters>
</function>
<function name="test_accessible_check_relation" c:identifier="gtk_test_accessible_check_relation" introspectable="0">
<doc xml:space="preserve">Checks whether the accessible @relation of @accessible is set to
a specific value.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the value of the accessible relation</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="relation" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRelation`</doc>
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">the expected value of @relation</doc>
<varargs/>
</parameter>
</parameters>
</function>
<function name="test_accessible_check_state" c:identifier="gtk_test_accessible_check_state" introspectable="0">
<doc xml:space="preserve">Checks whether the accessible @state of @accessible is set to
a specific value.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">the value of the accessible state</doc>
<type name="utf8" c:type="char*"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleState`</doc>
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">the expected value of @state</doc>
<varargs/>
</parameter>
</parameters>
</function>
<function name="test_accessible_has_property" c:identifier="gtk_test_accessible_has_property">
<doc xml:space="preserve">Checks whether the `GtkAccessible` has @property set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @property is set in the @accessible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="property" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleProperty`</doc>
<type name="AccessibleProperty" c:type="GtkAccessibleProperty"/>
</parameter>
</parameters>
</function>
<function name="test_accessible_has_relation" c:identifier="gtk_test_accessible_has_relation">
<doc xml:space="preserve">Checks whether the `GtkAccessible` has @relation set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @relation is set in the @accessible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="relation" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRelation`</doc>
<type name="AccessibleRelation" c:type="GtkAccessibleRelation"/>
</parameter>
</parameters>
</function>
<function name="test_accessible_has_role" c:identifier="gtk_test_accessible_has_role">
<doc xml:space="preserve">Checks whether the `GtkAccessible:accessible-role` of the accessible
is @role.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the role matches</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="role" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleRole`</doc>
<type name="AccessibleRole" c:type="GtkAccessibleRole"/>
</parameter>
</parameters>
</function>
<function name="test_accessible_has_state" c:identifier="gtk_test_accessible_has_state">
<doc xml:space="preserve">Checks whether the `GtkAccessible` has @state set.</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the @state is set in the @accessible</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="accessible" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessible`</doc>
<type name="Accessible" c:type="GtkAccessible*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">a `GtkAccessibleState`</doc>
<type name="AccessibleState" c:type="GtkAccessibleState"/>
</parameter>
</parameters>
</function>
<function name="test_init" c:identifier="gtk_test_init" introspectable="0">
<doc xml:space="preserve">This function is used to initialize a GTK test program.
It will in turn call g_test_init() and gtk_init() to properly
initialize the testing framework and graphical toolkit. It&#x2019;ll
also set the program&#x2019;s locale to &#x201C;C&#x201D;. This is done to make test
program environments as deterministic as possible.
Like gtk_init() and g_test_init(), any known arguments will be
processed and stripped from @argc and @argv.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="argcp" direction="inout" caller-allocates="0" transfer-ownership="none">
<doc xml:space="preserve">Address of the `argc` parameter of the
main() function. Changed if any arguments were handled.</doc>
<type name="gint" c:type="int*"/>
</parameter>
<parameter name="argvp" direction="inout" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">Address of the `argv`
parameter of main(). Any parameters understood by g_test_init()
or gtk_init() are stripped before return.</doc>
<array length="0" zero-terminated="0" c:type="char***">
<type name="utf8" c:type="char**"/>
</array>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">currently unused</doc>
<varargs/>
</parameter>
</parameters>
</function>
<function name="test_list_all_types" c:identifier="gtk_test_list_all_types">
<doc xml:space="preserve">Return the type ids that have been registered after
calling gtk_test_register_all_types().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">
0-terminated array of type ids</doc>
<array length="0" zero-terminated="1" c:type="const GType*">
<type name="GType" c:type="GType"/>
</array>
</return-value>
<parameters>
<parameter name="n_types" direction="out" caller-allocates="0" transfer-ownership="full">
<doc xml:space="preserve">location to store number of types</doc>
<type name="guint" c:type="guint*"/>
</parameter>
</parameters>
</function>
<function name="test_register_all_types" c:identifier="gtk_test_register_all_types">
<doc xml:space="preserve">Force registration of all core GTK object types.
This allowes to refer to any of those object types via
g_type_from_name() after calling this function.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
</function>
<function name="test_widget_wait_for_draw" c:identifier="gtk_test_widget_wait_for_draw">
<doc xml:space="preserve">Enters the main loop and waits for @widget to be &#x201C;drawn&#x201D;.
In this context that means it waits for the frame clock of
@widget to have run a full styling, layout and drawing cycle.
This function is intended to be used for syncing with actions that
depend on @widget relayouting or on interaction with the display
server.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="widget" transfer-ownership="none">
<doc xml:space="preserve">the widget to wait for</doc>
<type name="Widget" c:type="GtkWidget*"/>
</parameter>
</parameters>
</function>
<function name="tree_create_row_drag_content" c:identifier="gtk_tree_create_row_drag_content">
<doc xml:space="preserve">Creates a content provider for dragging @path from @tree_model.</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new `GdkContentProvider`</doc>
<type name="Gdk.ContentProvider" c:type="GdkContentProvider*"/>
</return-value>
<parameters>
<parameter name="tree_model" transfer-ownership="none">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">a row in @tree_model</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</function>
<function name="tree_get_row_drag_data" c:identifier="gtk_tree_get_row_drag_data">
<doc xml:space="preserve">Obtains a @tree_model and @path from value of target type
%GTK_TYPE_TREE_ROW_DATA.
The returned path must be freed with gtk_tree_path_free().</doc>
<return-value transfer-ownership="none">
<doc xml:space="preserve">%TRUE if @selection_data had target type %GTK_TYPE_TREE_ROW_DATA
is otherwise valid</doc>
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue`</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
<parameter name="tree_model" direction="out" caller-allocates="0" transfer-ownership="none" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">a `GtkTreeModel`</doc>
<type name="TreeModel" c:type="GtkTreeModel**"/>
</parameter>
<parameter name="path" direction="out" caller-allocates="0" transfer-ownership="full" nullable="1" optional="1" allow-none="1">
<doc xml:space="preserve">row in @tree_model</doc>
<type name="TreePath" c:type="GtkTreePath**"/>
</parameter>
</parameters>
</function>
<function name="tree_row_reference_deleted" c:identifier="gtk_tree_row_reference_deleted" moved-to="TreeRowReference.deleted">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-deleted signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the path position that was deleted</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</function>
<function name="tree_row_reference_inserted" c:identifier="gtk_tree_row_reference_inserted" moved-to="TreeRowReference.inserted">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::row-inserted signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the row position that was inserted</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
</parameters>
</function>
<function name="tree_row_reference_reordered" c:identifier="gtk_tree_row_reference_reordered" moved-to="TreeRowReference.reordered" introspectable="0">
<doc xml:space="preserve">Lets a set of row reference created by
gtk_tree_row_reference_new_proxy() know that the
model emitted the ::rows-reordered signal.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="proxy" transfer-ownership="none">
<doc xml:space="preserve">a `GObject`</doc>
<type name="GObject.Object" c:type="GObject*"/>
</parameter>
<parameter name="path" transfer-ownership="none">
<doc xml:space="preserve">the parent path of the reordered signal</doc>
<type name="TreePath" c:type="GtkTreePath*"/>
</parameter>
<parameter name="iter" transfer-ownership="none">
<doc xml:space="preserve">the iter pointing to the parent of the reordered</doc>
<type name="TreeIter" c:type="GtkTreeIter*"/>
</parameter>
<parameter name="new_order" transfer-ownership="none">
<doc xml:space="preserve">the new order of rows</doc>
<array zero-terminated="0" c:type="int*">
<type name="gint" c:type="int"/>
</array>
</parameter>
</parameters>
</function>
<function name="value_dup_expression" c:identifier="gtk_value_dup_expression">
<doc xml:space="preserve">Retrieves the `GtkExpression` stored inside the given `value`, and acquires
a reference to it.</doc>
<return-value transfer-ownership="full" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue` initialized with type `GTK_TYPE_EXPRESSION`</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</function>
<function name="value_get_expression" c:identifier="gtk_value_get_expression">
<doc xml:space="preserve">Retrieves the `GtkExpression` stored inside the given `value`.</doc>
<return-value transfer-ownership="none" nullable="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue` initialized with type `GTK_TYPE_EXPRESSION`</doc>
<type name="GObject.Value" c:type="const GValue*"/>
</parameter>
</parameters>
</function>
<function name="value_set_expression" c:identifier="gtk_value_set_expression">
<doc xml:space="preserve">Stores the given `GtkExpression` inside `value`.
The `GValue` will acquire a reference to the `expression`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue` initialized with type `GTK_TYPE_EXPRESSION`</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="expression" transfer-ownership="none">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</function>
<function name="value_take_expression" c:identifier="gtk_value_take_expression">
<doc xml:space="preserve">Stores the given `GtkExpression` inside `value`.
This function transfers the ownership of the `expression` to the `GValue`.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="value" transfer-ownership="none">
<doc xml:space="preserve">a `GValue` initialized with type `GTK_TYPE_EXPRESSION`</doc>
<type name="GObject.Value" c:type="GValue*"/>
</parameter>
<parameter name="expression" transfer-ownership="full" nullable="1" allow-none="1">
<doc xml:space="preserve">a `GtkExpression`</doc>
<type name="Expression" c:type="GtkExpression*"/>
</parameter>
</parameters>
</function>
<function-macro name="widget_class_bind_template_callback" c:identifier="gtk_widget_class_bind_template_callback" introspectable="0">
<doc xml:space="preserve">Binds a callback function defined in a template to the @widget_class.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_callback_full() function. It is not
supported after gtk_widget_class_set_template_scope() has been used
on @widget_class.</doc>
<parameters>
<parameter name="widget_class">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
</parameter>
<parameter name="callback">
<doc xml:space="preserve">the callback symbol</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="widget_class_bind_template_child" c:identifier="gtk_widget_class_bind_template_child" introspectable="0">
<doc xml:space="preserve">Binds a child widget defined in a template to the @widget_class.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full() function.
This macro will use the offset of the @member_name inside the @TypeName
instance structure.</doc>
<parameters>
<parameter name="widget_class">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
</parameter>
<parameter name="TypeName">
<doc xml:space="preserve">the type name of this widget</doc>
</parameter>
<parameter name="member_name">
<doc xml:space="preserve">name of the instance member in the instance struct for @data_type</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="widget_class_bind_template_child_internal" c:identifier="gtk_widget_class_bind_template_child_internal" introspectable="0">
<doc xml:space="preserve">Binds a child widget defined in a template to the @widget_class, and
also makes it available as an internal child in GtkBuilder, under the
name @member_name.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full() function.
This macro will use the offset of the @member_name inside the @TypeName
instance structure.</doc>
<parameters>
<parameter name="widget_class">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
</parameter>
<parameter name="TypeName">
<doc xml:space="preserve">the type name, in CamelCase</doc>
</parameter>
<parameter name="member_name">
<doc xml:space="preserve">name of the instance member in the instance struct for @data_type</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="widget_class_bind_template_child_internal_private" c:identifier="gtk_widget_class_bind_template_child_internal_private" introspectable="0">
<doc xml:space="preserve">Binds a child widget defined in a template to the @widget_class, and
also makes it available as an internal child in GtkBuilder, under the
name @member_name.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full() function.
This macro will use the offset of the @member_name inside the @TypeName
private data structure.</doc>
<parameters>
<parameter name="widget_class">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
</parameter>
<parameter name="TypeName">
<doc xml:space="preserve">the type name, in CamelCase</doc>
</parameter>
<parameter name="member_name">
<doc xml:space="preserve">name of the instance private member on the private struct for @data_type</doc>
</parameter>
</parameters>
</function-macro>
<function-macro name="widget_class_bind_template_child_private" c:identifier="gtk_widget_class_bind_template_child_private" introspectable="0">
<doc xml:space="preserve">Binds a child widget defined in a template to the @widget_class.
This macro is a convenience wrapper around the
gtk_widget_class_bind_template_child_full() function.
This macro will use the offset of the @member_name inside the @TypeName
private data structure (it uses G_PRIVATE_OFFSET(), so the private struct
must be added with G_ADD_PRIVATE()).</doc>
<parameters>
<parameter name="widget_class">
<doc xml:space="preserve">a `GtkWidgetClass`</doc>
</parameter>
<parameter name="TypeName">
<doc xml:space="preserve">the type name of this widget</doc>
</parameter>
<parameter name="member_name">
<doc xml:space="preserve">name of the instance private member in the private struct for @data_type</doc>
</parameter>
</parameters>
</function-macro>
</namespace>
</repository>