-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from gtk-rs/create-pull-request/patch
Update GIR files (2025-01-19)
- Loading branch information
Showing
4 changed files
with
151 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17046,7 +17046,7 @@ g_signal_override_class_handler().</doc> | |
The handler will be called synchronously, before the default handler of the signal. | ||
[[email protected]_emit] will not return control until all handlers are called. | ||
|
||
See [memory management of signal handlers](signals.html#Memory_management_of_signal_handlers) for | ||
See [memory management of signal handlers](signals.html#memory-management-of-signal-handlers) for | ||
details on how to handle the return value and memory management of @data. | ||
|
||
This function cannot fail. If the given signal name doesn’t exist, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7438,12 +7438,12 @@ contains private data only.</doc> | |
<record name="ApplicationCommandLinePrivate" c:type="GApplicationCommandLinePrivate" disguised="1" opaque="1"/> | ||
<bitfield name="ApplicationFlags" version="2.28" glib:type-name="GApplicationFlags" glib:get-type="g_application_flags_get_type" c:type="GApplicationFlags"> | ||
<doc xml:space="preserve">Flags used to define the behaviour of a #GApplication.</doc> | ||
<member name="flags_none" value="0" c:identifier="G_APPLICATION_FLAGS_NONE" glib:nick="flags-none" glib:name="G_APPLICATION_FLAGS_NONE"> | ||
<doc xml:space="preserve">Default. Deprecated in 2.74, use | ||
%G_APPLICATION_DEFAULT_FLAGS instead</doc> | ||
<member name="flags_none" value="0" c:identifier="G_APPLICATION_FLAGS_NONE" deprecated="1" deprecated-version="2.74" glib:nick="flags-none" glib:name="G_APPLICATION_FLAGS_NONE"> | ||
<doc xml:space="preserve">Default flags.</doc> | ||
<doc-deprecated xml:space="preserve">Use [[email protected]_FLAGS].</doc-deprecated> | ||
</member> | ||
<member name="default_flags" value="0" c:identifier="G_APPLICATION_DEFAULT_FLAGS" glib:nick="default-flags" glib:name="G_APPLICATION_DEFAULT_FLAGS"> | ||
<doc xml:space="preserve">Default flags. Since: 2.74</doc> | ||
<member name="default_flags" value="0" c:identifier="G_APPLICATION_DEFAULT_FLAGS" version="2.74" glib:nick="default-flags" glib:name="G_APPLICATION_DEFAULT_FLAGS"> | ||
<doc xml:space="preserve">Default flags.</doc> | ||
</member> | ||
<member name="is_service" value="1" c:identifier="G_APPLICATION_IS_SERVICE" glib:nick="is-service" glib:name="G_APPLICATION_IS_SERVICE"> | ||
<doc xml:space="preserve">Run as a service. In this mode, registration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2022,7 +2022,10 @@ using [[email protected]_platform_state].</doc> | |
<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> | ||
string. The format of the value is a space-separated list of shortcuts, with | ||
each shortcut consisting of one or more modifiers (`Control`, `Alt` or `Shift`), | ||
followed by a non-modifier key, all separated by `+`. | ||
Examples: `F2`, `Alt-F`, `Control+Shift+N`</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 | ||
|
@@ -4602,7 +4605,7 @@ positions the widget to line up the baselines, where that is supported.</doc> | |
<member name="baseline_fill" value="4" c:identifier="GTK_ALIGN_BASELINE_FILL" version="4.12" glib:nick="baseline-fill" glib:name="GTK_ALIGN_BASELINE_FILL"> | ||
<doc xml:space="preserve">a different name for `GTK_ALIGN_BASELINE`.</doc> | ||
</member> | ||
<member name="baseline" value="4" c:identifier="GTK_ALIGN_BASELINE" glib:nick="baseline" glib:name="GTK_ALIGN_BASELINE"> | ||
<member name="baseline" value="4" c:identifier="GTK_ALIGN_BASELINE" deprecated="1" deprecated-version="4.12" glib:nick="baseline" glib:name="GTK_ALIGN_BASELINE"> | ||
<doc xml:space="preserve">align the widget according to the baseline.</doc> | ||
<doc-deprecated xml:space="preserve">Use `GTK_ALIGN_BASELINE_FILL` instead</doc-deprecated> | ||
</member> | ||
|
@@ -7288,7 +7291,7 @@ See gtk_assistant_commit() for details.</doc> | |
add its own buttons through gtk_assistant_add_action_widget().</doc> | ||
</member> | ||
</enumeration> | ||
<constant name="BINARY_AGE" value="1702" c:type="GTK_BINARY_AGE"> | ||
<constant name="BINARY_AGE" value="1704" 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> | ||
|
@@ -28009,7 +28012,7 @@ if [[email protected]:list-factory] is not set.</doc> | |
<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> | ||
if no item is selected</doc> | ||
<type name="guint" c:type="guint"/> | ||
</return-value> | ||
<parameters> | ||
|
@@ -36652,6 +36655,67 @@ The @callback will be called when the dialog is dismissed.</doc> | |
</parameter> | ||
</parameters> | ||
</method> | ||
<method name="open_multiple_text_files" c:identifier="gtk_file_dialog_open_multiple_text_files" version="4.18" glib:finish-func="open_multiple_text_files_finish"> | ||
<doc xml:space="preserve">Presents a file chooser dialog to the user. | ||
|
||
The file chooser dialog will be set up to select multiple files. | ||
|
||
The file chooser dialog will initially be opened in the directory | ||
[[email protected]:initial-folder]. | ||
|
||
In contrast to [[email protected]], this function | ||
lets the user select the text encoding for the files, if possible. | ||
|
||
The @callback will be called when the dialog is dismissed.</doc> | ||
<return-value transfer-ownership="none"> | ||
<type name="none" c:type="void"/> | ||
</return-value> | ||
<parameters> | ||
<instance-parameter name="self" transfer-ownership="none"> | ||
<doc xml:space="preserve">a file dialog</doc> | ||
<type name="FileDialog" c:type="GtkFileDialog*"/> | ||
</instance-parameter> | ||
<parameter name="parent" transfer-ownership="none" nullable="1" allow-none="1"> | ||
<doc xml:space="preserve">the parent window</doc> | ||
<type name="Window" c:type="GtkWindow*"/> | ||
</parameter> | ||
<parameter name="cancellable" transfer-ownership="none" nullable="1" allow-none="1"> | ||
<doc xml:space="preserve">a cancellable to cancel the operation</doc> | ||
<type name="Gio.Cancellable" c:type="GCancellable*"/> | ||
</parameter> | ||
<parameter name="callback" transfer-ownership="none" nullable="1" allow-none="1" scope="async" closure="3"> | ||
<doc xml:space="preserve">a callback to call when the | ||
operation is complete</doc> | ||
<type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/> | ||
</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> | ||
</parameters> | ||
</method> | ||
<method name="open_multiple_text_files_finish" c:identifier="gtk_file_dialog_open_multiple_text_files_finish" version="4.18" throws="1"> | ||
<doc xml:space="preserve">Finishes the [[email protected]] call.</doc> | ||
<return-value transfer-ownership="full" nullable="1"> | ||
<doc xml:space="preserve">the files that were selected, | ||
as a list model of [[email protected]]</doc> | ||
<type name="Gio.ListModel" c:type="GListModel*"/> | ||
</return-value> | ||
<parameters> | ||
<instance-parameter name="self" transfer-ownership="none"> | ||
<doc xml:space="preserve">a file dialog</doc> | ||
<type name="FileDialog" c:type="GtkFileDialog*"/> | ||
</instance-parameter> | ||
<parameter name="result" transfer-ownership="none"> | ||
<doc xml:space="preserve">the result</doc> | ||
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/> | ||
</parameter> | ||
<parameter name="encoding" direction="out" caller-allocates="0" transfer-ownership="none"> | ||
<doc xml:space="preserve">return location for the text encoding to use</doc> | ||
<type name="utf8" c:type="const char**"/> | ||
</parameter> | ||
</parameters> | ||
</method> | ||
<method name="open_text_file" c:identifier="gtk_file_dialog_open_text_file" version="4.18" glib:finish-func="open_text_file_finish"> | ||
<doc xml:space="preserve">Initiates a file selection operation by presenting a file chooser | ||
dialog to the user. | ||
|
@@ -36708,7 +36772,7 @@ be `NULL`.</doc> | |
<doc xml:space="preserve">a `GAsyncResult`</doc> | ||
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/> | ||
</parameter> | ||
<parameter name="encoding" direction="out" caller-allocates="0" transfer-ownership="full"> | ||
<parameter name="encoding" direction="out" caller-allocates="0" transfer-ownership="none"> | ||
<doc xml:space="preserve">return location for the text encoding to use</doc> | ||
<type name="utf8" c:type="const char**"/> | ||
</parameter> | ||
|
@@ -36825,11 +36889,11 @@ where the latter means to preserve existing line endings.</doc> | |
<doc xml:space="preserve">a `GAsyncResult`</doc> | ||
<type name="Gio.AsyncResult" c:type="GAsyncResult*"/> | ||
</parameter> | ||
<parameter name="encoding" direction="out" caller-allocates="0" transfer-ownership="full"> | ||
<parameter name="encoding" direction="out" caller-allocates="0" transfer-ownership="none"> | ||
<doc xml:space="preserve">return location for the text encoding to use</doc> | ||
<type name="utf8" c:type="const char**"/> | ||
</parameter> | ||
<parameter name="line_ending" direction="out" caller-allocates="0" transfer-ownership="full"> | ||
<parameter name="line_ending" direction="out" caller-allocates="0" transfer-ownership="none"> | ||
<doc xml:space="preserve">return location for the line endings to use</doc> | ||
<type name="utf8" c:type="const char**"/> | ||
</parameter> | ||
|
@@ -58943,7 +59007,7 @@ This macro is longer used by GTK.</doc> | |
</parameter> | ||
</parameters> | ||
</function-macro> | ||
<constant name="MICRO_VERSION" value="2" c:type="GTK_MICRO_VERSION"> | ||
<constant name="MICRO_VERSION" value="4" 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> | ||
|
@@ -82471,49 +82535,89 @@ is set to %FALSE.</doc> | |
<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’t use a `GtkGrid`. | ||
This is typically useful when you want a column of widgets to have | ||
the same size, but you can’t use a [[email protected]] or [[email protected]]. | ||
|
||
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 [[email protected]_mode]) determines whether | ||
this applies to the horizontal size, the vertical size, or both sizes. | ||
widget in the size group if they were not in the size group. The | ||
[mode][[email protected]_mode] of the size group 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. | ||
such a way that they get the size they request and not more. In | ||
particular it doesn't make a lot of sense to set | ||
[the expand flags][[email protected]_hexpand] on the widgets that | ||
are members of a size group. | ||
|
||
`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. | ||
the initial reference to the size group with | ||
[[email protected]]. 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 [[email protected]:width-chars] for instance. Widgets with | ||
static sizes as well as widgets that grow (such as ellipsizing text) need no | ||
such considerations. | ||
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 with mode | ||
[[email protected]] or [[email protected]], and | ||
the vertical size from the vertical requisition of all widgets that can be | ||
reached from the widget by a chain of size groups with mode | ||
[[email protected]] or [[email protected]]. | ||
|
||
# Size groups and trading height-for-width | ||
|
||
::: warning | ||
Generally, size groups don't interact well with widgets that | ||
trade height for width (or width for height), such as wrappable | ||
labels. Avoid using size groups with such widgets. | ||
|
||
A size group with mode [[email protected]] or | ||
[[email protected]] only consults non-contextual sizes | ||
of widgets other than the one being measured, since it has no | ||
knowledge of what size a widget will get allocated in the other | ||
orientation. This can lead to widgets in a group actually requesting | ||
different contextual sizes, contrary to the purpose of | ||
`GtkSizeGroup`. | ||
|
||
In contrast, a size group with mode [[email protected]] can | ||
properly propagate the available size in the opposite orientation | ||
when measuring widgets in the group, which results in consistent and | ||
accurate measurements. | ||
|
||
In case some mechanism other than a size group is already used to | ||
ensure that widgets in a group all get the same size in one | ||
orientation (for example, some common ancestor is known to allocate | ||
the same width to all its children), and the size group is only | ||
really needed to also make the widgets request the same size in the | ||
other orientation, it is beneficial to still set the group's mode to | ||
[[email protected]]. This lets the group assume and count | ||
on sizes of the widgets in the former orientation being the same, | ||
which enables it to propagate the available size as described above. | ||
|
||
# Alternatives to size groups | ||
|
||
Size groups have many limitations, such as only influencing size | ||
requests but not allocations, and poor height-for-width support. When | ||
possible, prefer using dedicated mechanisms that can properly ensure | ||
that the widgets get the same size. | ||
|
||
Various container widgets and layout managers support a homogeneous | ||
layout mode, where they will explicitly give the same size to their | ||
children (see [[email protected]:homogeneous]). Using homogeneous mode | ||
can also have large performance benefits compared to either the same | ||
container in non-homogeneous mode, or to size groups. | ||
|
||
[[email protected]] can be used to position widgets into rows and | ||
columns. Members of each column will have the same width among them; | ||
likewise, members of each row will have the same height. On top of | ||
that, the heights can be made equal between all rows with | ||
[[email protected]:row-homogeneous], and the widths can be made equal | ||
between all columns with [[email protected]:column-homogeneous]. | ||
|
||
# GtkSizeGroup as GtkBuildable | ||
|
||
|